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 p
If you want to extract the plist from the mobileprovision in a proper way and not rely on grepping/sedding/etc., you can use OpenSSL as follow:
openssl smime -inform der -verify -noverify -in file.mobileprovision
A complete example in your case could be:
openssl smime -inform der -verify -noverify -in file.mobileprovision > tmp.plist
/usr/libexec/PlistBuddy -c 'Print :Entitlements:application-identifier' tmp.plist
The OpenSSL part should work on any platform, although I've only done that on a Mac so far. PlistBuddy is only on Mac, but other utilities can be found to read/write property list files.