[SOLVED] Set Version and Build for IOS using QT


when I build the IOS application From my QT it was working correctly, but lately, I added some .pro settings to my IOS to set ICON, Bundle ID, and all of this works pefect, after this the generated Xcode project was generated without Version Number which let me just build and open the Build in Xcode to Edit the Version so I can deploy on Simulator, Here is my .pro I use

ios {

    QMAKE_INFO_PLIST = $$PWD/ios/Info.plist
    QMAKE_ASSET_CATALOGS += $$PWD/ios/Images.xcassets

    ios_icon.files = $$files($$PWD/ios/Assets.xcassets/AppIcon.appiconset/*.png)
    QMAKE_BUNDLE_DATA += ios_icon

    app_launch_screen.files = $$files($$PWD/ios/MyLaunchScreen.storyboard)
    QMAKE_BUNDLE_DATA += app_launch_screen

    # Set "Devices" (2=iPad Only)
    #Note for devices: 1=iPhone, 2=iPad, 1,2=Universal.

What I tried is to add to it both of this


but both never worked and generate the Xcode project without version or build change, so what I did wrong or I missing in my .pro setting to change the build and add the version number, without those setting to add icon and splash screen, it generated a default 1.0.0 for build and version

enter image description here

so this is annoying because I cant directly deploy from QT and I need to go and open the build in Xcode to add version then run from there, because if I run again from QT it will overwrite the setting.

Error on running from QT

Application install on simulator failed. An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The application's Info.plist does not contain a valid CFBundleShortVersionString.
Ensure your bundle contains a valid CFBundleShortVersionString.

building is working fine, but deploy from QT is the problem now.


Set VERSION=1.2.3 in your .pro file and add QMAKE_INFO_PLIST = Info.plist works at least for me using QtCreator 6.0.2 and XCode 13.2.1.

Use the variables in Info.plist:


See also QTBUG-75988

Answered By – AD1170

Answer Checked By – David Marino (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *