{ "id": "174765", "key": "AC-6496", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": null, "resolutiondate": null, "created": "2020-02-26T10:04:25.000+0000", "labels": [ "critical", "ios", "pushnotification" ], "versions": [ { "id": "17038", "name": "Appcelerator Studio 4.5.0", "archived": false, "released": false } ], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-06-18T14:25:56.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14552", "name": "Appcelerator CLI", "description": "Please enter tickets related to Tooling and the CLI here" }, { "id": "14551", "name": "Studio", "description": "Please enter tickets related to Titanium Studio here." } ], "description": "SDK 8.3.1\r\n\r\nI was working on an app with push notification using Firebase module.\r\nSuddenly during testing the Firebase Admin SDK server side, iOS devices stops show notifications.\r\nSo I started investigate, the iPhone got iOS 13.3.1 update but seems to fire the token event correctly.\r\nI go back to the pure deviceToken generation creating a new app and find out that registerForPushNotifications not even fire a callback!\r\nThis is the only code inside the app\r\n\r\n{code:java}\r\nvar deviceToken = null;\r\n// Wait for user settings to be registered before registering for push notifications\r\n\r\n \r\n// Process incoming push notifications\r\nfunction receivePush(e) {\r\n alert('Received push: ' + JSON.stringify(e));\r\n}\r\n// Save the device token for subsequent API calls\r\nfunction deviceTokenSuccess(e) {\r\n\tTi.API.info(JSON.stringify(e));\r\n deviceToken = e.deviceToken;\r\n}\r\n \r\nfunction deviceTokenError(e) {\r\n alert('Failed to register for push notifications! ' + e.error);\r\n}\r\nTi.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {\r\n\tTi.API.error(\"registerForPush\");\r\n // Remove event listener once registered for push notifications\r\n Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush); \r\n \r\n Ti.Network.registerForPushNotifications({\r\n success: deviceTokenSuccess,\r\n error: deviceTokenError,\r\n callback: receivePush\r\n });\r\n});\r\n \r\nTi.App.iOS.registerUserNotificationSettings({\r\n types: [\r\n Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,\r\n Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,\r\n Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE\r\n ]\r\n});\r\n{code}\r\n\r\nYes the provisioning has the Push Notification enabled.", "attachment": [], "flagged": false, "summary": "Cannot obtain iOS Push token with registerForPushNotifications", "creator": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "environment": "Mac OSX Mojave 10.14.6 (18G87)\r\nXCode Version 11.3.1 (11C504)\r\n", "comment": { "comments": [ { "id": "454456", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~Pietro] We have fixed a similar issue in 9.0.0, TIMOB-27763. 9.0.0 RC is already there. Can you try on 9.0.0 and see if it works.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-02-26T18:28:40.000+0000", "updated": "2020-02-26T18:28:40.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }