icloud

iOS: How can I merge conflicted UIDocument's in iCloud?

烂漫一生 提交于 2019-12-11 10:08:09
问题 I'm having trouble understanding what my options are to merge 2 or more conflicted versions of a UIDocument stored in iCloud. After detecting the document conflict, I currently use removeOtherVersionsOfItemAtURL to simply keep the latest version of the document's data. However, I would like to support merging conflicted documents. The only resources and tutorials I found referred to Core Data and persistent stores for merging, and the examples used things like SQLite , which I don't use. In

iCloud Cocoa Error 512

て烟熏妆下的殇ゞ 提交于 2019-12-11 09:25:51
问题 I'm trying to copy a file from my iCloud container to my apps' cache directory. I keep getting The operation couldn’t be completed. (Cocoa error 512.) in my log, which is a very broad error meaning NSFileWriteUnknownError , or the write failed and iOS doesn't know why. Here is the code for when the NSMetadataQuery finishes and has the file names in iCloud. I'll briefly describe the code below. - (void)loadData:(NSMetadataQuery *)query { NSArray *cache = [[NSFileManager defaultManager]

Existing Core Data Database Not Uploading to iCloud When Enabling iCloud On My App

。_饼干妹妹 提交于 2019-12-11 09:05:52
问题 I have a simple application out in the App Store which is a UITableView which is populated by the user filling in some UITextField s in a view that's called up modally. The user presses save and everything goes saved to Core Data and using NSFetchedResultsControllers , the UITableView is updated. I am now updating my application to introduce iCloud synching (and an iPad version). I'm new to iCloud development and although the post I followed http://goddess-gate.com/dc2/index.php/post/452 is a

iCloud: Getting an array of txt files present in the cloud on OS X

我的未来我决定 提交于 2019-12-11 08:26:52
问题 I am trying to get an array of txt files in my app's iCloud folder using a NSMetadataQuery as recommended by Apple: NSMetadataQuery *query = [[NSMetadataQuery alloc] init]; [query setSearchScopes:[NSArray arrayWithObject:NSMetadataQueryUbiquitousDocumentsScope]]; NSPredicate *pred = [NSPredicate predicateWithFormat:@"%K ENDSWITH '.txt'", NSMetadataItemFSNameKey]; [query setPredicate:pred]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(queryDidFinishGathering:) name

Core Data with iCloud causing low memory warnings and crashes, memory usage constantly grows

时光怂恿深爱的人放手 提交于 2019-12-11 08:24:42
问题 I'm working on a small hobby app and am running into a weird memory issue that only occurs when I use Core Data with iCloud. If I switch the app to use a local store, the memory usage over time is just fine (usually 17-18Mb). When I use the app with iCloud, the app continually uses more and more memory (adding about 4-5Mb every second) until it crashes. I've done some profiling with Instruments but can't figure out a reason as to why this is happening. Does anyone have any ideas as to how to

Sqlite sync with iCloud not updating data

℡╲_俬逩灬. 提交于 2019-12-11 08:15:40
问题 I am using iCloud for sqlite database sync between multiple devices. i have implemented this functionality in my app for sqlite sync. But data is updating after 5 mins on other devices. is this problem from iCloud side because as far as i know we cannot manually update iCloud. i know it is not correct to use sqlite for icloud sync but i have more 100 tables and i cannot migrate to core data. Please find my code below: AppDelegate.m [self checkForiCloudAccess]; [[sqlmessenger shared]

Warning in iCloud integration

本秂侑毒 提交于 2019-12-11 08:12:03
问题 I am trying to integrating iCloud. Everything works fine but when I try to read a file from iCloud I get a warning Like: Foundation called mkdir("/var/mobile/Library/Mobile Documents/.ubd/peer-E8A60A8F-FB9D-8721-F47C-hdffgdfg-v23/ftr/(A Document Being Saved By XYZ)"), it didn't return 0, and errno was set to 1. My Code to fetch Data: for (NSMetadataItem *item in results) { NSString *filename = [item valueForAttribute:NSMetadataItemDisplayNameKey]; NSURL *url = [item valueForAttribute

Is Team Identifier still necessary for iCloud Container

匆匆过客 提交于 2019-12-11 08:01:27
问题 I have a quick question: I noticed that with Xcode 6 that the default iCloud containers are named something like iCloud.com.company.myApp . Even though my Team-Id is selected under the General > Identity project settings. In the past I would have container ids including my Team-Id like ABC12D3EF8.com.company.myApp . Will I need to change the iCloud container to include the Team-Id for any future mac app? or is the iCloud prefix enough in a post iCloud Drive era? Thanks 回答1: The iCloud prefix

iCloud Documents & Data App Icon Unknown

☆樱花仙子☆ 提交于 2019-12-11 07:43:20
问题 I'm noticing that my game's app icon and name are listed as "Unknown" in the device's settings for Documents and Data. Is it safe to assume this is because the game is not yet released on the App Store? I know Game Center users a sandbox server for storing data when an app isn't yet released... it looks like iCloud uses live servers? Or am I setting something up wrong? Can anyone confirm one way or another? 回答1: I do believe this was the case - the live app store did not yet know the app, so

Why isn't startDownloadingUbiquitousItemAtURL:fileURL: starting a download of the item?

醉酒当歌 提交于 2019-12-11 06:30:02
问题 I'm using an NSMetadataQuery to check for files in iCloud. Inside the NSMetadataQueryDidFinishGatheringNotification handler, if the item isn't downloaded or downloading I start downloading it using startDownloadingUbiquitousItemAtURL:fileURL: - but recently, after using the app on two devices, the documents seem to have got stuck; startDownloadingUbiquitousItemAtURL:fileURL: doesn't kick off a download any more. Here's an abbreviated form of the code: for (NSMetadataItem * result in query