Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Mac deployment issues
Qt 6.11 is out! See what's new in the release blog

Mac deployment issues

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
10 Posts 3 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Augustas
    wrote on last edited by
    #1

    Hello, I'm having issues uploading macOS app to appstore after I deploy, sign and package it. I'm using Qt 5.14.2 and MacOS Monterey 12.5
    The steps I take are:

    1. Build a release build of MyApp. I can open the MyApp.app file and it works without any issues.

    If I run xcrun altool --validate-app right after building a release build, with arguments: --type macos --username appleid --password somepassword --file /Path/To/MyApp.app, I get a "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier".
    I've checked MyApp.app/Contents/Info.plist, and it does contain the correct CFBundleIdentifier value. I've tried setting QMAKE_TARGET_BUNDLE_PREFIX and custom QMAKE_INFO_PLIST file in the .pro file, but the error stays the same.

    1. I run the appropriate version macdeployqt executable with these arguments: path to MyApp.app -qmldir -codesign=(id i've found using "security find-identity -v -p codesigning" command).
      It passes without any errors. I check the signing using "codesign -dv /Path/To/MyApp.app" command and it returns signing info.

    If I run xcrun altool --validate-app with the very same arguments after this step, I get different errors: "The Info.plist in the package must contain the CFBundleVersion .. " and ".. CFBundleShortVersionString key".
    I've added "VERSION = 1.2.3" and when I repeat these steps I can see that MyApp.app/Contents/Info.plist does contain CFBundleVersion and CFBundleShortVersionString values, but xcrun altool --validate-app still returns me the very same error.

    1. If I try to ignore the errors and build a package using "productbuild --sign=(id I get with "security find-identity" command) --component /Path/To/MyApp.app /Applications MyApp.pkg" arguments, I do get a MyApp.pkg file, but when I try to upload it to a Transporter app, I get an "Failed to get the app's bundle id", even though CFBundleIdentifier is present in MyApp.app/Contents/Info.plist.

    I've tried to compare and merge an XCode macos project generated Info.plist file, yet the error message remains the same.
    Any idea what could I be doing wrong?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you hitting the same issues if you use a more recent version of Qt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Are you hitting the same issues if you use a more recent version of Qt ?

        A Offline
        A Offline
        Augustas
        wrote on last edited by
        #3

        Hello @SGaist,
        I've tried to do the same steps with the same "xcrun altool --validate" command and "macdeployqt" executable appropriate to each version, on Qt 5.15.2 and 6.3.1 versions.

        Qt 6.3.1 "xcrun altool --validate-app" command returns the exact same errors as 5.14.2 (before and after macdeployqt).

        However Qt 5.15.2 calling "xcrun altool --validate-app" before macdeployqt returns the same error

        Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier 
        

        but when I call "xcrun altool --validate-app" after calling macdeployqt, the error I get:

        No suitable application records were found. Verify your bundle identifier 'org.qt-project.QtQuickControls2' is correct and that you are signed into Xcode with an Apple ID that has access to the app in App Store Connect
        

        even though I'm using the same Info.plist file.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you getting these error with a default application as well ?

          If so, can you provide a minimal bash script that applies the steps you use so we can test it ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • A Offline
            A Offline
            Augustas
            wrote on last edited by
            #5

            @SGaist, sorry for the late reply.

            I've created a default Qt project and tested my cases on Qt 6.3 and 5.14.2.
            The errors I get when I run xcrun altool after macdeployqt is different from the one I get on my main project. I've tried multiple variations, but the error message wouldn't change.

            The exact steps I take:

            1. Create an app identifier in developer.apple.com, that will match my application. (You're going to need an apple developer account for this, and some further actions in shell commands)
            2. Build a release build of my app.
            3. Shell commands I run (I had to replace paths and some personal identification details):
            xcrun altool --validate-app --type macos -username YourAppleId --password YourApplePassword --file /Path/To/Build/QtTestApp.app
            #After running xcrun altool command the first time, I'd get "Could not find the main bundle or the Info.plist is missing a CFBundleIdentifier" error.
            
            #Path to macdeploy is ussualy: ~/QtInstallationDir/QtVersion/macos/bin
            #To get codesign value you'd have to run "security find-identity -v -p codesigning" command and copy your apple developer account id (40 chars length, made up of random chars and numbers)
            /Path/To/macdeployqt /Path/To/Build/QtTestApp.app -qmldir=/Path/To/Project/QtTestApp -codesign=somecode
            
            
            #Returns app signing info, if signing was succesful during deployment
            codesign -dv /Path/To/Build/QtTestApp.app
            
            
            xcrun altool --validate-app --type macos -username YourAppleId --password YourApplePassword --file /Path/To/Build/QtTestApp.app
            #Running this command after macdeployqt, errors I'd get:
            #Qt5.14.2: "No suitable application records were found. Verify your bundle identifier 'org.qt-project.QtPrintSupport' is correct and that you are signed into Xcode with an Apple ID that has access to the app in App Store Connect.""
            #Qt6.3:    "No suitable application records were found. Verify your bundle identifier 'org.qt-project.QtQuickControls2' is correct and that you are signed into Xcode with an Apple ID that has access to the app in App Store Connect."
            

            Default project that I've used link.
            If you don't wan't to download it, it's just a default Qt app with this code added in .pro file:

            #QMAKE_INFO_PLIST = Info.plist #Tried using XCode generated Info.plist file
            QMAKE_TARGET_BUNDLE_PREFIX = com.company #To change app identifier prefix, so it would match in apple identifiers database
            

            and Info.plist file copied from a default XCode macos project.

            1 Reply Last reply
            0
            • SGaistS SGaist

              Are you getting these error with a default application as well ?

              If so, can you provide a minimal bash script that applies the steps you use so we can test it ?

              A Offline
              A Offline
              Augustas
              wrote on last edited by
              #6

              Hey @SGaist,
              Any updates on the issue?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Sorry, I have had issues with Xcode recently and couldn't check this.

                In between, did you check the bug report system to see if there's something related there ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                A 1 Reply Last reply
                0
                • SGaistS SGaist

                  Sorry, I have had issues with Xcode recently and couldn't check this.

                  In between, did you check the bug report system to see if there's something related there ?

                  A Offline
                  A Offline
                  Augustas
                  wrote on last edited by
                  #8

                  I've ran through all macdeployqt related posts in there, but couldn't find one related to my issue.
                  Is it worth to create a bug there, or should I just rely on you?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    It is worth I think especially if you can't find anything related to it there.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • Tor ArneT Offline
                      Tor ArneT Offline
                      Tor Arne
                      wrote on last edited by
                      #10

                      The file name to altool is an ipa file, not an app dir

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved