Xcode 15 beta 8 missing libSwiftDataMacros.dylib

Trying to compile the SwiftDataFlashCardSample app with Xcode 15 beta 8

There are warning messages in the log file:

Compiler plugin not loaded: /Applications/Xcode-15-beta-8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins/libSwiftDataMacros.dylib; loader error: No such file or directory

And syntax errors following:

/Users/dswift/Downloads/BuildingADocumentBasedAppUsingSwiftData/End/FlashCard/Model/Card.swift:12:13: External macro implementation type 'SwiftDataMacros.PersistentModelMacro' could not be found for macro 'Model()'

The folder /Applications/Xcode-15-beta-8.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/plugins contains only libSwiftMacros.dylib and libObservationMacros,dylib

beta 5 has this file plus several others

Accepted Answer

It looks like Apple may have consolidated the swift data macros into libSwiftMacros.dylib. I was able to fix as follows

  1. Go to build settings of the app
  2. Search for "Other Swift Flags"
  3. Double click to open it up
  4. Change ${TOOLCHAIN_DIR}/usr/lib/swift/host/plugins/libSwiftDataMacros.dylib to ${TOOLCHAIN_DIR}/usr/lib/swift/host/plugins/libSwiftMacros.dylib
Xcode 15 beta 8 missing libSwiftDataMacros.dylib
 
 
Q