cloudkit

Update progress with MRProgress

前提是你 提交于 2019-12-13 07:41:03
问题 I'm looking for help with trying to update a progress indicator using the MRProgress framework. I was able to set up the progress indicator, but I have no idea how to calculate and update its progress. I'm using CloudKit and trying to show the progress when saving a CKRecord. Could someone provide me some direction? Thanks in advance! self.hud = [MRProgressOverlayView showOverlayAddedTo:self.myCollectionView animated:YES]; self.hud.mode = MRProgressOverlayViewModeDeterminateCircular; self.hud

iOS 8 CloudKit: CKNotifications keep showing up, marked as CKNotificationTypeReadNotification

房东的猫 提交于 2019-12-13 05:25:01
问题 Whenever I query for past CKNotifications using CKFetchNotificationChangesOperation , I keep on getting a whole bunch that are marked as CKNotificationTypeReadNotification . And indeed, I have read them before, marked them as read (using CKMarkNotificationsReadOperation ), and am updating my lastServerChangeToken when querying. Why do they keep showing up? Thanks. 回答1: This started working…and, unfortunately, I'm not sure why. 来源: https://stackoverflow.com/questions/27007014/ios-8-cloudkit

how to make watchkit extension app and my iphone app share the same icloud databases

走远了吗. 提交于 2019-12-13 04:35:13
问题 Im trying to make my app for the apple watch but I am running into a problem with the cloud containers. When I created cloud kit for the watch extension it created its own container/database so now Im trying to get them both to share the same one. Ive tried to specify the custom container I want but it is not working. Please Help! 回答1: Since your watch app will use a specific CloudKit container you have to initiate your container using the identifier. You can not use the defaultContainer. So

How do I get a list of RecordTypes in a Database?

为君一笑 提交于 2019-12-13 03:59:45
问题 I want to list all records in a Database. To do this using CKQuery, it appears I must have a recordType. The predicate will be TRUEPREDICATE. How can I get a list of RecordTypes, for eventual use within CKQuery? (e.g. I'll loop through the list, and create new CKQuery objects at run time.) 回答1: As strange as it may seem, there is no way to determine what record types exist in a Cloud Kit database. Your code should be creating records with specific record types so your code should already know

How to retrieve AppleID of logged in user via CloudKit?

北城以北 提交于 2019-12-12 20:27:17
问题 I figured out how to retrieve first / lastName of a logged in user. Is there a way to get the AppleID too?! var defaultContainer = CKContainer.defaultContainer() var publicDatabase = defaultContainer.publicCloudDatabase defaultContainer.discoverUserInfoWithUserRecordID(recordID, {userInfo, error in println("firstName: \(userInfo.firstName?) lastName: \(userInfo.lastName?)") }) 回答1: You cannot retrieve the current user's email address - you're going to have to ask for it outside of CloudKit.

cloudkit “Your request contains more than the maximum number of items in a single request (400)”

佐手、 提交于 2019-12-12 19:28:16
问题 When doing a query with [publicDatabase performQuery:query inZoneWithID:nil completionHandler:^(NSArray *results, NSError *error) {... I get the following error, if the returned results count is 100 or higher 70] Error: <CKError 0x170641a70: "Invalid Arguments" (12/1020); "Your request contains more than the maximum number of items in a single request (400)"> I am in developer mode with the backend. Does this mean, I can't do a query with more than 100-200 returned objects? That not much...

Saving CKAsset to CKRecord in CloudKit produces error: “No authToken received for asset”

拜拜、爱过 提交于 2019-12-12 19:09:42
问题 This is the full error message I am getting when I try to save a CKAsset to a CKRecord . I haven't seen this error before nor can I find any information about it anywhere . Has anyone heard of this before? <CKError 0x17064ccf0: "Partial Failure" (2/1011); "Failed to modify some records"; partial errors: { 4B1CD9BE-3B67-49C5-AC39-F8379A5041C9:(_defaultZone:__defaultOwner__) = <CKError 0x174451a90: "Internal Error" (1/1000); "No authToken received for asset"> AC51EFE8-E370-4286-9510

CKAsset in server record contains no fileURL, cannot even check for nil

房东的猫 提交于 2019-12-12 12:19:10
问题 I am testing a sync conflict when I save a record that contains a CKAsset (simply a JPG image) using CKModifyRecordsOperation with a save policy of .IfServerRecordUnchanged . I am getting the error CKErrorCode.ServerRecordChanged . This CKError returns me useful information for conflict resolution, including the CKRecord I tried to save, and the current server version of the record. The first is in error.userInfo[CKRecordChangedErrorClientRecordKey] the second is in error.userInfo

How can I use CloudKit web services to query based on a reference field?

有些话、适合烂在心里 提交于 2019-12-12 10:48:32
问题 I've got two CloudKit data objects that look somewhat like this: Parent Object: { "records": [ { "recordName": "14102C0A-60F2-4457-AC1C-601BC628BF47-184-000000012D225C57", "recordType": "ParentObject", "fields": { "fsYear": { "value": "2015", "type": "STRING" }, "displayOrder": { "value": 2015221153856287200, "type": "INT64" }, "fjpFSGuidForReference": { "value": "14102C0A-60F2-4457-AC1C-601BC628BF47-184-000000012D225C57", "type": "STRING" }, "fsDateSearch": { "value": "2015221153856287158",

CloudKit didReceiveRemoteNotification not called on the Mac

谁说我不能喝 提交于 2019-12-12 10:06:55
问题 I am using the following CKNotification Info and this seems to work fine: CKNotificationInfo *note = [[CKNotificationInfo alloc] init]; note.alertBody = @"Something Happened"; note.shouldBadge = NO; note.shouldSendContentAvailable = NO; When something changes on an iOS device, my Mac app receives a Push notification based on a subscription with this notification. However, didReceiveRemoteNotification is never called so I can't process the event. I need to be able to refresh and fetch new