[iOS] Product Bundle Identifier /Info.plist missmatch



  • Hello everyone,

    I'm shipping my own Info.plist file for the IOS-version of my application.

    So far everything works fine and well. Launchscreen is there, properties are set, Icon is up, version number is set etc.

    The only problem I have, is when I try to archive it the app - using XCode - to then uppload it to the App-Store.

    When I do that, I get a missleading Errormessage.
    After a while I found out, that the Product Bundle Identifier is not the same as the CFBundleIdentifier set inside the Info.plist file.

    My question would be:

    Does anyone know a way to set the Product Bundle Identifier- the one found int the Build Settings tab - from the Info.plist or any other way from inside the QtProject-file. So that one does not have to set it manuely every time :)

    Greetings.


  • Qt Champions 2017

    Hi

    https://stackoverflow.com/questions/32862253/xcode-7-changing-product-bundle-identifier?

    speaks of using
    PRODUCT_BUNDLE_IDENTIFIER to set it.

    But maybe you already know and look for something Qt side .



  • hi @mrjj ,

    always interessting how using google, I asume, can lead to different resutls. We need unified google-coordinates !! :-)

    That said, PRODUCT_BUNDLE_IDENTIFIER seems to be the parameter that needs to be modified.

    However I don't think its a key, that could be set inside the Info.plist file. But rather a parameter that is set in the *.xcodeproj file that is created automatically by the precompiler/qmake?

    I wouldn't know how to approach that.
    Back to google I guess.

    Edit:
    Found this entry in the Qt-docs:

    Platform Notes - iOS
    Deployment
    Developing, building, running, and debugging a Qt for iOS application can all be done with Qt Creator on macOS. The toolchain is provided by Apple's Xcode, and running qmake on a project targeted for iOS will also generate an Xcode project file (.xcodeproj), with initial application settings. As Qt Creator does not provide an interface for managing all of the settings specific to iOS platform, it is sometimes necessary to adjust them in Xcode directly. Checking that the application is configured correctly is especially important before submitting an application for publishing in Apple's App Store.

    This might just fall into that category
    😐


  • Qt Champions 2017

    Hi
    Yep, its wonderful how same words on different ip's sometimes give me
    different results. ;)

    yeah it sounds like qmake do not have the ability to transfer the info.
    However, could you not just run a shell script and text replace the string in the resulting .xcodeproj ?
    or using a structured tool as cmdline and find and set key directly ?
    https://github.com/xcodeswift/xcproj
    (i assume MacOS is like linux and good with cmdline )



  • @mrjj Hi. If I understand correctly you need to set specific bundle identifier in Info.plist file for your iOS project from QtCreator, is this right? If so, I using next way for this: I save custom Info.plist. you can get it from any clear build your sources. Than you can edit it and setup any configuration from official Apple docs here the link.

    For using it as a default Info.plist you can use next row in you .pro file:

    QMAKE_INFO_PLIST = Info.plist
    

    I hope this will help to you.

    Also you can configuration your project for create archive and IPA from QtCreator. This will help to you upload builds to AppStore / Testflight without Xcode. For upload your IPA you can use another tool by Apple Application Loader or Fastlane if you are using something like Jenkins or another CI system.



  • @mrjj
    true, that might be a possibility. But I'm hessitent to go that way. I use a script to set a desktop-short cut when I install/start one of my programms the first time. And sometimes that results memory swap loop that takes up ALL of the available memory and only ends with a reboot. 🤨

    @shav I'm the one with the question, and @mrjj is nice enough to provide food for thought. The issue is not with the Info.plist but rather with the automatically created xcode project file. I need to modify PRODUCT_BUNDLE_IDENTIFIER in there, after it is created and before its compiled.



  • This may resolve your issue. Worked for me.

    Add the following line with your required value to your .pro file:
    xcode_product_bundle_identifier_setting.value = "com.mycompany.myapp"

    https://bugreports.qt.io/browse/QTBUG-66462



  • @TinRaven
    Thank you, I can't check it right now. But I will as soon as I'm back to work :)



  • Thanks again @TinRaven

    setting the xcode_product_bundle_identifier_setting.value to the correct name in the project file does indeed fix my issue.

    It's exactly what I was looking for!

    I'll mark the thread as solved, hopefully the bugreport progresses soon.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.