Trying to run a newly created in Xcode Version 13.0 beta (13A5154h) application, with a created in the same Xcode local package.
Build error:
Undefined symbols for architecture arm64:
"MainApp.MainApp.text.unsafeMutableAddressor : Swift.String", referenced from:
Modules.ContentView.body.getter : some in ContentView.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Example proj: GitHub - MaximBazarov/Modules: A test project for a bug
Reproduce:
- Run Xcode Version 13.0 beta (13A5154h)
- Create a new project, File -> New -> Project -> App, gibe it a name “Modules”
- Open your Xcode project and create a local Swift package as part of your project by selecting File > New > Swift Package. Give it a name “MainApp”
- Choose a project and a group, but don’t create a new Git repository if your app is already under version control; then create the new Swift package.
- Select your project in the Project navigator, then select your app target and navigate to its General pane.
- Click the + button in the “Frameworks, Libraries, and Embedded Content” section, select the local package’s library product, and add it as a dependency.
- Import your package in the ContentView by writing
import MainApp
- Select any iOS device or simulator and try to build.
ER:
App builds and runs on the device or simulator.
AR:
Build error:
Undefined symbols for architecture arm64:
"MainApp.MainApp.text.unsafeMutableAddressor : Swift.String", referenced from:
Modules.ContentView.body.getter : some in ContentView.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Jon_Shier
(Jon Shier)
2
I suggest you submit a bug to Apple through feedbackassistant.apple.com, unless you're just lookin for discussion here.
yeah, I also did that, was just curious may be there's a workaround
Feedback ID: FB9206466