331
votes

Now I'm trying to Product>Archive my iOS app to submit. However, I am getting following errors:

AppName has conflicting provisioning settings. AppName 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.1'`

The situation won't change even those I've retry a whole process to recreate iOS certificates or provisioning profile.

I was setting as iOS Distribution in TARGETS > Code Signing Identity > Release > Any iOS SDK. When I changed the setting as iOS Developer here, and changed the setting in PROJECTS > Code Signing Identity > Release > Any iOS SDK as iOS Distribution, I've succeeded in archiving. I'm wondering is it necessary to set as iOS Distribution in the target editor or not. And if it's mandatory, please someone let me know how can I work around this error.

My XCode version is 8.1.

30
You need to ensure that code signing settings aren't conflicting between the project and the target.max_
I think I've tried every combination of code signing settings between the project and the target. My problem is in any setting, I cannot get succeeded when I set as iOS Distribution in in the Target editor, and I'm wondering if it's necessary.vanagar
@BenLeggiero Please see also stackoverflow.com/a/52573190/341994. There is a manual way to clean up, as I explain there.matt
Thanks for the pointer, @matt! That doesn't directly apply to the problem I was working on, since we are making a Mac app and don't use integrations like Game Center. Will bookmark it for later, though!Ky Leggiero

30 Answers

932
votes

I had this same error, but I had already checked "Automatically manage signing".

The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.

170
votes

I had the same problem, I noticed that If you want to make a release of your iOs app and publish it on the App Store you don't need at all to put in the "Code Signing Identity" as release, just keep it as iOs developer.

Go to Your project -> Build Settings -> Code Signing Identity and put everything to iOs developer.

enter image description here

75
votes

For those coming from Ionic or Cordova, you can try the following:

Open the file yourproject/platforms/ios/cordova/build-release.xcconfig and change from this:

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

into this:

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

and try to run the ios cordova build ios --release again to compile a release build.

Reference: https://forum.ionicframework.com/t/ios-build-release-error-is-automatically-signed-for-development-but-a-conflicting-code-signing-identity-iphone-distribution-has-been-manually-specified/100633/7

66
votes

You are way over-thinking this. The process is vastly improved and extremely easy in Xcode 8. Take advantage of that fact.

Step One: Do not, in any way, shape, or form, attempt to set the Code Signing settings in the Build Settings. Don't go near them. You will absolutely mess this up. Instead, edit the target and do all the work in the General pane. Best approach: set yourself up for automatic code signing - just enter your Team and check the checkbox, like this:

enter image description here

Step Two: Make sure you have an iOS Distribution Identity (Certificate). You can check this under Xcode Preferences > Accounts, View Details. It would also be a good idea at this time to go to the member center and get yourself an App Store mobile provision for this app, and download and install it.

Step Three: Choose "Generic iOS Device" as your Destination, and choose Product > Archive. The app will be compiled, the archive is created, and you are now ready to submit to the App Store.

64
votes

If you get this error

App has conflicting provisioning settings. App is automatically signed, but provisioning profile 'ID' has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.

then make sure that you have empty PROVISIONING_PROFILE option in Target Build Settings:

enter image description here

33
votes

Don't forget to do this,

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

22
votes

If you are from Ionic world. You might get a "conflict code signing" error when you in the "archive" stage, as below:

... 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.x'

In this case, please go to Build Settings/under signing, code signing identity, and select both as iOS Developer, not Distribution.

Go to the menu: Product/Archive again, then the issue will be fixed.

18
votes

For those coming from Ionic or Cordova, you can try the following: Disconnect your ios devices from the computer before ios cordova build ios --release (seems to change the targeted device for xcode signing).

16
votes

The only solution worked for me:

  1. Close Xcode project
  2. Using finder go to project folder
  3. Right click on .xcodeproj and choose "Show Package Contents"
  4. Right click on project.pbxproj go on "Open With" and choose TextEdit
  5. Now search for your Provision Profile instanceId specified in the error message.
  6. Delete all found texts and let Provisioning Profiles clean.
  7. Save & Close
  8. Open Xcode
  9. Enable automatically manage signing

Enjoy! Hope it will be useful!

15
votes

Go to build settings, search for code signing identity, and set Any iOS SDK value for iOS Developer:

enter image description here

10
votes

For me change Code Signing Identity to all iOS Developer for both of Debug and Release.

And Code Signing Style to Automatic.

enter image description here

8
votes

In my case, i set the "automatic" option in Build Settings.

enter image description here

8
votes

I was struggles long time, I tried all proposed solutions. Nothing work for me.

Then I found the issue: there was a "User Defined Settings" for "PROVISIONING_PROFILE" at the end of Build Settings tab. I delete it for both Project and Target build settings. Then Automatic signing worked perfect.

I hope this will help somebody else. :)

7
votes

Try either of the following

1.Removing and adding ios platform and rebuild the project for ios

ionic cordova platform rm ios
ionic cordova platform add ios
ionic cordova build ios --release

2.Changing the Xcode Build Setting

The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.

3.Change the following code in platform

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
7
votes

Find .xcodeproj file and open it with a text editor

Find fields below and make them like this

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

PROVISIONING_PROFILE = "";

PROVISIONING_PROFILE_SPECIFIER = "";

7
votes
  1. General -> Signing -> check automatically manage signing and select team

  2. Build settings -> Signing -> Code Signing Identity -> SET ALL TO "IOS developer"

6
votes

This worked perfectly for me.

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.

enter image description here

5
votes

Only thing worked for me.

Open the project -> Select your target -> Go to Build Settings -> Search PROVISIONING and delete the selected profiles.

2
votes

In my case I had to login to Apple Developer Website and reset the list of devices.

It appears they now require you to do it every year when the subscription is renewed, before being able to add new devices and generate certificates.

2
votes

I had the same problem Mine was fixed by searching for "provisioning profile" in the build setting of share extension

Then there was two "Provisioning Profile"s fields there, one regular and one deprecated. The regular one was on Automatic but the deprecated one was not. Changing that one to Automatic too fixed my error.

2
votes

For me, I had dragged the dump_syms binary and a bunch of scripts into my build target when I manually installed the Firebase SDK. Removing those from my target and project solved the issue.

2
votes

Using Xcode 10: None of the other solutions here worked for me.

This error appears to be something you can't fix in Xcode 10

I had to revert to Xcode 9 to resolve this issue, and then update back to Xcode 10 so I could run my application on iOS 12 on a non-emulator device.

Any other solutions found on Stack Overflow or elsewhere, used in Xcode 10, sent me into an endless cycle of provisioning conflicts or signing certificate issues. It seems like signing is broken in Xcode 10 whether you're using the automatic method or manually selecting provisioning profiles and certificates.

You can revert to Xcode 9 by first deleting Xcode 10 from your Applications folder. Then, install Xcode 9 using the .xip file listed on this Apple Developers page.

In Xcode 9, use the automatic build option. You may have to uncheck 'Automatically manage signing' and reselect it, and you also may be required to revoke an existing certificate at developer.apple.com.

After you get the app to successfully build in Xcode 9, you can update back to Xcode 10 using the App Store. After reopening the application in Xcode 10, everything still worked. You may not need to do this, but I needed to in order to build for iOS 12 which requires Xcode 10.

2
votes

I opened the project file in a text editor "Atom" then I searched for the provisioning profile id and deleted it.

1
votes

Another cordova/ionic possible cause of this is if you're using the common branch-cordova-sdk plugin.

For some reason the plugin was overwriting code signing identities that had been correctly set in build.json when running ionic cordova build ios.

I tracked it down to identities that have been set in /plugins/branch-cordova-sdk/src/scripts/ios/enableEntitlements.js file

Make sure the debug and release vals are both set to "iPhone Developer" and this will save you having to do a manual fix in XCodes Build Settings after every build process

  const DEBUGCODESIGNIDENTITY = "iPhone Developer";
  const RELEASECODESIGNIDENTITY = "iPhone Developer"; // NOT "iPhone Distribution"

This doesn't happen on a different machine with same project/plugin so unsure precise root cause but sharing in case it helps others as this ate up a few hours.

It was found by searching for occurrences of "iPhone Distribution" in the project folder. Do the same to identify any other plugin/library that might be interfering for you.

0
votes

Change your code sign in to destribution certificate .

0
votes

After updating to Xcode 8.3.2 i had the same error with a Cordova project. I needed to upgrade Cordova (v7.0.0) and the iOS platform (v4.4.0) for code signing to work.

0
votes

You need to add a Production Certificate and (or) Download one from your Development Acoount

enter image description here

0
votes

Please make sure the "Product Bundle Identifier" in Build settings name matches actual bundle identifier.This worked for me.

0
votes

For me, I need to switch from auto to manual, and switch to auto, same error. Switch to manual, and change those provisioning profiles and code signing settings and build and get errors, and switch back to auto, then it just success.

0
votes

I had this same issue. I realized that it was because I was using xcode while I was using it. Since the updates didn't install correctly, it caused these errors to show up. The only thing that fixed it was to quit xcode and reopen it. When I reopened it, it prompted me to install updates. After the updates were installed, the errors went away.