icloud

UIManagedDocument example / tutorial

血红的双手。 提交于 2019-11-29 14:53:22
问题 I have been trying very unsuccessfully to create a simple UIManagedDocument library style application (separate documents saved to iCloud). I am confused with the following: Do I subclass UIManagedDocument and set up the persistentStoreCoordinator , ManagedObjectModel & ManagedObjectContext within this subclass, or are these supposed to be configured within the AppDelegate (and if so, how do I go about refreshing the persistentStoreCoordinator to look at the new file - it seems that once that

How to programmatically detect if the iCloud is enabled on user's device when only use NSUbiquitousKeyValueStore?

狂风中的少年 提交于 2019-11-29 12:06:12
问题 I am using NSUbiquitousKeyValueStore to sync some preference data to iCloud. I found that if the user disable "Document & Data" item of iCloud in "Setting App", NSUbiquitousKeyValueStore can not synchronize its data to iCloud. So, I want to first check if this setting is switched on. I found this Code snippet: NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; NSLog(@"url=%@",ubiq); if (!ubiq) { UIAlertView *av = [[UIAlertView alloc] initWithTitle:nil

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

[亡魂溺海] 提交于 2019-11-29 11:32:15
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 disable the upload of the entire documents folder and its subfolder. Perhaps the files are changing

NSMetaDataQuery never calls back with NSMetadataQueryDidFinishGatheringNotification

谁说胖子不能爱 提交于 2019-11-29 10:41:28
For an iCloud plugin I'm writing, I subscribe my iCloud manager class to these iCloud NSMetaDataQuery observers: // Add a predicate for finding the documents NSString* filePattern = [NSString stringWithFormat:@"*.%@", @"*"]; self.metadataQuery = [[NSMetadataQuery alloc] init]; // Before starting to query, it is required to set the search scope. arrayWithObject:NSMetadataQueryUbiquitousDocumentsScope]]; // It is also required to set a search predicate. [self.metadataQuery setPredicate:[NSPredicate predicateWithFormat:@"%K LIKE %@", NSMetadataItemFSNameKey, filePattern]]; // Listen for the

“Couldn't send a valid signature” error when using CloudKit without iCloud account

ε祈祈猫儿з 提交于 2019-11-29 06:33:40
I have submitted an iOS app that uses CloudKit to Apple. It's being rejected because it requires user to sign into iCloud for access. Apple's reasoning is that even without iCloud sign-in, the public database is still readable. So that part of the app should function. I am trying to modify the app but I continue to get this error when I am not signed in. <CKError 0x8141a360: "Internal Error" (1/4000); "Couldn't send a valid signature"> I have searched the web and the solution is always just to sign into iCloud. There is no Apple documentation regarding this error either. Does anyone know how

Managing Core Data iCloud Transaction Logs

最后都变了- 提交于 2019-11-29 02:53:33
问题 I am using iCloud with Core Data, based on the SQLite "Library-style" application design as specified by Apple. While the basic functionality works very well, I am concerned about the transaction logs and how they are managed. While the database for my app is not large, it is very active and the core data stack is saved many times while the app is in use. I have noticed that a new transaction log is created for every core data save. The end result is that I have a TON of transaction logs and

iCloud Drive Folder

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 02:39:52
I have an OSX app that uses iCloud documents with the older Team ID ubiquity key. Does anyone know how to get the ubiquity folder to appear in the iCloud drive folder? I have already tried using the NSUbiquitousContainerIsDocumentScopePublic key set to true in the applications pList to no effect. Folders that appear in the iCloud drive include Apple's application, and Pixelmator. Maximilian Litteral Add these values to your info.plist file and change your build number . <key>NSUbiquitousContainers</key> <dict> <key>iCloud.com.example.app</key> <dict> <key

How enable iCloud support for sqlite?

本小妞迷上赌 提交于 2019-11-29 02:22:42
I want to provide iCloud support for my wrapper around sqlite. Is not using coredata. I wonder how enable iCloud for it. The database content is changed all the time (is for invoicing). Also, if is possible to have some kind of versioning will be great. Exist any sample I can use to do this? The short answer is no, you would need to use Core Data as you suspected. Apple has stated that sqlite is unsupported. Edit: Check out the section on iCloud that's now in the iOS Application Programming Guide under Using iCloud in Conjunction with Databases Using iCloud with a SQLite database is possible

How do I delete a CloudKit container?

这一生的挚爱 提交于 2019-11-29 02:06:42
问题 I accidentally created a new container in CloudKit, and it is really annoying that it comes up when I open dashboard. Any suggestion how to delete? On developer.apple.com I don't see a delete button for containers. 回答1: Apple's iOS CloudKit documentation: Enable iCloud and Select CloudKit Important: When you select CloudKit, Xcode creates a default container ID based on the bundle ID. Because you can’t delete iCloud containers , verify that your bundle ID is correct in the General pane in

iCloud set up and provisioning

血红的双手。 提交于 2019-11-29 01:51:13
I am trying to set up iCloud within my iOS application, I have done the following: Removed all old certs on mac. Added iCloud to the App in Dev Console - created new container and added to app Redone the dev provision and downloaded Installed the provision Added the iCloud Entitlement to the app And this is where is all goes wrong... I can't get the app running again, the app is building but I am getting an error saying: The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016). Any ideas?? UPDATE: I