CloudKit: Application has malformed entitlements

Hey,

For some reason I see crashes for my iOS app related to CloudKit entitlements.

The crash happens on start up and it says: "CKException - Application has malformed entitlements. Found value "*" for entitlement com.apple.developer.icloud-services, expected an array of strings"

I have checked my entitlements of the same build on App Store Connect and it shows "com.apple.developer.icloud-services: ( "CloudKit" )"

So I am not sure why users are having this issue. I haven't been able to reproduce it.

Does anyone have any idea why this is happening?

Thanks

Do you have symbolicated crash reports that you can share here? If your crash reports are sensitive, I’d suggest that you file a feedback report with them and share your report ID here.

An entitlement issue in the app would impact all users, which, as you've confirmed, is not your case, and so I am wondering if it is something on those specific user systems.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Hello Ziqiao,

Thanks so much for your reply.

I have attached a crash stack trace. Hope it helps.

Thanks, Nihal

Your crash report was generated by Crashlytics and doesn't quite help. If you can, please provide a symbolicated crash report generated by the system (as opposed to 3rd party crash reporters).

Also, please start with file a feedback report with the following information:

  • Your app name.
  • The app bundle you submitted to App Store.
  • One or more symbolicated crash reports generated by Apple's system.

After you file the report, please share the report ID here. I'd be interested in taking a look.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Hello Ziqiao,

How do I get crash reports by the system? As mentioned I am unable to reproduce the crash. So I am only able to see the crash in Crashlytic by my users.

Thanks, Nihal

Yeah, it's indeed quite troublesome given that you don't have a reproducible case, but here is what you can do:

  1. Disable or remove the 3rd party crash reporter from your app, and then create a new build. If you are curious why, the following post will give you more background: Implementing Your Own Crash Reporter.
  2. Install the CloudKit profile to your testing device.
  3. Test the new build on the device, until the crash happens.
  4. Gather a sysdiagnose from the device, as mentioned in Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem.

The sysdiagnose should include the crash report, and also logs that may be helpful.

Just FYI, I am suspecting that the issue is something related to the 34018 error discussed here. Once you have a sysdiagnose, you can look into the system log to see if you can find the error.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

CloudKit: Application has malformed entitlements
 
 
Q