icloud

iCloud: can I ignore those who disable iCloud?

允我心安 提交于 2019-11-30 19:18:47
I'm struggling a bit with the idea of iCloud and posted a more general question here . My biggest problem is to decide whether I should stop putting the user's data in the good old documents folder which is found in the app's sandbox. To illustrate my problem: The docs don't give an answer as far as I can see. Let's suppose I have an App which handles different txt files. Once I start my app, I simply check if any txt files are in the cloud like so: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSLog(@"AppDelegate: app did finish

How to use iCloud for syncing my sqlite database and images that resides in the folder in the library folder of application

独自空忆成欢 提交于 2019-11-30 18:48:26
问题 My requirement is , The app I am working on is having a folder name called "Private docmunets " created in the Library folder that reside in the application folder.There are images and a sqlite file which records users entries and images in this folder. I have to make my app iCloud enabled, so I have to sync my sqlite database and all the images stored in Private docmunets folder on iCloud. From the last two weeks I am searching for this but I did not get the right direction how to proceed.

CKFetchNotificationChangesOperation returning old notifications

*爱你&永不变心* 提交于 2019-11-30 18:15:30
问题 I'm working on a CloudKit-based app that uses CKSubscription notifications to keep track of changes to a public database. Whenever the app receives a push notification I check the notification queue with CKFetchNotificationChangesOperation and mark each notification read after processing it: __block NSMutableArray *notificationIds = [NSMutableArray new]; CKFetchNotificationChangesOperation *operation = [[CKFetchNotificationChangesOperation alloc] initWithPreviousServerChangeToken:self

EXC_BAD_ACCESS using iCloud on multiple devices

喜夏-厌秋 提交于 2019-11-30 17:38:08
问题 I'm creating an app with iCloud. But I have some problem. It creates directory on iCloud using NSFileWrapper, then it creates NSData (container) file in NSFileWrapper directory. I'm using this code to convert NSFileWrapper to NSMutableArray: NSFileWrapper *MyWrapper=[[[MyDocument data] fileWrappers] objectForKey:@"myFile.doh"]; NSData *MyData=[NSData dataWithData:[MyWrapper regularFileContents]]; NSMutableArray *MyList=[NSPropertyListSerialization propertyListFromData:MyData mutabilityOption

Setting NSDocumentDirectory so it doesn't backup to iCloud

半腔热情 提交于 2019-11-30 16:32:56
I'm trying to mark the entire folder of my app's NSDocumentDirectory so that it is excluded from the iCloud backup, but when I go to the terminal and run: xattr -plxv com.apple.MobileBackup I get this error: No such xattr: com.apple.MobileBackup Thank you in advance for any help offered. Here is the code I'm using: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSURL *pathURL=

How can I resolve this iCloud Error?

旧巷老猫 提交于 2019-11-30 16:05:28
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 following log on iPad B which was connected to the computer. 2012-01-20 17:35:35.979 My-App[407:22d7]

backing up prevent from the app in iCloud

烂漫一生 提交于 2019-11-30 16:01:28
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, YES) lastObject]; NSURL *pathURL= [NSURL fileURLWithPath:documentPath]; [self

Determine availability of iCloud Key Value Store

给你一囗甜甜゛ 提交于 2019-11-30 15:28:05
I am working on OSX 10.8 application that uses iCloud Key Value store. It does not use Document storage. I would like to determine if iCloud Key Value store is available for a user. I was trying to use cloud like: + (BOOL)isCloudAvailable { id currentCloudToken = [NSFileManager defaultManager] ubiquityIdentityToken]; return (currentCloudToken) ? YES : NO; } However, the call to ubiquityIdentityToken always returns nil, even when a user is logged into iCloud. If I configure a Ubiquity Container as well as the key-value store then that call does work. However, I've just had my app rejected by

Should URLForUbiquityContainerIdentifier: be called in a thread outside the main thread?

北慕城南 提交于 2019-11-30 15:22:47
问题 I've read a lot of conflicting information about whether or not URLForUbiquityContainerIdentifier: should be called outside the main thread or not. In a lot of Apple's documentation they always call this method presumably on the main thread. However, I've also read that it's possible that calling this method could block for a significant time. What is everyone's thoughts? Call it in the main thread and don't worry or yes, ALWAYS make this call in another thread? 回答1: NSFileManager can be

Should URLForUbiquityContainerIdentifier: be called in a thread outside the main thread?

不打扰是莪最后的温柔 提交于 2019-11-30 14:16:12
I've read a lot of conflicting information about whether or not URLForUbiquityContainerIdentifier: should be called outside the main thread or not. In a lot of Apple's documentation they always call this method presumably on the main thread. However, I've also read that it's possible that calling this method could block for a significant time. What is everyone's thoughts? Call it in the main thread and don't worry or yes, ALWAYS make this call in another thread? MobileOverlord NSFileManager can be blocking and is recommended to run on a different thread than the main thread. Here is a snippet