Dear people who use CloudKit -
Have you recently seen CloudKit error code 15 (“serverRejectedRequest”), and have suggestions what to do about it?
I am seeing it in response to a perfectly reasonable CKQueryOperation to a zone in a shared database. Similar query to other zones in the same database works.
Doing the same in CK web console shows me a red box with “internal error”.
Filed FB13133751 about it. I don’t think I can do anything further about it on my side.
@simonnickel @hidde what do you mean? SwiftData will sync between devices using #CloudKit like NSPCKC but you have to manually process history if you need to dedupe data for example (what Apple calls coexistence: SwiftData + Core Data stack).
I’m on Mastodon for two things.
I build things on Apple platforms. I make @tact. I read (a lot) and post (a little) about related technologies: #Swift, #SwiftUI, #Combine, #CloudKit, #CoreData, #Xcode, #concurrency, as well as product design.
I support Ukraine. I follow Ukrainians and friends of 🇺🇦. Please donate to 🇺🇦 until 🗑🇷🇺 is gone: https://u24.gov.ua or any other respected charity. My Twitter is mostly about Ukraine - https://twitter.com/jaanus
#introduction #swift #swiftui #Combine #cloudkit #coredata #xcode #concurrency
An update to this:
#CloudKit requires all properties to either be optional or have initial values.
Followup Q:
Do we need to define like `let x: String = “testStr”` or can we just define them via the `init(x: String) {…}?
Has anyone built an app with #CoreData #CloudKit sharing where participants needs to link their CloudKit identity to a database Person entity object? Like a task management app with assignees join the project.
I was thinking about a flow with a "self-selection process" where participants select an existing Person from the database (or create a new one) when joining the share.
The app would then store the CKShare.currentUserParticipant.userIdentity.userRecordID as a field on the Person object.
Part of what I’m trying to track down with these #CloudKit questions is that sharing in my Development environment between a Dev device and simulators is working beautifully.
However for some reason in Production, sharing is incosistent, and almost always works for the first time you share a record with another user, but subsequent shares fail or only show a blank Share Sheet.
Another #CloudKit question...
What could have caused these ckAsset record types to show up in my Development Schema as available to deploy to Production?
The image1 and image2 are regular Core Data attributes, that can be shared via iCloud, but I wasn’t anticipating the ckAsset records being available as a Schema change?
Ok #CloudKit friends... I’m trying to track down some oddities I’m finding in my production NSPersistentCloudKitContainer instances... and one thing I’ve come across is seemingly duplicate Indexs, but with different Index Types. Is this a problem? Or is this normal?
@matt1corey hey Matt. I’m digging a bit more into #CloudKit Sharing (with #CoreData & #NSPersistentCloudKitContainer). I know you implemented sharing in your apps.
In an app where I want to attribute an event to a specific user, how would you do that? E.g. a task management app with assignee and assignees can be added by sharing to them. I want to track who created/edited/completed a task for example (like a log of events/activities). Should I add the userRecordName in the object?
#cloudkit #coredata #nspersistentcloudkitcontainer
#swiftdata #cloudkit #ios17 Is anyone else getting this when attempting to build and run on an actual device? Running on the simulator works fine…
The app is 💯 built in #SwiftUI.
#CoreData is used for local data persistency and #CloudKit is used to sync data between devices (both user content & preferences).
#RevenueCat is used to process and manage auto-renewable subscriptions.
#swiftui #coredata #cloudkit #RevenueCat
I’m continuing to get several emails a day about #Cloudkit sync failing in my app, and now the 1-star reviews are starting to appear. No errors in logs or CloudKit console.
Is anyone else seeing a rise in CloudKit failures?
The CloudKit issues I've found over the last few day are big enough that I wanted to capture my thoughts. So I did! Plenty of bugs here, but some really important ones that are related to CloudKit Share privacy configurations - if anyone uses these API's, and has a solution, please reach out!
https://mattcorey.substack.com/p/adding-icloud-sharing-to-bills-to?sd=pf
@Mecid - I read your posts re: a redux-like state container for #SwiftUI and I'm playing around with those ideas. Right now I’m struggling to integrate #CloudKit synched #CoreData entities as a part of the composed state. The point is, that they can change at any time, which I get notified about via #Combine subscribers, but the state can only be changed in the reducers. So far I solved this by using computed properties within the state, but I'm not really happy with that solution. Any ideas?
#combine #coredata #cloudkit #swiftui
My (spare time) watch app uses CloudKit and core data to sync data with the phone app. It’s accumulated about 3MB of data.
If I delete the watch app and re-install it, that 3MB of data takes about 4 *hours* to download, and my app is terminated multiple times for excess cpu usage in cloudkit.
Is this normal? It’s really not usable like this.
I'm running into some issues with CloudKit. I've pushed my schema changes to production, changed over my entitlements to point to production, but in my latest TestFlight build, data isn't syncing. It also appears that the CloudKit zone that previously existed in the development schema no longer exists, and there's no CloudKit zone in production. Am I missing something here, or is this all normal?
#WWDC23 #CloudKit #Concurrency #Sendable #Swift #Canopy
In this year’s platform release, many CloudKit types, most importantly CKRecord, are now Sendable 🎉
Nice to see in the docs, and confirmed in an Ask Apple session.
I built Canopy with Xcode 15 and was wondering where all the actor boundary crossing warnings had gone.
I still got work to make Canopy completely warning-free, but this is great.
#wwdc23 #cloudkit #concurrency #sendable #swift #canopy
Seit ich den erweiterten Datenschutz für meinen iCloud-Account aktiviert habe funktioniert die #CloudKit-Integration im #xCode-Simulator nicht mehr. Am Anfang dachte ich, das liegt vielleicht daran, dass iOS 16.4 noch nicht für den Simulator verfügbar ist - inzwischen ist das aber der Fall und das Problem besteht weiterhin. Ist der Simulator nicht mit #ADP bzw. #EDS kompatibel? #iOSDev
#iosdev #eds #adp #xcode #cloudkit