Luca Becchetti
Luca Becchetti

Reputation: 1280

Permission crash with calendar on iOS > 10

i have an app built with swift 2.2 and Xcode 7, minimum compatibility is: ioS9, this app require a permission for calendar, i use this code:

EKEventStore().requestAccessToEntityType(EKEntityType.Event, completion: {
        (accessGranted: Bool, error: NSError?) in

        if accessGranted == true {
            dispatch_async(dispatch_get_main_queue(), {
                self.loadCalendars()
                completitionHandler(success: true)
            })
        } else {
            completitionHandler(success: false)
        }
    })

All works fine, excepted in iOS >= 10, when a user install the app and request permission the app crash, from the instabug log this:

Crash due to signal: SIGTRAP() at 100476508
_mh_execute_header + 4482312

Whats wrong? i have to insert some change to make it works on ios10? something in info.plist?

Thanks for help!

Upvotes: 0

Views: 293

Answers (1)

user5890979
user5890979

Reputation:

You need to add:

Privacy - Calendars Usage Description

to your .plist

Upvotes: 1

Related Questions