Post

Replies

Boosts

Views

Activity

Reply to SwiftData ModelContainer can not be created in iOS 17.4 Beta
I tried creating a new app, with a new container, using the Xcode 'stock' Item ie; item.timestamp. I tried it in a 17.4 simulator and iPhone with 17/4. Both failed for the same reason as noted by the OP. Fatal error: Could not create ModelContainer: SwiftDataError(_error: SwiftData.SwiftDataError._Error.loadIssueModelContainer). I also have a "Live" App that is not loading because of 17.4. Also... I have played with the relationships as described in the posts above and nothing worked. Again - Apple's stock, stripped down, Items app is failing.??? Update: As for my app... The culprit was that I had added modelContext into the environment using both an @Environment call and .modelContainer on WindowGroup. By the way, this worked prior to 17.4. The solution was to remove : @Environment(.modelContext) private var modelContext. As for the 'stock app', I discovered that the issue was that timestamp is not marked optional so it fails. Marking it optional? and then providing ?? Date.now values where needed solved the problem.
Mar ’24
Reply to Removing Swift package from Xcode
For me I think the fix was changing my Dockerfile to disable automatic resolution. NOTE: that I also deleted my derived data directory. RUN swift build \ 		--enable-test-discovery \ 		--disable-automatic-resolution \ 		-c release \ 		-Xswiftc -g Not sure if this had a material impact but while I was in there... I upgraded my docker build: #FROM swift:5.2.3-bionic as build FROM swift:5.3-bionic as build
Oct ’20