Post

Replies

Boosts

Views

Activity

Comment on How to subclass with SwiftData?
You can use a PersistentModel object in XCTest. You have to create a ModelContainer as a property of XCTestCase - see the default template code that is supporting the Item model. Seems you have to pretend with @MainActor. For the config enabled store in memory only. Use container.mainContext.insert() to add objects to the model.
Topic: App & System Services SubTopic: iCloud Tags:
Dec ’23
Comment on How to subclass with SwiftData?
You can use a PersistentModel object in XCTest. You have to create a ModelContainer as a property of XCTestCase - see the default template code that is supporting the Item model. Seems you have to pretend with @MainActor. For the config enabled store in memory only. Use container.mainContext.insert() to add objects to the model.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Dec ’23