Push CallBack on Ios 10

7 posts, 0 answers
  1. Arnaud
    Arnaud avatar
    18 posts
    Member since:
    Mar 2016

    Posted 28 Sep Link to this post

    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"
          //}

        };

  2. Arnaud
    Arnaud avatar
    18 posts
    Member since:
    Mar 2016

    Posted 28 Sep Link to this post

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

     

  3. Arnaud
    Arnaud avatar
    18 posts
    Member since:
    Mar 2016

    Posted 28 Sep Link to this post

    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

  4. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 29 Sep Link to this post

    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.
     
  5. Zdravko
    Zdravko avatar
    1 posts
    Member since:
    Feb 2015

    Posted 30 Sep Link to this post

    Hello,

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

    Regards,

    Zdravko

  6. Arnaud
    Arnaud avatar
    18 posts
    Member since:
    Mar 2016

    Posted 02 Oct Link to this post

    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

  7. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 04 Oct Link to this post

    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.
     
Back to Top