icloud

iOS 9 CloudKit: query does not return anything while connected to cellular network

老子叫甜甜 提交于 2019-11-28 00:54:18
I'm developing an app with xcode 7 beta 5. When i run my app on my iphone 6 and i try to connect it to CloudKit if my iphone works in wifi mode all it's ok, i display all my data; but if my iphone works in LTE mode i can't see any kind of data. Does anyone know how to do this? func getRecordsFromCloud() { lavori = [] / let _cloudContainer = CKContainer.defaultContainer() let publicDatabase = CKContainer.defaultContainer().publicCloudDatabase / let predicate = NSPredicate(value: true) let query = CKQuery(recordType: "Lavori", predicate: predicate) / let queryOperation = CKQueryOperation(query:

Can I use iCloud to sync the NSUserDefaults plist file

自古美人都是妖i 提交于 2019-11-27 20:12:53
I was wondering if it was possible to use iCloud to sync an app's preferences file between devices. The preference file I am talking about is the com.domain.appname.plist file created by NSUserDafults to store the app's preferences. I would like to have the option of keeping my app's preferences file in sync between two different devices (an iPad and an iPhone, for example). Is this an acceptable use of iCloud syncing? Or would I need to convert the plist file into a different type of document, store it on the cloud, and convert it back into the app's preferences file upon retrieving it?

Exposing an app's ubiquitous container to iCloud Drive in iOS 8

那年仲夏 提交于 2019-11-27 18:10:40
I'm developing an iCloud-enabled app where users will be able to import and export files via iCloud Drive. When browsing iCloud Drive, either using the UIDocumentPickerViewController (iOS 8) or the Finder (OS X Yosemite), I can see directories created/owned by other iCloud-Drive-enabled apps, such as, Automator, Keynote, or TextEdit. I want our app to expose its ubiquitous documents directory in iCloud Drive, too, but haven't been able to figure it out yet. Within some of the aforementioned apps' Info.plist files, I've discovered this key: <key>NSUbiquitousContainers</key> <dict> <key>com

More iCloud Core Data synching woes

允我心安 提交于 2019-11-27 17:56:52
So, it finally happened. The worst case scenario for any independent iPhone developer occurred. Several users are reporting complete data loss after upgrading my app. iCloud Core Data sync is not working. My users are using this app partially to run their businesses. This is a truly catastrophic failure . The only iCloud related thing I changed was to add the key-value store to iCloud. The core data code remained exactly the same, same model version (no migration) etc. In my tests everything worked beautifully! But to my dismay, users reported that their data was not there anymore when they

iCloud Drive Folder

拥有回忆 提交于 2019-11-27 17:01:00
问题 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. 回答1: Add these values to your info.plist file and change your build number . <key>NSUbiquitousContainers</key>

Using Core Data, iCloud and CloudKit for syncing and backup and how it works together

北战南征 提交于 2019-11-27 16:45:46
I am in the early stages of creating an app where I would like to save, sync and backup data. The app will not store any files just data in a database. It is going to be iOS 8 and up so I am able to use CloudKit. I did some research and still not clear on how Core Data, iCloud and CloudKit work together. As far as understand CloudKit is just a way of getting and retrieving data to/from the cloud. Is CloudKit just a different way of syncing data with iCloud? My questions are: If I do use CloudKit, do I still need to create local core data database? If yes will it be automatically synced with

iCloud enabled - Stop the open file displaying on application launch?

让人想犯罪 __ 提交于 2019-11-27 14:56:56
问题 I've just added iCloud support to an app that I am working on. Its working great, except that when I open the application without a document in focus the iCloud open file dialog appears and I don't want it to! In my app delegate I have: - (BOOL) applicationShouldOpenUntitledFile:(NSApplication *)sender { [mainWindowController.window makeKeyAndOrderFront:self]; return NO; } Which I use to show my own custom window. However now, both the iCloud open file dialog and my own dialog are displayed.

iCloud: Callback for NSFileManager's startDownloadingUbiquitousItemAtURL?

一个人想着一个人 提交于 2019-11-27 11:43:31
问题 I am using NSFileManager 's startDownloadingUbiquitousItemAtURL to download file from iCloud to local copy (the local does not yet have the copy of the file in this case). I can't seem to find the callback for this process. I need the callback to tell my app that the requested file is finished downloaded (to local copy) so other task can start reading the content of the file and does stuff. I can check to see if the file is downloaded. But it would involve in polling constantly. Is there a

Method for downloading iCloud files? Very confusing?

家住魔仙堡 提交于 2019-11-27 10:24:08
问题 I have basic iCloud support in my application (syncing changes, making ubiquitous, etc.), but one crucial omission so far has been the lack of "download" support for files that exist (or have changes) in the cloud, but are not in sync with what's currently on disk. I added the following methods to my application, based on some Apple-provided code, with a couple tweaks: The download methods: - (BOOL)downloadFileIfNotAvailable:(NSURL*)file { NSNumber* isIniCloud = nil; if ([file

How can I use iCloud to synchronize a .zip file between my apps?

这一生的挚爱 提交于 2019-11-27 09:53:59
问题 Is it possible to upload a .zip file to iCloud , and then have it be synchronized across all of a user's iOS devices? If so, how would I go about doing this? If there is any File size limit, then also mention max. file size allowed. 回答1: This is how I synchronized zip files with iCloud . Steps: 1) http://transoceanic.blogspot.in/2011/07/compressuncompress-files-on.html . Refer this link to download zip api which is having code for zipping and unzipping folder. 2) Now all you need to play with