苹果需要我确保扩展目标CFBUNDLEVersion与我的应用目标版本匹配。要更新我的应用目标版本,我使用运行脚本,该脚本执行以下操作:
DSYM_INFO_PLIST="${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist"
buildNumber=$ENV_BUILD_NUMBER
stringLength=${#buildNumber}
if [ $stringLength -ne 0 ]; then
echo "Updating build number to $buildNumber"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${SRCROOT}/AppServiceExtension/Info.plist"
else
echo "Missing build number, skip updating"
fi
这将成功更新我的应用目标,但是不会更新 AppServiceExtension /Info.plist CFBundleVersion。
如何获取此运行脚本来更新 AppServiceExtension CFBundleVersion ?