icloud

How do I verify a file's existence in iCloud?

不问归期 提交于 2019-12-19 11:59:17
问题 I know that the file exists, because I can download it, but I need to check to see whether it exists. I have tried using [NSFileManager contentsOfDirectoryAtPath:error:] but it gives me null. I don't understand why that is because I can still download the files that I'm looking for. Maybe it's an incorrect URL, but the URL that I'm using is the one that I printed at creation of my UIDocument that I'm looking for. Maybe I'm using the wrong method? EDIT: I have also tried using NSMetadataQuery,

Why is NSMetadataQueryDidUpdateNotification being called several times in quick succession?

耗尽温柔 提交于 2019-12-19 10:05:31
问题 In order to monitor file changes in my iCloud container, I've registered for [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(processiCloudUpdates:) name:NSMetadataQueryDidUpdateNotification object:nil]; Ideally, whenever I receive the message that updates have been made, I'd like to open each of my UIDocs and check if settings have been changed. This would be fine, if NSMetadataQueryDidUpdateNotification was only called once. However, it is being fired several times

iOS5 data storage issue. Where to save files?

前提是你 提交于 2019-12-19 06:19:25
问题 Firstly, I have read these: (1) http://www.gaiagps.com/news/article/iOS5%20Breaks%20Data%20Storage%20and%20Crushes%20My%20Soul (2) http://iphoneincubator.com/blog/data-management/local-file-storage-in-ios-5 (I can not submit more than two hyperlinks because I'm a noob.) and all the related developer forum threads in apple.com. Problem : with the new iOS5, we need to save files to /Caches folder, and save only user generated files to the /Documents folder. And caches folder may be deleted

How can I migrate the data from the iCloud store file to a new store file in local storage?

妖精的绣舞 提交于 2019-12-19 05:00:15
问题 I have iCloud in my app. I've removed iCloud from my app, but on ios 6 app crashes and I get this message: -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:](1055): CoreData: Ubiquity: Error: A persistent store which has been previously added to a coordinator using the iCloud integration options must always be added to the coordinator with the options present in the options dictionary. If you wish to use the store without iCloud , migrate the data from

How can I resolve this iCloud Error?

帅比萌擦擦* 提交于 2019-12-18 18:05:12
问题 Hi I am trying to get my core data app syncing to iCloud so that multiple devices can be used. I just started a new iCloud account for testing and installed my app on both devices. I have enabled my app for iCloud using instructions at this link Using CoreData with icloud and by also comparing my app to apple's coreDataRecipes example code. I was not getting any syncing occurring so I did some logs to find out what was occurring. After adding an object to core data from iPad A i received the

How can I resolve this iCloud Error?

社会主义新天地 提交于 2019-12-18 18:04:11
问题 Hi I am trying to get my core data app syncing to iCloud so that multiple devices can be used. I just started a new iCloud account for testing and installed my app on both devices. I have enabled my app for iCloud using instructions at this link Using CoreData with icloud and by also comparing my app to apple's coreDataRecipes example code. I was not getting any syncing occurring so I did some logs to find out what was occurring. After adding an object to core data from iPad A i received the

backing up prevent from the app in iCloud

ε祈祈猫儿з 提交于 2019-12-18 17:13:13
问题 The way apple storage guidelines is creating more problem for me because most of the data i am maintaining from the Documents directory (files,dataBase and some kind of app related stuff).Recently i uploaded a binary file to the app store it was rejected and apple provided me a report according to this point i am going to change my code as a below - (NSString *)applicationDocumentsDirectory { NSString *documentPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,

CloudKit not returning the most recent data

早过忘川 提交于 2019-12-18 14:52:49
问题 I am having this issue where I save something to the icloud using CloudKit but immediately fetching the results doesn't return the latest data inserted. Example let todoRecord = CKRecord(recordType: "Todos") todoRecord.setValue(todo, forKey: "todotext") publicDB.saveRecord(todoRecord, completionHandler: { (record, error) -> Void in NSLog("Saved in cloudkit") let predicate = NSPredicate(value: true) let query = CKQuery(recordType: "Todos", predicate: predicate) self.publicDB.performQuery(query

URLForUbiquityContainerIdentifier returns nil even if configured correctly

99封情书 提交于 2019-12-18 12:56:22
问题 I am having the problem, that URLForUbiquityContainerIdentifier is returning nil in some cases even if the user has set up everything correctly in the settings. My code: dispatch_async(someQueue, ^{ if (![[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]) { ErrLog(@"iCloud container not available."); return; } dispatch_async(dispatch_get_main_queue(), ^{ [...] }); }); Does anybody came across the same problem? I am setting nil as the container identifier which should work

How to integrate iCloud on a non Document-based app?

隐身守侯 提交于 2019-12-18 12:38:18
问题 I've read the Apple docs and Ray Wenderlich's tutorial. It seems that I'm forced to use UIDocument so I read it up in the docs. I've found that it's effective to use Document-based approach. My problem is I don't want to be tied in techniques specific to the platform (iOS) thus my app has its own models made from scratch that only inherit from NSObject. This includes saving/loading. Now, I need to integrate iCloud along with my old models. How will I do it in an elegant/effective way where I