Example project not launching on iOS simulator (on Mac M2)

Hello,

I’m trying to work with Csound on iOS. The example project provided with the SDK works fine on my iPad, however I can’t make it work on the simulator.
Here is the error Xcode gives me :

Building for 'iOS-simulator', but linking in object file (...../Csound/csound-iOS-6.18.0/Csound iOS Obj-C Examples/csound-iOS/libs/libcsound.a[arm64][2](auxfd.o)) built for 'iOS'

Does anyone know how to make it work, or how to get a compatible csound.a library ?
Thanks,
Morgane

iOS and iOS-simulator use different architectures. Check out the iOS builds in Csound github actions. They now include an xcframework that includes slices for both iOS and iOS simulator.

Scroll to the bottom of this build for example and you’ll find an iOS zip with pre-built binaries.

I finally made it work on the simulator on my M-based Mac by using Rosetta.
See : https://armen-mkrtchian.medium.com/run-rosetta-simulator-on-xcode-14-3-381d341364ee

So it was nothing to do with the way Csound libraries were shipped, even though I spent a lot of time trying stuff with xcframework.

Thanks again for replying Rory, and I hope this will help somebody else.

1 Like