Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23889] iOS: App crashes on iOS 10 when calling Permisson's methods

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2016-09-11T13:50:33.000+0000
Affected Version/sRelease 5.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-5.5.0
ReporterEric Wieber
AssigneeHans Knöchel
Created2016-09-09T23:19:48.000+0000
Updated2016-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);
                }
       });
   }
}

Comments

  1. Hans Knöchel 2016-09-11

  2. Hans Knöchel 2016-09-11

    Resolving as Duplicate for now, but please let me know your objections if you have some!
  3. Eric Wieber 2016-09-12

    Closing as duplicate since related ticket is verified.

JSON Source