[英]Can I share CoreData on iCloud?
I have an iPhone app I'm writing that needs to keep an offline data store that users of a specific licensed app can access. 我有一个我正在编写的iPhone应用程序需要保留一个特定许可应用程序的用户可以访问的脱机数据存储。
I need a "Cloud" account where several users with different accounts can share the data. 我需要一个“云”帐户,其中具有不同帐户的多个用户可以共享数据。 Is this possible?
这可能吗?
I Googled and searched SO, but can find nothing about this particular topic. 我用Google搜索并搜索了SO,但却找不到有关此特定主题的信息。
An iCloud account is tied to a single user. iCloud帐户与单个用户绑定。
If you are asking whether you can set up an iCloud account that can be shared across multiple users; 如果您询问是否可以设置可在多个用户之间共享的iCloud帐户; there isn't such a thing.
没有这样的事情。
If you don't want to be responsible for syncing and vending the data yourself, have a look at Dropbox - where users can set up shared dropbox folders to do something similar to what you are asking about. 如果您不想自己负责同步和出售数据,请查看Dropbox - 用户可以在其中设置共享保管箱文件夹,以执行类似于您所询问的操作。
However, just putting the CD store on a Dropbox folder won't be enough to handle merge conflicts if different users modify the same value. 但是,如果不同的用户修改相同的值,仅将CD存储放在Dropbox文件夹上将不足以处理合并冲突。 In which case one solution is to have a web service that updates can be sent to, merges resolved, and the data pushed back down to the devices to be stored in their own Core Data stores.
在这种情况下,一种解决方案是拥有一个Web服务,可以将更新发送到,解析合并,并将数据推回到设备以存储在自己的Core Data存储中。
A bit more involved than just putting the store in the cloud - but this stuff is difficult. 比将商店放在云端还要多一点 - 但这个东西很难。
you need to start off with icloud 你需要从icloud开始
one of the best tutorials on net is: 网上最好的教程之一是:
http://www.raywenderlich.com/6015/beginning-icloud-in-ios-5-tutorial-part-1 http://www.raywenderlich.com/6015/beginning-icloud-in-ios-5-tutorial-part-1
http://www.raywenderlich.com/6031/beginning-icloud-in-ios-5-tutorial-part-2 http://www.raywenderlich.com/6031/beginning-icloud-in-ios-5-tutorial-part-2
sample icloud project http://cdn3.raywenderlich.com/downloads/dox.zip 示例icloud项目http://cdn3.raywenderlich.com/downloads/dox.zip
best of luck 祝你好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.