Does anyone use CMake to build and run an iOS app, without working (much) in Xcode? I’ve been using CMake + Emacs a lot lately, to build executables for desktop or command line. I’d like to start doing the same for iOS apps. When I used to use Xcode, it was pretty simple to compile and run a project on a simulator or device that was connected via USB cable. I’d like to setup a similar workflow with minimal use of Xcode. Is it possible?
I’m not sure if crosscompiling for iOS is supported with non-Xcode toolchains. You can use AppleClang + the Xcode CMake generator and still build only from the command line, though, without needing to actually use Xcode as your IDE.
One can probably get CMake to compile with a proper toolchain file, but all of the device simulator and other convenience things are Xcode behaviors that would need reproduced with add_custom_command.
ideviceinstaller -i ./build-debug/Learning/test_app.app
Uploading test_app.app package contents... DONE.
ERROR: could not locate ./build-debug/Learning/test_app.app/Info.plist in app!
Because it’s put Info.plist it in a nested directory structure like a macOS app.