CloudKit Dashboard

RSS for tag

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

Posts under CloudKit Dashboard tag

32 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

"Internal Error" in CloudKit Dashboard
Hi, I'm getting an "Internal Error" in the CloudKit Dashboard for my user. This happens for the Private database across all of my apps, and in both Development and Production environments. (Screenshot attached). If I login as a different user via the 'Act as iCloud Account' function, everything works fine - it seems to be an issue with my own user account. In the JavaScript console, I see "Known response error: The request has failed due to an error.", but no other details (Screenshot attached) I can see these failures in the Logs tag, showing as 'INTERNAL_ERROR' (another Screenshot) It appears that the data on my account is currently not sync'ing to CloudKit, although I haven't found any other errors from within the app claiming that there is an issue (using the CoreData+CloudKit integration). I'm assuming my in-app errors and my dashboard errors are related, although it's difficult to say without more information on what these errors actually are.
5
0
973
Aug ’24
Core Data Records Not Syncing with CloudKit Dashboard
Hello everyone, I'm currently working on an iOS app using SwiftUI and Core Data, integrating CloudKit for data synchronization. I've set up my Core Data stack with NSPersistentCloudKitContainer, and everything appears to be working correctly locally. However, I'm not seeing any records appearing in the CloudKit Dashboard. This issue started occurring after transferring the Apple Developer account ownership and changing the CloudKit container. Here's a summary of my setup and what I've tried so far: Setup PersistenceController.swift import SwiftUI import Foundation import CoreData import CloudKit class PersistenceController { static let shared = PersistenceController() let container: NSPersistentCloudKitContainer init() { container = NSPersistentCloudKitContainer(name: "Model") guard let description = container.persistentStoreDescriptions.first else { fatalError("No Descriptions found") } description.cloudKitContainerOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: "iCloud.com.company.Project") container.loadPersistentStores { (storeDescription, error) in if let error = error as NSError? { fatalError("Unresolved error \(error), \(error.userInfo)") } } container.viewContext.automaticallyMergesChangesFromParent = true } func saveContext() { let context = container.viewContext if context.hasChanges { do { try context.save() } catch { let nserror = error as NSError fatalError("Unresolved error \(nserror), \(nserror.userInfo)") } } } static let preview: PersistenceController = { let controller = PersistenceController() // Remove existing preview data let fetchRequest: NSFetchRequest<NSFetchRequestResult> = Letter.fetchRequest() let batchDeleteRequest = NSBatchDeleteRequest(fetchRequest: fetchRequest) let userFetchRequest: NSFetchRequest<NSFetchRequestResult> = User.fetchRequest() let userBatchDeleteRequest = NSBatchDeleteRequest(fetchRequest: userFetchRequest) let senderFetchRequest: NSFetchRequest<NSFetchRequestResult> = Sender.fetchRequest() let senderBatchDeleteRequest = NSBatchDeleteRequest(fetchRequest: senderFetchRequest) do { try controller.container.viewContext.execute(batchDeleteRequest) try controller.container.viewContext.execute(userBatchDeleteRequest) try controller.container.viewContext.execute(senderBatchDeleteRequest) try controller.container.viewContext.save() } catch { fatalError("Failed to delete preview data: \(error)") } } Entitlements.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>aps-environment</key> <string>development</string> <key>com.apple.developer.applesignin</key> <array> <string>Default</string> </array> <key>com.apple.developer.icloud-container-identifiers</key> <array> <string>iCloud.com.company.Project</string> </array> <key>com.apple.developer.icloud-services</key> <array> <string>CloudKit</string> </array> </dict> </plist> What I've Tried Verified that the iCloud capability is enabled in the Xcode project settings. Checked the containerIdentifier in the NSPersistentCloudKitContainer setup. Ensured the app is signed in with the correct iCloud account. Observed that local Core Data operations work correctly and save without errors. Waited to ensure any potential synchronization delays are accounted for. Observations I see debug messages in the Xcode console indicating that records are being serialized and saved to CloudKit, but they do not appear in the CloudKit Dashboard. I have verified that I'm looking at the correct Private Database and _defaultZone. When I delete the app and reinstall it, I can see that the data remains, indicating that the data is being stored somewhere in iCloud but not visible in the CloudKit Dashboard. After resetting the schema in the CloudKit Console and running the app, the schema (including record types) syncs immediately, but the records are still not visible. Console Output CoreData: debug: CoreData+CloudKit: -[PFCloudKitSerializer newCKRecordsFromObject:fullyMaterializeRecords:includeRelationships:error:](576): Serializer has finished creating record: <CKRecord: 0x15b13e600; recordType=CD_Letter, recordID=F879D7B8-0338-418D-A330-6B9DF7947C6A:(com.apple.coredata.cloudkit.zone:__defaultOwner__), values={ "CD_content" = "Dear User. Happy Valentine's Day! Today. l want to remind you of how much you mean to me. Your presence in my life fills my heart with joy and love. Thank you for being my confidant, my friend, and my love. Every moment with you is precious, and I look forward to creating many more beautiful memories together. With all my love, Thomas"; "CD_createdAt" = "2024-07-30 03:17:13 +0000"; "CD_date" = "2024-07-30 03:15:58 +0000"; "CD_emotion" = Lovely; "CD_entityName" = Letter; "CD_icon" = "❤️‍🔥"; "CD_id" = "81569A99-E74C-43AF-B346-220A75EA336E"; "CD_imageData" = "{ length=282816, sha256=a76343766534e061472e243deec7f0b428c85e8a6b94e6cd761443c45f5be41c }"; "CD_primaryAlpha" = "0.4313725490196079"; "CD_primaryBlue" = 0; "CD_primaryGreen" = "0.09014883061658401"; "CD_primaryRed" = "0.4156862745098039"; "CD_secondaryAlpha" = 1; "CD_secondaryBlue" = "0.8823529411764706"; "CD_secondaryGreen" = "0.8784313725490196"; "CD_secondaryRed" = "0.9490196078431372"; "CD_sender" = "EF893D7E-E9E9-453B-B76E-6A5D77E14AA3"; "CD_tertiaryAlpha" = 1; "CD_tertiaryBlue" = "0.8823529411764706"; "CD_tertiaryGreen" = "0.8784313725490196"; "CD_tertiaryRed" = "0.9490196078431372"; "CD_title" = "I love you"; }> Despite this, no records are found in the CloudKit Dashboard. Request for Assistance Are there any additional steps I might have missed to ensure that records sync correctly with CloudKit? Could there be any known issues or additional configurations required for syncing Core Data with CloudKit? Any advice on further troubleshooting steps or areas to investigate would be greatly appreciated. Thank you for your time and assistance!
1
0
1.1k
Jul ’24
Questions About CloudKit Security Roles and Permissions
Hi, I'm using CloudKit to create an app that backs up and records your data to iCloud. Here's what I'm unsure about: I understand that the 'CloudKit Dashboard' has 'Security Roles'. I thought these were meant to set permissions for accessing and modifying users' data, but I found there was no change even when I removed all 'Permissions' from 'Default Roles'. Can you clarify? I'd like to know what _world, _icloud, and _creator in Default Roles mean respectively. I would like to know what changes the creation, read, and write permissions make. Is it better to just use the default settings? Here's what I understand so far: Default Roles: _world: I don't know _icloud: An account that is not my device but is linked to my iCloud _creator: My Device Permissions: create: Create data read: Read data write: Update and delete data. I'm not sure if I understand this correctly. Please explain.
1
0
953
Jul ’24
Adding indexes more difficult with updated cloudkit console
Can the cloudkit console team please look into managing indexes with their updated cloudkit console tool? Working with Record indexes used to be straightforward but it has now become cumbersome and unintuitive. For example, why does the tool force you to fill in some name field if adding a queryable index for recordName? Why can't you create several index types at once for a given field? It is possible to manage schemas in some other ways but for small changes the console used to be handy. It's now become a pain. Thanks!
0
3
587
Jul ’24
Deleting CloudKit data
I have been testing an app which uses cloudKit with SWIFTDATA and after testing for several months my 200GB iCloud store is showing 168GB for iCloud Drive. Now my iCloud drive is only 22.6GB so the rest of the 168GB must be data from my app. Also, I have function in my app to delete all iCloud Data which I thought that should clean up iCloud storage but it does not. I tried resetting the Develop Environment but no change to iCloud data. Also I have several other containers in iCloud created while getting iCloud working which I would like to delete but I understand you can’t. https://forums.developer.apple.com/forums/thread/45251?answerId=788694022#788694022 Bottom line cloudkit console has been pretty much useless for me and I need a way to manage (delete containers and data). Am I missing something?
1
0
933
Jun ’24
What Apple user account do you use when testing CloudKit in Xcode
I currently have a production app that uses CloudKit I always struggle with testing the data within the development container and I was wondering if someone could share their current workflow. What is your current workflow when testing apps that use CloudKit, do you use your regular Apple User account for testing, or you use separate account? My concern is because I use my production app on a daily basis using my regular Apple user account, so I would like to keep the production iCloud data intact. In other words, I have my app on my phone with real data and now I need to test the app because there are some CloudKit syncing issues so I have the following questions. Can I connect my phone with production data to Xcode and use my regular Apple account for testing purposes? Will I be able to see the testing data in the CloudKit console? Will the production data merge with the testing data? I actually created a second Apple account thinking that I could use it for testing but logging off and logging back on to iCloud in your iPhone it's a pain, is this really what needs to be done? Any ideas would be greatly appreciated. Thanks
0
0
776
Apr ’24
How can a user change some data in the public data base?
I am using the public cloud database to store my application data, this data is accessed by all users of the application, but at some point it is necessary for a user who did not create a respective data in the database to delete it, but from what I read in the documentation this is not possible, only with a permission. How do I allow a user to change or delete any data created by another user in the public cloud database?
1
0
674
Jun ’24
Cloudkit Coredata reset upon user logout iCloud
Hi all, We have an iOS app which has Cloudkit Coredata as storage mechanism. Whenever user logout of iCloud in settings app, then the Coredata is wiped out and no row exists in the tables. Can we prevent this. We want to retain the coredata values until there is another iCloud user logs into settings app. Thanks Vinoth
4
1
1.4k
Aug ’24