Tuesday, 20 September 2016

Apps built with iOS 10 and Xcode 8 can crash when the user accesses API's such as Camera, Calendar & Contacts

Apps built with iOS 10 and Xcode 8 can crash when the user accesses API's such as Camera, Calendar & Contacts. 


After some research, this is because iOS 10 and later required the following keys that have been introduced back in iOS 6!

My App crashed at this line: 
var accessGranted = DeviceHelper.Current.EventStore.RequestAccessAsync(EventKit.EKEntityType.Event) 


Resolved it by: 
Edit the info.plist:  Privacy - Calendars Usage Description
Date type = string.
Value = Please provide the reason why you app ask for the calendar usage.

Doc ref:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW15


No comments:

Post a Comment

How to run unit test for your Xamarin Application in AppCenter?

How to run unit test for your Xamarin application in AppCenter?  When we talk about Building and Distributing your Xamarin app, you m...