CloudKit Dashboard

RSS for tag

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

Posts under CloudKit Dashboard tag

90 Posts

Post

Replies

Boosts

Views

Activity

CloudKit Zones Limit
Hello, I'm going to implement CloudKit for my project, allowing the users share data. At this moment, I'm researching the Apple project (link below) and documentation for this purpose, and I see many times "CloudKit has a limit on how many zones a database can have." So I have doubts about what is this limit. For my purpose, each user will share 10/15 objects (imagine posts with: title, notes and photos) as maximum. This zone limit is per user? I have to worry about this limit with my expected usage of sharing / per user? The apple project: https://developer.apple.com/documentation/coredata/sharing_core_data_objects_between_icloud_users Thanks in advance, David
0
0
920
Mar ’23
CloudKit Public Database index generation is slow丨CloudKit 公共数据库索引生成非常缓慢
My App is an App based on CloudKit technology that helps users match each other in real time, so it relies heavily on CloudKit's service stability. One of the problems that happened in the past few days is that CloudKit's public database index generation became very slow, and the data generated by one user could be queried by another user in a few seconds before, now it takes nearly a minute. This makes it impossible for my app users to do real-time matching with this technology. Using an AppleID, create a CKRecord containing several items of data, save it to the defaultZone of the public database, and create QueryIndex for these items. Immediately use another AppleID to Query this record in the defaultZone with these data. Check how long to wait before this record is queried. Under normal circumstances, the database index should be built very quickly, taking less than 5 seconds to query the corresponding record. In fact this process is currently becoming so slow that I am currently spending up to a minute waiting to query this record. Besides, my app is mainly operated in China, please also check if only Guizhou on the Cloud will have such problem. ----- Chinese Translate 我的 App 是一个基于 CloudKit 技术,帮助用户实时互相匹配的 App。所以非常依赖 CloudKit 的服务稳定性 这几天发生的一个问题是,CloudKit 的公共数据库索引生成变得非常缓慢,之前一个用户生成的数据,另一个用户几秒钟就可以查询到,现在需要花费近1分钟 这就导致我的 App 用户无法通过这个技术完成实时匹配了 使用一个 AppleID,创建一个包含了几项数据的 CKRecord,保存到公共数据库的 defaultZone,并创建这几个数据的 QueryIndex 立即使用另一个 AppleID,在 defaultZone 中使用这几项数据 Query 这个 record 检查需要等待多久,这个 record 才会被查询到 正常情况下,数据库的索引建立应该很快,只需要花费不到5秒就可以 Query 到对应 record 实际上这个过程目前变得非常缓慢,我目前需要花费长达1分钟的等待时间才能查询到这个 record 另外我的 App 主要在中国运营,也请检查是不是只有云上贵州会有这样的问题
2
1
1.6k
Mar ’23
CloudKit get ( Request failed with http status code 500 ) response
I launch my app on App Store by APP ID 1660030802. This data saved on CloudKit private database I use another account to download to use but I got the response called 「Request failed with http status code 500」 I try to use my developer account to download same APP, I can use and no show this error response. So I would to figure another can't not use private database and show 500 error code when I query the data in private database?
0
0
883
Jan ’23
Core Data + CloudKit - data record type does not appear in CloudKit Dashboard
I created a blank SwiftUI project and included Core Data and Cloud Kit. By selecting Core Data and CloudKit while creating the project, Apple already included some Core Data sample code and entities in the project, and also a Persistence.swift file that contained NSPersistentCloudKitContainer code. The sample code included a SwiftUI list in ContentView, with an "Add" button to add timestamp to the list when pressing. **I suppose after some basic setup to the project and created the CloudKit container, the app data will auto sync and can be viewed in CloudKit dashboard, but it didn't. ** Here is what I have setup: Created the project with Core Data and Cloud Kit Haven't touch any code from the Persistence.swift file since Apple has already set it up. Also haven't touch the app struct, content view and core data entities (left all sample code untouched) Selected Automatically Manage Signing and Development Team, with a paid developer acc. Added iCloud Capability Selected CloudKit in iCloud Capability, Created CloudKit Container. Added Background Modes Capability and selected Remote Notification. And then: Launch simulator, launch app, being asked to sign in with Apple ID, and did so. Add some timestamps into SwiftUI list. Kill app and relaunch, the timestamps are still there, even del app and reinstall. Core Data sample code works perfectly. Went to the related container of CloudKit Dashboard, selected Records, Private Database, There are only "Users" in Record Type. No other record types were shown. There are some log but is too long to post here, and this is the link: https://stackoverflow.com/questions/73841882/core-data-cloud-kit-data-record-type-does-not-appear-in-cloudkit-dashboard Am I missing something?
2
0
1.9k
Oct ’22
No ModifedAt Index in CloudKit
Hi, I do not see an option to add 'modifiedAt' as an index to a record in a public database in CloudKit. I've added the modifiedTimsestamp index for both QUERYABLE and SORTABLE but that doesn't seem to be loading the Public database as expected. I can write to it just fine. I can't find any documentation stating that modifiedAt has been deprecated in favor of something else. The only thing I can find is this video from WWDC2020 on how to configure a Public database: https://developer.apple.com/videos/play/wwdc2020/10650/ I've been following along with Donny Wals CoreData book in attempting to learn this stuff. Any help would be greatly appreciated. Thanks Edit: I should probably mention I have reset the environment numerous times. I seem to share some of the pain in this post: https://developer.apple.com/forums/thread/682698
1
1
1.9k
Sep ’22
CloudKit deploy shows unchanged fields with `unknownType`
I reset my Development environment to match Production. Then I added a new field of type Asset. Attempting to deploy to Production shows 22 field changes and 12 index changes, with the field types being marked unknownType. The diff view shows the correct attribute types, but also reflects the proposed removal of indices. I'm hesitant to push to Production because iI worry my field types will be removed and my current users will see errors. Has anyone seen this before? Anyone know if this is a bug?
2
2
1.8k
Sep ’22
Updating Production Records In Public CloudKit Database From Console
Simple question I think, I am looking at using CloudKit instead of setting up my own server for my next app. I want to use the public database to store a list of articles that I create and the users can read. Can these articles be created/managed/edited from within the Cloudkit Console? I have seen on the video that CloudKit development records can be accessed but can I also access the records that are in production? I want to be able to login to console and add a new record to the production database but not sure if this is possible. Thanks
1
0
1.4k
Aug ’22
CloudKit Console: Containers do not appear
I am new to CloudKit - and my test on the Mac (Swift, M1, Monterey, XCode 14 Beta 4) which creates records appears to be working. However, when I log into the CloudKit Console, using the same account as the iCloud account my Mac is logged into, no containers appear. I have tried this several times over 2 days, and no containers appear in the console. The container I am using appears in iCloud storage (via System Preferences > iCloud > Manage), so it appears to be there on iCloud. Am I doing something wrong? What I want to do is query the data, which, I understand, you must use the Console to make it queryable. (It would be nice to be able to do this programmatically, but haven't found a way yet). Thank you.
1
2
1.4k
Aug ’22
CloudKit Dashboard Development Environment Deleting Indexes
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?
2
1
1.1k
Jul ’22
Loading large number of records into the CloudKit public database
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
2
1
1.6k
Jun ’22
CloudKit - CKRecord returning nil
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 ?? "")") } }
1
0
853
Apr ’22
Help with CloudKit
Having trouble using CloudKit. I used this code: let publicDatabase = CKContainer(identifier: "iCloud.XXX.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> }>
3
0
2.3k
Apr ’22
BadRequestException: endpoint not applicable in the database type 'sharedb' in CloudKit Dashboard when viewing records of a share accepted
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.
0
0
853
Apr ’22
Core Data+CloudKit:No record on CloudKit Dashboard
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.
1
2
2.7k
Feb ’22
CloudKit: Duplicate notifications for CKQuerySubscriptions
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
2
0
1.4k
Jan ’22
CloudKit Dashboard - Cannot add or update asset items
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.
4
0
1.5k
Jan ’22
Upload operation complete but not found by CKQuery few minutes
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.
1
0
629
Jan ’22
CloudKit Zones Limit
Hello, I'm going to implement CloudKit for my project, allowing the users share data. At this moment, I'm researching the Apple project (link below) and documentation for this purpose, and I see many times "CloudKit has a limit on how many zones a database can have." So I have doubts about what is this limit. For my purpose, each user will share 10/15 objects (imagine posts with: title, notes and photos) as maximum. This zone limit is per user? I have to worry about this limit with my expected usage of sharing / per user? The apple project: https://developer.apple.com/documentation/coredata/sharing_core_data_objects_between_icloud_users Thanks in advance, David
Replies
0
Boosts
0
Views
920
Activity
Mar ’23
CloudKit Public Database index generation is slow丨CloudKit 公共数据库索引生成非常缓慢
My App is an App based on CloudKit technology that helps users match each other in real time, so it relies heavily on CloudKit's service stability. One of the problems that happened in the past few days is that CloudKit's public database index generation became very slow, and the data generated by one user could be queried by another user in a few seconds before, now it takes nearly a minute. This makes it impossible for my app users to do real-time matching with this technology. Using an AppleID, create a CKRecord containing several items of data, save it to the defaultZone of the public database, and create QueryIndex for these items. Immediately use another AppleID to Query this record in the defaultZone with these data. Check how long to wait before this record is queried. Under normal circumstances, the database index should be built very quickly, taking less than 5 seconds to query the corresponding record. In fact this process is currently becoming so slow that I am currently spending up to a minute waiting to query this record. Besides, my app is mainly operated in China, please also check if only Guizhou on the Cloud will have such problem. ----- Chinese Translate 我的 App 是一个基于 CloudKit 技术,帮助用户实时互相匹配的 App。所以非常依赖 CloudKit 的服务稳定性 这几天发生的一个问题是,CloudKit 的公共数据库索引生成变得非常缓慢,之前一个用户生成的数据,另一个用户几秒钟就可以查询到,现在需要花费近1分钟 这就导致我的 App 用户无法通过这个技术完成实时匹配了 使用一个 AppleID,创建一个包含了几项数据的 CKRecord,保存到公共数据库的 defaultZone,并创建这几个数据的 QueryIndex 立即使用另一个 AppleID,在 defaultZone 中使用这几项数据 Query 这个 record 检查需要等待多久,这个 record 才会被查询到 正常情况下,数据库的索引建立应该很快,只需要花费不到5秒就可以 Query 到对应 record 实际上这个过程目前变得非常缓慢,我目前需要花费长达1分钟的等待时间才能查询到这个 record 另外我的 App 主要在中国运营,也请检查是不是只有云上贵州会有这样的问题
Replies
2
Boosts
1
Views
1.6k
Activity
Mar ’23
CloudKit get ( Request failed with http status code 500 ) response
I launch my app on App Store by APP ID 1660030802. This data saved on CloudKit private database I use another account to download to use but I got the response called 「Request failed with http status code 500」 I try to use my developer account to download same APP, I can use and no show this error response. So I would to figure another can't not use private database and show 500 error code when I query the data in private database?
Replies
0
Boosts
0
Views
883
Activity
Jan ’23
Core Data + CloudKit - data record type does not appear in CloudKit Dashboard
I created a blank SwiftUI project and included Core Data and Cloud Kit. By selecting Core Data and CloudKit while creating the project, Apple already included some Core Data sample code and entities in the project, and also a Persistence.swift file that contained NSPersistentCloudKitContainer code. The sample code included a SwiftUI list in ContentView, with an "Add" button to add timestamp to the list when pressing. **I suppose after some basic setup to the project and created the CloudKit container, the app data will auto sync and can be viewed in CloudKit dashboard, but it didn't. ** Here is what I have setup: Created the project with Core Data and Cloud Kit Haven't touch any code from the Persistence.swift file since Apple has already set it up. Also haven't touch the app struct, content view and core data entities (left all sample code untouched) Selected Automatically Manage Signing and Development Team, with a paid developer acc. Added iCloud Capability Selected CloudKit in iCloud Capability, Created CloudKit Container. Added Background Modes Capability and selected Remote Notification. And then: Launch simulator, launch app, being asked to sign in with Apple ID, and did so. Add some timestamps into SwiftUI list. Kill app and relaunch, the timestamps are still there, even del app and reinstall. Core Data sample code works perfectly. Went to the related container of CloudKit Dashboard, selected Records, Private Database, There are only "Users" in Record Type. No other record types were shown. There are some log but is too long to post here, and this is the link: https://stackoverflow.com/questions/73841882/core-data-cloud-kit-data-record-type-does-not-appear-in-cloudkit-dashboard Am I missing something?
Replies
2
Boosts
0
Views
1.9k
Activity
Oct ’22
No ModifedAt Index in CloudKit
Hi, I do not see an option to add 'modifiedAt' as an index to a record in a public database in CloudKit. I've added the modifiedTimsestamp index for both QUERYABLE and SORTABLE but that doesn't seem to be loading the Public database as expected. I can write to it just fine. I can't find any documentation stating that modifiedAt has been deprecated in favor of something else. The only thing I can find is this video from WWDC2020 on how to configure a Public database: https://developer.apple.com/videos/play/wwdc2020/10650/ I've been following along with Donny Wals CoreData book in attempting to learn this stuff. Any help would be greatly appreciated. Thanks Edit: I should probably mention I have reset the environment numerous times. I seem to share some of the pain in this post: https://developer.apple.com/forums/thread/682698
Replies
1
Boosts
1
Views
1.9k
Activity
Sep ’22
Error looking up Developer Teams XHR request failure
for the past few hours I get the following error for accessing my cloudkit dashboard Error looking up Developer Teams XHR request failure and when I sign and sign in again I get server error yet all my developer data is reachable and everything seems fine on front end anybody has similar issue
Replies
4
Boosts
1
Views
1.8k
Activity
Sep ’22
CloudKit Console Down?
I'm trying to access CloudKit Console and am currently receiving the following error: "XHR request failure" Additionally, signing in directly to the console results in a Server not Found error in Safari. Is anyone else having this problem? Is CloudKit Console down?
Replies
2
Boosts
0
Views
941
Activity
Sep ’22
CloudKit deploy shows unchanged fields with `unknownType`
I reset my Development environment to match Production. Then I added a new field of type Asset. Attempting to deploy to Production shows 22 field changes and 12 index changes, with the field types being marked unknownType. The diff view shows the correct attribute types, but also reflects the proposed removal of indices. I'm hesitant to push to Production because iI worry my field types will be removed and my current users will see errors. Has anyone seen this before? Anyone know if this is a bug?
Replies
2
Boosts
2
Views
1.8k
Activity
Sep ’22
Updating Production Records In Public CloudKit Database From Console
Simple question I think, I am looking at using CloudKit instead of setting up my own server for my next app. I want to use the public database to store a list of articles that I create and the users can read. Can these articles be created/managed/edited from within the Cloudkit Console? I have seen on the video that CloudKit development records can be accessed but can I also access the records that are in production? I want to be able to login to console and add a new record to the production database but not sure if this is possible. Thanks
Replies
1
Boosts
0
Views
1.4k
Activity
Aug ’22
CloudKit Console: Containers do not appear
I am new to CloudKit - and my test on the Mac (Swift, M1, Monterey, XCode 14 Beta 4) which creates records appears to be working. However, when I log into the CloudKit Console, using the same account as the iCloud account my Mac is logged into, no containers appear. I have tried this several times over 2 days, and no containers appear in the console. The container I am using appears in iCloud storage (via System Preferences > iCloud > Manage), so it appears to be there on iCloud. Am I doing something wrong? What I want to do is query the data, which, I understand, you must use the Console to make it queryable. (It would be nice to be able to do this programmatically, but haven't found a way yet). Thank you.
Replies
1
Boosts
2
Views
1.4k
Activity
Aug ’22
CloudKit Dashboard Development Environment Deleting Indexes
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?
Replies
2
Boosts
1
Views
1.1k
Activity
Jul ’22
Loading large number of records into the CloudKit public database
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
Replies
2
Boosts
1
Views
1.6k
Activity
Jun ’22
What would happen if I add an index to a record type into production that wasn't there before in CloudKit?
What would happen if I add an index to a record type in development that isn't there in production, then I deploy the development into production?
Replies
2
Boosts
0
Views
885
Activity
Jun ’22
CloudKit - CKRecord returning nil
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 ?? "")") } }
Replies
1
Boosts
0
Views
853
Activity
Apr ’22
Help with CloudKit
Having trouble using CloudKit. I used this code: let publicDatabase = CKContainer(identifier: "iCloud.XXX.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> }>
Replies
3
Boosts
0
Views
2.3k
Activity
Apr ’22
BadRequestException: endpoint not applicable in the database type 'sharedb' in CloudKit Dashboard when viewing records of a share accepted
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.
Replies
0
Boosts
0
Views
853
Activity
Apr ’22
Core Data+CloudKit:No record on CloudKit Dashboard
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.
Replies
1
Boosts
2
Views
2.7k
Activity
Feb ’22
CloudKit: Duplicate notifications for CKQuerySubscriptions
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
Replies
2
Boosts
0
Views
1.4k
Activity
Jan ’22
CloudKit Dashboard - Cannot add or update asset items
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.
Replies
4
Boosts
0
Views
1.5k
Activity
Jan ’22
Upload operation complete but not found by CKQuery few minutes
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.
Replies
1
Boosts
0
Views
629
Activity
Jan ’22