[TIMOB-23889] iOS: App crashes on iOS 10 when calling Permisson's methods
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2016-09-11T13:50:33.000+0000 |
Affected Version/s | Release 5.5.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-5.5.0 |
Reporter | Eric Wieber |
Assignee | Hans Knöchel |
Created | 2016-09-09T23:19:48.000+0000 |
Updated | 2016-09-12T18:45:20.000+0000 |
Description
I am seeing app crashes when I use methods from permissions (Calendar, Contacts, Camera (Media), etc) in my apps.
I do not have any log output except from Xcode:
Termination Reason: TCC, This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.
Triggered by Thread: 5
*Steps to reproduce issue*
1. Create a new project
2. Use a Permission's method in the code, I suggest the below
3. Run the app on an iOS 10 device
*Expected Results*
The app runs without issue
*Actual Results*
The app crashes when the Permission's method is called
*Notes*
I am able to encounter this issue when checking for media permissions:
function askCameraPermissions(){
if (Ti.Media.hasCameraPermissions()) {
alert("Camera Permissions already granted");
} else {
Ti.Media.requestCameraPermissions(function(e) {
if (e.success === true) {
alert("Camera Permissions Granted");
} else {
alert("Access denied, error: " + e.error);
}
});
}
}
Resolving as
Duplicate
for now, but please let me know your objections if you have some!Closing as duplicate since related ticket is verified.