Hi.
I created a new swift macro package and wan't to start using the template which contains the #stringify macro out of the box without any changes.
The package itself runs incl. tests
But now I added the Package to a dummy iOS app project / workspace and I can't compile if im using this code let (_, _) = #stringify(a + b) + package import
Compile error:
External macro implementation type '***.StringifyMacro' could not be found for macro 'stringify'
I am using Xcode 15 and macOS 13.5.2
Restart Xcode, Clean etc doesn't help.
Can anyone help my ? Thanks :)
Posts under wwdc2023-10166 tag
2 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
In Xcode 15.0.0 I have created a package using a template Swift Macro. I have named it 'MyMacroApple'. The template comes with #stringify macro so I have created an new app and named it 'MyMacroApp' then copy pasted the code from 'MyMacroApple' main.swift file
import MyMacroApple
let a = 17
let b = 25
let (result, code) = #stringify(a + b)
then I have added Local package dependency to the app project and selected package product 'MyMacroApple' of Library kind to my 'pocMyApp' target.
When I run the project I get the error: "No such module 'MyMacroApple'"