我正在我的应用程序核心数据中实现iCloud。 但问题是当我在添加持久存储时切换iCloud帐户应用程序崩溃。以下是我得到的错误日志
Error: Error Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256.)" UserInfo=0x1cd3c600 {NSFilePath=/private/var/mobile/Library/Mobile Documents/E7E99FZSXM~com~tpt~mobileinventorynavigator/data/.baseline/com.tpt.mobilecommoditytrader.store200hij/R374GT_SOtlsru2c6ZdIu7SJvDIGqlBCc9juS0aP_0k=/baseline.zip, NSUnderlyingError=0x1cd3d000 "The operation couldn’t be completed. Bad file descriptor"}
" UserInfo=0x1cd3d850 {NSLocalizedDescription=<PFUbiquityBaseline: 0x1cd3e4d0>(0)
permanentLocation: <PFUbiquityLocation: 0x1cd3e320>: /private/var/mobile/Library/Mobile Documents/E7E99FZSXM~com~tpt~mobileinventorynavigator/data/.baseline/com.tpt.mobilecommoditytrader.store200hij/R374GT_SOtlsru2c6ZdIu7SJvDIGqlBCc9juS0aP_0k=/baseline.zip
safeLocation: <PFUbiquityLocation: 0x1cd3da20>: /private/var/mobile/Library/Mobile Documents/E7E99FZSXM~com~tpt~mobileinventorynavigator/data/.baseline/com.tpt.mobilecommoditytrader.store200hij/R374GT_SOtlsru2c6ZdIu7SJvDIGqlBCc9juS0aP_0k=/mobile.CE450AC2-AB0D-5B69-BA2F-280ACE4DC4F5
currentLocation: <PFUbiquityLocation: 0x1cd3e320>: /private/var/mobile/Library/Mobile Documents/E7E99FZSXM~com~tpt~mobileinventorynavigator/data/.baseline/com.tpt.mobilecommoditytrader.store200hij/R374GT_SOtlsru2c6ZdIu7SJvDIGqlBCc9juS0aP_0k=/baseline.zip
storeName: com.tpt.mobilecommoditytrader.store200hij
modelVersionHash: R374GT_SOtlsru2c6ZdIu7SJvDIGqlBCc9juS0aP_0k=
baselineArchiveLocation: <PFUbiquityLocation: 0x1cd3e320>: /private/var/mobile/Library/Mobile Documents/E7E99FZSXM~com~tpt~mobileinventorynavigator/data/.baseline/com.tpt.mobilecommoditytrader.store200hij/R374GT_SOtlsru2c6ZdIu7SJvDIGqlBCc9juS0aP_0k=/baseline.zip
我还拦截了iCloud帐户更改并删除了商店文件并创建了新文件。但我没有成功。如果你知道我在做什么,请建议
答案 0 :(得分:0)
首先检查您在icloud帐户中登录的天气与否,以下代码
NSURL *ubiq = [[NSFileManager defaultManager]
URLForUbiquityContainerIdentifier:nil];
if(ubip== nil)
NSLOG(no icloud acount);
else
NSLOG(icloud acount);