{ "id": "147265", "key": "TIMOB-18852", "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": [ { "id": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-04-25T01:13:08.000+0000", "created": "2015-04-24T21:19:55.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2018-10-22T14:00: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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "I was looking at the new UserDefaults API we have for sharing data between iOS extensions and it's missing the ability to specify a suiteName. Without this, this API cannot share data across extensions.\r\n\r\nExample in a watch extension:\r\n{code}\r\nlet sampleDefaults = NSUserDefaults(suiteName: \"group.com.myapp.here\")\r\n{code}\r\n\r\nCurrently you can only do something like:\r\n{code}\r\n\t\tTi.App.iOS.UserDefaults.setObject('myKey', {});\r\n{code}\r\n\r\nWhich points to the standard user defaults...which the apple watch can't access. Maybe a 3rd param needs to be introduced in these methods where you can specify the suiteName.\r\n\r\nRef. http://stackoverflow.com/questions/27007288/watchkit-sdk-not-retrieving-data-from-nsuserdefaults", "attachment": [], "flagged": false, "summary": "Ti.App.iOS.UserDefaults needs ability to set the suiteName in order for it to work with Apple Watch", "creator": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "subtasks": [], "reporter": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "environment": null, "comment": { "comments": [ { "id": "350739", "author": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "body": "Apparently, setting the suiteName is possible (though I didn't see reference to it at all in the class). Ref. https://github.com/appcelerator/titanium_mobile/blob/19886c8797a808d5cc4f572e85c791ac757a2c47/apidoc/Titanium/App/iOS/UserDefaults.yml", "updateAuthor": { "name": "rblalock", "key": "rblalock", "displayName": "Rick Blalock", "active": false, "timeZone": "America/Havana" }, "created": "2015-04-25T01:13:08.000+0000", "updated": "2015-04-25T01:13:08.000+0000" }, { "id": "442827", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "how do you actually use it? I need to retrieve the value passed from an MDM like this:\r\n\r\n\r\n{code:java}\r\nNSString *value = [[[NSUserDefaults standardUserDefaults] dictionaryForKey:@\"com.apple.configuration.managed\"] objectForKey:@\"key\"];\r\n{code}\r\n", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2018-10-22T14:00:32.000+0000", "updated": "2018-10-22T14:00:32.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }