438

I am facing the below issue and am unable to build the application.

XXX has conflicting provisioning settings. XXX is automatically provisioned, but provisioning profile WildCard has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual provisioning in the target editor. Code signing is required for product type 'Application' in SDK 'iOS 10.0'

I am also unable to choose a particular profile.

Enter image description here

How to resolve this issue?

mfaani
  • 33,269
  • 19
  • 164
  • 293
Rajesh
  • 10,318
  • 16
  • 44
  • 64

31 Answers31

752

Holy molly, I had to do all this in order for it to work. A picture is worth a thousand words.

  • If you get this error while archiving then continue reading.

    Enter image description here

  • Go to your app and click on the general tab. Under the signing section, uncheck "Automatically manage signing". As soon as you do that you will get a status of red error as shown below.

    Enter image description here

  • Now here's the tricky part. You need to uncheck "Automatically manage Signing" in both the targets under your project. This step is very important.

    Enter image description here

  • Now go under "build settings" tab of each of those targets and set "iOS Developer" under code signing identity. Do the same steps for your "PROJECT".

    Enter image description here

  • Now do Xcode → Product → Clean. Close your project in Xcode and reopen it again.

  • After this go to the general tab of each of your targets and check "Automatically manage signing" and under team drop down select your developer account

    Enter image description here

  • Do an archive of your project again and everything should work.

Really, Apple? Was this supposed to make our lives easier?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sam B
  • 27,273
  • 15
  • 84
  • 121
  • 37
    If I'm being 100% - I don't really understand why this worked. But it did, and the pictures made a big difference. Thank you, wise wanderer. – Aaron Krauss Sep 16 '16 at 19:15
  • 48
    I only had to uncheck and recheck the "Automatically manage signing". It then made me choose my team and had a popup confirming it was reseting some settings. Then it worked! – Jeremiah Sep 19 '16 at 21:38
  • 11
    Don't forget to 'Close your project in Xcode and reopen it again'. This is important, at least to me :( – Jack Sep 22 '16 at 08:33
  • 3
    Don't scare if you don't have multiple targets. I didn't have any and the process worked like a charm. I wouldn't be able to realise of all this process, you are a genius! – Pablo Ezequiel Leone Sep 30 '16 at 13:05
  • I had problems with certificate. Revoke didn't help, but after the clean and restart the certificate showed up. Nice! – Kristian MT Oct 04 '16 at 10:02
  • Your solution really helped. I was a bit confused with "uncheck Automatically manage Signing in both the targets." This could be due to Xcode 8.0 and the pictures not lining up. Thanks for taking the time to provide the solution +1 – andrewoodleyjr Oct 04 '16 at 21:41
  • I've tried this, but still i cant upload my project with deployment provision profile. – Yigit Yuksel Oct 14 '16 at 12:06
  • 23
    You probably saved me hours of work. You should send an invoice to Apple for nonsense like this. – Andrey Butov Nov 03 '16 at 16:23
  • in my case `Automatically manage Signing` wasn't actually checked by default and checking it solved my problem! – Yar Nov 10 '16 at 19:48
  • 1
    Please can you clarify **precisely** what "Go to your app and click on the general tab" is. My app features in numerous locations on the screen, there are boatloads of menus, tabs etc. I just can't find what you have in your second screenshot or the mysterious "project editor" mentioned in the error message. – Roger Binns Nov 19 '16 at 01:00
  • I actually got a warning when submitting app saying "potential loss of keychain access" as signing identity didn't match my previous version. So I came across this post, and I just turned off the auto provisioning following your steps and pointed to my known identities as I don't trust the automation and prefer the "old ways" as it selected some new identity that it must have autogenerated and does not even exist on my account! Thanks for the tips! It seems Apple consistently breaks something with the publishing process each version of XCode. – GameSalutes Nov 23 '16 at 00:13
  • 8
    "Really apple? This was suppose to make our lives easier?" Unbelievable, isn't it ? We're almost in 2017, and Xcode still behaves like a spoilt child from the 1980s. All that money, and they refuse to employ an Xcode developer with skills in actually making this stuff user-friendly. It's a disgrace. – Mike Gledhill Dec 01 '16 at 15:13
  • @Jeremiah is spot on. Unchecking, rechecking, and restarting Xcode worked. Face. Palm. – Jason Farnsworth Jan 11 '17 at 08:09
  • We had this issue in combination with a apple watch and the apple watch extension. Worked here as well with Xcode 8.2.1. It looks like `ProvisioningStyle = Automatic;` wasn't set at all this changed after i clicked through your instructions. Further the watchkitExtension Project had no Code Signing Identity for the entry "Any wachtOS SDK" there i hat to put iOS Developer in, no matter if on a Release or Debung Configuration – Darkglow Jan 24 '17 at 10:02
  • 1
    In addition to these steps I had to go to Product -> Scheme -> new scheme to get it to work. Thanks – prankin Apr 09 '17 at 22:27
  • 1
    Unchecked and checked `Automatically manage signing` also **cannot** fix the bug. I follow up your steps, then it's worked. Thanks. – lee May 25 '17 at 07:33
  • This is cool stuff ! Works for the Appium Server automation tests. Just got a long pending Automation Server issue fixed at work ! – Naishta Sep 19 '17 at 11:47
  • I will never understand Apple Code signing. After years of doing this. smh, thank you. – Ade Sep 22 '17 at 11:47
  • Yes! This works, although I did have to do a headstand for 5 seconds after I closed Xcode, and opening it up again. – John Halsey Sep 17 '18 at 11:12
68

Great, now we can choose the profile for Debug and Release separately in the general tab itself as illustrated in the image below.

Also when you click on Automatically manage signing it does all process that are created by Fix issue in previous Xcode versions.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Rajesh
  • 10,318
  • 16
  • 44
  • 64
62

Disabling automatic and then re-enabling has solved this for me in Xcode 8 GM seed. This can be done in the project settings, info tab for each target that needs to be signed.

jjxtra
  • 20,415
  • 16
  • 100
  • 140
37

I hate to say it. I just quit Xcode and opened it again. Simple and effective :)

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sabba Keynejad
  • 7,895
  • 2
  • 26
  • 22
21

For resovle this issue:

  1. Go to Xcode/Preferences/Accounts
  2. Click on your apple id account;
  3. Click - "View Details" (is open a new window with "signing identities" and "provisioning profiles";
  4. Delete all certificates from "Provisioning profiles", empty trash;
  5. Delete your Apple-ID account;
  6. Log in again with your apple id and build app!

Good luck!

Sumit patel
  • 3,807
  • 9
  • 34
  • 61
Mihail Salari
  • 1,471
  • 16
  • 17
  • 1
    Thank you...This worked for me and afterwords I just had to choose my team developer account. – Amos Nov 02 '16 at 01:00
  • Good tip... but frustrating that Xcode's upto v8.1, and we're still having to do dodgy workarounds like this. Are they ever going to make it user-friendly ? – Mike Gledhill Dec 21 '16 at 12:50
17

This is what I would call a classically Apple Xcode UX design bug.

The error said there is a bunch of stuff YOU DID WRONG LOCALLY.

The error actually meant "we have a new agreement you did not accept online".

After checking and unchecking the Automatic Signing button, I got this agreement error to display

After checking and unchecking the Automatic Signing button I got this agreement error to display:

Signing into the developer portal I was able to see a banner for the agreement update notice

Signing into the developer portal I was able to see a banner for the agreement update notice:

Restarting Xcode 8 then cleared that error and only forced me to reselect the certificate I already had on my machine and tied to the project. Restarting Xcode 8 then cleared that error and only forced me to reselect the certificate I already had on my machine and tied to the project.

This could have been handled in a less confusing implementation, but this is how I fixed it. I am putting it here because it's way different than the steps everyone else gave.

Oh and yeah, having the pre-latest iOS 10 device and latest Xcode (I was on 7.3.1 or something) also threw errors until I updated.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
NukeouT
  • 409
  • 1
  • 9
  • 20
15

This is how it worked for me:

  1. Kill Xcode and launch again
  2. Open project again
  3. Clean Project
  4. Go to project settings > general > uncheck 'automatically managed profiles' and than 'check' again it will prompt for enable.
  5. Now try archiving the source code

P.S Killing Xcode and launch again is the best thing to do if facing any random issue

Usman Awan
  • 1,208
  • 2
  • 13
  • 30
11

I fixed it doing this:

Set your team for all the targets of your project. Including the extensions. And left the automatic signing management.

Code signing config

Jose Galvez
  • 552
  • 4
  • 6
8

Steps:

  1. Under GeneralSigning
  2. Uncheck: Automatically manage signing
  3. Select Import Provisioning
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Johnny
  • 97
  • 1
  • 2
7

I only needed to uncheck 'Automatically manage signing', check it again, and rebuild.

MastaBaba
  • 1,085
  • 1
  • 12
  • 29
7

The Untick-tick (check-uncheck) "Automatically manage signing".) of Xcode checkboxes don't work for me (as many suggested on the top).

It happens with frameworks linked in your project.

Solution:

  • Find your framework or any other target that required signing.
  • Go to Build settings
  • Search Signing Identity
  • Set Don't code sign manually.
skywinder
  • 21,291
  • 15
  • 93
  • 123
  • Thank you! Your answer helped me to solve my issue. Even there is no such option in my interface (xcode 12.3) but it started working when I was trying out your answer. I posted my solution here: https://stackoverflow.com/a/65739207/4428219 – pyfyc Jan 15 '21 at 15:54
5

Click on Add Account if not signed in.

Then after select your team profile and check Automatically manage signing and leave everything else as is in Xcode. It will perform the remaining stuff by itself.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Neeraj Joshi
  • 721
  • 9
  • 26
4

I ran into this type error by updating the Xcode version to 8.0, and under the Code signing is required for product type 'Application' in SDK 'iOS 10.0'

There is a warning:

isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.

My solution is go to the TARGETGeneralSigning -> click the Enable signing... button, and I solved the issue.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
aircraft
  • 25,146
  • 28
  • 91
  • 166
4

If you are finding the following screen and facing the problem of code signing required, then one of the following solutions may help you.

Image_1

Solution 1. As said before, sign in with an Apple ID. Then you will get options like this, if you enter correct bundle identifier. Then select the appropriate profile from the list.

Image_2_after_adding_apple_id

Solution 2. If you don't want to sign in with your Apple ID, then change a small flag in project.pbxproj file. Find the following text in the project file.

/* Begin PBXProject section */

Change flag ProvisioningStyle = Automatic; to ProvisioningStyle = Manual; Refer to the following image. After changing the flag, you will see the options to select appropriate profile from the list.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sravan
  • 1,891
  • 4
  • 23
  • 28
4

in Build Setting change in Signing

enter image description here

Clean and Archive your code , Hope it will help you .

Abhishek Mishra
  • 1,625
  • 16
  • 32
4

Xcode Version 11.0:

I recently upgraded to Xcode Version 11.0.

Looks like Apple moved the Signing to a new tab from the original General tab.

  1. Navigate to the application
  2. Select "Signing & Capabilities"
  3. Click "Enable Development Signing"

enter image description here

Jacksonsox
  • 1,114
  • 15
  • 25
3

Firstly in general tab -> signing section -> select a development team, manage signings

Similarly if you are working with multiple pod files select each pod target separately and go to general tab -> signing section -> select a development team, manage signings

repeat the same process for all pods in your project

Clean -> Build the project.

This worked for me

niravdesai21
  • 4,818
  • 3
  • 22
  • 33
  • 1
    I was able to double click the project above the error in the left pane and the correct window appeared. – thadk Oct 15 '16 at 18:29
3

In unit test target

Xcode 7:

  • Must have provisioning profiles set (the same as in app target)
  • Must have "don't sign" under certificates

Xcode 8:

  • Must have 'None' set for provisioning profiles
  • Must have certificates set (the same as in app target)
  • (Must also have 'None' set for deprecated provisioning profiles)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Hogdotmac
  • 282
  • 6
  • 7
3

All answers looks fine but i found still issue so i changed settings in Build like this in XCode 9.0 - Sharing it so it could help someone.

enter image description here

Mandeep Gill
  • 4,577
  • 1
  • 28
  • 34
3

After applying all the solutions above, The same issue I was getting. i.e enter image description here

So I solved this by removing the provision profile in build sending. Please find the images which will make you more clear

My Signing details in build setting

I removed the provision profile

kalpa
  • 884
  • 1
  • 15
  • 22
  • i deleted them. But are you sure that this won't cause any problem – TheTravloper Mar 07 '19 at 06:16
  • For me I did not face any problem. But for safe side just keep an copy of it. – kalpa Mar 08 '19 at 11:51
  • I had the same error in the Signing Status section. I fixed it by removing PROVISIONING_PROFILE codes same you. After that the error in Signing section was gone. But I still cannot build my project with the same error: "Code signing is required ..." – pyfyc Jan 15 '21 at 04:32
  • @pyfyc after deleting provisioning profile clean the project and try again. – kalpa Jan 15 '21 at 05:24
  • @kalpa I have tried that many times but it did not solve the problem. Maybe my case is a bit specific, I also described it here: https://stackoverflow.com/q/65713315/4428219. You can take a look if you want. In the meantime I will try other suggestions from this thread. Thanks. – pyfyc Jan 15 '21 at 06:36
2

Even when installing the Watch OS application extension, the same error occured in Xcode 8.1:

Enter image description here

After updating the Provisioning Profile to Empty in Project of Build Settings, everything work fine.

Enter image description here

&& Code Signing Identity to iOS Developer in every targets Build Settings.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Shrawan
  • 7,128
  • 4
  • 29
  • 40
1

I upgraded to Xcode 8, and iOS 10, but I had the problem.

I fixed it by going to project general tab, signing section.

Click "Enable signing....."

That is it.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
hoogw
  • 4,982
  • 1
  • 37
  • 33
1

If you get this error while compiling in Microsoft Mobile Center

❌ Code signing is required for product type 'Application' in SDK 'iOS 10.3'

** ARCHIVE FAILED **

be aware that Mobile center doesn't yet support automatic signing with certificates of type app-store, ad-hoc and enterprise. Automatic signing only works with development certificates.

There are two things you can do to work around that limitation:

  1. Use a development certificate. You'll have to create a new one in the developer.apple.com portal, download it to your machine, export it to a .p12 file using keychain, then finally provide it to Mobile Center. You know the drill.

  2. Disable automatic signing. You will find that setting in Xcode in your project targets. Once disabled, a little "i" button will be displayed next to the "Xcode managed profile" label. Click that button, some info about the profile will be displayed. On the top left corner of that window, a "PROV" icon is displayed. That is the provisioning profile that you should provide to Mobile Center. Drag and drop the icon into the corresponding field in Mobile Center.

. Xcode

Berthier Lemieux
  • 3,785
  • 1
  • 25
  • 25
1

I did everything and didn't worked. I uninstalled Xcode 10 and installed Xcode 9.4 then it worked out of the box !

Tiberiu Popescu
  • 4,486
  • 2
  • 26
  • 38
1

If you still have problem then please try this.

Build Settings -> User Defined -> Provisioning profile (Remove this.)

It will solved my issue.

Thanks

Dhruv Khatri
  • 803
  • 6
  • 15
1

I have tried above all issue but was not working for me What I tried is

First of all, I want to go with manual code signing process, I am not doing via automatic code signing

  • I specify team name enter image description here
  • Then change deployment target enter image description here
  • Clean and build

You will good to go now

Kirtikumar A.
  • 4,140
  • 43
  • 43
0

1.1: If you are using p12 and a provision file, but not using AppID to log in, do not Select Automatically manage signing.

Which means you don't need to set your team. Just select your provision file and the machine code signing identity in Build Settings, like this Build Settings. Make sure the parameters are set as well.

And then go back to General. You will see General set, and that's OK.

  1. If 1 does not work, try as other answers said, clean your project, delete the derived data folder, quit Xcode, and open again.
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
jyz
  • 41
  • 3
0

Just download your provisioning profile again from your developer account. And sign out all developer accounts from Xcode → PreferencesAccounts → *Select Account showing at left and press -(subtract sign)

After deleting all accounts, press the + sign (add) button and sign in with all developer accounts.

It will work like a charm...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Tejinder
  • 1,507
  • 19
  • 22
0

It is because you have not choosen a team when you created the project.

I am such fixed. And I choose it in build settings, but invalid. I must create a new project.

Enter image description here

"I choose it in build settings, but invalid. I must create a new project." is wrong.

It is invalid because I have not chosen it in extension. You must choose a profile at your project's all extension, and there is no need to create a new.

[Enter image description here2

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
0

select your target and search for user-Defined section on build Settings,select provisioning profile and delete it

Delete provisioning profile

0

I downloaded a demo app and had this issue. I've Xcode Version 14.1 and what worked for me is:

  1. Go to Signing and Capabilities tab and check on Automatically manage signing
  2. modify the Bundle Identifier. In my case I appended my name to the existing bundle identifier

Xcode settings

leo
  • 113
  • 3
  • 11