1 year ago

#381741

test-img

Schmul42

How to fix undefined symbol errors in swift?

Recently I got to work on a Swift project on a mac with a M1 chip. This project uses the normal swift package manager but also has Moscapsule (https://github.com/flightonary/Moscapsule) manually installed. Therefore it gets compiled before all other dependencies and the app the package is used for. If you compile and run the app on an iPad-Simulator you need to tell the Moscapsule target to compile for x86_64 architecture because it uses a x86_64 iPad simulator. This works absolutely fine.

Then I tried to compile and run the UI Tests for the app. Now the compiler failed to build the app because the compiler needs the Moscapsule framework compiled for arm64 architecture.

I thought: Ok no problem, then compile it for arm64 architecture. But then I get these errors: The interesting thing to mention is that if I compile the app or the UI Tests for a real arm64 device (iPad Pro with M1 Chip) there is no problem at all.

Did one of you have a similar problem already and has a solution for me?

Thank you!

ios

swift

ios-simulator

xcode-ui-testing

0 Answers

Your Answer

Accepted video resources