caiyue1993/IceCream

Zone not being recreated if the user manually deletes iCloud data

Open

#196 opened on Apr 20, 2020

 (2 comments) (0 reactions) (0 assignees)Swift (260 forks)user submission
good first issue

Repository metrics

Stars
 (2,005 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Hi. Thank you for your work on this amazing library. I was debugging some stuff on my personal device, deleted the iCloud storage associated with my app, and now I can't sync anymore.

Expected behavior

The user deletes the iCloud data associated with the app. They delete the app and then re-install. A new zone should be created and they should be able to sync to iCloud.

Actual behavior(optional)

Recieve the following error and no data syncs.

ErrorHandler.Fail: User Deleted Zone: the user has deleted this zone from the settings UI.CKError.Code: 28

Steps to reproduce the problem(optional)

Use an app that is syncing correctly with IceCream. Go to Settings -> iCloud -> Manage Storage and delete the storage in iCloud associated with the app. Delete the app. Reinstall the app and attempt to sync again.

Reference links(optional)

It seems you need to recreate the zone: https://stackoverflow.com/a/34748607/6942666

Contributor guide