如何更新xcode扩展目标CFBundleVersion号?

时间:2018-11-21 23:14:12

标签: ios xcode

苹果需要我确保扩展目标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

0 个答案:

没有答案