Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iCloud exception the operation couldn't be completed no such file or directory, iOS8

Core data over iOS/ works fine, but while getting update or writing to the database in iOS 8, I get

2014-09-19 01:16:31.819 xxxxxx[369:57150] __45-[PFUbiquityFilePresenter processPendingURLs]_block_invoke(439): CoreData: Ubiquity: Librarian returned a serious error for starting downloads Error Domain=BRCloudDocsErrorDomain Code=5 "The operation couldn’t be completed.

(BRCloudDocsErrorDomain error 5 - No document at URL)" UserInfo=0x175a85c0 {NSDescription=No document at URL, NSUnderlyingError=0x175aefb0 "The operation couldn’t be completed. No such file or directory",

NSFilePath=/var/mobile/Library/Mobile Documents/xxxxx/CoreData/ATracker/mobile~268B3375-7A17-4FFA-89DE-AE1BF8DDB134/xxxxx/OJ~PXmuzk0E_yZN9NTVWA20~k_qcPzNgyW_uT_mz098=/8929F33C-BB6A-48B6-B16C-BF612D04D947.1.cdt} with userInfo {

NSDescription = "No document at URL";
NSFilePath = "/var/mobile/Library/Mobile Documents/xxxxx~xxxx~xxxxx/CoreData/xxxxx/mobile~268B3375-7A17-4FFA-89DE-AE1BF8DDB134/xxxxx/OJ~PXmuzk0E_yZN9NTVWA20~k_qcPzNgyW_uT_mz098=/8929F33C-BB6A-48B6-B16C-BF612D04D947.1.cdt";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\" UserInfo=0x175c2d50 {NSDescription=No such file or directory}";

} for these urls: (

"file:///var/mobile/Library/Mobile%20Documents/xxxxx~xxxx~xxxxx/CoreData/xxxxx/mobile~268B3375-7A17-4FFA-89DE-AE1BF8DDB134/xxxxx/OJ~PXmuzk0E_yZN9NTVWA20~k_qcPzNgyW_uT_mz098=/8929F33C-BB6A-48B6-B16C-BF612D04D947.1.cdt"

)

like image 907
user2585453 Avatar asked Sep 19 '14 00:09

user2585453


1 Answers

I had similar problem, not with iCloud, but with mainBundle. It could be that you are saving URL or filePath of your documents and then trying to read them by that URL/ filePath. However in iOS8 location of mainBundle is different (xxxxx~xxxx~xxxxx part of URL) each time you run your app. So you should save only file name and get the URL/ filePath for that on the fly each time. I'm not sure if this applies to iCloud Documents as well, but I hope this helps or leads you to the right direction.

like image 50
Andres Jakobson Avatar answered Oct 17 '22 22:10

Andres Jakobson