icloud

IOS 5.1 Backup / Restore App file from Documents Directory to / from iCloud

时光毁灭记忆、已成空白 提交于 2019-12-11 18:24:01
问题 I have created a database (IOS 5.1) with XCode 4.3.3 for the iPad and have set it up so that the user can backup and restore the database file (*.sqlite) to DropBox. Everything works fine... Now I would like to do the same process but, set it up for iCloud. Looking for the following function: Tap a button to backup the *.sqlite file from the Apps Document Directory up to iCloud at users preference. Tap a button to copy the *.sqlite file down from iCloud to the Apps Document Directory. I have

Using NSURLIsExcludedFromBackupKey in NativeScript

纵然是瞬间 提交于 2019-12-11 16:23:15
问题 In react native we have: type MkdirOptions = { NSURLIsExcludedFromBackupKey?: boolean; // iOS only }; What is the equivalent in NativeScript? I need a directory under knownFolders.documents() that will not be backed-up to iCloud. 回答1: Try this, NSURL.URLWithString(path).setResourceValueForKeyError(true, NSURLIsExcludedFromBackupKey); Where path is complete path of your file or folder. 来源: https://stackoverflow.com/questions/58363089/using-nsurlisexcludedfrombackupkey-in-nativescript

Setting up NSMetadataQueryDidUpdateNotification for a simple response

為{幸葍}努か 提交于 2019-12-11 13:59:39
问题 I'm trying to get up and running with an NSMetadataQueryDidUpdateNotification on an OS X app, to alert me when a file in my iCloud ubiquity container is updated. I've been doing a lot of research (including reading other Stack answers like this, this, this, and this), but I still don't have it quite right, it seems. I've got a "CloudDocument" object subclassed from NSDocument, which includes this code in the H: @property (nonatomic, strong) NSMetadataQuery *alertQuery; and this is the M file:

Invalid Code Signing Entitlements, error while submitting app to apple

∥☆過路亽.° 提交于 2019-12-11 13:43:40
问题 I am developing an app with iCloud enabled. While uploading the app to apple I got following error: Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported by iOS. Specifically, key `'com.apple.developer.icloud-container-identifiers' in Payload ------- not supported` While surfing i also got some answer that disable iCloud,but I want to use iCloud feature for my app, so is there any other way to overcome this problem,

iCloud Error “The operation couldn't be completed. (LibrarianErrorDoman error 10 - Unable to configure the collection.)”

南笙酒味 提交于 2019-12-11 12:59:27
问题 i want to migrate my existing app to iCloud. in my attempt to learn what to do, i have tried a sample app that has worked as described in the demo (as seen in lecture 17 of the iTunes stanford university course). can someone who has had this problem help me diagnose what step i messed up to cause the following to fail? is this just telling me basically that there's no data to query? or is there something else going on that i haven't properly configured? i am getting the following in my

iCloud wont sync on the first launch

你说的曾经没有我的故事 提交于 2019-12-11 12:11:31
问题 I have a bug where my app wont pull icloud inforamtion on the first launch but it does on the subsequent tries. here is my code to load a file from icloud. void DLC::loadFromiCloud(std::string fileName){ NSURL *mUbiqUrl = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; if (mUbiqUrl) { std::string fullPath = getLibraryPath_iOS() + fileName; NSString* restorePath = [NSString stringWithUTF8String:(fullPath.c_str())]; NSError *error = nil; NSURL *fileToDownload = [mUbiqUrl

Core data + iCloud: exclude certain attributes from sync?

独自空忆成欢 提交于 2019-12-11 11:36:44
问题 I am trying to implement core data sync using iCloud. However, there is one attribute that I don't want to sync. Is there a proper way to tell iCloud to sync most managed objects and attributes, but not others? 回答1: Right now, Core Data + iCloud does not support this kind of configuration. You may have to split your Data into two Persistent Stores (lokal, cloud). 回答2: One workaround would be to add the things you do not wish to sync to an entity that includes a unique device identifier. In

iCloud Core Data Model Schema Migration

蓝咒 提交于 2019-12-11 11:35:11
问题 Acording to Apple's Document, The lightweight migration for core data connected with iCloud can be performed automatically. And another documents from Apple says that: If you migrate a persistent store configured with a NSPersistentStoreUbiquitousContentNameKey option to a new model version, the store’s history of changes originating from the current device will also be migrated and then merged with any other devices configured with that new model version. Any changes from stores using the

iCloud synchronization on tvOS

家住魔仙堡 提交于 2019-12-11 11:12:46
问题 has anybody managed to get iCloud working on tvOS so far? I am using key-value-storage and it successfully saves everything in iCloud. However, it does not synchronize the data between the iOS-App and the tvOS-App. I am using the same bundle-identifier for both apps. Has anyone experienced the same issue? 回答1: So, it appears that Apple may have an issue here on the tvOS side, because if I follow Apple's instructions on Configuring Common Key-Value Storage for Multiple Apps I can share between

Swift: 'IN' query alternative using NSPredicate for fetching records from iCloud

独自空忆成欢 提交于 2019-12-11 10:56:39
问题 In iCloud , I want to search in Item's table, where I have userId column in swift but I didn't know how Table: User UserId {String type} UserName {String type} Table: Item ItemId {String type} ItemName {String type} UserId {String type} I need NSPredicate alternative to this query Select * from item where userId in (2,3,4) Also, is there any way so I can fire sql query directly in iCloud? Is this is the correct way of doing above in Swift? var orList = [NSPredicate]() orList.append