2009-03-27 11 views
13

In iPhone Developer Program Portal, c'è un video per dimostrare come creare un certificato di sviluppo e di assegnare un tastoCome creare una chiave privata per il certificato di distribuzione iPhone?

Ora ho terminato il processo di sviluppo privata e di iniziare a distribuire

ho creato un "certificato di distribuzione ", ma come posso assegnare una chiave privata a questo certificato?

come ha ottenuto il "CodeSign errore: la firma del codice identita '...' non corrisponde un certificato di firma del codice nel portachiavi" quando compila

Sarà contento di lasciarmi ora se ho bisogno di assegnare una chiave privata al certificato di distribuzione e come.

Si prega di notare che NON sto parlando di certificato di sviluppo qui, grazie.

risposta

7

Read the Obtaining your iPhone Distribution Certificate section of the Apple Developer Connection iPhone site. Questo spiega passo passo ciò che dovrai fare, nell'ordine corretto.

EDIT: Il collegamento corrente sembra essere: https://developer.apple.com/library/watchos/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW1

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

  1. In the Xcode Preferences window, click Accounts.

  2. Select the team you want to use, and click View Details.

  3. 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.

  4. To return to Accounts preferences, click Done.

+0

Haha la risposta è così ovvia, mi dispiace di trascurarlo. – Unreality

+4

Questo non è più vero btw. Questa pagina è cambiata in modo che abbia solo circa 1 paragrafo di informazioni. – Nathan

+1

Buon Dio e biscotti. Va bene. A beneficio dei lettori, questa risposta è stata scritta più di tre anni fa. –

0

Per me - riavviare Xcode risolto entrambi questi problemi.
Tutto era ovviamente configurato correttamente da qualche parte, ma doveva essere svuotato/sincronizzato.

+0

Ho anche trovato che il riavvio di Xcode è spesso necessario. Ovviamente questa non è la risposta completa alla domanda, ma potrebbe essere parte della risposta per alcuni. – AWrightIV

+1

Questa era la soluzione al mio problema. Non credo che questa risposta meriti i downvotes che ha ... – Keith

31

Come nessuno ha aggiornato o risposto a questa domanda da quando Nathan ha sottolineato che il link di risposta originale non è disponibile (Punto numero uno sulla pubblicazione su StackOverflow "Assicurati di rispondi alla domanda") ecco una risposta dalla mia esperienza , spero che aiuta qualcuno:

Per questa specifica domanda (Dev/distribuzione cert installato ma senza chiave privata) la risposta è una scelta di 2 alternative:

1. Creare una nuova identità certificato tramite il devloper mela portal In questo caso è necessario accedere a t Il suo portale per sviluppatori Apple e l'assistente, come parte di questo, sarà necessario creare e caricare un CSR (Certificate Signing Request) che creerà anche le chiavi pubbliche e private sulla macchina. Apple ha firmare la richiesta e voilà, un/pair certificato firmato pubblico privato: Reference

2. Esportare la chiave privata dalla macchina originariamente utilizzato per creare il certificato Questo caso è quando la tua firma con un'identità creato in precedenza, probabilmente su una vecchia macchina o se (come nel mio caso) si sta sviluppando per un cliente che ha già creato i propri ID. Se non è possibile accedere alla macchina originariamente utilizzata per creare l'identità del certificato, è necessario creare una nuova identità come da guida/assistente.

Per fare ciò, è necessario esportare la chiave privata (un file .p12) o una coppia di chiavi pubblica/privata tramite Accesso Portachiavi e installare la chiave privata o la coppia di chiavi sulla macchina su cui si sta sviluppando. Ecco uno guide che ho trovato su StackOverflow.

Rif: http://iphonedevsdk.com/forum/iphone-sdk-development/11498-problems-exporting-importing-p12-private-key-for-developing-on-another-mac.html

PS> Attenzione, sto eseguendo la seconda opzione in questo momento, e mentre l'evidenza suggerisce che questo lavoro, è non testato da me a partire da ancora, se se non funziona lo farò ri-risposta!

+0

il tuo passaggio 1 non è più un riferimento. questa pagina ha: http://support.brightcove.com/en/app-cloud/docs/step-step-guide-publishing-apple-app-store-using-mac#distribution – DanMoore

0

Se si passa il mouse sull'immagine e si fa clic sulla piccola icona di eliminazione rossa, quindi salvare questo. Allontanarsi e tornare a questa pagina sarà possibile aggiungere nuovamente l'icona.