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!
3 Answers
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.
-
When I run that command I get no identities, any clue on how whould I fix that? Thanks– rekansCommented Sep 22, 2017 at 13:46
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.
On macOS 11 Big Sur, @Taras answer above does not return any identities.
However, by removing -v for verbose, it does, and while it doesn't make any sense:
λ 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
-
1In this case
-vis not for verbose but it means that only valid identities should be displayed.– OldesCommented Sep 8, 2021 at 13:51 -
Wow, thank you @Oldes for the correction. Depending on context
-vcan mean verify but also verbose. How odd. Thanks for pointing this out. Commented Sep 9, 2021 at 14:04