SirRupertIII
SirRupertIII

Reputation: 12596

How can I find exactly what my codesign identity is?

I need to know exactly what my codesign identity is. Where can I find that? And what is the usual format for a codesign identity? Thank you!

Upvotes: 18

Views: 23329

Answers (3)

haakonstorm
haakonstorm

Reputation: 69

On macOS 11 Big Sur, @Taras answer above does not return any identities. However, by removing -v for "valid identities only", it does:

λ security find-identity -v -p codesigning
     0 valid identities found

λ security find-identity -p codesigning

Policy: Code Signing
  Matching identities
  1) B21272CXXXXXXCDBC562C0E0XXXXXX89 "Apple Development: Haakon Storm Heen (9X9X3XKX5X)"
     1 identities found

  Valid identities only
     0 valid identities found

Upvotes: 4

VGruenhagen
VGruenhagen

Reputation: 1497

In Xcode, you can access the Code Signing Identity by selecting your target, going to build settings and it's right under "Code Signing Identity".

For more information, you can access Apple's Documentation.

Upvotes: 6

Taras Tsugrii
Taras Tsugrii

Reputation: 842

You can run following command in your terminal to get a list of all codesign identities installed on your system:

security find-identity -v -p codesigning

The output will contain lines like:

1) 482348ADF834384843884934734 "iPhone Developer: John Smith (YTHGJFKTHG)"
2) 49u343943943943494387348738 ...

where the first part (482348ADF834384843884934734) is your codesign identity, which is passed as an argument to the --sign flag of codesign tool.

Upvotes: 56

Related Questions