每个人。
我已经开始使用 Watch Kit 应用程序。使用 WatchKit 1 可以很容易地访问共享文件夹中的 coredata 数据库。但是当我更新到 xcode 7、watch kit 2.0 和 swift 2.0 时,AppleWatch 和 iPhone 似乎具有不同的应用程序组共享文件夹地址。和下面的代码
NSURL *storeURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:BMCoreDataConstants.groupIdentifier];
storeURL = [storeURL URLByAppendingPathComponent:BMCoreDataConstants.sqliteStoreNameWithExtension];
在 iPhone 和 AppleWatch 上返回不同的 url。
如果您知道现在从父应用的核心数据中获取数据的最佳方式是什么,请告知?
最佳答案
关于ios - WatchKit 2.0 和 iPhone 共享核心数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32884810/