{ "id": "172159", "key": "TIMOB-26349", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2018-09-19T18:27:08.000+0000", "created": "2018-09-01T10:52:01.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [], "versions": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" }, { "id": "17609", "description": "", "name": "Release 7.0.0", "archived": false, "released": true, "releaseDate": "2017-12-07" }, { "id": "20115", "name": "Release 7.3.0", "archived": false, "released": true, "releaseDate": "2018-08-17" }, { "id": "20220", "name": "Release 7.3.1", "archived": false, "released": true, "releaseDate": "2018-08-30" } ], "issuelinks": [ { "id": "56792", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "172244", "key": "TIMOB-26399", "fields": { "summary": "iOS: Several issues with push-notifications since 7.3.x", "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": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2018-09-19T18:27:32.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": "There are a couple of issues with notifications on iOS right now:\r\n# On iOS 10+, if a notification is delivered while the app is opened, the notification is presented in-app and the usual callback is not fired\r\n# On iOS 10+, the contents of the \"aps\" key are not in the top-level of the \"data\" key that is returned by the callback of the {{registerForPushNotifications}} callback\r\n# On iOS 10+, the \"localnotificationaction\" event is triggered, although \"remotenoticationaction\" should be triggered\r\n# On iOS 10+, the \"sound\" property of queued pushes can lead to a crash because it's not bridged to a consumable JS-type\r\n# On all supported iOS versions, if a remote notification action is triggered and the app is closed, the {{notificationaction}} is not triggered\r\n# On all supported iOS versions, silent pushes are fired to both the {{registerForPushNotifications}} callback and {{silentpush}} event. it should only be fired to the {{silentpush}} event for parity and API clearance.", "attachment": [], "flagged": false, "summary": "iOS 10: A couple of issues related to remote push-notifications", "creator": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "closedSprints": [ { "id": 1073, "state": "closed", "name": "2018 Sprint 19 SDK", "startDate": "2018-09-09T21:02:56.422Z", "endDate": "2018-09-23T21:02:00.000Z", "completeDate": "2018-09-23T22:28:10.932Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "441270", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "(PR was reverted to do some more tests)\r\n\r\nTest-Case:\r\n1. Create a new app suitable for remote push notifications (with it's certs, provisioning profiles, aps-environment etc)\r\n2. Copy the below code in the app.js / index.js\r\n3. Download the app \"Pusher\" to simulate push messages from your mac\r\n4. Import your .p12 certificate, paste your device-token received from the \"success\" callback of your push-registration and try around with it (leave out \"content-available\" to test non-silent-pushes):\r\n{code:json}\r\n{ \"aps\":{\"alert\":\"Testing.. (30)\",\"badge\":1,\"sound\":\"default\", \"content-available\": 1 }}\r\n{code}\r\n\r\nJS-code:\r\n{code:js}\r\nvar deviceToken = null;\r\n\r\n// Wait for user settings to be registered before registering for push notifications\r\nTi.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {\r\n\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.addEventListener('silentpush', function(e) {\r\n Ti.API.info('SILENTPUSH received');\r\n Ti.API.info(e);\r\n});\r\n\r\n// Process incoming push notifications\r\nfunction receivePush(e) {\r\n Ti.API.info('Remote push received');\r\n Ti.API.info(e);\r\n}\r\n// Save the device token for subsequent API calls\r\nfunction deviceTokenSuccess(e) {\r\n deviceToken = e.deviceToken;\r\n Ti.API.info('Device-token: ' + deviceToken);\r\n Ti.API.info('Successfully registered for push notifications!');\r\n}\r\n\r\nfunction deviceTokenError(e) {\r\n alert('Failed to register for push notifications! ' + e.error);\r\n}\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nwin.addEventListener('open', function() {\r\n // Register notification types to use\r\n Ti.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});\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-01T12:04:14.000+0000", "updated": "2018-09-04T08:27:18.000+0000" }, { "id": "441711", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Handled via TIMOB-26399", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-09-19T18:27:08.000+0000", "updated": "2018-09-19T18:27:08.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }