-1

In Xcode 15.0.0, I have created a package using a Swift Macro template. I named it 'MyFirstMacro'. The template includes a #stringify macro. Next, I created a new application named 'MyApp' and copied the code from the 'MyFirstMacro' main.swift file:

import MyFirstMacro

let a = 17
let b = 25

let (result, code) = #stringify(a + b)

Then, I added a local package dependency to the application project and selected the package product 'MyFirstMacro' with a Library kind for my 'pocApp' target.

However, when I run the project, I encounter the error:

No such module 'MyFirstMacro'.

How can I fix it?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Blazej SLEBODA
  • 8,936
  • 7
  • 53
  • 93

1 Answers1

0

I had a similar issue but when I was creating a Macro package and running it standalone and seems like it was the bug which was fixed in Xcode beta 2.