Migrating an iCloud Store to a Local Store and making sure the data is there through each app launch

青春壹個敷衍的年華 提交于 2019-12-04 09:38:14

No data upon app launch points to the persistent store coordinator.

Looks like the evaluation for the options dictionary is fine, but in either outcome you're always setting up the coordinator with the same persistent store URL.

Likewise, in the migration routine, you're migrating the persistent store object, but with the same URL. That can't work, as that's where the actual files are saved. You need a different URL for the local store and for the iCloud store, then you can correctly migrate the data across and choose to delete the URL you no longer need (after removing the store from the coordinator).

Setup the coordinator with the respective URL, depending on the outcome of your evaluation - and hopefully - you should see your data upon app launch.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!