I have done some additional testing. Since all of the Archive compiler errors I'm getting now exist within the #Preview macros used in the Views I removed them all. Once I deleted all of the #Preview macros in the app I could delete the SampleData.swift and PreviewContainer.swift files that the compiler wasn't finding.
Now those files don't exist and I can continue to build and run the app normally. However Release build still fail with the same compiler error and the Archive command fails with the same Command SwiftCompile failed with a nonzero exit code build error. Looking at the log (here) it looks like the same result as my Release builds - no details.
I don't understand why Archive was failing to build with all the #Preview macros - I'll have to circle back around and look at that later. At the moment though, both Release builds and Archive is failing with the same nonzero exit code failure.
Post
Replies
Boosts
Views
Activity
I had not tried that actually so I just did and received a ton of compiler errors. I uploaded a new GIST of the errors. Why do I not receive these during a normal Run while in the Debug config?
I still haven't figured out why this is happening. I'm moving forward with manually updating the arrays but would still like to understand if the SwiftData changes to the array are supposed to be picked up by SwiftUI. If so, then I can file a bug but I'm not sure how to tell if this is expected behavior or not.
it looks like I had left some test code in my List example I initially provided. The below code is what I'm actually using (no online filtering, I'm using the computed property) For the user todo lists section.
// MARK: -- User TodoLists
Section(header: Text("Lists").padding(.top, -24)) {
ForEach(userTodoLists) { list in
NavigationLink(value: list) {
Text(list.name)
}
}
}
}
I forgot to mention what my model looked like. A simplified version of it looks like this:
@Model class FMList {
var listID: UUID
var name: String
var isFavorite: Bool
// init func omitted for brevity
}