Post

Replies

Boosts

Views

Activity

Comment on Migrate Core Data to SwiftData in an App Group (& CloudKit)
I’ve changed the data model in my MigrationPlan, so I don’t think you need to keep the models in sync. Works for me to keep the Core Data model at the old state before switching and migrating to SwiftData. 🤔 Yeah true, that’s weird that the „old“ .sqlite files won’t automatically get transferred. Seems like a bug to me. Thanks for the hints for enabling iCloud! Will keep an eye on that once I get to that, but sounds like I’m already at a good base.
1w
Comment on Migrate Core Data to SwiftData in an App Group (& CloudKit)
Also, you are mentioning that after the configuration I’ll need to move the newly created .store database and rename it to .sqlite and use this from now on. But how do I do that specifically? I guess in the MigrationStage’s didMigrate? Can you help me how to perform this in code with an example? … if that is even necessary considering my comment above. Maybe there is a better way to make the migration find my old store file and then use the default app group location from then on?
Jun ’24
Comment on Migrate Core Data to SwiftData in an App Group (& CloudKit)
Hey, thanks a lot for your detailed response! 🙏 Yes, the migration from Core Data to SwiftData itself works successfully for me. In my case I don’t want to keep the .sqlite name extension … it’s rather that the migration didn’t find the old Core Data for migration and simply created a new database. So how do I get the migration to 1) find my old „Something.sqlite“ Core Data database, 2) then move it to the App Group 3) so that I can then use it for my Widget and enable it for CloudKit?
Jun ’24
Comment on Unable to set the new App Tint Color options for App Shortcuts
Okay, I’ve figured it out! Yes, you have to add CFBundleIconFiles and UIPrerenderedIcon as well. And no you don’t have to use both new keys. I’ve ended up only using NSAppIconComplementingColorNames for the background gradient now. Seems like you have to add both strings to this array, though. So if you want to have a flat color, just put the same name for the top and bottom color. Btw, here is a tweet showing how it can look like: https://twitter.com/emcro/status/1677437755197132801
Aug ’23
Comment on Disappearing AppIntents
This should be the accepted answer! Looking into the build logs (View > Navigators > Reports) helped a lot. For me it was an issue with the caseDisplayRepresentations that didn’t include all cases. Even after including all cases I still had to change from DisplayRepresentation(stringLiteral: ) to DisplayRepresentation(title: ). Maybe that helps.
Aug ’23