Silent crashes in Xcode 8 / iOS 10

Sam Piggott
Combo
Published in
3 min readSep 15, 2016

There’s not much use in going into too much detail on this post, but I was wrestling with this pesky bug earlier today and figured it’s probably worthy of a cheeky Medium post seeing as Google didn’t unearth much earlier.

I was in the process of updating Combo.fm with support for iOS 10, and noticed it was crashing every single time I requested permission to an Apple Music account. There wasn’t much in the way of debugging pointing to the blame, aside from this on the break:

Yikes. CRASHING_DUE_TO_PRIVACY_VIOLATION. It sounds really, really bad. But relax. It’s really nothing to worry about.

Here’s the rub; with iOS 10, when asking for permission from iOS’ external capabilities (such as HomeKit, Apple Music Library, Local Media Library, Bluetooth, Calendars, Camera, Contacts, HealthKit, Location, Microphone, Motion, Photos, Reminders, Siri, Speech), iOS 10 now requires you to supply a reason in your Info.plist for every one of these capabilities you wish to include in your app.

Fixin’ it

So to fix it, just hop into your app’s Info.plist (you might also need to dive into your extensions’ individual .plist if they depend on these capabilities, I’m not entirely sure), right click, click “Add Row”, and begin typing Privacy in the key field. You’ll see something like this drop down:

For every one of those capabilities your app uses, just add it and supply a reason why you need it in the value field. So for Combo.fm, I selected the Media Library Usage Description (since we’re asking for access to the user’s Apple Music subscription) and popped this in:

And so, to wrap up, here’s what that looks like when you request permission once more:

No more sad, mysterious crashes, and the user gets to connect their account again. Everyone’s a winner.

Especially Taylor.

Still here? Bloody hell. Better do some shameless self-promotion then; so I’m building a music discovery app called Combo.fm to help you find the best new music you haven’t heard yet. Sound interesting? It’s available on iOS and you can download it right now. No, really. Right now. You can click this if you want to do that.

The kicker — it’s still very young and we’re trying to understand how people discover music, so any feedback you have on it would be massively appreciated. Drop me a line on sam@combo.fm and we’ll have a little chat about it.

--

--

Sam Piggott
Combo
Editor for

More than likely found in front of a screen. Making code courses over at CodeSnap.io.