views:

243

answers:

2

I got another new account for the AppStore, I setup the new account certificates on my MAC. Now when I try to publish XCode gives me the error

CodeSign error: Certificate identity 'iPhone Distribution: 'Name' appears more than once in the keychain. The codesign tool requires there only be one.

How can I change my certificate identity for the other account? While I have to leave my Name as it is on both itunes profiles. How can avoid this problem without have to remove one certificate each time I need to publish app on appstore.

Thank you.

A: 

I create a keychain for each team, and put all the related files (public key, private key, certificate) for the team in the keychain. The only downside is that you have to set your default keychain to the team keychain when building for a device.

drawnonward
A: 

I have just had this problem, and my current temporary solution was to export then delete one of the distribution identities, leaving me with one identity which then XCode is happy with. So I will have to export, delete, and import each time I want to switch to a different project to make a distribution, which isn't ideal.

I am still looking for a nicer solution.

The keychain approach sounds ok in principle, but in practice it appears to be require using the "Reset the default keychain" option in Keychain Preferences, which I have not tried yet but doesn't sound like a low-risk activity.

theLastNightTrain