cloudkit

CloudKit Delete Self option for CKReference Doesn't work

余生长醉 提交于 2019-12-22 04:42:39
问题 Does anybody have experience using the CloudKit option to DeleteSelf for a CKReference ? Here is what I got from the docs: DeleteSelf The delete action for referenced records. Deleting a record also deletes any records containing CKReference objects that point to that record. The deletion of the additional records may trigger a cascade deletion of more records. The deletions are asynchronous in the default zone and immediate in a custom zone. So I've been testing this out, I have created

CloudKit fetchRecordChangesOperation gives a “AppDefaultZone does not support sync semantics”

筅森魡賤 提交于 2019-12-22 04:09:35
问题 I'm using a CKFetchRecordChangesOperation with a CKFetchRecordsChangeToken to grab changes and it is telling me that the "AppDefaultZone does not support sync semantics". Here is the offending code: - (void)downloadServerChangesWithCompletionBlock:(void (^)(NSError *error))completionBlock { // Prepare to fetch remote changes CKDatabase *database = [CKContainer defaultContainer].privateCloudDatabase; CKRecordZoneID *zoneID = [[CKRecordZoneID alloc] initWithZoneName:CKRecordZoneDefaultName

How to create user in CloudKit? [closed]

狂风中的少年 提交于 2019-12-21 21:37:58
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . In Parse, to make a new user, I used: var user = PFUser() user.username = "myUsername" user.password = "myPassword" user.email = "email@example.com" What's the code used in CloudKit to create a new user and use it for login? 回答1: I had to do something similar recently. I had to

Increment field value in a CKRecord variable without fetching?

一笑奈何 提交于 2019-12-21 19:56:44
问题 I am curious is it somehow possible to increment a field value in a CKRecord variable without fetching? So on client I am not curious about the recent value, I just want to increase whatever be the value is. The reason, operation should be as quick and easy as possible, instead of two message 'stream', I want initiate only one. 回答1: Unfortunately you can not. You have to read, change and then write the record. Make sure that you use the CKModifyRecordsOperation and leave the savePolicy to

CloudKit fetch all subscriptions from the current user

﹥>﹥吖頭↗ 提交于 2019-12-21 18:13:56
问题 I manage to save, change and delete records in Apples CloudKit. I even got notifications working with subscriptions, what I can not find out is, how do i list all subscriptions for the current user. Here is my code so far: let operation = CKFetchSubscriptionsOperation() operation.fetchSubscriptionCompletionBlock = { (d, e) -> Void in println("got subscription") if e != nil { println("Error") dump(e) } dump(d) } publicDatabase.addOperation(operation) What I got is: got subscription Error -

How to grant discoverUserInfoWithUserRecordID permission?

我们两清 提交于 2019-12-21 06:35:30
问题 To retrieve actual logged in iCloud user's info via CloudKit, I need to call the discoverUserInfoWithUserRecordID method. Its API says: The user must have granted the CKApplicationPermissionUserDiscoverability permission for this container. How does it work? 回答1: Swift CKContainer.defaultContainer().requestApplicationPermission(CKApplicationPermissions.PermissionUserDiscoverability, completionHandler: { applicationPermissionStatus, error in // check (applicationPermissionStatus ==

iCloud and Xcode 6 - Ubiquity Container

北城余情 提交于 2019-12-21 04:14:38
问题 I am currently working on an app for iOS 8 which uses iCloud Drive and the CloudKit Framework. Everything was set up by using Xcode 6. When I try to submit my App to iTunesConnect I get the following error: When I'm adding the Key in my iCloud entitlements I'm not able to Code sign the app and Xcode sends me an error,too. <key>com.apple.developer.ubiquity-container-identifiers</key> <string>de.sn0wfreeze.CloudFInder</string> I'll get that error: And I'm not able to Code sign. Can anyone

How do the CloudKit security roles and permissions work?

只谈情不闲聊 提交于 2019-12-21 03:57:28
问题 There are three default security roles in CloudKit: World Authenticated Creator And three permissions: Create Read Write How do these security roles and permissions work? Here are examples of some of the questions I would hope get answered by an explanation of security roles: What do the three roles mean? The first two seem obvious, but the last one seems less so. E.g. does Creator refer to the creator of the table, or the creator of a record? Where would the deletion permission fall under?

CloudKit: “Internal Error” (1/4000); “Couldn't get a signing certificate”>

十年热恋 提交于 2019-12-21 03:09:13
问题 I'm running on simulator and the app works fine, but once on an iPhone device it crashes with - An error occured in discoverUserInfo:: The discoverUserInfo is copied code from Apple's CloudKit sample code below. Is this something on Apple's end, or mine? - (void)discoverUserInfo:(void (^)(CKDiscoveredUserInfo *user))completionHandler { [self.container fetchUserRecordIDWithCompletionHandler:^(CKRecordID *recordID, NSError *error) { if (error) { [self showAlert]; // In your app, handle this

Not receiving CloudKit push notifications for Custom Record Zone on the Mac

江枫思渺然 提交于 2019-12-20 23:29:54
问题 I've setup a custom zone subscription to receive (silent) push notifications from my custom record zone. Everything works fine on my iOS devices but I'm not able to receive the notifications on my Mac. To register the notifications I'm registering the notification type in applicationDidFinishLaunching : [[NSApplication sharedApplication] registerForRemoteNotificationTypes:NSRemoteNotificationTypeNone]; (Tried the other types with the same result) application