Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15785] iOS: Push Notifications callback not being fired

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-11-22T00:29:03.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 24, 2013 Sprint 24 API, Release 3.2.0
ComponentsiOS
Labelscallback, critical, notifications, push, triage
ReporterEric Wieber
AssigneeSabil Rahim
Created2013-11-18T21:20:10.000+0000
Updated2013-11-26T23:28:27.000+0000

Description

Apps using Ti SDK 3.2.0 master are not receiving the callback event in registerForPushNotifications when the app is open. This means the app cannot present any information from a push notification while the app is open. note: I do NOT use ti.cloud - I have my own APN server which works fine. I am not using Alloy. Notifications are correctly received when the app is closed/paused. Should be easy enough to confirm without a specific test case. #urgent

Comments

  1. kosso 2013-11-19

    Is it possible this is related to the old deprecation warning about accessing the top-level APS key From TiApp.m
       DebugLog(@"[WARN] Accessing APS keys from toplevel of notification is deprecated");
       
  2. kosso 2013-11-19

    There's definitely something seriously wrong with Push Notifications and Ti SDK 3.2.0.x on iOS. When the app is open, nothing fires at all when receiving a push notification. On closing the app, then firing off a push notification from my server, it arrives fine, but if the app is launched from that notification and resumes, there is also no indication of the notification. Simply logging the success callback event and viewing the xCode console log shows nothing is triggered. (And also show that it does on 3.1.x)
  3. kosso 2013-11-19

    Another update on this: Commenting out the ...
       #pragma mark Remote Notifications iOS 7 
       Delegate callback for Silent Remote Notification.
       
    ... didReceiveRemoteNotification handler section in TiApp.m stops this issue happening. So, is this broken? Or is there some extra documentation I haven't seen yet most likely regarding iOS7's "silent remote notifications". references : https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html Thanks.
  4. Eric Wieber 2013-11-21

    Hi Kosso, We were able to reproduce this error and have escalated the ticket. It is an SDK bug and we are investigating solutions. Thank you for identifying this issue and for bringing it to our attention!
  5. Sabil Rahim 2013-11-22

    master PR: https://github.com/appcelerator/titanium_mobile/pull/5008
  6. kosso 2013-11-22

    phew. good work people! :)
  7. Eric Wieber 2013-11-26

    Fix verified using iPhone 5 7.0.3. Was able to subscribe to and receive push notifications. Callbacks were fired.

JSON Source