{ "id": "136465", "key": "TIMOB-17683", "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": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2014-09-12T22:14:43.000+0000", "created": "2014-09-11T22:42:59.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [ { "id": "41022", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "132395", "key": "TIMOB-17238", "fields": { "summary": "iOS8: Add support for Interactive 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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "41021", "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 } } } }, { "id": "41023", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "136191", "key": "TIMOB-17647", "fields": { "summary": "iOS8: Access to currentUserNotificationSettings & didRegisterUserNotificationSettings", "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": "2014-09-18T17:17:46.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": "In a comment in TIMOB-17238, Timan said that is was confusing to have to call \r\n{code}\r\nTi.App.iOS.registerUserNotificationSettings() \r\n{code}\r\nbefore \r\n{code}\r\nTi.Network.registerForPushNotifications()\r\n{code}\r\n\r\nWe could take the `types` passed into `registerForPushNotifications` and call `registerUserNotificationSettings` for the user behind the scenes to make it work like it did in iOS8. I am not sure if this would be a good abstraction, but it is possible.", "attachment": [], "flagged": false, "summary": "iOS8: call registerUserNotificationSettings when Ti.Network.registerForPushNotifications() is called", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "323178", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T01:30:18.000+0000", "updated": "2014-09-12T01:30:18.000+0000" }, { "id": "323215", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "[~cng] Push Notifications can be made interactive at the moment, only not when using ACS Push. There are a lot of other ways to send push notifications of course. We already have working Interactive Push Notifications running in a beta version of our app, by first calling local registration and then calling push registration. That version will even be submitted to Apple today, now we can submit iOS8 apps", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-12T07:01:50.000+0000", "updated": "2014-09-12T07:01:50.000+0000" }, { "id": "323218", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "[~timanrebel] Oh yeah, you are correct there. So what we can do is:\r\nA) change according to what Jon suggest, with the method registerForPushNotifications accepting types AND categories (optional), behind the scenes the method will call registerForLocalNotifications and also call apple api registerForRemoteNotifications (required).\r\n*Advantage:* \r\nTitanium developers who use push notifications face little change and only have to call this method to register.\r\n*Disadvantage:*\r\nTitanium developers who need to use both local AND push notifications in 1 app, have to call both local and remote registration methods, that may have overlapping methods.\r\nB) change registerForLocalNotifications to registerUserNotificationSettings, and slight modifications to registerForPushNotifications\r\n*Advantage:* \r\nTitanium developers who need to use both local AND push notifications in 1 app will have no problems.\r\n*Disadvantage:*\r\nAPI docs have to instruct the new way to push notifications for iOS8 have to do the following steps:\r\n1)registerUserNotificationsSettings\r\n2)registerForPushNotifications\r\n\r\nAny thoughts?", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T07:31:05.000+0000", "updated": "2014-09-12T07:31:05.000+0000" }, { "id": "323243", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "[~cng] Option A) poses a couple of edge cases, which should be prevented in native space. For example a Titanium developer call registerForLocalNotifications with categories A and B, but later calls registerForRemoteNotifications with categories B and C. I'm not sure what would happen :) Plus C would also be available to local notifications, although the developer has not requested it specifically.\r\n\r\nOption B) is the safest and clearest option IMHO towards Titanium developers, but has the disadvantage of the need to change your JS code when upgrading to 3.4.0. (Although that was also the case when switching from NavigationGroup to navigationWindow and some other cases). It could be an option to throw a warning when setting types on registerForRemoteNotifications , explaining that registerUserNotificationsSettings should be called instead.\r\n\r\n", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2014-09-12T10:19:57.000+0000", "updated": "2014-09-12T10:30:01.000+0000" }, { "id": "323318", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "+1 for Timan's thoughts on Option B", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T16:36:40.000+0000", "updated": "2014-09-12T16:42:37.000+0000" }, { "id": "323361", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~jalter] to mark as invalid.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T18:01:43.000+0000", "updated": "2014-09-12T18:01:43.000+0000" }, { "id": "323448", "author": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here are the essential changes that have been made:\r\n\r\n- `registerForLocalNotifications` renamed to `registerUserNotificationSettings`\r\n- when calling `registerForPushNotifications` on iOS8+, the `types` property is ignored.\r\n- if `types` is passed to to `registerForPushNotifications` on iOS8+, a warning will be logged to the console that types need to be set via `registerUserNotificationSettings`.\r\n- this has been added to the documentation as well.\r\n\r\nThese changes have been made in the PR for TIMOB-17640\r\nThank you both for your input.", "updateAuthor": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-09-12T22:14:31.000+0000", "updated": "2014-09-12T22:14:31.000+0000" }, { "id": "324522", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as invalid. This ticket has been covered in TIMOB-17640.", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-09-18T17:17:35.000+0000", "updated": "2014-09-18T17:17:35.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }