I should work on a project both for iOS and OS X. Obviously i have 2 different projects and my question is: should the 2 projects have the same xcdatamodeld to share Core Data via iCloud? Meaning same structure or exactly same (name + structure)? I'm still at the beginning of the OS X app and would like to know in advance if i have to import the iOS core data file or i can create another one. Thanks in advance

有帮助吗?

解决方案

should the 2 projects have the same xcdatamodeld to share Core Data via iCloud?

If you want to share data stores between the two projects, then yes. Use the same model file in both projects.

It's not uncommon to build a model for an iOS project and then to use the same model file in a simple OS X project so that you can easily examine or modify the data from a MacOS X app.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top