In iPhone Developer Program Portal, there's a video to demonstrate how to create a development certificate and assign a private key
Now I have finished the development process and starting to distribute
I have created a "Distribution Certificate", but how do I assign a private key to this certificate?
As it got the "CodeSign error: code signing identity '...' does not match any code-signing certificate in your keychain" when compiles
It will be glad to let me now if I need to assign a private key to the distribution cert and how.
Please be noticed that I am NOT talking about development certificate here, thanks.
Read the Maintain Signing Assets section of the Xcode Help site. It explains step-by-step what you will need to do, in the correct order.
Before you can code sign your app, you create your development certificate and later, a distribution certificate to upload your app to iTunes Connect. You can create all the types of certificates and signing identities you need using Xcode. Xcode creates, downloads, and installs your signing identities for you.
All team members can create their own development certificate. Only a team agent or admin can create a distribution certificate. Only a team agent can create a Developer ID certificate. If you have an organization membership, read Managing Your Team in Member Center for a description of team roles and tasks that team agents perform on behalf of team members.
Xcode creates your development certificate for you when you need it. For example, when you assign your project to a team or create the team provisioning profile, as described in Configuring Identity and Team Settings, Xcode creates your development certificate and adds it to the team provisioning profile. Because of this, you typically create distribution certificates using the Xcode Preferences window.
To create a signing identity
In the Xcode Preferences window, click Accounts.
Select the team you want to use, and click View Details.
In the dialog that appears, click the Create button in the row of the type of certificate you want to create.
If the Create button is disabled, you are not allowed to create that type of signing identity. For a description of each type of certificate, refer to Table 14-2.
After the signing identity is created, the Create button disappears.
To return to Accounts preferences, click Done.