Post

Replies

Boosts

Views

Activity

Reply to AppIntents @OptionalParameter doesn't exist?
The documentation should be updated, it seems optional parameters are inferred based on Swift optionality via ?. Replace this: @OptionalParameter(title: "Quantity") var quantity: Int? with this: @Parameter(title: "Quantity") var quantity: Int? The user won't be required to specify the parameter.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to SwiftData with CloudKit failing to migrate schema
I'm experiencing what @mrtnmgi describes too—willMigrate and didMigrate are never called. I have it reproducing in a repeatable test which I've attached to FB13711459.
Replies
Boosts
Views
Activity
Apr ’24
Reply to [SwiftData]Why did not I receive willMigrate and didMigrate callbacks during the schemaMigrationPlan
It seems this is related to using CloudKit. See more here: https://forums.developer.apple.com/forums/thread/744491
Replies
Boosts
Views
Activity
Apr ’24
Reply to The current model reference and the next model reference cannot be equal.
I came across this while googling and thought I'd also put my solution here for any others it helps: I was bumping the schema just to use the migrations for ensuring data integrity, and I hadn't actually changed the model. Once I made a change to the model (renamed an attribute I had been meaning to get around to) everything worked fine.
Replies
Boosts
Views
Activity
Mar ’24