{ "id": "163436", "key": "AC-4506", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2016-09-25T15:42:12.000+0000", "created": "2016-09-25T13:12:24.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-09-25T15:42:13.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "In my application I am using the TI.Contacts framework for pulling contacts from the device. This has been working correctly, but when I updated to Titanium 5.5.0 this line started to crash. The odd thing is I do not get a stack trace or error in the debugger at all. The application simply terminates without any information regarding the crash. Has this been deprecated and I just missed it?", "attachment": [], "flagged": false, "summary": "iOS: Crashes when calling Ti.Contacts.requestAuthorization", "creator": { "name": "miken01", "key": "miken01", "displayName": "Mike Neill", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "miken01", "key": "miken01", "displayName": "Mike Neill", "active": true, "timeZone": "America/New_York" }, "environment": "Appcelerator Studio 4.7.1, Titanium 5.5.0, Xcode 8 and iOS 10 SDK.", "comment": { "comments": [ { "id": "397184", "author": { "name": "miken01", "key": "miken01", "displayName": "Mike Neill", "active": true, "timeZone": "America/New_York" }, "body": "I also updated my code to reflect exactly what is in your documentation. This is what I have. Any thoughts as to what is wrong? Is there a framework I need to import?\r\n\r\nif (Ti.Contacts.hasContactsPermissions()) {\r\n\t// do some work\r\n} else {\r\n\tTi.Contacts.requestContactsPermissions(function(e) {\r\n\t\t// do some work\r\n\t});\r\n}", "updateAuthor": { "name": "miken01", "key": "miken01", "displayName": "Mike Neill", "active": true, "timeZone": "America/New_York" }, "created": "2016-09-25T13:35:23.000+0000", "updated": "2016-09-25T13:35:23.000+0000" }, { "id": "397186", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey Mike,\r\n\r\niOS 10 requires the user to add usage-description keys to the plist when accessing certain platform API's. In your case, you need the following key in your plist-section of the tiapp.xml:\r\n{code:xml}\r\nNSContactsUsageDescription\r\nCan we use to your contacts?\r\n{code}\r\nThis is behavior we can't prevent, since iOS will crash the app intentionally. So as soon as you add the key and clean-rebuild your app, everything should be fine. Also check our [5.5.0 blog|https://www.appcelerator.com/blog/2016/09/ga-release-for-titanium-sdk-5-5-0-appcelerator-cli-5-5-0-appcelerator-studio-4-7-1/] for details on the iOS 9 > iOS 10 migration if you want. Thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-09-25T15:42:12.000+0000", "updated": "2016-09-25T15:42:12.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }