Post

Replies

Boosts

Views

Activity

Reply to CoreData in SPM Package
A (somewhat brittle) solution for anyone that finds this via Google. After running a build with swift build I manually invoke the momc compiler to produce the necessary momd and save it to the SPM generated bundle. After that I execute the tests. swift build /Applications/Xcode.app/Contents/Developer/usr/bin/momc Sources/PackageName/Resources/ModelName.xcdatamodeld .build/arm64-apple-macosx/debug/PackageName_PackageName.bundle/ModelName.momd swift test
Mar ’23