cloudkit

SWIFT: I dont get notifications from my CloudKit app?

送分小仙女□ 提交于 2019-12-08 10:13:52
问题 I asked this question and people have answered but nothing ever works. This is very important to me that I can get this to work. Here is some of my code: @IBAction func sendSweet(sender: AnyObject) { //delegate method let newSweet = CKRecord(recordType: "Extra1") newSweet["content"] = textField.text let publicData = CKContainer.defaultContainer().publicCloudDatabase publicData.saveRecord(newSweet, completionHandler: { (record:CKRecord?, error:NSError?) -> Void in if error == nil { dispatch

Is there any option to export all cloud kit data?

孤街醉人 提交于 2019-12-08 09:40:21
问题 I am working on a application and I setup a development environment. Now I want to move to production environment. is There any option for moving all the data from development to production in cloud kit? or Can I export all the data in Json format? 回答1: When you deploy to production only the schema is copied, not the data. You will either have to write code to copy the data (E.g. JSON as you mentioned or persist the data locally in CoreData, synchronise with the development environment, then

Is it possible to find user’s contacts that also have Apple devices?

萝らか妹 提交于 2019-12-08 08:26:56
问题 Given the iOS Address Book API, or possibly other App Store friendly APIs, is it possible to find the user’s contacts that also use iOS? The only heuristic I was able to come up with was finding all contacts that have a kABPersonPhoneIPhoneLabel phone number – but that method has a lot of both false positives and negatives. 回答1: This is now possible using CloudKit and the CKDiscoverAllContactsOperation class. You only get the user’s contacts that also use the same app and have given an

CKQuerySubscriptions are not supported in a sharedCloudDatabase

这一生的挚爱 提交于 2019-12-08 06:40:00
问题 I noticed that the docs mention that the newly introduced shared CloudKit databases do not support CKQuerySubscription (in earlier iOS versions these were called CKSubscription ). So I guess that means that it is not possible to notify users when privately shared records have changed. Major disappointment. Has anyone run into this problem? 回答1: According to the WWDC video about CloudKit this year: So, new this year in iOS 10, there's an API called CKDatabaseSubscription. This allows you to

Possible to set default CloudKit container not based on application name?

蓝咒 提交于 2019-12-08 05:20:52
问题 When I turn on CloudKit in Xcode, it set and create a default container based on the name of the app . Is it possible to set a different default name? I do not want to see a new container name on the list in CloudKit dashboard, but use an existing one. 回答1: Janos answer is correct, although I think you even after selecting a different iCloud container, you also have to say so in your code? let container = CKContainer(identifier: "iCloud.com.kukodajanos.Dating") let publicDB = container

CloudKit CKShare userDidAcceptCloudKitShareWith Never Fires on Mac App

只愿长相守 提交于 2019-12-08 03:43:22
问题 I am working on accepting a CKShare in a macOS app in Swift 4. I've already done all the following: Create the CKShare and save it with its rootRecord to CloudKit Add a participant ( CKShare.Participant ) I've confirmed that the CKShare is on the CloudKit server and that the person I invited has access to it. Here's a screenshot: https://d.pr/i/0sMFQq When I click the share link associated with the CKShare , it opens my app, but nothing happens and userDidAcceptCloudKitShareWith doesn't fire.

Why is iCloud account/CKContainer not being found

天涯浪子 提交于 2019-12-08 03:27:50
问题 Please see my updated question below: I am working on my first app with CloudKit. I'm trying to test whether a user is connected to iCloud, before looking for transactions. This is my code (showing various tests): func isICloudContainerAvailable()->Bool { CKContainer.default().accountStatus { (accountStat, error) in if (accountStat == .available) { print("iCloud is available") } else { print("iCloud is not available") } } CKContainer.default().accountStatus { (accountStatus, error) in switch

Fetch Record Assets in CloudKit Using Swift

匆匆过客 提交于 2019-12-08 03:22:30
问题 I am new to CloudKit and I am having trouble connecting the assets in my database to the ImageView and TextView in my app. In my CloudKit database, under record types, I created a record named "Companies". I then went to Public Data->Default Zone and then created a new instance of the record called "myCompany". In "myCompany" I have two assets, an image and a .txt file. I want to connect those assets to my app. I am not sure if I need to use CKQuery or what is the best approach. Any advice

CKQuerySubscriptions are not supported in a sharedCloudDatabase

一笑奈何 提交于 2019-12-08 03:17:27
I noticed that the docs mention that the newly introduced shared CloudKit databases do not support CKQuerySubscription (in earlier iOS versions these were called CKSubscription ). So I guess that means that it is not possible to notify users when privately shared records have changed. Major disappointment. Has anyone run into this problem? According to the WWDC video about CloudKit this year: So, new this year in iOS 10, there's an API called CKDatabaseSubscription. This allows you to subscribe to any change across an entire database, and it works in a private database, in a shared database.

Full CoreData uploading (backup) to iCloud Drive and restore if need

淺唱寂寞╮ 提交于 2019-12-08 03:12:54
问题 My project is CoreData-based application. Is it enough to upload sqlite-file to CloudDrive for restoring data when need? Is there any tutorials how to implement it? 回答1: Nothing for you to do. Just enable iCloud and it will always be backed up and restorable automatically. See Enable iCloud with Core Data. It's really simple. 来源: https://stackoverflow.com/questions/30886331/full-coredata-uploading-backup-to-icloud-drive-and-restore-if-need