iOS build release error (is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified)

Hi,

It is the first time for me to build a release version for iOS.
I try follow this article http://ionicframework.com/docs/v1/guide/publishing.html
Everything in Apple website is fine, until the step to run ionic cordova build ios --release and reached error (attached at the end).

Troubleshooting actions:
I tried to open the project in xcode: go to signing -> untick “automatically manage signing” -> signing(release) -> select the team -> give “iOS Distribution” to Signing certificate.

But ionic cordova build ios --release still fails with the same error.

Note. I have just purchased the developer license. It is the first time to use it, there might be somewhere I misconfigured?

xxx has conflicting provisioning settings. xxx is automatically signed for development, but a
        conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity
        value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor.
        Code signing is required for product type 'Application' in SDK 'iOS 10.3'
3 Likes

Same here !! Any solutions ?

Doesn’t it say right in the error message what you have to do?

no, it does not help. Stackoverflow has untick/tick the automatically signing and made the error gone. But those are not working for ionic project.

I am now using fastlane to manage the certis for me, this error is gone but I am stuck on some other issues in fastlane.

I am 1 step away from release it out and it’s 3 days passed o_O

I went on with fastlane by following this article https://devdactic.com/automatic-ionic-builds-fastlane/

afterwards, fastlane automatically handled my profile and certificates. then release build works without error.

However, the “You have to specify a new version number” appears when fastlane tries to upload to itune connect. the solution mentioned in internet didn’t help (because xcode cannot locate my info.plist file, i dont know why)

At this step, I switched back to xcode since release build works, and I manually create archive in xcode then upload to itune connect.

It would be nice to fix the fastlane version error thing and let everything go automatically. It is just too much tech debt that I cannot pay right now :).

1 Like

although it is my fist time using fastlane, I do think all ionic developer should use it and create a good doc out.
It pays off and walked around all these painful manual certificate profile settings…

For anyone still struggling, I have found a solution. The problem is in the Cordova settings.

Note this:

iPhone Distribution has been manually specified

This didn’t make any sense to me, since I had set the project to auto sign in xcode. Like you, the check and uncheck didn’t work. But then I read the last file path given and followed it. The file path is APP > Platforms > ios > Cordova > build-release.xconfig

And in the file, iPhone Distribution is explicitly set for CODE_SIGN_IDENTITY.

Change:

CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution

To:

CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer

It a simple thing, and the error message does make it clear that iPhone Distribution has been manually specified, but it doesn’t really say where unless you follow the path. I looked and fiddled with xcode for about three hours trying to figure this out. Hopes this helps anyone in the future.

48 Likes

It worked, thank you!!

We have the same issue. if I manually overwrite ‘CODE_SIGN_IDENTITY’, will my push notifications still work in production?

BTW: how did this issue arrive? I followed the exact same steps from the docs.

Because the tools being used change. The docs are on Github, so if you want you can actually fix the instructions yourself and submit a Pull Request to Ionic.

Thanks, this has also helped me fix this issue.

Thank you very much. Worked for me.

JareBear138 is a lifesaver :ok_hand:

Thank you very much :slight_smile:

perhaps this may help
[Code Signing Error]

You are a life saver …

Thats worked!! Thanks!

Thank you from saving me from self destructive behavior!

Man…Ty a lot…i was losing my mind already… <3