gpt4 book ai didi

ios - Xcode:无法更改项目版本

转载 作者:行者123 更新时间:2023-11-29 01:38:07 26 4
gpt4 key购买 nike

我无法更改项目的版本。我尝试使用 Target->General->[Version and Build]

更改版本

enter image description here

此外,我尝试更改 AppName-info.plist 中的版本

enter image description here

但是,当我存档这个项目时,我得到了错误版本的构建

enter image description here

当我尝试提交到 Appstore 时,出现此错误

enter image description here

如何解决?我们将不胜感激!

最佳答案

我解决了我的问题。在“目标”->“构建阶段”中我找到了脚本

git=$(sh /etc/profile; which git)
git_release_version=$("$git" describe --tags --always --abbrev=0)
number_of_commits=$("$git" rev-list master | wc -l | tr -d ' ')
target_plist="$TARGET_BUILD_DIR/$INFOPLIST_PATH"
dsym_plist="$DWARF_DSYM_FOLDER_PATH/$DWARF_DSYM_FILE_NAME/Contents/Info.plist"

for plist in "$target_plist" "$dsym_plist"; do
if [ -f "$plist" ]; then
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $number_of_commits" "$plist"
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${git_release_version#*v}" "$plist"
fi
done

然后我就把它删除了。

关于ios - Xcode:无法更改项目版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32739604/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com