简体   繁体   English

在两台计算机之间共享数据库的 Mac Os Core Data 应用程序

[英]Mac Os Core Data App that shares database between two computers

I made a mac os app (with a large database implemented with Core Data).我制作了一个 mac os 应用程序(使用 Core Data 实现的大型数据库)。 This app is private, I use this app only for my job (it is not sold on the mac app store).这个应用程序是私人的,我只在我的工作中使用这个应用程序(它不在 mac 应用商店出售)。 Now I would use this app from two different computers (two users) and it would be great to share the database between two users.现在我将在两台不同的计算机(两个用户)上使用这个应用程序,在两个用户之间共享数据库会很棒。 How can I make this?我怎样才能做到这一点? I know about Cloudkit, but it is necessary to pay Apple development program to use it.我知道 Cloudkit,但需要支付 Apple 开发程序才能使用它。 Is there any other solution, perhaps (free and) more easy of Cloukit?有没有其他解决方案,也许(免费且)更容易使用 Clokit? thx谢谢

Core Data is designed to work as the local data store of a single app. Core Data 旨在用作单个应用程序的本地数据存储。 Apple's CloudKit is the only way it really supports syncing. Apple 的 CloudKit 是它真正支持同步的唯一方法。 You could try putting the data store in a folder synced by Dropbox, iCloud Drive, etc, but it's unlikely to work reliably.您可以尝试将数据存储在由 Dropbox、iCloud Drive 等同步的文件夹中,但它不太可能可靠地工作。 If getting syncing in your app isn't worth $99 to you then you probably need to look at third party solutions like Firebase, but that probably means redesigning the app to not use Core Data.如果在您的应用程序中进行同步对您来说不值 99 美元,那么您可能需要查看 Firebase 等第三方解决方案,但这可能意味着重新设计应用程序以不使用 Core Data。

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

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