Parsing mobileprovision files in bash?

后端 未结 6 600
一个人的身影
一个人的身影 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条回答
  •  一向
    一向 (楼主)
    2020-12-02 15:31

    I created a bash function based on jlawrie's answer to list all .mobileprovision's bundle IDs from the ~/Library/MobileDevice/Provisioning Profiles folder.

    Save this into your .bash_profile and just call it with list_xcode_provisioning_profiles from a terminal.

    list_xcode_provisioning_profiles() {
        while IFS= read -rd '' f; do
            2> /dev/null /usr/libexec/PlistBuddy -c 'Print :Entitlements:application-identifier' /dev/stdin \
                <<< $(security cms -D -i "$f")
    
        done < <(find "$HOME/Library/MobileDevice/Provisioning Profiles" -name '*.mobileprovision' -print0)
    }
    

提交回复
热议问题