icloud

Determine availability of iCloud Key Value Store

房东的猫 提交于 2019-12-30 05:03:07
问题 I am working on OSX 10.8 application that uses iCloud Key Value store. It does not use Document storage. I would like to determine if iCloud Key Value store is available for a user. I was trying to use cloud like: + (BOOL)isCloudAvailable { id currentCloudToken = [NSFileManager defaultManager] ubiquityIdentityToken]; return (currentCloudToken) ? YES : NO; } However, the call to ubiquityIdentityToken always returns nil, even when a user is logged into iCloud. If I configure a Ubiquity

Saving Modified Data in CloudKit

こ雲淡風輕ζ 提交于 2019-12-29 05:32:32
问题 I have been testing out CloudKit as i wish to release an app using it when the release of iOS8 occurs. It seems simple enough to save data using the code below: CKRecordID * recordID = [[CKRecordID alloc] initWithRecordName:@"basicRecord"]; CKRecord * record = [[CKRecord alloc] initWithRecordType:@"basicRecordType" recordID:recordID]; [record setValue:@"defaultValue" forKey:@"defaultKey"]; CKDatabase *database = [[CKContainer defaultContainer] publicCloudDatabase]; [database saveRecord:record

Best way to use iCloud Documents Storage

隐身守侯 提交于 2019-12-29 03:14:17
问题 I am currently using local storage in my iOS App. The user data is stored in the Document Directory and now I am planning to use iCloud Documents storage instead. Here is how I intend to do it : Checking if iCloud is available on the device If yes, use URLForUbiquityContainerIdentifier to get the iCloud container URL Save new files and documents to this new URL For that I am using this code that will return the URL of the document folder (iCloud or local) class CloudDataManager { class func

Xcode 6 iOS 8 iCloud core data setup

旧街凉风 提交于 2019-12-29 02:33:33
问题 Has anyone got iCloud core data syncing setup on Xcode 6 and iOS 8? (hopefully this isn't a duplicate post) Where did iCloud Core Data storage option go? I remember Core Data had an extra storage option called Core Data storage, but now in Xcode 6 it only seems to show key-value and document storage when I enable the iCloud toggle in Xcode 6. Background Info New iPad app Xcode 6 Targeting minimum version iOS 7 but hoping it works for iOS 8 too? (We can set iOS 8 as minimum) Want to use iCloud

Seed and maintain CloudKit public database without requiring iCloud login?

女生的网名这么多〃 提交于 2019-12-28 07:09:33
问题 The Apple docs say reads from an app's CloudKit public database can occur without an iCloud login, but writes cannot. Saving or updating records to the public database require an iCloud login. What if you want to seed and maintain the public database as an administrator? For instance, for a map app, if you as an administrator want to populate and maintain the public database with demographic data for each country, does your flow still require an iCloud login? If posting code snippets, Swift

Seed and maintain CloudKit public database without requiring iCloud login?

天大地大妈咪最大 提交于 2019-12-28 07:09:08
问题 The Apple docs say reads from an app's CloudKit public database can occur without an iCloud login, but writes cannot. Saving or updating records to the public database require an iCloud login. What if you want to seed and maintain the public database as an administrator? For instance, for a map app, if you as an administrator want to populate and maintain the public database with demographic data for each country, does your flow still require an iCloud login? If posting code snippets, Swift

iCloud basics and code sample [closed]

送分小仙女□ 提交于 2019-12-27 10:57:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . As a beginner, I'm struggling with iCloud. There are some samples, but they are usually quite detailed (on the developer forum there

subclassing initWithFileURL of an UIDocument

风格不统一 提交于 2019-12-25 09:08:54
问题 I'm trying to overwrite the initWithFileURL of an UIDocument as I need to call some custom methods once an UIDocument is initialised. I thought this may be a good idea: -(id)initWithFileURL:(NSURL *)url { self = [super initWithFileURL:url]; // do some custom stuff return self; } Is there anything else I need to do if I overwrite this? I have the feeling that I need to check for NIL or something. Where do you usually look if you need to overwrite a method with something custom? I was only able

Fetching Public Record From iCloud Using CloudKit

自作多情 提交于 2019-12-25 07:47:13
问题 I have the following code for uploading my assets to iCloud func uploadAsset(recordType: String, fileURL: URL) { let record = CKRecord(recordType: recordType) record["file"] = CKAsset(fileURL: fileURL) CKContainer.default().publicCloudDatabase.save(record) { savedRecord, error in if let saveError = error { print("An error occurred in \(saveError)") } else { print(savedRecord) } } } It definitely works because I am able to go onto the CloudKit dashboard, and physically see the records as well

Download image from iCloud Drive iOS objective C

自作多情 提交于 2019-12-25 05:24:26
问题 I have gone through many links, but nothing worked for me. All i need to do is fetch all iCloud Drive files and download images. I succeeded fetching all files using below code - (void)presentDocumentPicker { NSArray *documentTypes = @[@"public.content", @"public.text", @"public.source-code ", @"public.image", @"public.audiovisual-content", @"com.adobe.pdf", @"com.apple.keynote.key", @"com.microsoft.word.doc", @"com.microsoft.excel.xls", @"com.microsoft.powerpoint.ppt"];