Ionic iOS Automatic Code Signing Error: Provisioning profile is Xcode managed, signing settings require a manually managed profile

Description of the issue

Hello!
I am trying to get passed some signing troubles with an Ionic application. I have followed the steps outlined here: https://devcenter.bitrise.io/ios/code-signing/ and replaced the xcode archive step with the ionic archive step.

In addition I am using the generate cordova build config step, and am setting the values to those used in the upload from the codesigndoc tool. I also ensured that I can create a valid .ipa file from xcode using archive / export.

When I try to build I get
Code Signing Error: Provisioning profile "iOS Team Provisioning Profile: *" is Xcode managed, but signing settings require a manually managed profile.

This is confusing to me because I have all my signing set to automatic in the project, and truthfully am not fond of signing and always opt for the automatic option.

I am relatively new to iOS signing, so wouldn’t be surprised if I have set a setting somewhere to make the build think I have set some signing setting to manual signing, but after perusing the xcode settings, everything is set to automatic. How can I set this up to use automatic signing?

Environment:

Bitrise - stack: default Hybrid (xamarin, Ionic,…) mac OS

Reproducibility

  • _Does a “Rebuild” help?
    Sadly, no
  • Does the issue happen sporadically, or every time? :
    every time
  • Does upgrading the build Step to the latest version help? :
    no
  • When did the issue start? :
    i’ve been running into this since this morning

Local reproduction

_Can it be reproduced on your own Mac/PC?

no

Build log

Hi @josh-strickland-4c,

sorry for the inconveniences.

Could you please try to run your workflow on your local machine: How to experiment with Bitrise configs locally, on your Mac/Linux ?

I think the problem is that, when you open your generated .xcodeproj file its codesign settings are set to Xcode managed signing, Xcode generates a managed profile for your project, which you can use to export an ipa in your local Xcode.

However on Bitrise, we use the ionic-cli tool to archive your project. During the ionic-cli’s build process, it uses the generated codesign config file (generated by the generate-cordova-build-configuration) to override your project’s codesign settings, with the one specified by the file.
This way the cordova-cli turns off your project’s automatic codesigning and forces the defined settings as a Manual codesign settings.

The problem is that codesigndoc works with the generated local xcode project, which uses Xcode managed signing by default. So the codesign files uploaded by codesigndoc are for Xcode managed signing, but during the ionic archive the project’s codesign settings are overriding.

I would recommand to setup your local project with manual codesign setting (turn off the Xcode managed codesigning) and run codesigndoc again. In this turn codesigndoc will collect your manual codesign files and upload them. Update the generate-cordova-build-configuration, with the new manual provisioning profile and run a new build.

Hey @godreikrisztian, thanks very much for the answer and the quick response!

You were right, I had to use manual signing for the project. Once I got a successful export from manual signing, I used codesigndoc to upload the new files, and it signed successfully!!

I’m not sure if this exists already, I did a quick search on the docs without results, but maybe there should be an ionic focused doc that references how to set up the cordova build config step along with other iOS signing requirements, such as this one (requires manual signing).

Anyways, this was a huge help, thanks again, I’m all set.

1 Like

Definitely a great idea, thanks for the feedback @josh-strickland-4c, we’ll see what we can do - added to our backlog! :wink:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.