Search code examples
iphonebashshellplistadhoc

Parsing mobileprovision files in bash?


I am tying building a php/bash/mysql system for automating adhoc distribution for iPhone apps. But I want to read the application-identifier key in mobileprovision file of projects and change it info.plist file according to that.

I can currently build ipa files from php IF the cfbundleidentifer key is same as its provision file.

I found a code like this https://gist.github.com/711794 but I want bash script to integrate it to my system.

Thanks


Solution

  • If your running this on a machine with mac os x, you can use the following:

    /usr/libexec/PlistBuddy -c 'Print :Entitlements:application-identifier' /dev/stdin <<< $(security cms -D -i path_to_mobileprovision)