Parsing mobileprovision files in bash?

后端 未结 6 598
一个人的身影
一个人的身影 2020-12-02 14:32

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

6条回答
  •  萌比男神i
    2020-12-02 15:18

    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.

提交回复
热议问题