Nominate our 2022 Qt Champions!

Codesign Qt app for MacOS with team provision profile



  • Hi!
    I want to code sign a qt app built for Mac OS to include a "Team provisioning profile". I can not find any way to include this in my app. Anybody have any successful experience with this? I can't find any info on how to manually include this without xcode..
    Thanks
    Peter


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    IIRC, with the latest version of macdeployqt you have the -codesign parameter where you should be able to give the identity you want.

    Hope it helps



  • @SGaist Thanks for your reply. Unfortunately the codesign option does not support including "Team provisioning profiles" its actually not part of the signing process. Xcode embeds it just before the codesigning process starts. But I can't figure out what it does..


  • Lifetime Qt Champion

    What version of Xcode are you using ?



  • Hi. Did anyone every figure this out? I'm dealing with this same thing now. We have an app that's in it's 3rd release now and want to add a provisioning profile to it. We use Qt (5.15.2) and have a build script that uses macdeployqt, codesign, packagebuild, etc to create final package for distribution (to internal testers) and app store. I can't find anything on how to add our provisioning profile though.



    • In case anyone still needs it, I figured it out. Create your provisioning profile on developer portal as a "Distribution->App Store" type. Later select the type that matches the certs you're signing with (Mac App Distribution being the old type I'm still using and just Distribution is the new type, but it has to match up!)
    • list itemDownload the provisioning profile and rename it to embedded.provisioningprofile
    • Copy it to your.app/Contents
    • Now when you sign/package, make sure you also sign that new file in the .app
      Turns out it's that simple, yet nothing on Apple's docs tell you this, had to piece together 20 cryptic pages.


  • @wesblake Ok not quite. That allowed it to pass in Transporter, no more errors about not being available in testflight without a profile. However, once uploaded to the store it now shows "Not Available for Testing".
    Thanks Apple for the incredible documentation (or rather assuming everyone must use your stuff!)



  • Ok, fully working now, in addition to the steps above, you must put the following in your entitlements file:

    <key>com.apple.application-identifier</key>
    <string>XXXXXXX.com.sample.app</string>
    <key>com.apple.developer.team-identifier</key>
    <string>XXXXXXX</string>
    

    Everything works now, yay!



  • @wesblake Hello,
    Using the information you've provided I've managed to upload my package to the appstore using Transporter, however even after inserting com.apple.application-identifier and com.apple.developer.team-identifier to my .entitlements file, I still get "Not Available for Testing" status in TestFlight.

    Could you share any other entries in the entitlements file, or any other leads to resolve this issue?


Log in to reply