Xcode has conflicting provisioning settings

Richard picture Richard · Mar 19, 2017 · Viewed 46.6k times · Source

I have an Ionic 2 app, which builds and is testable in Xcode 8.2.1 Simulator environment, e.g. iPhone7 (Build Successful).

enter image description here

When I try Archive the app to create an ipa file to set on a device, I follow these instructions. But Product -> Archive is greyed out. So I change the active scheme to Generic iOS Device.

enter image description here

But then when I click Product -> Archive, I get Build Failed.

theWhoZoo has conflicting provisioning settings. theWhoZoo 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.2'

enter image description here

If anyone could advise how I can fix this to build an Archive, I would appreciate it.

Answer

Mohd Asim picture Mohd Asim · Dec 28, 2018

This worked perfectly for me. Give a try :)

Step 1:

Select the Project Target-- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.

Step 2:

Uncheck "Automatically manage signing", then check it again and reselect the Team. Xcode then fix whatever was causing the issue on its own.