Post

Replies

Boosts

Views

Activity

Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
I have now identified that this issue is happening due to Relationships in my model. My MyToDo has task defined like this: @Relationship(deleteRule: .cascade) var tasks: [MyTask]? = [] and MyTask has reference back as following: var todo: MyTodo? Both of them are optional as required for CloudKit. This model can be read in iOS 17.3, but in 17.4 beta, it crashes!
Feb ’24
Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
It seems for whatever reason inverse relationship needs to be explicitly defined. Change from this: @Relationship(deleteRule: .cascade) var tasks: [MyTask]? = [] to @Relationship(deleteRule: .cascade, inverse: \MyTask.todo) var tasks: [MyTask]? = [] has solved the crash issue. Works both in iOS 17.3 and 17.4.
Replies
Boosts
Views
Activity
Feb ’24
Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
I have now identified that this issue is happening due to Relationships in my model. My MyToDo has task defined like this: @Relationship(deleteRule: .cascade) var tasks: [MyTask]? = [] and MyTask has reference back as following: var todo: MyTodo? Both of them are optional as required for CloudKit. This model can be read in iOS 17.3, but in 17.4 beta, it crashes!
Replies
Boosts
Views
Activity
Feb ’24
Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
Widget can obtain the data without error/crash from modelContainer using this code: guard let modelContainer = try? ModelContainer(for: MyTodo.self) else { return [] }
Replies
Boosts
Views
Activity
Feb ’24
Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
My model do not have any @Attribute(.unique) All properties have default values Relationships are marked as optional App is using CloudKit for iCloud syncronization A brandnew app with the same model does not have this issue. When I uncheck "CloutKit" in Signing & Capabilities, the app launch normally.
Replies
Boosts
Views
Activity
Feb ’24
Reply to Where to get 5.5 inch iPhone screenshots for submission
I dont have an answer and don't know how to generate 5.5" screenshots. However, Apple clarified that those are needed :( https://developer.apple.com/forums/thread/719822
Replies
Boosts
Views
Activity
Dec ’23
Reply to WidgetKit / SwiftUI Text Timer Bug. This has remained a bug for a very long time.
Same problem with me as well. Neither alignment, nor .timer works.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’22