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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…