/${APP_NAME}/Info.plist" #取版本号 bundleShortVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString " "${project_infoplist_path}") #取build值 bundleVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion /${APP_NAME}/Info.plist" #取版本号 bundleShortVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString " "${project_infoplist_path}") #取build值 bundleVersion=$(/usr/libexec/PlistBuddy -c "print CFBundleVersion
/bin/bash#/usr/libexec/PlistBuddy -c "print" ~/Library/Preferences/com.navicat.NavicatPremium.plist/usr /libexec/PlistBuddy -c "Delete :91F6C435D172C8163E0689D3DAD3F3E9" ~/Library/Preferences/com.navicat.NavicatPremium.plist /usr/libexec/PlistBuddy -c "Delete :B966DBD409B87EF577C9BBF3363E9614" ~/Library/Preferences/com.navicat.NavicatPremium.plistrm
[0m" fi # 修改 Plist # plist路径 infoPlist_File_Path=$Applications_Path/*.app/info.plist /usr/libexec/PlistBuddy -c "Set :CFBundleName $appName" $infoPlist_File_Path /usr/libexec/PlistBuddy -c "Set :CFBundleDisplayName $appDisplayName" $infoPlist_File_Path /usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier $appBundleId " $infoPlist_File_Path /usr/libexec/PlistBuddy -c "Set :Channel $appChannelName" $infoPlist_File_Path
PROJECT_DIR}/${INFOPLIST_FILE} #increment the build number (ie 115 to 116) buildnum=$(/usr/libexec/PlistBuddy build number in $plist" exit 2 fi buildnum=$(expr $buildnum + 1) /usr/libexec/Plistbuddy
learn.xcarchive -exportPath App -exportProvisioningProfile "provisioning file name" 扩展内容 1、命令行修改plist参数 PlistBuddy 支持修改plist,下面是一个修改指令: /usr/libexec/PlistBuddy -c "Set :TestVersion ${TestVersion}" ${infoplist_path} PlistBuddy简单使用,简书上也有详细介绍的文章。
-i Payload/iGoat-Swift.app/embedded.mobileprovision > provision.plist 我们可以用常用的文本编辑器打开plist文件,或者直接使用PlistBuddy 来将plist中的所有授权域提取出来: $ /usr/libexec/PlistBuddy -x -c 'Print :Entitlements' provision.plist | tee entitlements.plist $ /usr/libexec/PlistBuddy -x -c 'Print :Entitlements' provision.plist > entitlements.plist $ cat entitlements.plist 我们可以根据这个配置描述文件来获取到目标App所需的权限: $ security cms -D -i new_embedded.mobileprovision > new_provision.plist $ /usr/libexec/PlistBuddy
HiddenUsersList 命令: sudo/usr/libexec/plistbuddy -c "add :HiddenUsersList:0 string Guest" /Library/Preferences /com.apple.loginwindow.plist 恢复命令: sudo /usr/libexec/plistbuddy -c "delete :HiddenUsersList:0" /Library
Print: Entry, ":CFBundleIdentifier", Does Not Exist Command failed: /usr/libexec/PlistBuddy -c Print:
,内部版本号,bundleID info_plist_path="$project_name/$info_plist_name.plist" bundle_version=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $info_plist_path` bundle_build_version=`/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $info_plist_path` bundle_identifier=`/usr/libexec/PlistBuddy -c "Print CFBundleIdentifier
****" echo "*************************************" exit fi #取版本号 bundleShortVersion=$(/usr/libexec/PlistBuddy print CFBundleShortVersionString" "${project_infoplist_path}") #取build值 bundleVersion=$(/usr/libexec/PlistBuddy
string JVMVersion="" JVMMaxVersion="" # function 'plist_get()' # # read a specific Plist key with 'PlistBuddy ##################################################################### plist_get(){ /usr/libexec/PlistBuddy {InfoPlistFile}" 2> /dev/null } # function 'plist_get_java()' # # read a specific Plist key with 'PlistBuddy check Info.plist for Apple style Java keys -> if key :Java is present, parse in apple mode /usr/libexec/PlistBuddy keys -> if key :JavaX is present, parse in apple mode if [ $exitcode -ne 0 ]; then /usr/libexec/PlistBuddy
/usr/libexec/PlistBuddy -c "Set CFBundleVersion ${CFBundleVersion}" . /Runner/Info.plist /usr/libexec/PlistBuddy -c "Print CFBundleVersion " . /Runner/Info.plist 在 Mac 上其实本身就自带了满足需求的命令行工具:PlistBuddy, 如上命令所示 通过 Set 命令可以直接动态配置 plist 下的版本号、 code 和第三方
应用的Info.plist路径INFO_PLIST="$DIR/your_project_name/Info.plist"# 当前版本号CURRENT_VERSION=$( /usr/libexec/PlistBuddy $PATCH"# 更新Info.plist中的版本号/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $NEW_VERSION" "
image.png 3.导出entitlements.plist /usr/libexec/PlistBuddy -x -c "Print:Entitlements" embedded.plist> entitlements.plist
echo "Info.Plist : ${INFOPLIST_FILE}" # BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion ' "${INFOPLIST_FILE}") # BUNDLE_SHORT_VERSION=$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString
iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk cp SDKSettings.plist SDKSettings.plist.bak /usr/libexec/PlistBuddy -c "Set :DefaultProperties:AD_HOC_CODE_SIGNING_ALLOWED YES” SDKSettings.plist /usr/libexec/PlistBuddy
QA 和 Prod 打包后是两个不同的 bundleId,两个 ipa 可以同时存在手机上; 自定义构建时修改某些信息; 所以基于这些,最终决定了自己构建一套 命令行的打包模式 ,大概总结是: 通过 PlistBuddy
企业) 2、获取证书里面的信息(xx.plist) security cms -D -i xx.mobileprovision > xx.plist 3、导出xx.plist /usr/libexec/PlistBuddy
其中 $PRO_NAME 你可以通过 security cms -D -i embedded.mobileprovision > plistfile PRO_NAME=`/usr/libexec/PlistBuddy
部署从云基础设施下载的二级负载 通过使用SQLite枚举LSQuarantineDataURLString获取受感染 Mac的完整下载历史记录 通过从下载的有效负载中删除隔离属性来绕过Gatekeeper 使用PlistBuddy 它使用PlistBuddy在LaunchAgent/LaunchDeamon中创建和修改Plist以实现持久性。”