ios iCloud和核心数据错误(普遍存在:未从元数据URL获取基线元数据)

nhhxz33t  于 2022-12-05  发布在  iOS
关注(0)|答案(2)|浏览(149)

我在尝试让iCloud与我的应用程序一起工作时遇到了一点麻烦。我尝试按照Tim Roadley的例子here,但无论何时通过Xcode启动应用程序,仍然会出现下面的日志(同步确实短暂有效,但现在已经停止工作)。

[PFUbiquityBaseline metadataFromCurrentBaselineForStoreWithName:modelVersionHash:andUbiquityRootLocation:withError:](1091): 
CoreData: Ubiquity:  Didn't get baseline metadata back from metadata url:         
file://localhost/private/var/mobile/Library/Mobile%20Documents/<TEAM
ID>~samburnstone~Staff-Manager/Logs/.baseline/current.nosync/<TEAM 
ID>.samburnstone.StaffManager/g9TNo_uNFuNyltbjcAmDaFE7wl~6a2eGmW6uKIZCC1s=
/baseline.meta Error: (null)

(TEAM ID是我的字母数字字符序列,可在Apple会员中心找到)
如果有人知道是什么导致了这一切,我将非常感激。
谢谢你!

myss37ts

myss37ts1#

检查以下内容是否适用于您的问题-它对我有帮助:http://mentalfaculty.tumblr.com/post/25241910449/under-the-sheets-with-icloud-and-core-data没有看到您的代码,很难对实际问题进行评论。

6tqwzwtp

6tqwzwtp2#

您也可以尝试以下代码,并在每次启动应用程序时调用它:
PFU质量基线元数据来自当前基线,用于名称为:模型版本哈希为:和普遍质量根位置为:的存储,错误为:
if (![[NSFileManager defaultManager] fileExistsAtPath:[[NSURL fileURLWithPath:[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"Logs"]] URLByAppendingPathComponent:@"current.nosync"].path]) { [PFUbiquityBaseline metadataFromCurrentBaselineForStoreWithName:@"AppStore" modelVersionHash:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"] andUbiquityRootLocation:[[NSURL fileURLWithPath:[[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"Logs"]] URLByAppendingPathComponent:@"current.nosync"] withError:nil]; }

相关问题