30

I use an admin account for the development. But every time I compile to a device Xcode is asking for admin username & password. I googled the issue. But none of the solutions worked. I tried the workarounds from this post, but it didn't work

Authorize a non-admin developer in Xcode / Mac OS

I also tried disabling and enabling the DevSecurityTools but it didn't work. I am using Xcode 4.3.1 installed on Mac OSX Lion 10.7.3.

Is there any way to fix this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
bitsandgates
  • 315
  • 1
  • 3
  • 7
  • The sudo command should have worked. Try doing it logged in as admin. – TigerCoding Mar 16 '12 at 13:43
  • @Javy I am already admin. I tried sudo. I will login from another admin account and try to run terminal commands for my user. – bitsandgates Mar 16 '12 at 13:47
  • 1
    Hey, I am having the exact problem. I have an administrator account and every time I try to run on device I get prompted for 'Administrator' username and password. Is it possible to save this information to keychain? – NSRover May 18 '12 at 00:58
  • I'm having the same problem. It used to work as expected, but ever since I installed "Maya" from Autodesk, it now prompts me every time I want to build to device. I tried all of the solutions of the linked post but none worked. – Jarson May 29 '12 at 18:59
  • Issue is still there even after I installed Xcode 4.3.2 and updated Lion to 10.7.4. If anyone finds a solution please post.. :( – bitsandgates Jun 06 '12 at 12:59
  • this is the same question as http://stackoverflow.com/questions/10068566/xcode-keeps-asking-for-password-to-use-the-system-keychain – Jerry Tian Jul 20 '12 at 03:12

6 Answers6

81

For solution go to Keychain Access, and in the top left navigation, move your Developer certificate from "System" to "Login".

Actually problem is Developer certificate is under "System", and it is locked every-time, so it will require a password to unlock, whereas when certificate is in "Login" section it will resolve that.

sathish_at_madison
  • 823
  • 11
  • 34
Brijesh Vadukia
  • 922
  • 8
  • 11
  • It works for me, OSX 10.8 GM and XCode 4.5 Preview 3. Just using the "keychain access" tool to move the code sign related certifications to "Login" section will do. – Jerry Tian Jul 20 '12 at 03:14
  • excellent! Never would have found this, works with xcode 4.5 and 10.7 – Sam Clewlow Oct 07 '12 at 21:57
  • having the same problem on OS X Mavericks with Xcode 4.6.3.i have tried the solution but failed.will u plz clearly mention name of certificates as named in keychain access for drag drop.is that single certificate or more than one certificates need to drag drop??? The Alert is "Developer tools access needs to take control of another process for debugging to continue.Type your password to allow this." – sanjay Oct 28 '13 at 02:59
  • i don't have a developer account,am debugging my apps on simulator. thx!! – sanjay Oct 28 '13 at 03:10
6

In keychain remove your development and distribution certificates from System and place them under Login. It will ask once and you have to select Always allow

That worked for me. Hope it works for you aswel.

NaXir
  • 2,373
  • 2
  • 24
  • 31
5

In Xcode 7.1, I didn't find Login so I have given access to Xcode and codesign for the certificate key by following steps:

  1. Open Key Chain
  2. Go to Certificate under System
  3. Click on closure, right click on private key and select 'Get Info'
  4. Click on 'Access Control' tab
  5. Add Xcode and coding under 'Always allow access by these applications:'

It solves my problem.

Anni S
  • 1,996
  • 19
  • 28
1

Is the /Developers directory from the old Xcode still on the drive? I just had a user with this issue that was also experiencing build fails with code that other users were able to build successfully. Some of the file associations cause the new Xcode (moved to the /Applications folder) to reference components in the old /Developers folder. Once we removed the folder and emptied the trash, everything worked as expected.

0

After moving Developers certificate form "System" to "Login". If it still asks for Username and password, you need to check your code signing. Go to the Build Setting and under code signing select the respected developer's certificate. It works for me.

GameBegins
  • 580
  • 7
  • 12
0

On macOS Catalina, you have to:

  1. Open Keychain Access.
  2. Find your developer cert under the System category on the left.
  3. Right or Double click the cert to open the Get Info window.
  4. Expend the Trust dropdown above the cert details.
  5. Open the drop down menu options for Code Signing.
  6. Set the value to Always Trust.

It may be a good idea to quit and restart xCode after this if it was open, but when I changed mine I didn't bother and it still worked as expected.

Z3r0CooL
  • 131
  • 1
  • 7