Hello community,
TL;DR
My question is : How can CMake be used to build an IPA? currently we are getting a .app artifact as final product, Does CMake have the required commands or targets to do this ? Earlier we were using XCodebuild -exportArchive option for same.
I am trying to port an iOS application from Qt5 (build with Qmake) to Qt6 (build with Cmake), and I have successfully completed compilation and linking stages.
I am getting an archive as App.app instead of an expected App.ipa
commands used to build app
cmake -H. -Bbuildxcode -DCMAKE_PREFIX_PATH=/Users/cybercraft/Qt/6.2.4/ios -DCMAKE_TOOLCHAIN_FILE=../ios.toolchain.cmake -DPLATFORM=OS64 -DENABLE_BITCODE=NO -GXcode
cmake --build buildxcode
I have a bash script that does build an ipa with Qt5.12.11, I've compared the xproj files (from both bash build and cmake build) side by side for every setting, didnt find any difference for packaging/signing.
Building ipa directly from command line using XCodebuild -exportArchive didnt work as well, producing same .app instead of .ipa.
I'm new to cmake and iOS development, am I missing something critical?
I have added my CMakeLists.txt file here [ https://pastebin.com/VD2DxHNi ]
ios.toolchain.cmake is taken from [ https://github.com/leetal/ios-cmake ]
My info.plist file here [https://pastebin.com/qcrd6Fdy ]
My export.plist file here [ https://pastebin.com/eJiVnwFt ]
screenshot of compilation process "with build successfull" [ https://imgur.com/a/97PCXeZ ]
Build environment Details:
Qt version: 5.12.11
qmake version: 3.1
MacOs version: 12.6 (Monterey, M1 2020)
Xcode version: 14.0.1 (14A400)
xcodebuild version: 14.0.1 (14A400)
cmake version: 3.24.2
boost version: 1.80.0
I've already followed few online suggestions and solutions mentioned in forums, but none of them worked, if you want me to add thoses, I'll add them too, just let me know if it helps.
although my question could possibly be a duplicate of https://stackoverflow.com/questions/72553643/creating-an-ipa-from-app-for-ios-using-cmake still hoping to find some solutions.
https://stackoverflow.com/questions/8739506/xcode-creates-archive-instead-of-ipa didnt help here.
https://stackoverflow.com/questions/52049567/get-ipa-from-xcode didnt help as well.
Regards.
Top comments (0)