CloudKit Dashboard

RSS for tag

Monitor and manage the CloudKit database containers used by your apps.

CloudKit Dashboard Documentation

Posts under CloudKit Dashboard tag

16 Posts
Sort by:
Post not yet marked as solved
2 Replies
457 Views
To create records in the Cloudkit Dashboard I was previously able to enter dates into a record field but now I can't. The dashboard won't accept any entries from the keyboard. I can enter all the other fields (text and double) but not a date. Why?
Posted
by
Post not yet marked as solved
1 Replies
382 Views
I have two Core Data entities synching with CloudKit nicely. When I query records for one in the Dashboard, the results are displayed as expected. However, when I query records for the other entity, the Dashboard goes black (completely, I mean, no navigation, etc.). I can confirm that changes to the records are synching across devices. I just can't figure out what is making the Dashboard query fail. Has anyone else encountered the same issue? Was there a solution? (BTW, I have made recordName queryable, since I've had that problem in the past. Also, my app is in development - not production.)
Posted
by
Post marked as solved
3 Replies
573 Views
So I'm trying to create a new subscription based on a predicate. The predicate is if there is a new Record (of type Message) with conversationID to a given conversation ID. Okay so I've enabled notifications on my device and subscriptions do get sent to CloudKit. But then when I go onto the CloudKit dashboard I get this response: Error fetching subscriptions. Expected this response but could not parse it: HTTP 200, text: [{"subscriptions":[{"type":"query","subscriptionId":"CDF6D9BD-77E5-41C6-BC18-3AD1A49E1A7D","query":{"recordType":"Message","filters":{"fieldName":"conversationID","fieldValue":{"type":"stringType","value":"C8356727-83A0-4981-9C62-48B891B376EB"},"type":"EQUALS"}]},"firesOn":["CREATE"],"firesOnce":false,"zone":{"zoneName":"_zoneWide","canonicalName":"_zoneWide","ownerRecordName":"_df807ec5aa88995e336922b90835b528"}}]} So I'm confused about this. It seems like that is the response I was looking for, and I'm not sure why it can't query it. I remember seeing in another question something about there being an issue with a listEmpty or something. But I'm querying on a string so I don't understand why it's not working. my CloudKit code looks like this: func setNotifications(convoID: String) {     let database = CKContainer.default().publicCloudDatabase     let pred = NSPredicate(format: "conversationID == %@", convoID)     let newSubscription = CKQuerySubscription(recordType: RecordType.Message, predicate: pred, options: [.firesOnRecordCreation])     let notification = CKSubscription.NotificationInfo()     notification.alertBody = "You have a new message"     notification.shouldSendContentAvailable = true     newSubscription.notificationInfo = notification     database.save(newSubscription) { (subscription, error) in          if let error = error {               print(error)               return          }          if let _ = subscription {               print("Hurrah! We have a subscription")          }     } } Thanks!
Posted
by
Post marked as solved
2 Replies
548 Views
Hello, I'm seeing issues with getting multiple duplicate notifications for the same CKRecord creation when a CKQuerySubscription has been created for them. I have tried to diagnose but don't see anyway I could be generating 10+ duplicates for a single record creation in the public database (also have users, in production, experiencing this same issue). Note: The CKQuerySubscription is created for every new user when they enable notifications and looks only at one when a CKRecord is being created. It also doesn't set a specific subscription ID (not sure if this is the issue or not). Thanks, Camden
Posted
by
Post marked as solved
1 Replies
382 Views
I am unable to preview any telemetry charts in the dashboard for a couple of weeks now. This happens for every member on our team and on any brower/device we try. Anyone else also experiencing this issue?
Posted
by
Post not yet marked as solved
4 Replies
487 Views
I've been using CK Dashboard for several years to maintain updates that propagate to user apps. Recently I have had a problem adding or updating any record that has an asset in it. Adding the asset seems to go fine until I hit the "Save" button. Then it comes back with "! Load Failed". This happens every time. I'm using the latest build of Safari in Big Sur 11.6.1. I have searched preferences to see if somehow Safari does not have access permissions, but it does not matter what directory the uploaded file resides in - it fails every time. I can download a record with an asset, but if I change the asset and save, it fails. Saving from a live app in iOS continues to work fine. This seems to be some sort of permission issue, but I am the only user and I have all permissions enabled. Logging out/back in has no effect. This problem exists in both my M1 iMac and M1 MacBook Air (Monterey). Looking for anyone else having the problem before filing a bug.
Posted
by
Post not yet marked as solved
0 Replies
250 Views
My app is backing up / restoring data in the app using CloudKit. I've been using the same code since early 2020, and I've had the problem since a few months ago (around September 2021). The problem is as below. eg) If 30 pieces of data are uploaded using OperationQueue, the upload is completed within a few seconds. No error occurred in operation.perRecordCompletionBlock. Check the number of requested data using the CloudKit console log. However, if i use CKQuery to check the data, 1 or 2 pieces of data are missing for several minutes (approximately 10 minutes). This is the same whether you send a Query from the CloudKit console or use CKQuery using swift code. And after a few minutes, all the data is uploaded. Now, some users are writing this problem in reviews, but I have no way to solve it.
Posted
by
Post marked as solved
1 Replies
360 Views
When I try to access the cloud database it says No Containers I have everything set up correctly. Everything in the pics below with the gray outline has the same exact identifier iCloud.com.myCo.myApp Entitlements: Xcode: developer.apple: I did a deep clean, closed Xcode, reopened it, deep clean again, build. Still No Containers. This is a paid account.
Posted
by
Post marked as solved
1 Replies
351 Views
Hi,everyone I use CloudKit + CoreData to store data. It works normally during the test, but when I log in to CloudKit Dashboard, there is no record here, but there is a record of device access in the log. In addition, the icloud account and development account I used in the test are not the same account. Will this have an impact? Thank you.
Posted
by
Post not yet marked as solved
0 Replies
177 Views
When I query for all the records of a certain record type, and then I click on the record name to view the record, I get this error at the bottom of the window pane that shows the details of the specific record: BadRequestException: endpoint not applicable in the database type 'sharedb' What is "endpoint" referring, what does it mean and what is causing this error message? Here is the part of the schema that defines the two record types involved: RECORD TYPE Group ( "___createTime" TIMESTAMP, "___createdBy" REFERENCE, "___etag" STRING, "___modTime" TIMESTAMP, "___modifiedBy" REFERENCE, "___recordID" REFERENCE QUERYABLE, debugTag STRING QUERYABLE SEARCHABLE SORTABLE, groupData BYTES, GRANT WRITE TO "_creator", GRANT CREATE TO "_icloud", GRANT READ TO "_world" ); RECORD TYPE LocalGroupIdentifier ( "___createTime" TIMESTAMP, "___createdBy" REFERENCE, "___etag" STRING, "___modTime" TIMESTAMP, "___modifiedBy" REFERENCE, "___recordID" REFERENCE QUERYABLE, groupReference REFERENCE, localGroupIdentifier STRING QUERYABLE SEARCHABLE, GRANT WRITE TO "_creator", GRANT CREATE TO "_icloud", GRANT READ TO "_world" ); The error comes when I view the details of a record of type Group. I use UICloudSharingController and CKModifyRecordsOperation as Apple Documentation shows in the Apple Documentation for UICloudSharingController and Sample Code: Sharing CloudKit Data with Other iCloud Users. It works just fine when I create the CKShare object. When I use the url to accept the share, it works fine except for the error in question, which shows when I view the record of type Group and the record of type LocalGroupIdentifier, which has a reference to the record of type Group. I use exactly one record of type Group and one record of type LocalGroupIdentifier. I used two different simulators with different Apple IDs for sharing and for accepting the share. They are both iPhone 8 with iOS 15.4. The share I create is in the private database, and the share accepted is in the shared database.
Posted
by
Post marked as solved
3 Replies
221 Views
Having trouble using CloudKit. I used this code: let publicDatabase = CKContainer(identifier: "iCloud.***.XXXX").database(with: .public) With the correct container instead of "XX" and enabled these capabilities: Background modes: remote notifications enabled iCloud: CloudKit enabled Note this is not the default container - I had to create a new one because the default one is loading incorrectly in the dashboard - "Error loading container details.").  App is not recording records to public iCloud database. Please help, I am new to Swift and Xcode. Here is some debugging (edited to make it shorter): 0..> test_useLegacySavePolicy:YES archivingUtilities:<PFCloudKitArchivingUtilities: 0x..0> storeOptions: { NSInferMappingModelAutomaticallyOption = 1; NSMigratePersistentStoresAutomaticallyOption = 1; NSPersistentCloudKitContainerOptionsKey = "<NSPersistentCloudKitContainerOptions: 0x2..30>"; NSPersistentHistoryTrackingKey = 1; NSPersistentStoreMirroringOptionsKey = { NSPersistentStoreMirroringDelegateOptionKey = "<NSCloudKitMirroringDelegate: 0x2...c0>"; }; } CoreData: debug: CoreData+CloudKit: <NSCloudKitMirroringDelegate: 0x2...>: Observing store: <NSSQLCore: 0x1...0> CoreData: CloudKit: CoreData+CloudKit: ...<NSCloudKitMirroringDelegate: 0x2....c0>: Successfully enqueued setup request. CoreData: CloudKit: CoreData+CloudKit: ....<NSCloudKitMirroringDelegate: 0x2...0>: Checking for pending requests. CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(2941): <NSCloudKitMirroringDelegate: 0x....6c0>: Executing: <NSCloudKitMirroringDelegateSetupRequest: 0x...7a80> 2022-04-19 11:10:09..00 [Snapshotting] Snapshotting a view (0x10600e400, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES. CoreData: debug: CoreData+CloudKit: ...Skipping migration for 'ANSCKDATABASEMETADATA' because it already has a column named 'ZLASTFETCHDATE' ... CoreData: CloudKit: CoreData+CloudKit: -[PFCloudKitSetupAssistant _checkUserIdentity:]_block_invoke(1235): <PFCloudKitSetupAssistant: 0x28...>: CKIdentity record matches store: <CKRecordID: 0x280...; recordName=_17385bb3..., zoneID=_defaultZone:defaultOwner> 2022-04-19 11:10:10.130670-0400 error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1106): <NSCloudKitMirroringDelegate: 0x2833256c0>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x104....610> <CKError 0x2807902a0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = E88D-A....3D7-B4; container ID = "iCloud.XXXX"; partial errors: { com.apple.coredata.cloudkit.zone:defaultOwner = <CKError 0x280797a80: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = 5F3....3571; uuid = E8810E9D-23....3D7-C9....8A7...B4> }>
Posted
by
Post marked as solved
1 Replies
153 Views
Not sure what I am doing wrong here, but my "record" variable keeps returning "nil". When I run the savetoCloud() function, it crashes because record is "nil" (when it should have the data to be uploaded to CloudKit instead). Help please. I have this in a .swift file: import Foundation import CloudKit public class dbData: NSObject{ var record: CKRecord? var lightDB: Bool?{ didSet{ record!["Light"] = lightDB } } init(record: CKRecord){ self.record = record self.lightDB = self.record!["Light"] as? Bool } convenience init(light: Bool) { self.init(record: CKRecord(recordType: "Location", recordID: CKRecord.ID(recordName: UUID().uuidString))) self.lightDB = light } } And then this on the main View Controller: import UIKit import CloudKit class MapViewController: UIViewController { let publicDatabase = CKContainer(identifier: "iCloud.XXXX").database(with: .public) var dbdata: dbData? @IBOutlet weak var lightSW: UISwitch! override func viewDidLoad() { super.viewDidLoad() public func savetoCloud(){ let light = lightSW.isOn let record = self.dbdata?.record record!["Light"] = light self.dbdata?.record = record publicDatabase.save(record!) { (record, error) in if let error = error{ print("Error\(error.localizedDescription)") return } print("Record saved: \(record?.recordID.recordName ?? "")") } }
Posted
by
Post not yet marked as solved
2 Replies
162 Views
Anyone know how to load a large number of records into the CloudKit public database? I need to load 1.2million records (about 150Mb) into the public database. no binary data. basically just a bunch of exchange rates that I need to have available to all my users. I've been trying for months. have tried: loading into core data on a device or simulator individually or in batches ranging from 400 records to 2500 (more than that exceeds batch size limits). it will start to sync and then stop. can often get it to restart by restarting device or similator but will eventually corrupt the database in iCloud requiring a reset of the environment. generally can get the load to go for a few days and load maybe 500k records before it breaks. to do that have to put delays up to a minute between batches loaded into core data. have tried doing it using the CloudKit.js framework and loading from a server. this works for a small number of records. but limits are really small doing it through that interface. after a while it locks you out. don't get anywhere near the number of records I need to load. I'm stuck. has anyone found a way? same issue on all versions of iOS - 14, 15, 16b1
Posted
by
ngb
Post not yet marked as solved
2 Replies
57 Views
I'm trying to modify a CloudKit record type on my dev env but every time I add a field all my indexes get deleted leaving only the basic ones. I have tried resetting multiple times (losing all the test data along with it, very annoying) but it just keeps deleting indexes and sometimes record fields too. This is preventing me to test on the dev environment, and since all the indexes get deleted it also prevents me from pushing the changes to the production environment without readding all the indexes back manually again. Is this a bug on CloudKit dashboard? How can I fix this?
Posted
by