{ "id": "172244", "key": "TIMOB-26399", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20275", "name": "Release 7.4.1", "archived": false, "released": true, "releaseDate": "2018-10-18" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-09-28T14:25:09.000+0000", "created": "2018-09-19T17:18:50.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios", "parity" ], "versions": [], "issuelinks": [ { "id": "56903", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "172344", "key": "TIMOB-26437", "fields": { "summary": "Ti.Network.registerForPushNotifications callback not working when application resume.", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "56792", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172159", "key": "TIMOB-26349", "fields": { "summary": "iOS 10: A couple of issues related to remote push-notifications", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-10-05T04:00:30.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Push notification support in SDK 7.4.0 is broken (since 7.3.1 with the move to UNUserNotificationCenter delegate) and has a number of pre existing issues.\r\n- no callbacks occur for remote notifications (regression)\r\n- all incomming notifications fire a pop up notification when app is in foreground (regression)\r\n- notification actions do not fire when interacting with remote notifications (regression)\r\n- actions do not process in the background (pre-existing)\r\n- no user text input is passed in the callback (regression)\r\n- silent notifications fire on the dedicated silent event AND the normal (pre-existing)\r\n- app can crash if a custom sound is specified (also reported via AC-5901)", "attachment": [], "flagged": false, "summary": "iOS: Several issues with push-notifications since 7.3.x", "creator": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TI SDK 7.4.X", "comment": { "comments": [ { "id": "441707", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have been working with @hknoechel on these issues and prepared a PR for the 7.4.X branch which addresses all of the above\r\n", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-19T17:20:54.000+0000", "updated": "2018-09-19T17:20:54.000+0000" }, { "id": "441712", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for this PR [~miniman42], huge work! I will take care of getting a test-plan ready for this and handle the remaining linting issues. Can you please do me a favor and also open a pull-request against master? This is the usual procedure - approving master first and merging to the backported branch afterwards. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-19T18:29:45.000+0000", "updated": "2018-09-19T18:29:45.000+0000" }, { "id": "441722", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Added master PR :)\r\n\r\n- master: https://github.com/appcelerator/titanium_mobile/pull/10330\r\n- 7_4_X: https://github.com/appcelerator/titanium_mobile/pull/10328", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-19T20:00:14.000+0000", "updated": "2018-09-20T10:42:31.000+0000" }, { "id": "441838", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": " I have an issue when the app crashes on trying to register to push notification.Does this PR covers that case too ?\r\nThank you.", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T11:36:35.000+0000", "updated": "2018-09-20T11:36:35.000+0000" }, { "id": "441839", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rborn] you can try the latest 7.4.1 with {{ti sdk install -b 7_4_X}} !", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T12:10:41.000+0000", "updated": "2018-09-20T12:10:41.000+0000" }, { "id": "441848", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~hknoechel] same issue. 7.2.0 works just fine\r\n\r\n{code}\r\n\r\n[ERROR] Script Error {\r\n[ERROR] column = 24;\r\n[ERROR] line = 18;\r\n[ERROR] message = \"-[TiApp setRemoteNotificationDelegate:]: unrecognized selector sent to instance 0x103704770\";\r\n[ERROR] nativeStack = \"3 CoreFoundation 0x000000018d7ed810 + 1412\\n4 CoreFoundation 0x000000018d7ef4bc _CF_forwarding_prep_0 + 92\\n5 Motorsport 0x0000000102ea5890 Motorsport + 4266128\\n6 CoreFoundation 0x000000018d7ef660 + 144\\n7 CoreFoundation 0x000000018d6cb980 + 292\\n8 Motorsport 0x0000000102ab8810 Motorsport + 149520\\n9 Motorsport 0x0000000102ab6dd8 Motorsport + 142808\\n10 JavaScriptCore 0x0000000194b15ddc + 348\\n11 JavaScriptCore 0x00000001952002b8 + 352\\n12 JavaScriptCore 0x0000000194aed120 + 29952\\n13 JavaScriptCore 0x0000000194aed134 + 29972\\n14 JavaScriptCore 0x0000000194aed134 + 29972\\n15 JavaScriptCore 0x0000000194aed134 + 29972\\n16 JavaScriptCore 0x0000000194ae5a1c + 300\\n17 JavaScriptCore 0x000000019515d3f0 + 424\\n18 JavaScriptCore 0x0000000195314068 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 172\\n19 JavaScriptCore 0x0000000194b1b284 JSObjectCallAsFunction + 368\";\r\n[ERROR] sourceURL = \"file:///var/containers/Bundle/Application/832BDBA5-DFB5-4C21-9B80-8722D40DFD5B/Motorsport.app/pushHelper.js\";\r\n[ERROR] stack = \" at [native code]\\n at registerForPush(/pushHelper.js:18:24)\\n at tryToRegister(/pushHelper.js:6:16)\\n at onClick(/alloy/controllers/popups/pushSubscriptionsPopupWindow.js:19:67)\\n at onClick(/alloy/controllers/popups/popupButton.js:16:31)\";\r\n[ERROR] } \r\n{code}\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T14:16:20.000+0000", "updated": "2018-09-20T14:16:20.000+0000" }, { "id": "441849", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "I've tried the merged code and found a problem I was also encountering when I was doing my own troubleshooting.\r\nWhen attempting to forward the delegate call from UNUserNotificationCenter to the application delegate, an invalid selector exceptios is thrown and the app quits. The pushnotification callbacks are executed, though.\r\n\r\n{code:java}\r\n- (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler\r\n{\r\n // For backwards compatibility with iOS < 10, we do not show notifications in-app, but make it configurable\r\n BOOL showInForeground = [TiUtils boolValue:notification.request.content.userInfo[@\"showInForeground\"] def:NO];\r\n if (showInForeground) {\r\n completionHandler(UNNotificationPresentationOptionBadge | UNNotificationPresentationOptionAlert | UNNotificationPresentationOptionSound);\r\n } else {\r\n //next call causes the app to crash\r\n [self application:[UIApplication sharedApplication] didReceiveRemoteNotification:notification.request.content.userInfo];\r\n completionHandler(UNNotificationPresentationOptionNone);\r\n }\r\n}\r\n{code}\r\n\r\n\r\n{noformat}\r\n[ERROR] \b\b \bThe application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] \b\b \bReason:\r\n[ERROR] \b\b \b-[NSNull intValue]: unrecognized selector sent to instance 0x1bf5019a0\r\n[ERROR] \b\b \bStack trace:\r\n[ERROR] \b\b \b0 CoreFoundation 0x000000018effbf10 + 252\r\n[ERROR] \b\b \b1 libobjc.A.dylib 0x000000018e1c9a40 objc_exception_throw + 56\r\n[ERROR] \b\b \b2 CoreFoundation 0x000000018ef13154 + 0\r\n[ERROR] \b\b \b3 CoreFoundation 0x000000018f001810 + 1412\r\n[ERROR] \b\b \b4 CoreFoundation 0x000000018f0034bc _CF_forwarding_prep_0 + 92\r\n[ERROR] \b\b \b5 iNZDR 0x00000001029e6c8c iNZDR + 3009676\r\n[ERROR] \b\b \b6 iNZDR 0x00000001029cd1bc iNZDR + 2904508\r\n[ERROR] \b\b \b7 iNZDR 0x00000001029bc6b0 iNZDR + 2836144\r\n[ERROR] \b\b \b8 iNZDR 0x00000001028a5cb8 iNZDR + 1694904\r\n[ERROR] \b\b \b9 iNZDR 0x00000001029b3920 iNZDR + 2799904\r\n[ERROR] \b\b \b10 UIKitCore 0x00000001bba15bb0 + 3176\r\n[ERROR] \b\b \b11 UIKitCore 0x00000001bc1e45a0 + 680\r\n[ERROR] \b\b \b12 UIKitCore 0x00000001bc1e42a8 + 432\r\n[ERROR] \b\b \b13 UIKitCore 0x00000001bc227844 + 220\r\n[ERROR] \b\b \b14 UIKitCore 0x00000001bc228334 _performActionsWithDelayForTransitionContext + 112\r\n[ERROR] \b\b \b15 UIKitCore 0x00000001bc2276fc + 248\r\n[ERROR] \b\b \b16 UIKitCore 0x00000001bc220a10 + 368\r\n[ERROR] \b\b \b17 UIKitCore 0x00000001bba2d940 + 468\r\n[ERROR] \b\b \b18 FrontBoardServices 0x0000000191a2c5a0 + 228\r\n[ERROR] \b\b \b19 libdispatch.dylib 0x000000018ea34484 + 16\r\n[ERROR] \b\b \b20 libdispatch.dylib 0x000000018e9d7e58 + 224\r\n[ERROR] \b\b \b21 FrontBoardServices 0x0000000191a6a640 + 40\r\n[ERROR] \b\b \b22 FrontBoardServices 0x0000000191a6a2cc + 416\r\n[ERROR] \b\b \b23 FrontBoardServices 0x0000000191a6a8e8 + 56\r\n[ERROR] \b\b \b24 CoreFoundation 0x000000018ef8a5b8 + 24\r\n[ERROR] \b\b \b25 CoreFoundation 0x000000018ef8a538 + 88\r\n[ERROR] \b\b \b26 CoreFoundation 0x000000018ef89e1c + 176\r\n[ERROR] \b\b \b27 CoreFoundation 0x000000018ef84ce8 + 1040\r\n[ERROR] \b\b \b28 CoreFoundation 0x000000018ef845b8 CFRunLoopRunSpecific + 436\r\n[ERROR] \b\b \b29 GraphicsServices 0x00000001911f8584 GSEventRunModal + 100\r\n[ERROR] \b\b \b30 UIKitCore 0x00000001bb9ff558 UIApplicationMain + 212\r\n[ERROR] \b\b \b31 iNZDR 0x000000010270d8b8 iNZDR + 22712\r\n[ERROR] \b\b \b32 libdyld.dylib 0x000000018ea44b94 + 4\r\n{noformat}", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T14:43:34.000+0000", "updated": "2018-09-20T14:44:20.000+0000" }, { "id": "441850", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "is this from a local notification or a remote?", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-20T14:47:26.000+0000", "updated": "2018-09-20T14:47:26.000+0000" }, { "id": "441851", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "Remote", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T14:48:35.000+0000", "updated": "2018-09-20T14:48:35.000+0000" }, { "id": "441854", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "False alarm. The issue seems to be in the payload. Thanks Greg for your help!", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T15:27:34.000+0000", "updated": "2018-09-20T15:27:34.000+0000" }, { "id": "441857", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "It was not the payload. I had the Pushwoosh module being loaded in tiapp.xml , and it looks like it was swizzling the ``` - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo ``` from within the framework, and crashing when receiving unexpected data", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-20T16:18:44.000+0000", "updated": "2018-09-20T16:18:54.000+0000" }, { "id": "441874", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rlustemberg] Thank you for your insights. \r\nIn my case I use https://github.com/arleyandrada/PushClient\r\n\r\n[~hknoechel] could you have a look maybe to see what's changed since 7.2.0.GA which works?\r\nI think it crashes because of the change here: https://github.com/appcelerator/titanium_mobile/commit/62e42b5affb99be545e7b0f7d7d599f400fcf49a#diff-1a9ce8f0d125c49bb4d2b29bc9057f89L257 - maybe you could add an alias to that function or something so the not-updated modules not to crash?\r\n\r\n\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-21T08:20:34.000+0000", "updated": "2018-09-21T08:20:34.000+0000" }, { "id": "441878", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Thanks for the insight! I'd prefer to update the module to keep the SDK more clean, is that okay for you? Happy to provide the PR for that asap.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-21T09:18:03.000+0000", "updated": "2018-09-21T09:18:03.000+0000" }, { "id": "441880", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "I think you just break all the modules that use `setRemoteNotificationDelegate` and won't be updated ever, not only the one I use.\r\nI suppose you are aware that many modules are not and won't be updated in the future so the (few) devs still using Titanium won't be able to update to the newer versions.\r\n\r\njust my 2c", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-21T09:23:52.000+0000", "updated": "2018-09-21T09:23:52.000+0000" }, { "id": "442059", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "At iOS SDK 7.4.1 notification do not work properly when the app is running on background.\r\nYou get the notifcation but when you open it a black page appears instead of opening normally.\r\nWhen the app is not running and its the first time that you receive a notification and you open it, it works properly.", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T11:48:21.000+0000", "updated": "2018-09-26T11:48:21.000+0000" }, { "id": "442060", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hmm - are you tapping a notification or a notification action?", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T11:58:15.000+0000", "updated": "2018-09-26T11:58:15.000+0000" }, { "id": "442062", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "notification", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T12:31:20.000+0000", "updated": "2018-09-26T12:31:20.000+0000" }, { "id": "442063", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Is this a local or a remote notification? I have tested locally and tapping remote notification with app running and not running is working fine for me. Please provide more details.", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T12:39:45.000+0000", "updated": "2018-09-26T12:39:45.000+0000" }, { "id": "442073", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Its a remote notification. On SDK 7.4.0 , you always get a notification but when you open it doesnt take you anywhere. On SDK 7.4.1 you receive it and when you open it inside the app crashes or Opens a black screen.\r\n\r\n\r\n{code:java}\r\nvar deviceToken = null;\r\n\r\nTi.App.iOS.registerUserNotificationSettings({\r\n\ttypes: [\r\n\t\tTi.App.iOS.USER_NOTIFICATION_TYPE_ALERT,\r\n \t\tTi.App.iOS.USER_NOTIFICATION_TYPE_BADGE,\r\n \tTi.App.iOS.USER_NOTIFICATION_TYPE_SOUND\r\n \t]\r\n});\r\n\t\r\nTi.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {\r\n\t\r\n Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush); \r\n \r\n Ti.Network.registerForPushNotifications({\r\n success:function(e) {\r\n\t\t\t\r\n\t\t},\r\n error:function(e) {\r\n\t\t\t\r\n\t\t},\r\n callback:function(e) {\r\n\t\r\n\t\t\tif (e.inBackground == 1) {\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n });\r\n \r\n});\r\n{code}\r\n", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T15:24:49.000+0000", "updated": "2018-09-26T15:24:49.000+0000" }, { "id": "442082", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I will take a look shortly, 7.4.0 doesn't actually do anything with the notification (ie no callback to the js handler), it simple presents the notification - this all changed in 7.3.1 with the new notification delegate in the SDK.\r\n\r\n7.4.1 enables the callback to the JS to maintain parity with the existing behaviour in 7.3.0 and below.\r\n\r\nIs your app actually \"running\"?- i.e actually executing - in background mode, or is simply that it was launched and then backgrounded? when you tap the notification? Just want to understand what is going on for you.\r\n\r\nThe only time I can get a black screen is if I tap a background mode notification action AND don’t call the completion handler when the background JS is finished. If you open the app within 30 secs of tapping it, the app will be black. if you wait 30 secs the app will be fine. This is because there is a protection in the SDK to ensure the completion handler is called before the background processing execution time limit runs out (~30secs) if a JS dev forgets to call it.\r\n\r\nNote: you need to have the correct background mode for this to be enabled\r\n```\r\n UIBackgroundModes\r\n \r\n remote-notification\r\n \r\n```\r\n", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-26T18:16:41.000+0000", "updated": "2018-09-26T18:19:34.000+0000" }, { "id": "442096", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I once used notification action. I have removed it on SDK 7.4.0 as I was no longer using it. I have only left the following:\r\n\r\n{code:java}\r\nUIBackgroundModes\r\n\r\nremote-notification\r\n\r\n{code}\r\n\r\nAt SDK 7.4.0 was working properly. However, on SDK 7.4.1 a blank screen appeared. I have then removed it from 7.4.1 and work properly.\r\n\r\nIt remains as a bug in the following situations:\r\n\r\ncallback of registerForPushNotifications\r\n\r\n1) When the app is running then its OKAY\r\n2) When the app is closed and opens for the first time its OKAY\r\n3) When the app is open but you use another app, you receive the notification but callback DOES NOT WORK.", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T07:16:12.000+0000", "updated": "2018-09-27T07:16:12.000+0000" }, { "id": "442098", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Andreas, I'm not sure what you expect to happen, but in situation (3) the callback cannot occur as your app is not in the foreground and will always be sent to the notification center. The only way around this is to use silent pushes (setting content-available in the payload...), which, if you have the remote-notification background mode, will \"wake\" your app and trigger the \"silent\" event (e.g Ti.App.iOS.addEventListener('silentpush', onSilent) - just don't forget to call the background handler when your done or you'll get more black screens... (Ti.App.iOS.endBackgroundHandler(e.handlerId)). Please also note the silent push does not always get delivered instantly and is subject to the iOS's power mgmt and rate limiting. \r\n\r\nPreviously there was a bug where silent pushes were delivered to the normal notification callback (in addition to the silent callback). This was incorrect behaviour and was fixed in this update.", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T07:54:24.000+0000", "updated": "2018-09-27T07:54:24.000+0000" }, { "id": "442113", "author": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes but when i have a notification in notification center and i open it, i callback should fire when the app was in background.\r\n\r\nThats what happened before sdk 7.4.0. Now that does not happen as i describe it on the point 3) above\r\n3) When the app is open but you use another app, you receive the notification but callback DOES NOT WORK.\r\n\r\n...\r\n\r\ninBackground : Boolean\r\nBoolean indicating if notification was received while app was in background. This property became available in Titanium Mobile 3.1.0 for iOS.", "updateAuthor": { "name": "andreas.pingas", "key": "andreas.pingas", "displayName": "Andreas Pingas", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T11:23:41.000+0000", "updated": "2018-09-27T11:23:41.000+0000" }, { "id": "442114", "author": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "body": "Andreas, As a workaround, you can listen on remotenotificationaction. That event is being fired after the app resumes when you click on the notification from the notification center", "updateAuthor": { "name": "rlustemberg", "key": "rlustemberg", "displayName": "Richard Lustemberg", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-27T11:30:51.000+0000", "updated": "2018-09-27T11:30:51.000+0000" }, { "id": "442115", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Andreas, so in (3) you are tapping the notification - that was not clear to me. Now I understand that you are indicating that the notification received while app is backgrounded and is subsequently tapped is not triggering the callback on resume of the app - I'll investigate. \r\n\r\nThanks Richard for the workaround - that action handler should probably be sanitised to only callback when an action identifier is present. ", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T12:45:43.000+0000", "updated": "2018-09-27T12:45:43.000+0000" }, { "id": "442119", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi again. I'm putting a PR together atm to trigger the remote notification callback as opposed to the remotenotificationaction callback for the case when the action provided is a UNNotificationDefaultActionIdentifier (this is the presented action now provided when a user taps a notification in iOS). This removes the need for Richards workaround and ensures the completion callback is called in an orderly manner.", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T15:23:54.000+0000", "updated": "2018-09-27T15:23:54.000+0000" }, { "id": "442121", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This commit: https://github.com/appcelerator/titanium_mobile/pull/10354/commits/5cf0b1c0a963929dfeea00fce530361baea28f21\r\nMaster PR: https://github.com/appcelerator/titanium_mobile/pull/10353\r\n", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T16:23:48.000+0000", "updated": "2018-09-27T16:23:48.000+0000" }, { "id": "442122", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Backport 7.4.x https://github.com/appcelerator/titanium_mobile/pull/10355", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T16:36:21.000+0000", "updated": "2018-09-27T16:36:21.000+0000" }, { "id": "442123", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Reopening to include one more fix to make notifications less error-prone.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-27T17:04:58.000+0000", "updated": "2018-09-27T17:04:58.000+0000" }, { "id": "442132", "author": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Identified a bug in relation to ios11 category registration (using: Ti.App.iOS.createUserNotificationCategory) that causes Ti.App.iOS.registerUserNotificationSettings to fail if categories are provided.\r\nFixed in the following PR's:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/10356 (Master)\r\nhttps://github.com/appcelerator/titanium_mobile/pull/10357 (7_4_X)", "updateAuthor": { "name": "miniman42", "key": "miniman42", "displayName": "Greg", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2018-09-27T21:12:15.000+0000", "updated": "2018-09-27T21:12:15.000+0000" }, { "id": "442165", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified changes included in SDK 7.4.1.v20180928073117 & 7.5.0.v20180928064200. Ran the Push Notification test apps and sample code without issue.", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-09-28T16:50:39.000+0000", "updated": "2018-09-28T16:50:39.000+0000" } ], "maxResults": 31, "total": 31, "startAt": 0 } } }