{ "id": "163295", "key": "TIMOB-23923", "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": [ { "id": "16980", "description": "New V8", "name": "Release 6.0.0", "archived": false, "released": true, "releaseDate": "2016-11-15" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-09-21T07:49:35.000+0000", "created": "2016-09-19T08:56:25.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "ios10", "musiclibrary", "permissions", "privacy", "qe-6.0.0" ], "versions": [ { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "issuelinks": [], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-09-23T19:04: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 new OS 10 apple added new permission for access music library , my issue with Ti.Media.queryMusicLibrary, when i call this method the app crashes , Ive tried to search for condition to check if user already gives access or request access to Music library can't find them !\r\n\r\nvar musicList = Ti.Media.queryMusicLibrary({\r\n mediaType : Ti.Media.MUSIC_MEDIA_TYPE_MUSIC\r\n});\r\nafter upgrade to ios 10 and appcelerator SDK to 5.5.0.GA , when u call the above method the app will crash !\r\n\r\nany advices is very much appreciated", "attachment": [], "flagged": false, "summary": "iOS 10: Ti.Media.queryMusicLibrary crashes the app", "creator": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 707, "state": "closed", "name": "2016 Sprint 19 SDK", "startDate": "2016-09-10T00:17:15.164Z", "endDate": "2016-09-24T00:17:00.000Z", "completeDate": "2016-09-26T05:17:04.253Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "396488", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Did you include the {{NSAppleMusicUsageDescription}} key in your plist? It is required by iOS 10 and later. Although we added the usage-description-keys to the very most of our API's, we may need to add it to the music-library docs as well.\r\n\r\nWe will update the docs and also provide new methods to check the music-library permissions.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-19T10:09:25.000+0000", "updated": "2016-09-19T10:19:32.000+0000" }, { "id": "396490", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/8397\r\n\r\nDemo:\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: \"#fff\"\r\n});\r\n\r\nvar btn = Ti.UI.createButton({\r\n title: \"Has permissions\",\r\n top: 40\r\n});\r\n\r\nbtn.addEventListener(\"click\", function() {\r\n alert(\"Has permissions? \" + Ti.Media.hasMusicLibraryPermissions());\r\n});\r\n\r\nvar btn2 = Ti.UI.createButton({\r\n title: \"Request permissions & access library\",\r\n top: 80\r\n});\r\n\r\nbtn2.addEventListener(\"click\", function() {\r\n if (!Ti.Media.hasMusicLibraryPermissions()) {\r\n Ti.API.info(\"Does not have permissions, yet. Will request now\");\r\n Ti.Media.requestMusicLibraryPermissions(function(e) {\r\n if (e.success) {\r\n Ti.API.info(\"Permissions granted, can access music library now.\");\r\n // Ti.Media.queryMusicLibrary();\r\n } else {\r\n Ti.API.error(\"Permissions denied!!\");\r\n }\r\n })\r\n } else {\r\n Ti.API.info(\"Already has permissions, can access music library now.\");\r\n // Ti.Media.queryMusicLibrary();\r\n }\r\n});\r\n\r\nwin.add(btn);\r\nwin.add(btn2);\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-19T10:50:29.000+0000", "updated": "2016-09-19T10:53:14.000+0000" }, { "id": "396506", "author": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@hans , thank u i tried ur code gives error so i need to modify Ti files with ur commit ", "updateAuthor": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-19T14:13:51.000+0000", "updated": "2016-09-19T14:13:51.000+0000" }, { "id": "396560", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jackSparrow] It just crashes because it's not in the SDK, yet. That's why it is an open Pull Request in review :-) You can just add the plist-key for now and the app won't crash. The additional methods are just for an improved permission-handling. Of course you can patch your current SDK already. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-19T19:22:37.000+0000", "updated": "2016-09-19T19:22:37.000+0000" }, { "id": "396616", "author": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@Hans Knoechel , thank u its worked when i patched my SDK with ur modifications thank u ", "updateAuthor": { "name": "jackSparrow", "key": "jacksparrow", "displayName": "jack sparrow", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-09-20T05:49:54.000+0000", "updated": "2016-09-20T05:49:54.000+0000" }, { "id": "396784", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8407", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-21T07:11:55.000+0000", "updated": "2016-09-21T07:11:55.000+0000" }, { "id": "396797", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "body": "PRs merged.", "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-09-21T07:49:21.000+0000", "updated": "2016-09-21T07:49:21.000+0000" }, { "id": "397075", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, when specifying {{NSAppleMusicUsageDescription}} in the plist, app no longer crashes on iOS10.\r\n\r\nTested On:\r\niPhone 6 Plus 10.0.1 Device \r\niPhone 5S 9.3.5 Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 6.0.0.v20160922165510\r\nAppc Studio: 4.8.0.201609191928\r\nAppc NPM: 4.2.8-7\r\nApp CLI: 6.0.0-51\r\nXcode 8.0 \r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-09-23T19:04:30.000+0000", "updated": "2016-09-23T19:04:30.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }