281

I have Xcode 8 installed on OS X El Capitan.

I get this error:

Signing for "target" requires a development team. Select a development team in the project editor.

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

Xcode screenshot

Community
  • 1
  • 1
Hardik Parmar
  • 2,828
  • 2
  • 7
  • 9
  • 3
    You need to go to the General tab and select a Team. – Rhythmic Fistman Sep 16 '16 at 05:23
  • This should (surprise) happen to people the have been using "Run" (simulator) successfully, but not when they want to "Archive". Can you confirm the command that triggered this error? – benc Jan 10 '19 at 18:38

16 Answers16

414

To add developer account to Xcode:

  1. Press Cmd ⌘ + , (comma)

  2. Go to Accounts tab

  3. Follow the screen shot below to enable development team:

Step 3

Ronan Boiteau
  • 8,035
  • 6
  • 32
  • 47
Ketan Parmar
  • 25,426
  • 9
  • 43
  • 67
234

With Xcode-8.1 & iOS-10.1

  1. Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID:

Step 1

  1. Enable signing to Automatically && Select Team that you have created before:

Step 2

  1. Change the Bundle Identifier:

Step 3

  1. Code Signing to iOS Developer:

Step 4

  1. Provision profile to Automatic:

Step 5

You can now run your project on a device!

Ronan Boiteau
  • 8,035
  • 6
  • 32
  • 47
Shrawan
  • 6,372
  • 4
  • 24
  • 40
82

In case you are still having this problem, click on the Tests and select a team for them too.

Alexander Vitanov
  • 3,762
  • 2
  • 17
  • 21
  • 1
    and sub-project also! – oOEric Apr 20 '18 at 03:52
  • 2
    where can I click on "Tests" ? – Kim Mar 05 '19 at 18:48
  • I already had the team selected long ago, but now that I started making the tests, they have this problem. Neither clicking on the top-level test "folders" or the test code files themselves brings up anyplace where I could select the development team for them. This is Xcode 10.2. – Ilmari Apr 13 '19 at 16:11
  • 1
    On Xcode 11.3, under the project file there are tabs for General, Signing, etc. To the left of those nav buttons there should be your project's name in a dropdown. That is the target, click the dropdown to select a different target, e.g., the tests and from there you can select the signing. – sbdchd Jan 01 '20 at 19:12
28

To run your app on a real device, you need to have an Apple ID, and have registered your device with that ID. That is why you are getting this error.

Here's how you do it.

  1. Go to the project Navigator. Cmd-1 if you can't find it.

  2. Click the project target dropdown and pick Target. enter image description here

  3. Click on the Team dropdown and pick add an account. enter image description here

  4. Sign in with your Apple ID that is linked to your developer account, or just your Apple if you don't have a dev account.

  5. If you haven't registered your device with that account yet, a button will appear, something like 'Register device'. Click that and Apple will register the device and do the certificates and code signing. (Oh my unicorns certificates and signing is so much easier than it used to be) enter image description here

Pick your physical device and hit run and it should load onto your device without error.

Joshua Dance
  • 6,602
  • 3
  • 52
  • 60
  • 2
    Great job answering this question, and I love the screenshots. Thanks! Cool that you don't have to pay $99 to run any more. – Ethan Parker Sep 19 '17 at 15:49
22

Well, after I did all those things I still got the errors so I closed Xcode and opened it up again and then it worked.

Cœur
  • 32,421
  • 21
  • 173
  • 232
Cyrus Zei
  • 1,711
  • 1
  • 17
  • 30
10

Recently had the issue on Xcode 11 beta 2:

  1. Select your project on the left side panel
  2. Find the "Signing & Capabilities" tab for your target

If your target doesn't have the "Signing & Capabilities" tab (in my case only the test target had it), open the build settings for your project and click "All" instead of "Basic"/"Customised". Find signing under the settings and make sure you've got a Development team set up.

  1. Repeat the same step for your test target if needed
Yunus Nedim Mehel
  • 11,371
  • 4
  • 47
  • 54
6

If you need to disable the team for now, as you don't have a development account, just change the target at the top menu to iPhone instead of generic iOS device or real device.

Hany Sakr
  • 1,633
  • 19
  • 22
5

For those using Ionic and receiving this error - you need to open your $project_dir/platform/ios/$project_name.xcodeproj - then follow the steps listed in the "answer"

Ricky Levi
  • 5,482
  • 1
  • 47
  • 55
5

For those that are going to come here after me, if it's Xcode 11 and ios 13 then your layout might look a little different than what you see in the main answer to this question.

Firstly do this as it was mentioned on the answer, Add your Apple ID in Xcode Preferences > Accounts > Add Apple ID.

Then click on the project name which is located in the left panel then you'll get a window of settings then look for signing & Capabilities and that's where you'll be able to see "Team" and select your name as the option. enter image description here

ZaMy
  • 340
  • 4
  • 9
5

Make sure you add the team on both Debug and Release tabs.

enter image description here

GalAbra
  • 4,282
  • 4
  • 18
  • 34
4

Select team in the general settings of the target

Michal Shatz
  • 1,398
  • 2
  • 17
  • 31
4

Xcode 11.4

Click on: 1. Your project 2. Signing & Capabilities 3. Select your Team.

enter image description here

puerile
  • 356
  • 4
  • 15
3

select development team in both project and target rest all things set to automatic then it will work

Midhun Narayan
  • 679
  • 7
  • 21
2

I had this error on my React Native project, weirdly enough I thought I was NOT editing the correct .xcodeproj file! I went into my project directory './appname/ios' and opened the project file and edited my team name into the project and it started working.

Sam Groot
  • 21
  • 3
  • 1
    Glad that worked for you. As a relatively new Xcode user, I do feel compelled to mention that this is the type of change best done in Xcode GUI, when possible, AFAIK. – benc Jan 10 '19 at 18:40
0

Downgrading the iOS development Target from 12.1 to 12 fix the issue for me as I don't have a dev team configured.

Mohamed ALOUANE
  • 4,731
  • 3
  • 27
  • 52
0

Go to the bar where you have file, edit, view etc Go on view -> Navigators -> Show Project Navigator -> Click on team -> Select yours.

Enjoy