CloudKit Console

RSS for tag

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

Posts under CloudKit Console tag

92 Posts

Post

Replies

Boosts

Views

Activity

Current CloudKit pricing?
I've found old forum posts that reference CloudKit pricing based on usage (after exceeding the 'Free' tier). However, it doesn't seem that Apple has any information on any of their website that indicate what that pricing is, or otherwise the limits of a free tier. The closest I've found to this is on https://developer.apple.com/icloud/cloudkit/ where it says, "Store private data securely in your users’ iCloud accounts for limitless scale as your user base grows, and get up to 1PB of storage for your app’s public data." So does this mean that the only CloudKit limits now are: Private data: dependent on individual user's remaining iCloud storage space Public data: 1 PB Request count/day: unlimited Download usage/day: unlimited I'm being a little sarcastic, but at the same time, if there are still limits and a pricing structure, I'm really scratching my head as to why that doesn't seem to be published anywhere. Ultimately, I'm trying to find the best, reliable public asset storage with cross-device usage (iOS, tvOS) solution and am weighing CloudKit versus other cloud storage solutions and their costs. Side note: I'm kinda confused why CloudKit provides public asset storage in the first place, since I thought On-Demand Resources was intended to fill that gap (and ODR does have storage limits too).
5
1
7.3k
Sep ’23
Overide App name in iCloud "Manage Storage" list
In our team we have two apps A and B, unfortunately app B was released with iCloud entitlement with selected container ID of the app A. It lead to a problem that our app A displays in iCloud "Manage Storage" list on iOS as app B. Because of that people are loosing all of theirs data as they thing it is app A. App B stores uses only Key-Value storage in iCloud How can we override that name so it displays A again?
1
1
825
Aug ’23
Cloudkit saving error
Hello, I recently started learning Swift and now I'm using Cloudkit to store user information. I kinda have no idea what I'm doing but I watched this youtube tutorial to save user data and display it in UI instantly with DispatchQueue.main.async but it keeps throwing me an error, saying "No exact matches in call to instance method 'save'" What I want to do is I want users to save a new record and I want this record to be updated instantly and be displayed on the screen. How could I fix this? import Foundation import CloudKit enum RecordType:String { case movie = "Movie" } class SavingMovieViewModel : ObservableObject{ private var database :CKDatabase private var container : CKContainer @Published var movies: [SavingMovieModel] = [] init(container: CKContainer){ self.container = container self.database = container.publicCloudDatabase } func saveMovie(title:String, director: String, stars:String, review: String){ let record = CKRecord(recordType: RecordType.movie.rawValue) let movie = Movie(theTitle: title, theDirector: director, theStars: stars, theReview: review) record.setValuesForKeys(movie.toDictionary()) // saving self.database.save(record) { newRecord, error in. //<-- here is where the error is :( if let error = error{ print(error) } else{ if let newRecord = newRecord{ //<-- this bit is the problem. i need the new record added to be displayed instantly if let movie = Movie.fromRecord(newRecord){ DispatchQueue.main.async { self.movies.append(SavingMovieModel(Movie: movie)) } } } } } } func whatMovies(){ //creating an array of movies var movies: [Movie] = [] let query = CKQuery(recordType: RecordType.movie.rawValue, predicate: NSPredicate(value: true)) database.fetch(withQuery: query) { result in switch result{ case.success(let result): result.matchResults.compactMap{$0.1} .forEach{ switch $0 { case.success(let record): if let movie = Movie.fromRecord(record){ movies.append(movie) } case.failure(let error): print(error) } } DispatchQueue.main.async { self.movies = movies.map(SavingMovieModel.init) } case.failure(let error): print(error) } } } } struct SavingMovieModel{ let movie: Movie var movieId :CKRecord.ID?{ movie.movieId } var title:String{ movie.title } var director:String{ movie.director } var stars:String{ movie.stars } var review:String{ movie.review } } This is the Movie struct for Movie objects import Foundation import CloudKit struct Movie{ var movieId: CKRecord.ID? var title:String var director:String var stars:String var review:String init(movieId: CKRecord.ID? = nil, theTitle:String, theDirector:String, theStars:String, theReview:String){ self.title = theTitle self.director = theDirector self.stars = theStars self.review = theReview self.movieId = movieId } func toDictionary() -> [String:Any]{ return ["title": title, "director" :director, "stars":stars, "review": review] } static func fromRecord(_ record :CKRecord) -> Movie? { guard let title = record.value(forKey:"title") as? String, let director = record.value(forKey:"director") as? String, let stars = record.value(forKey:"stars") as? String, let review = record.value(forKey:"review") as? String else{ return nil } return Movie(movieId: record.recordID, theTitle: title, theDirector: director, theStars: stars, theReview: review) } }
3
0
1.2k
Aug ’23
CloudKit Stopped Syncing after adding a new Attribute
My App is in the App Store, and synced well between iOS devices with the same iCloud account. But after adding a new attribute to an entity 2 weeks ago, the CloudKit stopped syncing. I checked the Cloudkit console, and can't find the new attribute there! I don't know Why. Actually this attribute already works well in the newest version of my App downloaded form App store. Then I chose to deploy schema changes, but there are no changes to deploy! So how to deploy the new change? and how to make the iCloud syncing work again? Thanks!
2
0
901
Jul ’23
Refresh view with new CloudKit records
Hello, I'm new to iOS development and I need help for working with CloudKit. I have an application that allows me to add, delete and display information stored in a CloudKit container. When I try to add a new record, this one can be visible into my CloudKit Console but if don't switch to a other view and back to my view (with my list of records) the record isn't displayed. How can I update my list to reflect directly the new record add to my container ? This is my code with split into different files (in attachment) Sets : define my record struct SetsView: list of my records AddSetView: add new records AddSetView-ViewModel : view model with my add function SetsView-ViewModel: view model with my fetch function Add function : func add() async throws { var newSet = set newSet.name = name newSet.code = code newSet.releaseDate = releaseDate newSet.numberOfCards = numberOfCards let record = try await db.save(newSet.set) guard let set = Set(record: record) else { return } setsDictionary[set.id!] = set print("Set added") } Fetch function : func fetchSets() async throws { let query = CKQuery(recordType: SetRecordKeys.type.rawValue, predicate: NSPredicate(value: true)) query.sortDescriptors = [NSSortDescriptor(key: "name", ascending: false)] let result = try await db.records(matching: query) // récupère les données qui correspondent aux critères let records = result.matchResults.compactMap { try? $0.1.get() } // Récupère les records sets.removeAll() records.forEach { record in sets.append(Set(record: record)!) } print("Sets fetched") print(sets) } Set.txt SetsView.txt AddSetView.txt AddSetView-ViewModel.txt SetsView-ViewModel.txt I try to add some print to figure out what's going on, but I don't understand. This is the console log for this scenario : open app without any data into the container > add a new record First, the fetch function is executed but there is no data into the container (it's logic) Second I add a new record (Set) : Into the CloudKit console the new Set is visible So for refresh my view with this record I need to re-call the fetch function. I tried many things but nothing works. Even if the fetch function is called, the new record is not retrieved. Do you have any idea how to solve this problem? Thanks for your help.
0
0
996
Jul ’23
Limits of CloudKit Public Database
Hello! I would like my users to save short videos (under 30seconds 1080p) to the public database for all other users to download and view. Is this possible? Will I run into any storage pricing with Apple if I were to pursue this as my application backend? I am looking at other methods as well (user sharing from their private database) so I can implement video sharing. Is this feasible and worth pursuing?
2
0
1.5k
Jul ’23
CloudKit Subscriptions - weird things going on
Hi all, Would not believe this if not seeing it for 2 days (and nights) now. Our game uses CloudKit subscriptions to avoid two devices entering the game with the same account. That worked perfectly well for 8 months, since 4 months we did not have any update on the game, so nothing changed. Now since Wednesday user have not been able to enter the game cause the subscription was not found. We tested on device, not working. We checked on CloudKit console, everything fine. Testing again on device, works. Great! Until 3–5 minutes later, when it stopped working again. Going back to CloudKit console, everything fine. Device, fine. Until 5 min later… So, the weird situation we got now is that everything works perfectly, as long as we query the subscriptions in CloudKit console every few seconds. If we stop, our game is down until we do that again. So we do nothing else as reload the link that does a simple query to keep it up. Sitting here and can't sleep because I'm feared my browser session expires and the game goes down... Has anybody ever experienced something like that? We have not been able to find reports of similar issues
6
2
2.2k
Mar ’23
CloudKit Why is my Public Database empty?
Hello. I am beta testing an app in TestFlight. I want to use a public database inside the cloudkit container, and I think that I have set things up that way (see below). But my testers can only see their own data and all records are being stored in the Private Database. I'm getting the results I want on my own iPhone (loading the app directly from xCode). But testers are not getting the same experience. It this because I am in TestFlight? Are there settings I have missed? Here is what I have done so far: In my DataController I have this: init(inMemory: Bool = false) { container = NSPersistentCloudKitContainer(name: "Main") if inMemory { // this is set in static var preview container.persistentStoreDescriptions.first?.url = URL(fileURLWithPath: "/dev/null") } guard let description = container.persistentStoreDescriptions.first else { print("Can't set description") fatalError("Error") } let publicStoreURL = description.url!.deletingLastPathComponent().appendingPathComponent("public.sqlite") let containerIdentifier = description.cloudKitContainerOptions!.containerIdentifier let publicDescription = NSPersistentStoreDescription(url: publicStoreURL) publicDescription.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey) publicDescription.setOption(true as NSNumber, forKey: NSPersistentStoreRemoteChangeNotificationPostOptionKey) let publicOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: containerIdentifier) publicOptions.databaseScope = .public publicDescription.cloudKitContainerOptions = publicOptions container.persistentStoreDescriptions.append(publicDescription) container.loadPersistentStores { _, error in if let error = error { fatalError("Error loading store: \(error.localizedDescription)") } } In entitlements I added "Production" to com.apple.developer.icloud-container-environment (because I read somewhere that that is also needed). In the cloudkit console the container is set to Production as well. Have I goofed? Or have I neglected something? Getting desperate ;) Thanks.
2
0
1.4k
Jan ’23
Cloudkit Telemetry API
Hello, I'm new to software development sorry if this is worded incorrectly. I understand that Cloudkit telemetry data is available on the cloudkit dashboard. However, my question is if there is a public endpoint or any plans in the future for one to access telemetry data such as notifications, database stats, and usage. ex: https://api.icloud.apple.com/v1/telemetry/
0
0
1.1k
Nov ’22
CloudKit console don't show subscriptions
Hello. I want to use CloudKit to send notifications to users of my app. I created record type for notification and I use this code to sub let subscription = CKQuerySubscription(recordType: "Notifications", predicate: NSPredicate(format: "TRUEPREDICATE"), options: .firesOnRecordCreation) let info = CKSubscription.NotificationInfo()       info.titleLocalizationKey = "%1$@"       info.titleLocalizationArgs = ["title"]       info.alertLocalizationKey = "%1$@"       info.alertLocalizationArgs = ["content"]       info.shouldBadge = true       info.soundName = "default"       subscription.notificationInfo = info    CKContainer(identifier: "iCloud.****").publicCloudDatabase.save(subscription, completionHandler: { subscription, error in             if error == nil {                 // Subscription saved successfully               print(subscription?.notificationInfo?.description)             } else {                 // Error occurred               print(error?.localizedDescription)             }         }) The subscription is successful and when I create a record via from CloudKit, my local device received push notification normally. My issue is that CloudKit console says "There are no subscriptions in this database!!!" Do anyone say how I can see subscription?
0
1
1.1k
Oct ’22
CloudKit query incorrectly sorted
I have a simple CloudKit query over a given record type, with a sort descriptor for one of the attribute, which is of type String, and the results come out in the wrong order. This is even visible in the CloudKit console (see screenshot, ordering is by title). Can anyone explains what happens here ? I've checked that there wasn't any weird characters in the attributes. Thanks.
0
0
1.3k
Oct ’22
Did not return 'com.apple.coredata.cloudkit.shared.subscription'
I work with Core Data and I needed to change CloudKit container in Singing & Capabilities. I've done it successed, I think. But when I run my app, NSCloudKitMirroringDelegate returns the error with user info: NSLocalizedFailureReason=Subscription save succeeded but did not return 'com.apple.coredata.cloudkit.shared.subscription' as a saved subscription I've registred my app's ID and I've checked iCloud. Thanks in advanced.
1
3
1.4k
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
Current CloudKit pricing?
I've found old forum posts that reference CloudKit pricing based on usage (after exceeding the 'Free' tier). However, it doesn't seem that Apple has any information on any of their website that indicate what that pricing is, or otherwise the limits of a free tier. The closest I've found to this is on https://developer.apple.com/icloud/cloudkit/ where it says, "Store private data securely in your users’ iCloud accounts for limitless scale as your user base grows, and get up to 1PB of storage for your app’s public data." So does this mean that the only CloudKit limits now are: Private data: dependent on individual user's remaining iCloud storage space Public data: 1 PB Request count/day: unlimited Download usage/day: unlimited I'm being a little sarcastic, but at the same time, if there are still limits and a pricing structure, I'm really scratching my head as to why that doesn't seem to be published anywhere. Ultimately, I'm trying to find the best, reliable public asset storage with cross-device usage (iOS, tvOS) solution and am weighing CloudKit versus other cloud storage solutions and their costs. Side note: I'm kinda confused why CloudKit provides public asset storage in the first place, since I thought On-Demand Resources was intended to fill that gap (and ODR does have storage limits too).
Replies
5
Boosts
1
Views
7.3k
Activity
Sep ’23
Overide App name in iCloud "Manage Storage" list
In our team we have two apps A and B, unfortunately app B was released with iCloud entitlement with selected container ID of the app A. It lead to a problem that our app A displays in iCloud "Manage Storage" list on iOS as app B. Because of that people are loosing all of theirs data as they thing it is app A. App B stores uses only Key-Value storage in iCloud How can we override that name so it displays A again?
Replies
1
Boosts
1
Views
825
Activity
Aug ’23
Cloudkit saving error
Hello, I recently started learning Swift and now I'm using Cloudkit to store user information. I kinda have no idea what I'm doing but I watched this youtube tutorial to save user data and display it in UI instantly with DispatchQueue.main.async but it keeps throwing me an error, saying "No exact matches in call to instance method 'save'" What I want to do is I want users to save a new record and I want this record to be updated instantly and be displayed on the screen. How could I fix this? import Foundation import CloudKit enum RecordType:String { case movie = "Movie" } class SavingMovieViewModel : ObservableObject{ private var database :CKDatabase private var container : CKContainer @Published var movies: [SavingMovieModel] = [] init(container: CKContainer){ self.container = container self.database = container.publicCloudDatabase } func saveMovie(title:String, director: String, stars:String, review: String){ let record = CKRecord(recordType: RecordType.movie.rawValue) let movie = Movie(theTitle: title, theDirector: director, theStars: stars, theReview: review) record.setValuesForKeys(movie.toDictionary()) // saving self.database.save(record) { newRecord, error in. //<-- here is where the error is :( if let error = error{ print(error) } else{ if let newRecord = newRecord{ //<-- this bit is the problem. i need the new record added to be displayed instantly if let movie = Movie.fromRecord(newRecord){ DispatchQueue.main.async { self.movies.append(SavingMovieModel(Movie: movie)) } } } } } } func whatMovies(){ //creating an array of movies var movies: [Movie] = [] let query = CKQuery(recordType: RecordType.movie.rawValue, predicate: NSPredicate(value: true)) database.fetch(withQuery: query) { result in switch result{ case.success(let result): result.matchResults.compactMap{$0.1} .forEach{ switch $0 { case.success(let record): if let movie = Movie.fromRecord(record){ movies.append(movie) } case.failure(let error): print(error) } } DispatchQueue.main.async { self.movies = movies.map(SavingMovieModel.init) } case.failure(let error): print(error) } } } } struct SavingMovieModel{ let movie: Movie var movieId :CKRecord.ID?{ movie.movieId } var title:String{ movie.title } var director:String{ movie.director } var stars:String{ movie.stars } var review:String{ movie.review } } This is the Movie struct for Movie objects import Foundation import CloudKit struct Movie{ var movieId: CKRecord.ID? var title:String var director:String var stars:String var review:String init(movieId: CKRecord.ID? = nil, theTitle:String, theDirector:String, theStars:String, theReview:String){ self.title = theTitle self.director = theDirector self.stars = theStars self.review = theReview self.movieId = movieId } func toDictionary() -> [String:Any]{ return ["title": title, "director" :director, "stars":stars, "review": review] } static func fromRecord(_ record :CKRecord) -> Movie? { guard let title = record.value(forKey:"title") as? String, let director = record.value(forKey:"director") as? String, let stars = record.value(forKey:"stars") as? String, let review = record.value(forKey:"review") as? String else{ return nil } return Movie(movieId: record.recordID, theTitle: title, theDirector: director, theStars: stars, theReview: review) } }
Replies
3
Boosts
0
Views
1.2k
Activity
Aug ’23
CloudKit Stopped Syncing after adding a new Attribute
My App is in the App Store, and synced well between iOS devices with the same iCloud account. But after adding a new attribute to an entity 2 weeks ago, the CloudKit stopped syncing. I checked the Cloudkit console, and can't find the new attribute there! I don't know Why. Actually this attribute already works well in the newest version of my App downloaded form App store. Then I chose to deploy schema changes, but there are no changes to deploy! So how to deploy the new change? and how to make the iCloud syncing work again? Thanks!
Replies
2
Boosts
0
Views
901
Activity
Jul ’23
Refresh view with new CloudKit records
Hello, I'm new to iOS development and I need help for working with CloudKit. I have an application that allows me to add, delete and display information stored in a CloudKit container. When I try to add a new record, this one can be visible into my CloudKit Console but if don't switch to a other view and back to my view (with my list of records) the record isn't displayed. How can I update my list to reflect directly the new record add to my container ? This is my code with split into different files (in attachment) Sets : define my record struct SetsView: list of my records AddSetView: add new records AddSetView-ViewModel : view model with my add function SetsView-ViewModel: view model with my fetch function Add function : func add() async throws { var newSet = set newSet.name = name newSet.code = code newSet.releaseDate = releaseDate newSet.numberOfCards = numberOfCards let record = try await db.save(newSet.set) guard let set = Set(record: record) else { return } setsDictionary[set.id!] = set print("Set added") } Fetch function : func fetchSets() async throws { let query = CKQuery(recordType: SetRecordKeys.type.rawValue, predicate: NSPredicate(value: true)) query.sortDescriptors = [NSSortDescriptor(key: "name", ascending: false)] let result = try await db.records(matching: query) // récupère les données qui correspondent aux critères let records = result.matchResults.compactMap { try? $0.1.get() } // Récupère les records sets.removeAll() records.forEach { record in sets.append(Set(record: record)!) } print("Sets fetched") print(sets) } Set.txt SetsView.txt AddSetView.txt AddSetView-ViewModel.txt SetsView-ViewModel.txt I try to add some print to figure out what's going on, but I don't understand. This is the console log for this scenario : open app without any data into the container > add a new record First, the fetch function is executed but there is no data into the container (it's logic) Second I add a new record (Set) : Into the CloudKit console the new Set is visible So for refresh my view with this record I need to re-call the fetch function. I tried many things but nothing works. Even if the fetch function is called, the new record is not retrieved. Do you have any idea how to solve this problem? Thanks for your help.
Replies
0
Boosts
0
Views
996
Activity
Jul ’23
Limits of CloudKit Public Database
Hello! I would like my users to save short videos (under 30seconds 1080p) to the public database for all other users to download and view. Is this possible? Will I run into any storage pricing with Apple if I were to pursue this as my application backend? I am looking at other methods as well (user sharing from their private database) so I can implement video sharing. Is this feasible and worth pursuing?
Replies
2
Boosts
0
Views
1.5k
Activity
Jul ’23
Cloudkit Public Database Storage
I only used cloudkit private database in my application but the telemetry data shows 244 bytes of public database storage used. When I check my container I don't see any public stored data. I don't understand why this is happening. Can anyone help me?
Replies
0
Boosts
0
Views
735
Activity
Jun ’23
CloudKit Subscriptions - weird things going on
Hi all, Would not believe this if not seeing it for 2 days (and nights) now. Our game uses CloudKit subscriptions to avoid two devices entering the game with the same account. That worked perfectly well for 8 months, since 4 months we did not have any update on the game, so nothing changed. Now since Wednesday user have not been able to enter the game cause the subscription was not found. We tested on device, not working. We checked on CloudKit console, everything fine. Testing again on device, works. Great! Until 3–5 minutes later, when it stopped working again. Going back to CloudKit console, everything fine. Device, fine. Until 5 min later… So, the weird situation we got now is that everything works perfectly, as long as we query the subscriptions in CloudKit console every few seconds. If we stop, our game is down until we do that again. So we do nothing else as reload the link that does a simple query to keep it up. Sitting here and can't sleep because I'm feared my browser session expires and the game goes down... Has anybody ever experienced something like that? We have not been able to find reports of similar issues
Replies
6
Boosts
2
Views
2.2k
Activity
Mar ’23
com.apple.nand
Has anyone ever seen this in their Apple computer logs? Do you know what it does?
Replies
2
Boosts
0
Views
1.9k
Activity
Feb ’23
CloudKit Console
Keep getting the below error, maintenance supposably complete, but still experiencing issue. Error looking up Developer Teams XHR request failure Please sign out and try again. Anyone else seeing the same?
Replies
2
Boosts
0
Views
1.3k
Activity
Feb ’23
CloudKit Why is my Public Database empty?
Hello. I am beta testing an app in TestFlight. I want to use a public database inside the cloudkit container, and I think that I have set things up that way (see below). But my testers can only see their own data and all records are being stored in the Private Database. I'm getting the results I want on my own iPhone (loading the app directly from xCode). But testers are not getting the same experience. It this because I am in TestFlight? Are there settings I have missed? Here is what I have done so far: In my DataController I have this: init(inMemory: Bool = false) { container = NSPersistentCloudKitContainer(name: "Main") if inMemory { // this is set in static var preview container.persistentStoreDescriptions.first?.url = URL(fileURLWithPath: "/dev/null") } guard let description = container.persistentStoreDescriptions.first else { print("Can't set description") fatalError("Error") } let publicStoreURL = description.url!.deletingLastPathComponent().appendingPathComponent("public.sqlite") let containerIdentifier = description.cloudKitContainerOptions!.containerIdentifier let publicDescription = NSPersistentStoreDescription(url: publicStoreURL) publicDescription.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey) publicDescription.setOption(true as NSNumber, forKey: NSPersistentStoreRemoteChangeNotificationPostOptionKey) let publicOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: containerIdentifier) publicOptions.databaseScope = .public publicDescription.cloudKitContainerOptions = publicOptions container.persistentStoreDescriptions.append(publicDescription) container.loadPersistentStores { _, error in if let error = error { fatalError("Error loading store: \(error.localizedDescription)") } } In entitlements I added "Production" to com.apple.developer.icloud-container-environment (because I read somewhere that that is also needed). In the cloudkit console the container is set to Production as well. Have I goofed? Or have I neglected something? Getting desperate ;) Thanks.
Replies
2
Boosts
0
Views
1.4k
Activity
Jan ’23
Cloudkit Telemetry API
Hello, I'm new to software development sorry if this is worded incorrectly. I understand that Cloudkit telemetry data is available on the cloudkit dashboard. However, my question is if there is a public endpoint or any plans in the future for one to access telemetry data such as notifications, database stats, and usage. ex: https://api.icloud.apple.com/v1/telemetry/
Replies
0
Boosts
0
Views
1.1k
Activity
Nov ’22
CloudKit console don't show subscriptions
Hello. I want to use CloudKit to send notifications to users of my app. I created record type for notification and I use this code to sub let subscription = CKQuerySubscription(recordType: "Notifications", predicate: NSPredicate(format: "TRUEPREDICATE"), options: .firesOnRecordCreation) let info = CKSubscription.NotificationInfo()       info.titleLocalizationKey = "%1$@"       info.titleLocalizationArgs = ["title"]       info.alertLocalizationKey = "%1$@"       info.alertLocalizationArgs = ["content"]       info.shouldBadge = true       info.soundName = "default"       subscription.notificationInfo = info    CKContainer(identifier: "iCloud.****").publicCloudDatabase.save(subscription, completionHandler: { subscription, error in             if error == nil {                 // Subscription saved successfully               print(subscription?.notificationInfo?.description)             } else {                 // Error occurred               print(error?.localizedDescription)             }         }) The subscription is successful and when I create a record via from CloudKit, my local device received push notification normally. My issue is that CloudKit console says "There are no subscriptions in this database!!!" Do anyone say how I can see subscription?
Replies
0
Boosts
1
Views
1.1k
Activity
Oct ’22
Can't filter records by creation timestamp
I have a bunch of records in my database. Whenever I try to filter on the created timestamp, I get no results even though I've marked the field as queryable. Based on the records on the screenshots, I would expect to get 2 entries back from the query. What am I missing?
Replies
1
Boosts
0
Views
1.2k
Activity
Oct ’22
CloudKit query incorrectly sorted
I have a simple CloudKit query over a given record type, with a sort descriptor for one of the attribute, which is of type String, and the results come out in the wrong order. This is even visible in the CloudKit console (see screenshot, ordering is by title). Can anyone explains what happens here ? I've checked that there wasn't any weird characters in the attributes. Thanks.
Replies
0
Boosts
0
Views
1.3k
Activity
Oct ’22
Did not return 'com.apple.coredata.cloudkit.shared.subscription'
I work with Core Data and I needed to change CloudKit container in Singing & Capabilities. I've done it successed, I think. But when I run my app, NSCloudKitMirroringDelegate returns the error with user info: NSLocalizedFailureReason=Subscription save succeeded but did not return 'com.apple.coredata.cloudkit.shared.subscription' as a saved subscription I've registred my app's ID and I've checked iCloud. Thanks in advanced.
Replies
1
Boosts
3
Views
1.4k
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 Console Database Section Not Working
Since few days the database section on Cloudkit Console is not loading for me. Found this error upon inspecting the network console: TypeError: Cannot read properties of undefined (reading 'permissions') Uncaught error: TypeError: Cannot read properties of undefined (reading 'permissions') Shows this on browser: Any idea what the issue could be?
Replies
4
Boosts
0
Views
1.8k
Activity
Sep ’22