Which restriction an app with CloudKit has if user does not turn on iCloud Drive

元气小坏坏 提交于 2019-12-07 05:40:58

问题


Which CloudKit services are not available if user not turns on iCloud Drive?

Is it any way to turn on iCloud Drive from app?

I guess downloading records from public container should work regardless iCloud Drive, writing container only if it is enabled?!


回答1:


CloudKit is linked to the iCloud account. If the user is login in into iCloud, but does not have iCloudDrive enabled, then there are no limitations to CloudKit.

If the user is not logged in into iCloud, then he can only access public data. You could set this on any recordType from the CloudKit dashboard.

There is no way to change the login from within your app. You can only login from the settings app. There is also no way to enable iCloud Drive from your app. For that you also need to go to the settings app




回答2:


Here is where Apple implies iCloud Drive is required for CloudKit:

Improve the user’s experience by verifying that the user is signed in to their iCloud account before saving records. If the user is not signed in, present an alert instructing the user how to enter their iCloud credentials and enable iCloud Drive. Insert your code that saves records in the else clause below.

https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/CloudKitQuickStart/CreatingaSchemabySavingRecords/CreatingaSchemabySavingRecords.html#//apple_ref/doc/uid/TP40014987-CH3-SW8



来源:https://stackoverflow.com/questions/34067778/which-restriction-an-app-with-cloudkit-has-if-user-does-not-turn-on-icloud-drive

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