I am asked to type in the system admin user name and password when I compile my Xcode project. The whole message is
Mac OS X wants to make changes. Ty
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.
It seems that Xcode not refresh the team selection so selecting it again from the general tab of the targets solved it.
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.
Yes - run XCode with administrator privileges only. It needs administrator rights to perform a whole bunch of tasks, installations, debug sessions and such.
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.