0

I am using Qmake command line to build my app for iOS and I am struggling to sign my app with xcodebuild because the MyApp.xcodeproj/project.pbxproj that qmake is generating does not the contain the following fields at all

ProvisioningStyle
DevelopmentTeam

How can enforce qmake to contain ProvisioningStyle $ DevelopmentTeam fields in project.pbxproj?

I dont need to have any certain value to be set into the 2 fields. Only, need the fields to be present in appropriate places in project.pbxproj. Opening & MyApp.xcodeproj in Xcode UI IDE & just checking-unchecking the Automatically manage signing option under Project>General settings adds the fields into project.pbxproj. How can I get qmake to add them for me?

TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159

1 Answers1

1

As you know, I answered the DevelopmentTeam detail on this SO thread: Qt for iOS: code signing is required

You commented that you tried the same pattern for PROVISISIONING_STYLE but did you try ProvisioningStyle? I'm just a bit unclear what you did and what the results were.

BuvinJ
  • 10,221
  • 5
  • 83
  • 96
  • Yes. I tried `ProvisioningStyle`. But, the issue is that it ends up in `buildSettings = {` section of `project.pbxproj` . Whereas it should be in `attributes = {` section of `project.pbxproj`. Only when it is in `attributes = {` section, `Xcode` picks it up correctly. – TheWaterProgrammer Jul 13 '17 at 22:01
  • Please check a `project.pbxproj` generated out of `Xcode` to understand my comment correctly. The format defined by `Xcode` for `project.pbxproj` does not seem to be adhered in this case by `qmake`. is there some way I can enforce from `qmake` level to automatically choose a `provisioning profile` ? I am using Xcode 8 – TheWaterProgrammer Jul 13 '17 at 22:11
  • Unfortunately, I'm not working on my Mac, and I'm neck deep in other issues. What we want to know is how QMAKE_MAC_XCODE_SETTINGS gets applied. That should point us in the right direction. Can you post your compile output from Qt? We'll see where that gets mixed into the build process. (I.e. let's search for the DEVELOPMENT_TEAM variable/value etc. in that) – BuvinJ Jul 13 '17 at 22:17
  • I'm expecting to see some XCode command line tool that gets brought into play. – BuvinJ Jul 13 '17 at 22:20
  • Worse case scenario, you can write a script to edit that file post linkage via qmake. I've done a variety of tricky tasks that way for which Qt couldn't possibly have a built-in solution for. – BuvinJ Jul 13 '17 at 22:23
  • Ok. Let me try some a sed command technique to insert the text I want to in the pbxproj. – TheWaterProgrammer Jul 13 '17 at 22:27
  • I saw some posts where other developers did that. I can help you get that firing off in your qmake at the right time if you want. – BuvinJ Jul 13 '17 at 22:29
  • 1
    I'd still suggest figuring out what the qmake xcode variable does though. I'm guessing Qt used a cleaner solution (hopefully!) – BuvinJ Jul 13 '17 at 22:30