How can I find exactly what my codesign identity is?
Asked Answered
I

3

18

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!

Iota answered 15/5, 2013 at 23:19 Comment(0)
S
6

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.

Selfeducated answered 15/5, 2013 at 23:38 Comment(0)
J
56

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.

Jotter answered 8/3, 2017 at 3:12 Comment(1)
When I run that command I get no identities, any clue on how whould I fix that? ThanksAscribe
S
6

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.

Selfeducated answered 15/5, 2013 at 23:38 Comment(0)
M
4

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
Mamoun answered 13/6, 2021 at 15:11 Comment(2)
In this case -v is not for verbose but it means that only valid identities should be displayed.Beckon
Wow, thank you @Beckon for the correction. Depending on context -v can mean verify but also verbose. How odd. Thanks for pointing this out.Mamoun

© 2022 - 2025 — McMap. All rights reserved.