[ios] I get conflicting provisioning settings error when I try to archive to submit an iOS app

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.

This question is related to ios xcode

The answer is


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.


Change your code sign in to destribution certificate .


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.


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.


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 = "";


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


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

enter image description here


Don't forget to do this,

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


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


Only thing worked for me.

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


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

enter image description here


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.


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.


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


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!


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


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


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. :)


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.


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).


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

enter image description here


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

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.


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

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


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.


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.


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.


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


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.


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


Examples related to ios

Adding a UISegmentedControl to UITableView Crop image to specified size and picture location Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Keep placeholder text in UITextField on input in IOS Accessing AppDelegate from framework? Autoresize View When SubViews are Added Warp \ bend effect on a UIView? Speech input for visually impaired users without the need to tap the screen make UITableViewCell selectable only while editing Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

Examples related to xcode

Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64 iPhone is not available. Please reconnect the device Make a VStack fill the width of the screen in SwiftUI error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 The iOS Simulator deployment targets is set to 7.0, but the range of supported deployment target version for this platform is 8.0 to 12.1 Xcode 10.2.1 Command PhaseScriptExecution failed with a nonzero exit code Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) Xcode 10: A valid provisioning profile for this executable was not found Xcode 10, Command CodeSign failed with a nonzero exit code