I'm glad I'm not the only one having this issue. It's like swift build doesn't even include the compiled .momd file (works just fine in Xcode!). I have tests that fail with
let modelPath = try XCTUnwrap(bundle.url(forResource: "TestModel", withExtension: "momd"), "Unable to find TestModel.momd")
and when I inspect the generated test bundles, I get the normal .xcdatamodeld. swift build appears to be missing a step that compiles Core Data models — something that xcodebuild knows how to do. It's likely this is intentionally decoupled from swift build and I have no idea how to fix it.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: