gpt4 book ai didi

ios - CFBundleShortVersionString 必须是大多数三个非负整数的句点分隔列表

转载 作者:可可西里 更新时间:2023-11-01 04:17:19 25 4
gpt4 key购买 nike

将我的应用程序提交到应用程序商店时出现此错误:

enter image description here

这是我的 info.plist 文件中的相关部分:

    <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>

enter image description here

当我提交应用程序时,您可以清楚地看到没有版本 1.0.0.pre

enter image description here

我也使用 CocoaPods。

我该如何解决这个问题?

更新:这是我在我的项目路径上尝试的:find 。 -name "*.plist"-exec grep -o -A 1 "CFBundleShortVersionString"{}\; 结果如下:

CFBundleShortVersionString
<string>1.0.6</string>
CFBundleShortVersionString
<string>1.0</string>
CFBundleShortVersionString
<string>3.3.4</string>
CFBundleShortVersionString
<string>1.5.5</string>
CFBundleShortVersionString
<string>2.0.2</string>
CFBundleShortVersionString
<string>0.7.0</string>
CFBundleShortVersionString
<string>0.0.9</string>
CFBundleShortVersionString
<string>1.2.2</string>
CFBundleShortVersionString
<string>1.6.0</string>
CFBundleShortVersionString
<string>1.7.2</string>
CFBundleShortVersionString
<string>2.0.0</string>
CFBundleShortVersionString
<string>1.3.2</string>
CFBundleShortVersionString
<string>1.4.1</string>
CFBundleShortVersionString
<string>1.0</string>
CFBundleShortVersionString
<string>0.9.1</string>
CFBundleShortVersionString
<string>0.2.3</string>
CFBundleShortVersionString
<string>1.0.0</string>
CFBundleShortVersionString
<string>3.7.3</string>
CFBundleShortVersionString
<string>0.15.0</string>
CFBundleShortVersionString
<string>1.0.0.pre</string>
CFBundleShortVersionString
<string>2.3.0</string>
CFBundleShortVersionString
<string>2.0.0</string>
CFBundleShortVersionString
<string>1.2</string>
CFBundleShortVersionString
<string>3.0.2</string>

更新 2:执行:xcodebuild > build.log 我收到以下错误:

2015-10-25 22:02:52.653 xcodebuild[6273:1043943] [MT] PluginLoading: Required plug-in compatibility UUID 7265231C-39B4-402C-89E1-16167C4CC990 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/VVDocumenter-Xcode.xcplugin' not present in DVTPlugInCompatibilityUUIDs
** BUILD FAILED **

最佳答案

定位版本号

由于您没有在项目中看到该字符串,因此很可能存在与您的项目关联的包、框架或库负责。在项目的最顶层目录中,除了 grep 之外,您还可以使用 find 来查找罪魁祸首:

find . -name "*.plist" -exec grep -iq "CFBundleShortVersionString" {} \; \
-exec grep -Him 1 "1.0.0.pre" {} \;

这可能会返回类似于以下内容的结果:

Binary file ./FooProject/Foo.framework/Info.plist matches
./FooProject/Resources/Info.plist- <string>1.0.0.pre</string>

如果返回结果,您将找到“ERROR ITMS-90096 This bundle is invalid. The value for key CFBundleVersionShortString...”的原因。如果返回的结果在上面第一个结果(例如 Binary file)或另一个 bundle/library 中所示的框架内,那么您将需要更改它定义的项目中的值(前提是它只是版本号错误)。您还可以创建一个清理脚本,以在代码签名之前的构建时替换该值。

1.0.0.pre

但这里更重要的是您的应用被拒绝的原因以及 1.0.0.pre 版本是专门为做什么而创建的。使用故意让你的应用程序被拒绝的版本标签是为了防止你在生产应用程序中使用预发布代码——这是设计使然。创建特定 pod、bundle、框架、库的人告诉您:

"Don't use this prerelease code in an app that you are planning to deploy to the public".

我建议不要只是简单地更改项目 .plist 的版本号,以便您的应用程序成功提交——而是检查用于生产的稳定发布版本。

多个 Info.plists

Frameworks、pod 和 bundle 都有自己的 .plist 和版本号。它们不会“覆盖”您的主要应用程序版本号,而只是拥有自己的版本号(其中一个显然无效)。

关于ios - CFBundleShortVersionString 必须是大多数三个非负整数的句点分隔列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33287059/

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