{ "id": "170261", "key": "TIMOB-25495", "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": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2019-03-11T17:14:42.000+0000", "created": "2017-11-09T19:10:53.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-03-11T17:14:42.000+0000", "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" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Hello,\r\n\r\nUnable to subscribe to push notifications on latest Ti SDK 6.3.0.GA. We have tested the issue in the following environment:\r\nAppcelerator Command-Line Interface, version 6.3.0\r\nAxway Appcelerator Studio, build: 4.10.0.201709271713,\r\nTitanium SDK 6.3.0\r\nXcode Version: Version 9.1\r\niOS SDK 11\r\n\r\n*Steps to reproduce the issue:*\r\n1- Create new certificate\r\n2- Create new provisioning profile\r\n3- Delete old provisioning profiles from Apple developer and my mac\r\n4- Download and install the new profile and certificate\r\n5- Clean the project\r\n6- Delete the build forlder\r\n7- Uninstall and reinstall the app\r\n8- Run the app using the new certificate and profile (in development)\r\n9- Accept permission to allow notifications in the app\r\n \r\nOR\r\nJust create a new application and follow all the configuration for push notification on above working environment.\r\n\r\n*Test Code:*\r\n- https://gist.github.com/MotiurRahman/2cd4520727271bb60316d57032bf0028\r\n\r\n*Test Results:*\r\nWe have got an infinity loop like below\r\n{code}[INFO] : Device Token: {\"success\":true,\"code\":0,\"source\":{},\"type\":\"remote\",\"deviceToken\":\"94xxxxxxxxxxxce52\"}\r\n[INFO] : Device Token: {\"success\":true,\"code\":0,\"source\":{},\"type\":\"remote\",\"deviceToken\":\"94xxxxxxxxxxxce52\"}\r\n[INFO] : Device Token: {\"success\":true,\"code\":0,\"source\":{},\"type\":\"remote\",\"deviceToken\":\"94xxxxxxxxxxxce52\"}\r\n[INFO] : Device Token: {\"success\":true,\"code\":0,\"source\":{},\"type\":\"remote\",\"deviceToken\":\"94xxxxxxxxxxxce52\"}\r\n[INFO] : Device Token: {\"success\":true,\"code\":0,\"source\":{},\"type\":\"remote\",\"deviceToken\":\"94xxxxxxxxxxxce52\"}\r\n[INFO] : Device Token: {\"success\":true,\"code\":0,\"source\":{},\"type\":\"remote\",\"deviceToken\":\"94xxxxxxxxxxxce52\"}\r\n{code}\r\n\r\n*Expected Result:*\r\nThe device is subscribed for the push notification.\r\n\r\nThanks", "attachment": [ { "id": "63577", "filename": "Keychains+log.txt", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-11T00:41:52.000+0000", "size": 3659, "mimeType": "text/plain" }, { "id": "63576", "filename": "security find-identity -p codesigning -v.txt", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2017-11-11T00:41:38.000+0000", "size": 1777, "mimeType": "text/plain" } ], "flagged": false, "summary": "iOS: Unable to subscribe for push notifications on latest SDK", "creator": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "subtasks": [], "reporter": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "environment": "iOS Push, Push Notification", "closedSprints": [ { "id": 1119, "state": "closed", "name": "2019 Sprint 6", "startDate": "2019-03-03T22:20:00.193Z", "endDate": "2019-03-15T22:20:00.000Z", "completeDate": "2019-03-18T17:26:43.120Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "430386", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "I just simplified the test-case to only the core-components used to receive the device-token and it returns the device-token properly:\r\n{code:js}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: 'Get Device Token'\r\n});\r\n\r\nbtn.addEventListener('click', getToken);\r\n\r\nwin.add(btn);\r\nwin.open();\r\n\r\nvar deviceToken = null;\r\n\t\r\nfunction getToken() {\r\n // Wait for user settings to be registered before registering for push notifications\r\n Ti.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {\r\n\r\n \t// Remove event listener once registered for push notifications\r\n \tTi.App.iOS.removeEventListener('usernotificationsettings', registerForPush);\r\n\r\n \tTi.Network.registerForPushNotifications({\r\n \t\tsuccess : deviceTokenSuccess,\r\n \t\terror : deviceTokenError,\r\n \t\tcallback : receivePush\r\n \t});\r\n });\r\n\r\n // Register notification types to use\r\n Ti.App.iOS.registerUserNotificationSettings({\r\n \ttypes : [Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT, Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND, Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE]\r\n });\r\n\r\n // Process incoming push notifications\r\n function receivePush(e) {\r\n \talert('Received push: ' + JSON.stringify(e));\r\n }\r\n\r\n // Save the device token for subsequent API calls\r\n function deviceTokenSuccess(e) {\r\n \tdeviceToken = e.deviceToken;\r\n Ti.API.info(deviceToken);\r\n }\r\n\r\n function deviceTokenError(e) {\r\n \talert('Failed to register for push notifications! ' + e.error);\r\n }\r\n}\r\n{code}\r\nSo it looks like a circular loop issue you are having with your code. Please go through the code again and ensure the method to receive the device-token is not called more than once. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2017-11-10T13:41:22.000+0000", "updated": "2017-11-10T13:41:22.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }