简体   繁体   English

核心数据iCloud同步还是其他?

[英]Core Data iCloud sync or smth else?

I build an iOS app which works with base. 我构建了一个可与base一起使用的iOS应用。 User can work with it everywhere, that is cool. 用户可以在任何地方使用它,这很酷。 When application starts for the first time, obviously, base will be empty. 显然,当应用程序第一次启动时,base将为空。 For now, user's base stores data locally with Core Data. 目前,用户库将数据与Core Data一起本地存储。 But there is a case, when user may have his own base with a lot of data and he do not want to start work from scratch. 但是,在某些情况下,用户可能有大量数据的基础,而又不想从头开始工作。 For this reason I want to create simple Cocoa App for macOS, which will allow user to import some data from, for example - CSV file. 因此,我想为macOS创建一个简单的Cocoa App,它将允许用户从CSV文件中导入一些数据。 Both Core Data models (iOS app and macOS app) will be the same. 两种核心数据模型(iOS应用程序和macOS应用程序)将相同。 I just want to make sync between two platforms. 我只想在两个平台之间进行同步。 I think it's possible with cloudKit, but which way is the best? 我认为cloudKit有可能,但是哪种方法最好? Core Data Sync or smth like supporting MySQL database on server, etc... 核心数据同步或类似,例如在服务器上支持MySQL数据库等。

Thanks in advance! 提前致谢!

Asking which method is "best" is a matter of opinion, but in mine, Apple has made working with iCloud fairly simple. 询问哪种方法是“最佳”是一个意见问题,但是在我看来,Apple使得使用iCloud变得相当简单。 If all you want to do is sync between platforms, I would use cloudKit. 如果您要做的只是平台之间的同步,那么我将使用cloudKit。 There seems to be no reason to spin up your own MYSQL database instance and introduce another level of complexity, when the functionality you're looking for is free and easily accessible. 当您要寻找的功能免费且易于访问时,似乎没有理由启动自己的MYSQL数据库实例并引入另一种复杂性。

See this WWDC16 video for some cloudKit tips: https://developer.apple.com/videos/play/wwdc2016/226/ 请参阅此WWDC16视频以获取一些cloudKit提示: https : //developer.apple.com/videos/play/wwdc2016/226/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM