I\'m trying to automate the process of building iphone apps with a particular certificate. So imagine if different users uploaded their cert into the system and it was immediate
On my system, once the keychain is unlocked with
security unlock-keychain
I just let xcodebuild to do both the build and the code signing.
If your keychanins are unlocked, it shouldn't be necessary to use the above call.
You might also want to check the command execute-with-privileges of security.