{ "id": "136721", "key": "TIMOB-17714", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-09-17T17:08:18.000+0000", "created": "2014-09-17T13:01:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios8" ], "versions": [ { "id": "15972", "description": "Release 3.4.0", "name": "Release 3.4.0", "archived": false, "released": true, "releaseDate": "2014-09-28" } ], "issuelinks": [ { "id": "41235", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "136078", "key": "TIMOB-17640", "fields": { "summary": "iOS8: Add isRegisteredForRemoteNotifications to determine whether the app is currently registered for remote 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": "High", "id": "2" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2015-05-25T22:05:29.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": "Running latest RC of 3.4 + 3.4.0.v20140916181713 SDK and XCode6\r\n\r\nBuilding with iOS8SDK with the following code:-\r\n\r\n{code}\r\nTi.Network.registerForPushNotifications({\r\n\t\ttypes : [Ti.App.iOS.NOTIFICATION_TYPE_BADGE, Ti.App.iOS.NOTIFICATION_TYPE_ALERT, Ti.App.iOS.NOTIFICATION_TYPE_SOUND],\r\n\t\tsuccess : onSuccess,\r\n\t\terror : deviceTokenError,\r\n\t\tcallback : receivePush\r\n\t});\r\n{code}\r\n\r\nworks and onSuccess is fired, a token is received - but the error :-\r\n\r\n\"Passing `types` to registerForPushNotifications is not supported on iOS 8 and greater. Use registerUserNotificationSettings to register notification types.\"\r\n\r\nis reported in the logs\r\n\r\nIf I use the recommended approach in the docs:-\r\n\r\n{code}\r\nTi.App.iOS.registerUserNotificationSettings({\r\n\t\ttypes : [Ti.App.iOS.NOTIFICATION_TYPE_BADGE, Ti.App.iOS.NOTIFICATION_TYPE_ALERT, Ti.App.iOS.NOTIFICATION_TYPE_SOUND],\r\n\t});\r\n\r\n\tTi.Network.registerForPushNotifications({\r\n\t\tsuccess : onSuccess,\r\n\t\terror : deviceTokenError,\r\n\t\tcallback : receivePush\r\n\t});\r\n{code}\r\n\r\nonSuccess is not called, no token received, push is not registered.\r\n", "attachment": [], "flagged": false, "summary": "iOS8: registerForPushNotifications events do not fire, no token returned", "creator": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "subtasks": [], "reporter": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "environment": null, "closedSprints": [ { "id": 126, "state": "closed", "name": "2018 Sprint 05 SDK", "startDate": "2018-02-25T19:38:08.926Z", "endDate": "2018-03-11T18:38:00.000Z", "completeDate": "2018-03-11T22:06:01.520Z", "originBoardId": 100 } ], "comment": { "comments": [ { "id": "324224", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~wluu] FYI. Can you investigate as well?", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-17T13:26:50.000+0000", "updated": "2014-09-17T13:26:50.000+0000" }, { "id": "324244", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Notes:\r\n\r\n# client built their own\r\n# so I'm just doing registerForPushNotifications which I guess goes to Apple\r\n# and get the device token\r\n# then fire the client's API to give them the token\r\n# been working fine in iOS7 and iOS8 if I use the old methods\r\n# If I change to the new way, doesn't work", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-17T15:42:09.000+0000", "updated": "2014-09-17T15:42:09.000+0000" }, { "id": "324254", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jkneen] in iOS 8 `registerForPushNotifications` will not be successful if user notifications for that app are not enabled.\r\n1. Go to Settings>Notifications>Your App and make sure that notifications are enabled\r\n2. When registering, make sure that you only call `registerForPushNotifications` after the user has opted to allow notifications from your app. This can be done by waiting for the `usernotificationsettings` event to fire before calling `registerForPushNotifications`. There is an example of this in the [ti.cloud example app|https://github.com/appcelerator-modules/ti.cloud/commit/e6c4b8b06806b1d16692f1b53bdf9f03375e7b08#diff-21e2d89e72434de8cdfd659ae14b9ae2R61].\r\n", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-17T16:07:48.000+0000", "updated": "2014-09-17T16:07:48.000+0000" }, { "id": "324256", "author": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "body": "Is all this + examples in the docs? Doesn't seem like the release notes cover all this.", "updateAuthor": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "created": "2014-09-17T16:12:14.000+0000", "updated": "2014-09-17T16:12:14.000+0000" }, { "id": "324264", "author": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "body": "Some really odd behaviour has been observed. I've got it working but here's what happened:-\r\n\r\n1. Using the code example from above, I'm doing the registernotification call and capturing the usernotificationsettings event, then calling registerForPush etc. \r\n2. This didn't work. No notifications entry was created on the phone, registerForPushNotifications never responds.\r\n3. I changed my code back to put types BACK into the registerForPushNotifications call (which I know I shouldn't need on iOS8)\r\n4. Reinstalling to device, and running the code, the app appeared in the settings > notifications section *however* it was off\r\n5. I turned it back on, reverted the code to NOT include the types in the RFP call, and it all worked fine.\r\n\r\nThe odd thing is, this app was previously authorised on the device, and in the normal notifications settings - it had been authorised prior to the iOS8 upgrade, so not sure if that did something.\r\n\r\nThe only issue now is the docs don't reflect this process as I've done it. It's not clear you have to trap the event, chain the two together.", "updateAuthor": { "name": "jkneen", "key": "jkneen", "displayName": "Jason Kneen", "active": false, "timeZone": "Africa/Ceuta" }, "created": "2014-09-17T16:46:15.000+0000", "updated": "2014-09-17T16:46:15.000+0000" }, { "id": "324271", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Docs are being updated. Resolving.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-17T17:08:18.000+0000", "updated": "2014-09-17T17:08:18.000+0000" }, { "id": "324467", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "I currently have the same issue. On iOS8 and with 3.4.0RC (and also with nightly build), somehow the types are not registered with Apple. Reinstalling does not help and the workaround from [~jkneen] neither. No way I can get the types registered with Apple.\r\n\r\nBecause types is not registered, there is also no 'Notifications' page in App Settings en can not dis- and enable them.\r\n\r\nI will keep investigating and if I find a cause, I will report it here. But note that Jason and Ingo are not the only ones having this issue.", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-18T14:21:02.000+0000", "updated": "2014-09-18T14:21:02.000+0000" }, { "id": "324470", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "I found the cause of [~jkneen]'s original issue and mine as well. The types have been renamed from Ti.App.iOS.NOTIFICATION* to Ti.App.iOS.USER_NOTIFICATION*", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-18T14:29:10.000+0000", "updated": "2014-09-18T14:29:10.000+0000" }, { "id": "353437", "author": { "name": "chadstachowicz", "key": "chadstachowicz", "displayName": "Chad Stachowicz", "active": true, "timeZone": "America/New_York" }, "body": "What is the fix to this, this is happening to my on iOS8 and it worked fine on appcelerator 3.3 and iOS7? Is it just expected push notification will never work again on iOS? Should we be looking at other platforms if we want to use push? Please help, this complaint is all over the google and jira...", "updateAuthor": { "name": "chadstachowicz", "key": "chadstachowicz", "displayName": "Chad Stachowicz", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-25T20:51:37.000+0000", "updated": "2015-05-25T20:51:37.000+0000" }, { "id": "353441", "author": { "name": "chadstachowicz", "key": "chadstachowicz", "displayName": "Chad Stachowicz", "active": true, "timeZone": "America/New_York" }, "updateAuthor": { "name": "chadstachowicz", "key": "chadstachowicz", "displayName": "Chad Stachowicz", "active": true, "timeZone": "America/New_York" }, "created": "2015-05-25T22:05:29.000+0000", "updated": "2015-05-25T22:05:29.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }