By vanagar

2016-11-27 00:52:42 8 Comments

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.


@Khaled Annajar 2019-05-09 10:14:47

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

@Keeper Hood 2019-08-19 10:25:51

This is the only thing that worked for me, thanks!

@Ahmad.Net 2019-04-01 21:58:46

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

@Tai Le 2019-02-23 04:58:42

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

@Oyebisi Jemil 2019-06-19 04:58:47

This works for me!

@codaman 2018-12-26 08:33:43

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



@Jane Z. 2018-11-17 16:22:53

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.

@Gaby Fitcal 2018-11-15 19:44:19

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!

@Amber K 2019-05-23 05:54:10

I knew it will be gonna some Xcode issue. Thanks a ton man!!!! It was showing automatic in Build Setting for Provision Profile but still giving that error. Thank god I wasn't the only one with the issue.

@Rein rPavi 2018-11-12 05:38:58

Don't forget to do this,

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

@Alexander Vitanov 2019-01-07 20:45:37

Probably the only solution that did it for me, thanks

@Dave Levy 2019-03-06 15:19:57

I did this, in conjunction with unchecking and re-checking the Automatically manage signing on the General tab and then re-selecting the team. Thanks Rein and Erin. (Hey look at that, your names are anagrams!)

@Rein rPavi 2019-03-15 05:16:08

Well that's interesting @DaveLevy

@swiftBoy 2019-07-16 00:26:45

This is the working solution!! for Xcode 10.

@Rafael Nobre 2019-08-19 19:47:58

I didn't give this much credit because my PROVISIONING_PROFILE didn't seem to contain garbage, it had "Automatic" set and looked fine. Deleting it and re-enabling automatic signing did the trick, though!

@Mark Lyons 2018-11-07 15:44:22

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

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.

@Redwolf 2018-11-29 13:19:33

Try adding the flag --buildFlag="-UseModernBuildSystem=0"

@atereshkov 2018-10-09 12:22:34

If you're getting something like this:

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

@Erik Peruzzi 2019-02-10 21:58:43

Thank you! It worked for me

@petrosmm 2019-03-08 02:53:58

I did not distinguish between the user and system build profile... so thank you for pointing out that it was "PROVISIONING_PROFILE"

@Trinh Tran 2019-05-08 13:54:26

Thanks. Correct in my case!!!

@Rafal Zawadzki 2019-07-01 09:08:56

This helped me.

@user107172 2019-07-30 00:32:52

This was the error I searched for and got the link to this SO question, but this is the answer I needed. Note that trying to actually specify a value of "Automatic" does not work. You need to NOT specify it all despite the error message saying otherwise. For me we are using xcconfig files, so it was was a matter of removing the setting in the config file.

@catanore 2018-07-12 12:41:51

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

enter image description here

@algrid 2018-09-05 15:00:48

Yeah, that's exactly what the error message asks to do. But could you explain why on earth using "iOS Developer" for release builds would make any sense?

@catanore 2018-09-06 13:05:18

You're right, pal, I fixed my answer!

@ina 2019-01-13 05:28:45

strangely this was what worked as well for unity generated project from a while ago

@Arman 2018-09-05 21:57:08

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.

@Mohsen Hossein pour 2018-08-05 18:09:49

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.

@manish kumar 2018-07-08 10:01:20

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.


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


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

@ACES 2019-03-29 18:25:24

#3 worked for me

@zgjie 2018-06-26 04:09:21

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.

@Saurabh 2018-06-22 14:00:53

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

@Flight 2018-05-26 04:38:08

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.

@Led Machine 2018-03-11 05:53:39

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

@Vesper 2018-04-07 23:50:34

thanks man you solution is work very fine.

@algrid 2018-09-05 15:08:20

Yeah, this works. But for ad hoc builds I have to disable automatic signing and go there and set "iOS Distribution" instead. Why did Apple implemented it this way? It makes no sense at all :(

@Tom Marvolo Riddle 2018-10-30 05:21:15

it's best answer. xcode will rewrite setting in local when "archive".

@Tom Marvolo Riddle 2018-10-30 05:32:09

please look at the "Review xxx.ipa content:" displayed after archiving, it is "Certificate: iOS Distribution".

@Ben 2018-11-03 02:25:30

This should be the correct answer.

@kanaparthikiran 2018-12-22 18:11:59

This solutions worked for me.

@Saravanan 2019-08-23 06:48:17

one upvote for save my time man..!

@Petru 2018-02-08 10:57:41

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

@Jordan Benge 2018-04-04 19:01:12

This is the dumbest answer, and it completely works. I hate all of the workarounds we have to do with Xcode to get an app to work.

@Neel 2018-05-19 11:48:20

this is right. When I had my iPad connected instead of my iPhone, I get this error. Once I disconnected all ios devices and build it from command line, it worked fine after that.

@ulisesvera 2018-07-05 07:38:08

Absolutly right. I have been a whole day trying to solve this issue and this is the only solution that works for me.

@Seloka 2019-04-04 12:00:20

IOS make me angry.. everything has to be solved through a jiggle.... otherwise thanks dude

@Charlie Ang 2017-10-19 05:49:05

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.


@mikewagz 2017-11-05 14:49:40

After trying all the other answers, this is the one that finally got it working for me. Thank you!

@Kent Johnson 2017-11-12 23:25:08

The file is now called build-release.xcconfig. You missed one 'c' Here is a bash script to do it: ```` #!/usr/bin/env bash sed -i "" "s/iPhone Distribution/iPhone Developer/g" platforms/ios/cordova/build-release.xcconfig exit 0; ````

@Charlie Ang 2017-11-13 03:30:46

@KentJohnson Ah, thanks for the correction. I have updated the answer to refer to the correct filename.

@Jules 2017-11-15 12:47:39

You can also just comment out the lines; the iPhone Developer setting is set in build.xcconfig, these lines just override it.

@Ryan H. 2018-01-18 23:18:44

I simply deleted those two lines and let Xcode automatically manage signing.

@FactualHarmony 2018-02-07 17:16:43

You can use the cordova-custom-config plugin to do this automatically with the following lines in config.xml: <custom-preference buildType="release" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY" value="iPhone Developer" xcconfigEnforce="true" /> <custom-preference buildType="release" name="ios-XCBuildConfiguration-CODE_SIGN_IDENTITY[sdk=iphone‌​os*]" value="iPhone Developer" xcconfigEnforce="true" />

@Dmitri R117 2018-03-06 09:14:36

I noticed the new Ionic 2 instructions don't focus on the --release flag for iOS. Is this even needed anymore?

@Siddiqui Noor 2018-04-30 20:02:11

I am using Cordova and this works for me :)

@po10cySA 2018-06-27 07:33:14

Only one that worked for me, thanks!

@Man Coding 2018-07-25 20:44:37

save me days!! thanks!! It works like magic.

@Christian Ascone 2018-10-08 14:42:06

You literally saved my day

@Joaquín L. Robles 2019-08-21 16:48:48

I can't possibly imagine WHY this is happening, but it worked for me

@Emre Gürses 2017-08-08 06:22:21

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

enter image description here

@William Wong Garay 2017-08-07 03:01:35

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

enter image description here

@Erin Geyer 2017-02-09 21:29:11

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.

@Sam 2017-05-02 23:49:13

This is the silly solution that works.

@Jtello 2017-05-17 13:28:44

Thanks! This worked for me, for anyone who is using cordova to generate an ios platform i was getting this error, even using the latest cordova version. the automatically signing was checked by default but no team selected. it was only when i deselected manage signing and selected auto signing and the team was i able to get this working. thanks Erin!

@kraftydevil 2017-07-14 17:03:07

another "jiggle the handle" Apple solution lol

@ami rt 2017-09-14 08:16:24

When I check it again , the code signing automatically set iOs Developer but I need to set it iOs Distribution, and when I set it iOs Distribution Xcode through the same exception again as above mentioned.

@Kimi Chiu 2018-02-06 07:21:59

@amirt I have exactly the same problem as yours. Did you fix it?

@ami rt 2018-02-13 08:12:34

@KimiChiu Yes brother I did.

@codezombie 2018-06-30 17:42:08

Where is this automatic thing. I see it, but I don't see an option to enable/disable it.

@Nexus 2018-10-08 07:08:13

Doesn't work. I've been struggling with this for days now. Automatic Signing works perfectly fine when I run the app on my iPhone 8 directly from Xcode. but when I try to archive the app for publishing to App Store, the Profile resolves to NONE. Of course I can manually sign the app but it didn't work, the submitted app gets a different profile and my iCloud container stops working. I've revoked and deleted everything, recreated all certs. and profiles yet no luck.

@Naga 2018-10-29 14:51:06

very frustrating that such silly things made it too time consuming, maybe imp for some project not all

@jakob.j 2018-11-11 12:39:39

This is right, but to clarify it a little bit more, here is what I experienced: - You have to manually create a Distribution Provisioning Profile (via Apple developer website) beforehand. Automatic Signing doesn't do that for you. - In case the Code Signing Identities in Build Settings were somehow screwed up: all 4 of them have to be set to "iOS Developer" (even the ones for Release) for Automatic Signing to work

@Rubycon 2018-11-22 09:47:53

Damn Apple.....

@CGN 2019-01-23 16:30:25

Worked! You saved my evening. Thanks. Not the first time that such obscure phenomena (bugs) appear in Xcode.

@Gianluca Ghettini 2019-02-06 15:54:54

"close and reopen", the silver bullet solution to modern IT problems

@Michael B 2019-04-26 12:25:26

I just updated to the latest Xcode Version10.2.1 and I can confirm that his bug still exists. Also you can still fix it by checking and unchecking said checkbox...

@Juan José Ramírez 2019-05-07 21:08:50

this works for me!

@H. Evers 2017-05-10 09:38:14

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.

@Ilya Vinogradov 2017-05-10 22:16:04

That didn't solve the problem for me.

@George Huang 2017-04-24 04:09:20

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.

@Webberig 2017-07-12 06:35:45

The problem is it gets reset every build... This is messing up our automated builds. Any idea how to change this in a non-interactive script ?

@Steven Kramer 2017-09-19 22:23:28

Excellent, this fixed the issue for me. This solution makes perfect sense, in hindsight and with a lot of alcohol consumption.

@matt 2016-11-27 03:47:04

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.

@vanagar 2016-11-27 04:13:38

Thank you so much! It succeeded. Let me confirm about the Step2: down loading "mobile provision". Is that "iOS Provisioning Profiles (Distribution)"? I just double clicked the downloaded file, and is that the installation that you mentioned here?

@matt 2016-11-27 04:48:01

Yes, exactly. The downloaded file has now been copied into Xcode's world (you can throw out the original), and will be seen by Xcode when you actually submit to the App Store.

@matt 2016-11-27 19:59:33

It may be that under certain circumstances you don't need to make the App Store mobile provision file, because Xcode will create it for you automatically. But I find that it's a good idea to make one anyway.

@Séraphin Hochart 2017-01-20 04:22:01

Just a note for people trying step 1 : do it for each target you have, that did it for me! :)

@Dan 2017-02-14 00:33:14

It's funny that all the deployment tutorials I've seen tell you to manually change the code signing settings on each target. I had Automatically Manage turned on, but I didn't even realize it.

@smtlaissezfaire 2017-04-24 18:49:00

So does this work for ad-hoc deployments?

@Bhavin_m 2017-10-25 11:36:17

Step One is must if you using Automatic.

@Verticon 2018-02-21 15:02:41

Thank you, Matt. I had the additional wrinkle of my app depending upon my framework and discovered that my framework needed to be built properly. @gbk gave me what I needed here:…

@andreszs 2018-06-25 19:34:33

Do we really need to create the provisioning profile in the Apple Developer Portal? The app works anyway, in fact Automatic Signing is supposed to auto create provisioning profiles, according to the docs.

@matt 2018-07-02 21:53:50

@andreszs Automatic signing does a good job of creating a development certificate and profile, which is all you need to develop and archive. But when the time comes to distribute to the app store, I find that it's a good idea to create the distribution profile manually and download it, ready to use during the export process.

@Zahirul Islam 2016-11-27 03:22:07

Change your code sign in to destribution certificate .

@vanagar 2016-11-27 04:17:12

Thank you, but I've tried it many time last 3 days, and failed every times.

Related Questions

Sponsored Content

22 Answered Questions

[SOLVED] Xcode 10: A valid provisioning profile for this executable was not found

  • 2018-09-20 11:46:20
  • Daniel Andersson
  • 92184 View
  • 173 Score
  • 22 Answer
  • Tags:   ios xcode

15 Answered Questions

1 Answered Questions

[SOLVED] Xcode On Archive Validate Provisioning Profile Conflict

23 Answered Questions

[SOLVED] Xcode 7.2 no matching provisioning profiles found

18 Answered Questions

2 Answered Questions

Conflict archiving my Cordova App on iOS

17 Answered Questions

9 Answered Questions

Sponsored Content