ipa_utilities
Simple ruby gem to execute common ipa utilities, such as verify integrity, convert certificate formats, re-signs an ipa using a new provision profile and more.
Installation
$ gem install ipa_utilities
Command Line Tool
ipa_utilities
is available as a command line tool. the main functionalities are described bellow:
For help use
ipa_utilities -h
# works for any of the verbs bellow
ipa_utilities verify -h
verify
ipa_utilities verify verb is used to verify the integrity and signature of an ipa file
ipa_utilities verify ipa_path
ipa_utilities verify ipa_path -c apns_certificate_path
ipa_utilities verify ipa_path -c apns_certificate_path -d device_UDID
By using the -c apns_certificate_path
you can cross reference the ipa APNS environment with the APNS_Certificate passed
By passing a device UDID using -d UDID
option, you can verify if the UDID is included in the embedded provision profile
certificate
ipa_utilities certificate ipa_path
This command will return the name of the APNS certificate that will be used with for the current ipa, it will also search the keychain for the existence of the certificate returned
convert
ipa_utilities convert p12_path
Convert verb helps in converting a P12 formatted identity file to a PEM file to be used with your APNS server implementation
Use -o out_path
to select the save location
resign
ipa_utilities resign ipa_path -p new_provision_path
Re-Signs the ipa using the new new_provision_path
Use -o out_path
to select the save location
Ruby Classes
IpaUtilities
IpaUtilities
contains high level ipa bound operations:
ipa = IpaUtilities.new ipa_path
ipa.unzip
to unzip the ipaipa.zip path
zip the ipa to a specific locationipa.verifyCodeSign
verifies the code sign for the unzipped ipaipa.parse
create and return aProvisionParser
object that is used to query the embedded provision profile
ProvisionParser
ProvisionParser
used to query a provision profile
parser = ProvisionParser.new provision_profile_path
parser.uuid
returns the UUID of the provision profileparser.signingIdentities
returns the signing identities from the certificate object within the the provision profileparser.certificates
returns the array of the certificatesparser.provisionedDevices
returns array of devices included in the provision profileparser.isAPNSProduction
reads the entitlements and checks for APNS environmentparser.isBuildRelease
,isBuildStoreDistribution
readsget-task-allow
fro the - entitlementsparser.appBundleID
returns theparser.teamName
returns the team nameparser.teamIdentifier
returns the team identifier
PemParser
PemParser
reads a PEM formatted certificate files
pem = PemParser.new pem_path
name
the common name of the certificateisAPNS
checks if the pem is APNSisProduction
check if the certificate is for productionbundleID
return the bundle id from the certificate
Contact
Omar Abdelhafith
License
ipa_utilities is available under the MIT license.
Future
Since xcode keeps changing how it signs and package the ipa files i will keep that up-todate for this library.
Other future improvements:
- Adding RSpec tests
- Better document the libraries
- Refactor the ipa_utilities binary
Contribute
Please!
Feel free to fork me on github