Skip to content

Xcode@5 Code Signing Error when building a project with embedded framework that does not support manual signing #12263

Closed
@ericallam

Description

@ericallam

Required Information

Type: Bug
Task Name: Xcode@5

Environment

All

Issue Description

Xcode@5 fails to build an Xcode project that has multiple targets that have mixed signing needs, resulting in a Code Signing Error with this format:

<Framework> does not support provisioning profiles. <Framework> does not support provisioning profiles, but provisioning profile <Provisioning Profile Name> has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor.

In my case, I am trying to build an Xcode project produced by Unity 2019.3, which includes a new UnityFramework that does not support manual code signing.

According to the Unity Documentation, a new set of command line arguments for xcodebuild are to be used to target manual code signing to the main Unity-iPhone target only, and leave UnityFramework to be able to signed automatically.

Using PROVISIONING_PROFILE_APP and PROVISIONING_PROFILE_SPECIFIER_APP instead of PROVISIONING_PROFILE and PROVISIONING_PROFILE_SPECIFIER in the xcodebuild command fixes this issue.

Adding a "Custom Provisioning Profile Argument Suffix" parameter to Xcode under the Signing action would allow this issue to be fixed. See this blob post for more information about how the suffixes are used in building Xcode projects with multiple targets.

Here is a Unity produced Xcode project that can be used to demonstrate the issue:

https://content-infrastructure-uploadbucket-iuhbmg0o97e6.s3.amazonaws.com/uploads/AzureXcodeCodeSignError.zip

You can attempt to build it using a command similar to this:

/usr/bin/xcodebuild -sdk iphoneos13.2 -configuration Release -project ./Unity-iPhone.xcodeproj -scheme Unity-iPhone archive CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY="<Code Sign Identity>" PROVISIONING_PROFILE_APP="<Provisioning Profile UUID>" PROVISIONING_PROFILE_SPECIFIER_APP="<Provisioning Profile Name>"

Activity

fortunacio

fortunacio commented on Apr 8, 2020

@fortunacio

Hi @ericallam did u find any solution?

fortunacio

fortunacio commented on Apr 13, 2020

@fortunacio

I manage to solve this by creating a custom task to provide "Custom Provisioning Profile Argument Suffix" to the Xcode Build task. If anyone wants the task let me know so I can share it.

Cheers.

Paul-ICS

Paul-ICS commented on Apr 16, 2020

@Paul-ICS

Hi @fortunacio,
I'm getting the same problem as this with my Ionic project, could you share what you did to make it sign and build?
Thanks,
Paul

fortunacio

fortunacio commented on Apr 16, 2020

@fortunacio
Paul-ICS

Paul-ICS commented on Apr 16, 2020

@Paul-ICS

My DevOps org is called: ics-development

Thanks,
Paul

fortunacio

fortunacio commented on Apr 16, 2020

@fortunacio
Paul-ICS

Paul-ICS commented on Apr 24, 2020

@Paul-ICS

Just a quick update, we tried your task and specified the suffix of APP, but it didn't seem to make any difference to the build. I also tried it locally and couldn't get xcodebuild to do anything with PROVISIONING_PROFILE_APP. It did the same as if it wasn't specified.

Anyway, we found that using the original Xcode build task and specifying an argument of "CODE_SIGNING_ALLOWED=No" made it all build and sign correctly.

Thanks for you help.

pandey-laxman

pandey-laxman commented on May 4, 2020

@pandey-laxman

@Paul-ICS can you please be more specific about where you specified "CODE_SIGNING_ALLOWED=No" . is it in task: Xcode@5 ? on somewhere in xcode project.
I have some embedded framework for those getting below error.

error: Domain does not support provisioning profiles. Domain does not support provisioning profiles, but provisioning profile xxxxx has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor. (in target 'Domain' from project 'xxxxx')

Can you please provide more details to fix this issue?
I have been spent hours to fix this issue but still no luck.

Paul-ICS

Paul-ICS commented on May 13, 2020

@Paul-ICS

@pandey-laxman, sorry missed this email!

It needs to go in the arguments field in the Xcode task.
This is how my Xcode task looks (in yaml):

          - task: Xcode@5
            inputs:
              actions: 'build'
              xcWorkspacePath: '**/myproj.xcworkspace'
              scheme: 'myproj'
              xcodeVersion: 'specifyPath'
              xcodeDeveloperDir: '/Applications/Xcode_11.1.app'
              packageApp: true
              exportPath: 'output/$(SDK)/$(BuildConfiguration)'
              exportOptions: 'plist'
              exportOptionsPlist: 'pipelines/export.debug.plist'
              signingOption: 'manual'
              signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
              provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
              args: 'CODE_SIGNING_ALLOWED=No'
pandey-laxman

pandey-laxman commented on May 16, 2020

@pandey-laxman

@Paul-ICS Thank you very much, it worked I have created exportOptions.plist file in provided in above path and it worked.
But I have some doubts if you anyone can clear will highly be appreciated.

  1. what/how would be the workflow for app build(every PR merge) / distribute(on specific Tag) for different environment those are created configuration(dev, demo, qa and prod) for adhoc and App store.
  2. how to push release notes ?

there is no documentation I have found regarding this.

29 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @ericallam@rafek@eirikwah@Strepto@pandey-laxman

      Issue actions

        Xcode@5 Code Signing Error when building a project with embedded framework that does not support manual signing · Issue #12263 · microsoft/azure-pipelines-tasks