This is a migrated thread and some comments may be shown as answers.

Push CallBack on Ios 10

9 Answers 76 Views
Push Notifications
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Arnaud
Top achievements
Rank 1
Arnaud asked on 28 Sep 2016, 10:14 AM

Hello,

I'm  currently developing push notification for our app and it seems that the notification callback on Ios 10 is not fired when the app is in background.

To be clear, the callback is correctly fired when the app is in foreground or completely close. When the app is started and send in background (home button) the callback seems not fired when the user tap the notification and the app is bring back in foreground.

Can you confirm the issue? What can I do to solve it?

Thank you very much

 

 

var pushSettings = {
      iOS: {
        badge: true,
        sound: true,
        alert: true,
        clearBadge: false
      },
      android: {
        //projectNumber: ...
      },
      //wp8: {
      //  channelName: 'EverlivePushChannel'
      //},
      notificationCallbackIOS: function (e) {
       
        console.log(e)
        if (e.foreground=="1"){
          console.log('foreground notification')
        }
        else{

console.log('foreground notification')

        }

      },
      notificationCallbackAndroid: function (e) {
        // logic for handling push in Android
        displayNotifBanner();
        
        
      },
      //notificationCallbackWP8: function (e) {
      //  // logic for handling push in Windows Phone. Not available in NativeScript.
      //},
      //customParameters: {
      //  myParameter1: "MyValue1",
      //  myParameter2: "MyValue2"
      //}

    };

9 Answers, 1 is accepted

Sort by
0
Arnaud
Top achievements
Rank 1
answered on 28 Sep 2016, 10:16 AM

By the way, I saw that your plugin is based on the phonegap PushPlugin which is no longer maintained. Can this pose any issue?

 

0
Arnaud
Top achievements
Rank 1
answered on 28 Sep 2016, 10:17 AM

By the way, I saw that the telerik push plugin is based on the phonegap PushPlugin which is no longer maintained. Can this pose some issue?

 

Thank you

0
Anton Dobrev
Telerik team
answered on 29 Sep 2016, 02:32 PM
Hello Arnaut,

You are correct, on iOS 10, the specific callback called when the app is launched from the notification is used differently. We are aware of the issue and we will think of the best way to address it.

In the meantime you may choose to use the development version of the plugin I created in this branch and which should be fixing the issue on iOS 10 without any further development from your side.

If you find it suitable to test with this branch until the official fix is released in the Marketplace:

1. Open your project properties and disable the integrated plugin from the Marketplace and Save
2. Head to the repo and download the ZIP of the branch
3. Import it following the procedure from here


Back in the days the Telerik push plugin was a fork of the other repo as you properly observed. Both forks long ago diverged, however, the Telerik plugin was and is independently maintained and incorporates a lot of new features.

Let me know should you have further questions.

Regards,
Anton Dobrev
Telerik by Progress
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Zdravko
Top achievements
Rank 1
answered on 30 Sep 2016, 01:36 PM

Hello,

Have anyone tried and tested the development version of the plugin proposed by Anton Dobrev? 

Regards,

Zdravko

0
Arnaud
Top achievements
Rank 1
answered on 02 Oct 2016, 05:43 PM

Hello,

I'll test the development version of the plugin by the end of this week and let you know about the results.

Best

Arnaud

0
Anton Dobrev
Telerik team
answered on 04 Oct 2016, 01:54 PM
Hi,

Just to specify, tested the dev version in the following environment:

- Telerik Platform
- Cordova 4 in AppBuilder (also tested with 5.0.2)
- iOS 9 and iOS 10 devices

Let me know should you have further questions or considerations.


Regards,
Anton Dobrev
Telerik by Progress
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Arnaud
Top achievements
Rank 1
answered on 28 Apr 2017, 01:40 PM

Hello,

We are planning a release next week. The branch provided here is indeed working as expected on ios 10.

However, we observed that this has not been commited to the main repository, is that correct?

Problem occurs when trying to update all the plugins which reverted the Telerik push plugin to the released git version rather than this branch...

Thank you for your input

0
Accepted
Anton Dobrev
Telerik team
answered on 02 May 2017, 02:45 PM
@Arnaut

Thanks for the follow up. 

To be honest, the plugin is not updated with the branch with the supposed fix, because the issue was not reproducible consistently and according to my experience it was more related to the behavior specific for the first version of iOS 10 and is some specific cases which were not reproducible after that (and even at the time of performing the fix). 

Even now I tested thoroughly with iOS 10.1.1 and 10.3.1. devices, Cordova 6.4 and plugin version 3.2.0 and the app performs as expected. More on this in the documentation here

Let me know if this answers your questions and works for you. 

Regards,
Anton Dobrev
Telerik by Progress
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
0
Arnaud
Top achievements
Rank 1
answered on 03 May 2017, 07:36 AM

In fact, you are right.. sorry for my mistake.

I'm using cordova 6.5.0. I totally removed the push plugin, removed the ios platform, reinstall the plugin using the cordova cli (back to 3.2.0) and rebuild the ios app... Now everything is working as expected.

Thanks for your help.

Tags
Push Notifications
Asked by
Arnaud
Top achievements
Rank 1
Answers by
Arnaud
Top achievements
Rank 1
Anton Dobrev
Telerik team
Zdravko
Top achievements
Rank 1
Share this question
or