Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ios] Notification not appear in background mode #1312

Closed
xxstefanoxx opened this issue Jun 5, 2017 · 6 comments
Closed

[Ios] Notification not appear in background mode #1312

xxstefanoxx opened this issue Jun 5, 2017 · 6 comments
Labels

Comments

@xxstefanoxx
Copy link

WARNING: If you ignore this template, we'll ignore your issue.

Provide a general summary of the issue.

Your Environment

  • Plugin version: 0.8.5
  • Platform: IOS
  • OS version: 10.3.1
  • Device manufacturer / model: iphone 7
  • Cordova version (cordova -v): 7.0.1
  • Cordova platform version (cordova platform ls): ios 4.4.0
  • Plugin config

Expected Behavior

When app go to background, notification appear

Actual Behavior

Notification not fired

Steps to Reproduce

Reproduce this issue; include code to reproduce, if relevant

this.platform.ready().then(() => {    
        this.platform.pause.subscribe(() => {
            console.log("PAUSA")
            this.localNotifications.schedule({
              id: 1,
              text: 'Dispositivo in pausa',
              at: new Date(new Date().getTime() + 61000)
            });
        });

        this.platform.resume.subscribe(() => {
            console.log("RESUME")
            this.localNotifications.schedule({
              id: 2,
              text: 'Dispositivo non in pausa',
              at: new Date(new Date().getTime() + 61000)
            });
        });
    });

The pause and resume console.log appear correctly

Context

Show notification after 61 seconds

@rwillett
Copy link
Collaborator

rwillett commented Jun 5, 2017

This is ionic 2?

@xxstefanoxx
Copy link
Author

Yes it's Ionic 2

@rwillett
Copy link
Collaborator

rwillett commented Jun 5, 2017

There does appear to be issues with Ionic 2. We don't use Ionic 2 so I'm not sure what to say.

Are you using the ios10 branch, its not clear that you are to me.

Also the scheduling function should really be passed an array, even if only one object is passed in.

However there are other issues raised for ionic 2

#1301, #1287, #1219, #1186.

Somebody has reported that it worked with Ionic 2 Beta but not in Ionic 2 Release.

I think that Ionic 2 may simply not work very well with this plugin.

Rob

@xxstefanoxx
Copy link
Author

xxstefanoxx commented Jun 5, 2017

sorry it's ionic 3
"@ionic-native/camera": "^3.10.3", "@ionic-native/core": "3.10.2", "@ionic-native/local-notifications": "^3.12.1", "@ionic-native/splash-screen": "3.10.2", "@ionic-native/status-bar": "3.10.2", "@ionic/storage": "2.0.1",

@rwillett
Copy link
Collaborator

rwillett commented Jun 5, 2017

Thats really Ionic 2 with bells on.

My previous comments still stand though.

@katzer
Copy link
Owner

katzer commented Oct 31, 2017

Closing as its related to Ionic.

@katzer katzer closed this as completed Oct 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants