2

Thanks for taking a look. I'm hoping someone can help, I am a bit at my wits end here.

I have an application in production that currently does not handle CloudKit's CKErrorUserDeletedZone error. This happens when a user deletes the container data from the Settings->iCloud area on their iPhone/iPad, or System Preferences->iCloud area on their Mac.

The problem I am having is I am not able to test this scenario while running from Xcode since it uses the Development not Production servers. Only production databases show up in the Settings/System Preferences areas. This means I cannot recreate the scenario while able to debug in Xcode. The only way to test in production is to export the application and sadly there's no way to debug from Xcode when that's done.

Is there any way to potentially test this or am I flying completely blind here? I'd happily just deal with it in production but with a very large number of users I'd rather not make a mess of things when only a few users are encountering issues at the moment.

Thanks!

Ely
  • 8,259
  • 1
  • 54
  • 67
AGKyle
  • 21
  • 3

2 Answers2

1

You can configure your debug build to use the production container by adding the following entry to your .entitlements file:

<key>com.apple.developer.icloud-container-environment</key>
<string>Production</string>

Xcode does the same thing when preparing your app for submission.

Felix
  • 776
  • 8
  • 16
  • On OS X this is not possible as it leads to a code signing error. http://stackoverflow.com/questions/30182521/use-production-cloudkit-during-development – berbie Feb 29 '16 at 18:03
  • 1
    @berbie This is no longer the case. – Ely Dec 16 '21 at 09:27
1

You can now test this by ticking purge zone in the dashboard.enter image description here

malhal
  • 26,330
  • 7
  • 115
  • 133