icloud

My app is getting crashed on UIDocumentPickerViewController

落爺英雄遲暮 提交于 2019-11-28 12:05:13
I am working on file sharing on my iOS App, I am new to UIDocumentPickerViewController . I do not know why my app is crashing. UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; documentPicker.delegate = self; documentPicker.modalPresentationStyle = UIModalPresentationFormSheet; [self presentViewController:documentPicker animated:YES completion:nil]; App is crashing on the highlighted lines. Has anyone done this previously? I want to do the same like the attachment below See

Where we have to store download data in iPhone application?

陌路散爱 提交于 2019-11-28 10:15:36
I am working on In-App-Purchase and downloading data after payment in users /Documents folder. Apple has rejected my application it's says you are not following iOS Data Storage guideline. Can any one help me how to implement iCloud functionality in my application? Thank you According to the iOS Data Storage Guidelines you should probably be storing your purchased data inside the Application_Home/Library/Caches directory. The downloaded data does not belong in the Documents folder. Apple provides a list of the various directories and what you should put in those in the File System Programming

Why was my application still rejected after excluding files from iCloud backup using this code?

本秂侑毒 提交于 2019-11-28 09:34:14
I have added the following code to exclude files from iCloud backup, but my application was still rejected: - (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL { if (&NSURLIsExcludedFromBackupKey == nil) { // iOS <= 5.0.1 const char* filePath = [[URL path] fileSystemRepresentation]; const char* attrName = "com.apple.MobileBackup"; u_int8_t attrValue = 1; int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0); return result == 0; } else { // iOS >= 5.1 NSLog(@"%d",[URL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:nil]);

Open iCloud Drive in iOS app

这一生的挚爱 提交于 2019-11-28 09:18:54
I want to allow document(pdf, doc, docx) selection in my app. And I want to integrate iCloud for this. All I want to do is to open the iCloud drive from my app and there user can select the file and returns back to the origin app. Something like whatsapp has done for document selection in iOS app. Any idea regarding this? Read this below link you will get idea: https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentPickerProgrammingGuide/AccessingDocuments/AccessingDocuments.html Below is the code : -(IBAction)iCloudDriveFullFolder:(id)sender{

Why my app is not shown in iCloud Drive Folder

﹥>﹥吖頭↗ 提交于 2019-11-28 06:58:40
iCloud Drive Folder doesn't show my app's folder. This is how I send a file to iCloud Drive: - (IBAction)btnStoreTapped:(id)sender { // Let's get the root directory for storing the file on iCloud Drive [self rootDirectoryForICloud:^(NSURL *ubiquityURL) { NSLog(@"1. ubiquityURL = %@", ubiquityURL); if (ubiquityURL) { // We also need the 'local' URL to the file we want to store //NSURL *localURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Photo" ofType:@"pdf"]]; NSURL *localURL = [self localPathForResource:@"document" ofType:@"doc"]; NSLog(@"2. localURL = %@", localURL); //

Swift write/save/move a document file to iCloud drive

◇◆丶佛笑我妖孽 提交于 2019-11-28 06:36:55
I've been trying for over two days to write a file to iCloud drive. I have tried writing a simple text file directly, locally then moving it, using UIDocumentMenuViewController, etc. I'm not getting any errors with my code and stepping through debugger, it looks successful, but when I check to see if the file exists or at least the iCloud directory, there is nothing there. I tried on both the simulator and my iPhone, triggering iCloud synching, and everything else I can think of. My main goal is to simply write a text file to the iCloud drive, which later will be "numbers" file I have set up

Is it possible to intercept iCloud switching on/off in Settings -> iCloud -> Document & Data?

为君一笑 提交于 2019-11-28 05:31:26
问题 Is it possible to intercept if the user switches from on to off the iCloud support under Settings -> iCloud -> Document & Data ? Obviously when he does this the app has already resigned active and entered the background. I am targeting iOS7 and I would like to keep in sync the UIManagedDocument , otherwise it would be like having two different UIDocuments: one with iCloud support and all the data created until the switch from on to off and a new one without any data in it. If I create data

Disable backup of documents folder and all its sub folders on icloud?

只谈情不闲聊 提交于 2019-11-28 04:31:28
问题 I have an already running enterprise application which stores a lot of documents inside the documents folders. I wish to disable the iCloud backup of all these documents and folders inside the Documents folder. The problem is that the contents inside the folder keep on changing dynamically and the idea of adding kCFURLIsExcludedFromBackupKey for every files sounds a bit difficult, as there are multiple classes in my code which can write to the documents directory. Is there any way I can

iCloud + CoreData - how to avoid pre-filled data duplication?

南笙酒味 提交于 2019-11-28 04:25:14
I have a problem with an iCloud shoebox application and hope some-one can help me (I've spent many hours fighting it in vain). The App: - A simple library style application - containing set of categories (Cat1 .. CatN) each containing items (Item1...ItemM). I used Apple's iPhoneCoreDataRecipes to set up iCloud CoreData stack. Everything works almost perfect with iCloud except - there should be a number of pre-filled empty categories the user can start using once he has opened the app for the first time (he can also be offline at that time). And here's the devil. Here's what I do - Once my

Does iOS keychain storage persist when restoring an app to a new device?

◇◆丶佛笑我妖孽 提交于 2019-11-28 04:17:56
问题 My question is directly related to this one but is different: iOS: keychain on new devices or on restores. The poster is curious if you store information in keychain storage, does it get backed up to iTunes and iCloud so that when you restore it to another device the data are persisted. A partial answer to the OP's own question was: But now I read that the keychain is only restored if the backup is encrypted in iTunes (don't know about iCloud backups). The accepted answer was: You can