Xcode 15 beta 5 External macro implementation type 'ObservationMacros.ObservableMacro' could not be found for macro 'Observable()

Using Xcode 15 Beta 5 the following error now appears when building an app with @Observable

External macro implementation type 'ObservationMacros.ObservableMacro' could not be found for macro 'Observable()'; the type must be public and provided by a macro target in a Swift package, or via '-plugin-path' or '-load-plugin-library'

See the attached image.

This does not happen on other team member’s computer. He can compile app just fine and I can compile app file on Xcode 15 beta 4 and below. This just started happening with Beta 5 installation.

I have deleted all derived data, deleted the Derived data folder for the project, restarted Xcode, restarted machine, reinstalled Xcode 15 beta 5. Nothing helps.

Have the same problem in two different projects.

Please reply with a fix.

Yes even their sample app of Observable having this issue (in Beta 5) so looks like we need to wait until they fixed it.

This seems to be caused by having a space in the name of the Xcode app (e.g. to delineate betas, I had renamed the app "Xcode 15 Beta 5"). Removing the spaces solved this issue for me.

Just download Xcode 15 RC and a SwiftData Sample from Apple. Sell this error all over:

External macro implementation type 'SwiftDataMacros.PersistentModelMacro' could not be found for macro 'Model()'

What's wrong with the RC?

I'm experiencing both a warning and a couple of errors in my case (a custom package with a macro). The errors are "Undefined symbols" and "Linker command failed with exit code 1". These issues only occur locally, initially on Xcode15-beta6 and persist even after the Xcode15 public release. However, when I compile the same source code on CI, it builds successfully (https://github.com/capturecontext/swift-foundation-extensions/tree/swift-macros).

I think I have the same Problem in the Xcode 15 final version:

https://developer.apple.com/forums/thread/737908

I had the same issue and after hours found the solution on my side.

For our library we had to define a macOS support version besides iOS for SwiftSyntaxMacros. Locally we used MacOS 14 and set it to 14. On the Server we were running 13.X. We did not get a error for the MacOS support version only "error: external macro implementation type 'foo' could not be found for macro 'foo'".

After setting it to MacOS 12 the issue was gone:

platforms: [.macOS(.v12), .iOS(.v15)],

I hope this is useful for you. Online I found no solutions for this issue.

Xcode 15 beta 5 External macro implementation type 'ObservationMacros.ObservableMacro' could not be found for macro 'Observable()
 
 
Q