Get a glance at the identities ("SHA1" "Name")
$ security find-identity -v -p codesigning
Get information about the code signing status
$ codesign -vv -d Payload/Example.app
Entitlements embedded in binary
$ codesign -d --entitlements - Payload/Example.app/
Verify provision profile
$ openssl smime -in PROFILE.mobileprovision -inform der -verify
Find a certificate item and print SHA-1 hash of the certificate
$ security find-certificate -a -c 'NAME_OF_THE_CERTIFICATE' -Z login.keychain
Check a PKCS#12 file (.pfx or .p12)
$ openssl pkcs12 -info -in CERTIFICATE.p12
Get SHA1 fingerprint from p12
$ keytool -list -v -storetype PKCS12 -storepass 'CERTPASSWORD' -keystore CERT.p12
Get SHA1 fingerprint from p12 (pretty print)
$ keytool -list -v -storetype PKCS12 -storepass 'CERTPASSWORD' -keystore CERT.p12 | grep SHA1 | tr -d :
Send a push notification to a specified device (requires houston
gem)
$ apn push -e production <DEVICE_TOKEN> -c <CERTIFICATE.PEM> -m <MESSAGE>
$ apn push <DEVICE_TOKEN> -c <CERTIFICATE.PEM> -m <MESSAGE>
Unzip the ipa file
$ unzip MyApp.ipa
Extract entitlements to entitlements.xml file
$ codesign -d --entitlements entitlements.xml Payload/MyApp.app
Replace empbedded mobileprovision file and resign the app
$ codesign --entitlements entitlements.xml -f -s "iPhone Distribution: COMPANY" Payload/MyApp.app
Create ipa file (excluding .DS_Store files from zip archive)
$ zip -r MyApp.ipa Payload -x "*.DS_Store"