Monday, July 20, 2015

iOS Development Cool command line utilities

Packaging application if having .app file, mobile provision and Signing identity is present

 /usr/bin/xcrun -sdk iphoneos PackageApplication -v "AppRTCDemo.app" -o "/Users/muser.r/Desktop/RR/per/iOS/WebRTC/src/out_ios64/Release-iphoneos/AppRTCDemo.ipa" --sign "iPhone Distribution: mycompany, Inc." --embed "/Users/muser.r/Desktop/RR/Projects/certs/CCADist.mobileprovision"

To find all Signing identities currently active on the Machine 
security find-identity


To get the detail of the provisioning profile used for signing
security cms -D -i src/out_ios/Release-iphoneos/AppRTCDemo.app/embedded.mobileprovision

To remove the code signature from the compiled app 
 rm -rf src/out_ios/Release-iphoneos/AppRTCDemo.app/_CodeSignature/

To Copy the mobile provisioning profile into the .app file
cp ~/Downloads/my_personal.mobileprovision src/out_ios/Release-iphoneos/AppRTCDemo.app/embedded.mobileprovision


Coding after the profile is copied to the .app file
codesign -f -s "iPhone Developer: Jason Adams (SZ2V5SDF5DF)" --resource-rules src/out_ios/Release-iphoneos/AppRTCDemo.app/ResourceRules.plist src/out_ios/Release-iphoneos/AppRTCDemo.app


Reference:

No comments:

Post a Comment