Mac OS X wants to use system keychain when compiling the project

前提是你 提交于 2019-11-28 03:14:08
PVCS
  1. Open Keychain Access.
  2. In the top-left corner, unlock the keychain (if it is locked).
  3. Choose the System keychain from the top-left corner.
  4. Find your distribution certificate and click the disclosure triangle.
  5. Double-click ‘Private key’ under your distribution certificate.
  6. In the popup, go to the Access Control tab.
  7. Select ‘Allow all applications to access this item’.
  8. Save the changes.
  9. Close all windows.
  10. Run the application.

The problem is with the Developer Certificate on Keychain which is under "System", on the left hand panel, which is always locked and requiring my password to unlock!

So just move the Developer Certificate to "login", which is always unlocked. Now your problem gets solved.

  1. Open Keychain Access

  2. Click on System in left pane

  3. Unlock the System keychain top left (if it is locked)

  4. Sort the System items by Kind so that the keys are at the top

  5. Look for the private key that keeps asking for password

  6. Double click on it and choose Access Control

  7. Choose "Allow all applications to access this item"

  8. Save changes, lock the System keychain and quit the Keychain app

  9. Restart the application that keeps asking to modify your keychain

I was getting this problem because I had duplicate certificates in my login and System keychains. By opening Keychain Access and deleting all certificates from System that were also in login solved this problem. Hope this helps.

Singh

I found that problem to be of provisioning profiles. I deleted all previous provisioning profiles and then reinstalled one I needed.

In my case I went to Keychain Access, selected "system" in "Keychains" (top left). Then for each item: right click, "Get Info", "Access Control" and added Xcode in "Always allow acces by these applications:" list.

I followed a solution similar to what @krafter did but, instead of giving access to everything in the system keychain, I only needed to give add xcode to the provisioning profile under keychain -> system -> "your provision profile" -> get info -> Access Control then just added xcode. This is what worked for 4.6

Move your private key from System to login in keychain access.Then move your developer certificate into login.This worked for me.

Yes - run XCode with administrator privileges only. It needs administrator rights to perform a whole bunch of tasks, installations, debug sessions and such.

Are you sure it says "Mac OS X" not something developer tools related?

It is normal if Developer Tools wants to enable Developer Mode on your Mac, thus, you don't need to enter an administrator password every time you start debugging your app in the simulator for the every first time after each Xcode launch.

But if you don't have enabled Developer Mode, when it was offered by Xcode, then be prepared, that Xcode will ask for an administrator password for the every first time you launch debugging in the simulator after each Xcode launch.

You need to add your OSx user name to the _developer group. Worked for me.

sudo dscl . append /Groups/_developer GroupMembership <username>

It seems that Xcode not refresh the team selection so selecting it again from the general tab of the targets solved it.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!