Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2012-06-01T12:49:03Z by SystemAdmin
SystemAdmin
SystemAdmin
570 Posts
ACCEPTED ANSWER

Pinned topic [Solved] Push Notification on iOS

‏2012-05-24T17:14:59Z |
I have the certificate available in the root of my app. When I call subscribe, the xCode console displays:

2012-05-24 13:14:14.941 FPL5423:707 ERROR Can't subscribe, notification token is not updated on the server
Server logs show nothing.

Any help troubleshooting this?

Thanks
  • IdanAdar
    IdanAdar
    288 Posts
    ACCEPTED ANSWER

    Re: [Solved] Push Notification on iOS

    ‏2012-05-24T17:43:16Z  in response to SystemAdmin
    Are you sure the certificate is valid? Have you followed the guidlines in the training module? What is your Worklight Server and Studio version?
  • SystemAdmin
    SystemAdmin
    570 Posts
    ACCEPTED ANSWER

    Re: [Solved] Push Notification on iOS

    ‏2012-05-24T17:47:43Z  in response to SystemAdmin
    Ok, I get a bit farther now, I added the following to the Authenticaiton Config:

    <loginExtension class="com.worklight.integration.notification.NotificationSubscriptionLoginExtension"/>

    Which I do not see documented anywhere.

    I get an error that I cannot get device ID from Mobile Device.
  • IdanAdar
    IdanAdar
    288 Posts
    ACCEPTED ANSWER

    Re: [Solved] Push Notification on iOS

    ‏2012-05-24T17:57:53Z  in response to SystemAdmin
    For us to be able to help you with issues you come across, it'd help us if you answer the questions above...

    Further more, for Push Notifications, as it is a high level feature, we advise to firstly follow the training module and then try to create your own application. The training module can be found here: http://worklight.com/download/get-started/4.2.1/module-21.
  • SystemAdmin
    SystemAdmin
    570 Posts
    ACCEPTED ANSWER

    Re: [Solved] Push Notification on iOS

    ‏2012-05-25T15:20:14Z  in response to SystemAdmin
    Worklight Version: WorklightConfiguration Build Version: 4.2.2.1283
    MAC

    I have successfully gotten the subscription working.

    The Notification Deck you pointed me to does not contain this
    <loginExtension class="com.worklight.integration.notification.NotificationSubscriptionLoginExtension"/>

    Also, I need to manually set the Codgin Signing Identity in the XCode project.
    I am not having an issue with sending the notification from the Polling adapter. Even though I successfully subscribe for the User, when I call:

    
    var userSubscription = WL.Server.getUserNotificationSubscription(
    'FPLDataServices.MyOutages', data.user);
    


    It returns Null.

    I have attached my adapter. Below is the text from my Worklight Console which displays the successful subscribe handler being called.

    
    09:48:33,308 DEBUG [developer] >> deviceSubscribeFunc 09:48:33,308 DEBUG [developer] 
    { 
    "delegate": 
    "com.worklight.integration.notification.UserSubscription@1d69a562", 
    "state": 
    {
    }, 
    "userId": 
    "roly" 
    } 09:48:33,309 DEBUG [developer] 
    { 
    "alias": 
    "MyOutages", 
    "applicationId": 
    "FPL-iphone-1.0", 
    "device": 
    "4/FxBudWMB4nUebuU8VOhP92H6Q=", 
    "options": 
    {
    }, 
    "platform": 
    "Apple", 
    "token": 
    "ff4f8e71027d220f49ac811a77743ab1b450c00dbc2ba2f913a07c5acae7f879", 
    "userAgent": 
    "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206" 
    } 09:48:35,694 DEBUG [developer] Getting Data 09:48:35,695 DEBUG [developer] FPLDataServices.getOutages(): 09:48:35,695 DEBUG [developer] Getting Subscription 
    
    for roly 09:48:35,697 DEBUG [developer] Subscription called 09:48:35,697 DEBUG [developer] No Subscription 
    
    for roly
    


    Roland Barcia
    IBM Distinguished Engineer
    ISSW CTO for Mobile and WebSphere Application Infrastructure
  • SystemAdmin
    SystemAdmin
    570 Posts
    ACCEPTED ANSWER

    Re: [Solved] Push Notification on iOS

    ‏2012-05-30T19:05:36Z  in response to SystemAdmin
    Any thoughts on this?
  • SystemAdmin
    SystemAdmin
    570 Posts
    ACCEPTED ANSWER

    Re: [Solved] Push Notification on iOS

    ‏2012-06-01T12:49:03Z  in response to SystemAdmin
    Hi rbarcia,

    You mentioned that you finally got past the following issue:

    2012-05-24 13:14:14.941 FPL5423:707 ERROR Can't subscribe, notification token is not updated on the server.

    Can you please take a quick look at the steps I've taken to get a certificate and sign my code with it and tell me if I'm doing something wrong or missed out on anything.

    Any help from anyone whose done this successfully would be greatly appreciate.