Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 归档内置Xcode时不显示版本号和内部版本号_Ios_Xcode_App Store_App Store Connect - Fatal编程技术网

Ios 归档内置Xcode时不显示版本号和内部版本号

Ios 归档内置Xcode时不显示版本号和内部版本号,ios,xcode,app-store,app-store-connect,Ios,Xcode,App Store,App Store Connect,我正在存档要提交到应用商店的构建,但版本和构建未显示。我已经附上了相同的截图。当我通过应用程序加载器提交应用程序时,在导出.ipa后,我收到此错误。“包中的Info.plist必须包含CbundleShortVersionString键。”我已将这些详细信息添加到Info.plist文件中,如下所示 <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBun

我正在存档要提交到应用商店的构建,但版本和构建未显示。我已经附上了相同的截图。当我通过应用程序加载器提交应用程序时,在导出.ipa后,我收到此错误。“包中的Info.plist必须包含CbundleShortVersionString键。”我已将这些详细信息添加到Info.plist文件中,如下所示

<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.1</string>
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
CbundleShortVersionString
1
循环流化床锅炉
1.1
info.plist文件也位于根文件夹中。我对iPhone和iPad应用程序有两个不同的目标


我发现一个脚本如下

<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1.1</string>
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

删除此脚本后,我能够解决此问题。此脚本用于自动更新版本和内部版本号。我不知道此脚本为什么会导致此问题。

您在生成时是否连接了设备?请在目标中检查项目设置,这是怎么回事given@KKRocks是的,我已经连接了存档构建的真实设备。@Sivajee Battina是的,这里也是一样。然后从mac上删除它,然后用command+shift+k…清理你的项目,然后再次使用通用设备构建。