Search code examples
iosxcodesdlxcode12

Build SDL sources for iOS developement with Xcode 12


I am trying to setup an SDL iOS project with Xcode 12 but I fail.

  • From the SDL source, I cannot build the lib itself unless if I exclude "arm64" (Excluded Architecture / Any iOS simulator SDK)

  • When I try to build my project for a simulator I get some Undefined symbols for architecture x86_64 ...

  • When I try to build my project for "any iOS device" I get Undefined symbols for architecture arm64 ...

Is there any up-to-date tutorial to build an SDL project for iOS with Xcode 12 ?


Solution

  • After some time searching, I finish with :

    • Build the SDL with exclude "arm64" (Excluded Architecture / Any iOS simulator SDK -- debug and release)
    • exclude arm64 for your project as well
    • Of course add libsdl2.a to linked libraries in your project
    • Add Metal.framework and CoreBluetooth.framework to to linked libraries in your project !
    • At last, I had a message for a missing Bundle version string (short) in the plist. Add it and you are done !

    Build and run on your emulator and device !