icloud

html input type=file — Select a file from iCloud

有些话、适合烂在心里 提交于 2019-12-13 01:44:53
问题 I'm developing a Cordova / PhoneGap-based application that has an embedded text editor. To access selected files, I'm having the user browse the mobile device by using the html <input type=file> element: <div class="control-row"> <label for="selFile" class="topcoat-button">{{t 'view.lblSelect'}}</label> <input type="file" value="" id="selFile" multiple> </div> On iOS, however, clicking on the input element brings up Photos instead of allowing me to pick iCloud documents. Is there a way to

Tracking upload progress of iCloud files

元气小坏坏 提交于 2019-12-13 01:28:17
问题 I'm writing a Unity plugin which makes use of iCloud. Now the way I currently use to move files to iCloud is using this code: [byteDocument saveToURL:savePathURL forSaveOperation:UIDocumentSaveForCreating completionHandler:^(BOOL success) { if (ubiquitousContainerURL != nil) { NSURL *ubiquityDocumentDirectory = [ubiquitousContainerURL URLByAppendingPathComponent:@"Documents" isDirectory:YES]; ubiquityDocumentDirectory = [ubiquityDocumentDirectory URLByAppendingPathComponent:[NSString

Is there a good way to backup Core Data database with iCloud integration?

☆樱花仙子☆ 提交于 2019-12-13 01:03:59
问题 Is there a good way to backup my sqlite information from iCloud in case CoreData sqlite + iCloud corrupts? Copying the .sqlite to another location? When the iCloud corrupts, reading the data out from the .sqlite to create a new iCloud sqlite? 回答1: use migratePersistentStore API to create a copy of the store file in the devices /Documents directory where it will get backed up. See here for a more complete explanation and a sample app. http://ossh.com.au/design-and-technology/software

Attaching iWork documents from iCloud Document Picker does not work because they are directories not files

假装没事ソ 提交于 2019-12-13 00:22:42
问题 Converting any iWork documents ( Pages , Keynote , Numbers ) into NSData from the UIDocumentPickerViewController does not seem to be working since they are not files but directories. Here is my code: NSString *fileName = [[url path] lastPathComponent]; NSData *fileData = [[NSFileManager defaultManager] contentsAtPath:[docPickerUrl path]]; NSString *fileExtension = [docPickerUrl pathExtension]; NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag

Export & Import Documents using iCloud in IOS

China☆狼群 提交于 2019-12-12 19:19:03
问题 I am developing an app that makes user to export core data records into an document using iCloud Drive/iCloud Documents/iCloud Kit and he can able to import and access those document at another device. I mean Export/Import of documents within devices that are using same application. Documents can be identified by unique document name for importing.. Please Give any suggestions for above task. Which one is more useful..or suggest any other useful links for above task. 1) iCloud Documents.

Saving CKAsset to CKRecord in CloudKit produces error: “No authToken received for asset”

拜拜、爱过 提交于 2019-12-12 19:09:42
问题 This is the full error message I am getting when I try to save a CKAsset to a CKRecord . I haven't seen this error before nor can I find any information about it anywhere . Has anyone heard of this before? <CKError 0x17064ccf0: "Partial Failure" (2/1011); "Failed to modify some records"; partial errors: { 4B1CD9BE-3B67-49C5-AC39-F8379A5041C9:(_defaultZone:__defaultOwner__) = <CKError 0x174451a90: "Internal Error" (1/1000); "No authToken received for asset"> AC51EFE8-E370-4286-9510

CloudKit didReceiveRemoteNotification not called on the Mac

谁说我不能喝 提交于 2019-12-12 10:06:55
问题 I am using the following CKNotification Info and this seems to work fine: CKNotificationInfo *note = [[CKNotificationInfo alloc] init]; note.alertBody = @"Something Happened"; note.shouldBadge = NO; note.shouldSendContentAvailable = NO; When something changes on an iOS device, my Mac app receives a Push notification based on a subscription with this notification. However, didReceiveRemoteNotification is never called so I can't process the event. I need to be able to refresh and fetch new

App Crash if iCloud is on (linked to sync with coreData)

我只是一个虾纸丫 提交于 2019-12-12 09:19:58
问题 This is the code i used in the init for storage class and it worked fine until recently.. when i tried testing it, it crashes (marked below) at addPersistentStoreWithType ... i noticed this after switching to the iPhone 5 and was trying to run the app... but if i turn off icloud on my phone or test it on the simulator there are no problems... -(id)init { self = [super init]; if(self) { NSLog(@"%s", __FUNCTION__); favColors = [[NSMutableArray alloc] init]; model = [NSManagedObjectModel

iOS App Persistent Settings After App Deleted

纵饮孤独 提交于 2019-12-12 08:58:50
问题 We are creating an app as follows: User starts with 2 free "tokens" User can buy a pack of 10 tokens with $.99 in-app purchase We have implemented this using NSUserDefaults to save the number of tokens. Is there a way to make our free 2 token setting persistent? Even if they delete the app? Right now you can delete the app and reinstall to get 2 tokens again. iOS 5 has NSUbiquitousKeyValueStore for saving settings to iCloud, is that any better? If not we will have to use a web service for