Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The application is missing required entitlement com.apple.developer.icloud-services'

I'm using a public iCloud database in my app, which works great and is up on the store.

On updating my app to a new version (with Xcode 7 on iOS9) I get a crash on the line :

CKContainer * container = [CKContainer containerWithIdentifier:@"iCloud.com.identifier"];

*** Terminating app due to uncaught exception 'CKException', reason: 'The application is missing required entitlement com.apple.developer.icloud-services'

This happens ONLY the first launch of the app after updating, and only on iOS9. After that first (update) launch, the app launches and iCloud works as expected.

I can recreate the crash consistently by downloading the current store version of the app, then running the updated app from Xcode 7.

If I do the same steps (download production app, and update) using iOS8, I do not have the same crash.

I'm guessing this is an iOS9 or Xcode 7 bug. Any ideas?

EDIT : This actually happens on the first launch of the app on iOS9, regardless of whether I'm updating or just first installing.

like image 307
olynoise Avatar asked Sep 22 '15 22:09

olynoise


People also ask

How do I request entitlements from Apple?

Go to https://developer.apple.com/system-extensions/ and click the link to request an entitlement. Apply for the DriverKit entitlement and specify the entitlements you need. Provide a description of the apps you'll use to support your hardware.

What are iCloud entitlements?

iCloud entitlements let you enable the use of iCloud data storage for your iOS or macOS app. You set iCloud entitlement values on a target-by-target basis in your Xcode project. Push notifications let your app alert the user even when your iOS or macOS app is not executing.


2 Answers

Toggling the iCloud Capability on and off seems to have fixed it.

like image 82
olynoise Avatar answered Oct 22 '22 00:10

olynoise


Toggling iCloud didn't work for me. Reinstalling the app didn't work either. The problem seems to happen whenever I have break points enabled. If I turn these off it runs without any problem.

like image 27
Mark Bridges Avatar answered Oct 21 '22 22:10

Mark Bridges