CloudKit Console

RSS for tag

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

Posts under CloudKit Console tag

14 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

CloudKit database - 500 Internal error
As of yesterday all queries my app makes to the CloudKit database, and requests via the CloudKit console result in 500 internal errors. We have made no changes to the database or app that could have caused this. The status page for CloudKit database is green. Here is a response from the CloudKit console: {code: 500, message: "internal-error", reason: "Internal error", detailedMessage: undefined, requestUuid: "808955a2-e564-459e-ba9b-1101917ce1a4"}
1
0
140
1w
ios push notification not received after getting out of airplane mode
I'm sending a push notification using Noticed Gem during the night when my phone is in airplane mode. When I wake up and disable the airplane mode, I don't get the push notification. These are the settings: ` def ios_format(apn) apn.custom_payload = { universal_link: url } apn.alert = { title: title(recipient), body: message(recipient) } apn.sound = 'default' apn.priority = '10' # Send immediately, bypassing the end ` default expiration is supposed to be 30 days. How can I debug/fix the problem? (with noticed gem) I checked Apple consoleKIT, and I don't see discarded notifications. Thanks
3
0
248
1d
Unable to access CloudKit Database containers
Hello, We have a problem and we don't know how to solve it. Our application uses CloudKit databases. We can no longer access the CloudKit databases. When we connect to the CloudKit console and select CloudKit Database, we get the message "No Containers". However, the application continues to work by downloading files located on CloudKit Database. How can I modify CloudKit Database data?
0
0
264
Feb ’24
CloudKit Console - Internal Error during Query Records
Issue: I'm experiencing intermittent CloudKit Console 'Internal Error' when performing simple queries on a Private database. I am experiencing this issue with multiple CloudKit databases. In all instances, the issue is intermittent. Steps to Replicate in the CloudKit Console: Select a Database Select Records Select Private Database Select Custom Zone Select Record Type Select Query Records IF the records populate, click 'Query Records' again until Internal Error occurs. Expected Results: A list of records Actual Results: 'Internal Error' (see screenshot below) Additional Info: Starting last month, I started receiving CKCloudKit Error 15 when attempting to sync data from a private CloudKit database. My query code has not changed for a few years now with no previous issues. I believe these errors are the 'same' and on the Apple Server side. Is anyone else experiencing this issue? Any help would be greatly appreciated. Thank you.
3
2
556
Dec ’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?
0
1
480
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
649
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
584
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
507
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
935
Jul ’23
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
4.3k
Sep ’23