Using Core Data with watchOS 2.0

依然范特西╮ 提交于 2019-11-27 21:06:12

Yes, you'll have to maintain two separate stores. If either side is a "read-only" client and the CoreData datastore is small and changes infrequently you could potentially use the transferFile WatchConnectivity API to transfer the whole store each time it changes.

I recommend setting up sync using the user info background transfer to mirror each database operation in both directions (if required) after transferring the store on first run.

The WWDC Session 713 - Introducing Watch Connectivity covers the mechanisms required. Nice API they've put together.

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