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. I cannot deploy Qt framwork on Mac.
Forum Updated to NodeBB v4.3 + New Features

I cannot deploy Qt framwork on Mac.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
16 Posts 3 Posters 1.5k Views 3 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.
  • SGaistS SGaist

    Hi and welcome to devnet,

    From the error message, you seem to have not signed the application bundle.
    Without that, recent versions of macOS will not allow your application to run in their default settings.

    O Offline
    O Offline
    ostrichking371
    wrote on last edited by
    #6

    @SGaist do I just need the developer account and macdeployqt will sign it for me? Do I need to pass -codesign? Thanks in advance!

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

      You have to tell macdeployqt that you want to sign your application bundle.

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

      O 1 Reply Last reply
      0
      • O ostrichking371

        @SGaist do I just need the developer account and macdeployqt will sign it for me? Do I need to pass -codesign? Thanks in advance!

        artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #8

        @ostrichking371 Hi,
        macdeployqt will work for simple apps, most of the heavy lifting.
        As you progress and start including 3rd party libraries, it will not be sufficient any more. Do yourself a favour and learn to work with codesign and friends from the start. That would be also beneficial should you try to port your code to run on multiple Apple platforms or experiment with the AppStore - macdeployqt is not very flexible when working with codesign.
        What worked for me is I wrote myself shell script handling deployment (calling macdeployqt and other tools) with parameters etc. A bit of work but once done is just a single call from the terminal to have signed installation package for the destination of my choice...

        Having said all that, Apple didn't create the most user friendly dev environment but it's manageable, just lots of learning from the start.

        For more information please re-read.

        Kind Regards,
        Artur

        1 Reply Last reply
        0
        • SGaistS SGaist

          You have to tell macdeployqt that you want to sign your application bundle.

          O Offline
          O Offline
          ostrichking371
          wrote on last edited by
          #9

          @SGaist I know… but how do I do that? What parameter do I pass to macdeployqt?

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

            See the macdeployqt documentation and the -codesign option.

            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
            • O ostrichking371

              @SGaist I know… but how do I do that? What parameter do I pass to macdeployqt?

              O Offline
              O Offline
              ostrichking371
              wrote on last edited by
              #11

              @ostrichking371 how do I link a Apple developer account so macdeployqt knows what sign to use? Again… I am new to c++ building and development.

              artwawA 1 Reply Last reply
              0
              • O ostrichking371

                @ostrichking371 how do I link a Apple developer account so macdeployqt knows what sign to use? Again… I am new to c++ building and development.

                artwawA Offline
                artwawA Offline
                artwaw
                wrote on last edited by
                #12

                @ostrichking371 It has nothing to do with C++. You need to create an account in apple developer console, create yourself appropriate certificates, import them to your wallet (I usually import whole bunch to Xcode too). Then you can use them with tools.
                It should all be described in the Apple Developer documentation linked above.

                For more information please re-read.

                Kind Regards,
                Artur

                O 1 Reply Last reply
                1
                • artwawA artwaw

                  @ostrichking371 It has nothing to do with C++. You need to create an account in apple developer console, create yourself appropriate certificates, import them to your wallet (I usually import whole bunch to Xcode too). Then you can use them with tools.
                  It should all be described in the Apple Developer documentation linked above.

                  O Offline
                  O Offline
                  ostrichking371
                  wrote on last edited by
                  #13

                  @artwaw I’m new to Mac development in general. For -codesign I need my “signing identity” but I don’t know what that means.

                  artwawA 1 Reply Last reply
                  0
                  • O ostrichking371

                    @artwaw I’m new to Mac development in general. For -codesign I need my “signing identity” but I don’t know what that means.

                    artwawA Offline
                    artwawA Offline
                    artwaw
                    wrote on last edited by
                    #14

                    @ostrichking371 that's identity defined by your developer certificate for a given action type (certificates come in a few flavours: Mac development, distribution, etc.). As I wrote above, you'd need at least Mac Developer one, probably distribution - should you pack your program into dmg; probably more. Please familiarise yourself with Apple development process.
                    Just a note: for the purpose of using Qt on Mac, developing and running your software from Qt (macOS) or a simulator or associated developer device (iOS, iPadOS, etc) you should not need any certificates. Those come in handy just when you try to run your code independently or submit to AppStore.

                    For more information please re-read.

                    Kind Regards,
                    Artur

                    O 1 Reply Last reply
                    1
                    • artwawA artwaw

                      @ostrichking371 that's identity defined by your developer certificate for a given action type (certificates come in a few flavours: Mac development, distribution, etc.). As I wrote above, you'd need at least Mac Developer one, probably distribution - should you pack your program into dmg; probably more. Please familiarise yourself with Apple development process.
                      Just a note: for the purpose of using Qt on Mac, developing and running your software from Qt (macOS) or a simulator or associated developer device (iOS, iPadOS, etc) you should not need any certificates. Those come in handy just when you try to run your code independently or submit to AppStore.

                      O Offline
                      O Offline
                      ostrichking371
                      wrote on last edited by
                      #15

                      @artwaw that’s why I’m wondering. The error I posted at the top was on my own MacBook, the same one I deployed with. I don’t have an Apple developer subscription but I shouldn’t need one only my own laptop right? It works to just run an exe, but the bundle that includes the libraries gives this error.

                      1 Reply Last reply
                      0
                      • artwawA Offline
                        artwawA Offline
                        artwaw
                        wrote on last edited by
                        #16

                        I am writing these posts from my Mac, on which I am actively programming with Qt and never ever have I had the need to sign anything that I run from Qt Creator, also no need for deployment steps. If, however, you run standalone app package - yes, you need to do both.
                        I am unable to say how does CLion come into the equation as I never used it.

                        For more information please re-read.

                        Kind Regards,
                        Artur

                        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