CFBundleShortVersionString 必须是最多三个非负整数的句点分隔列表 [英] CFBundleShortVersionString must be a period-separated list of most three non-negative integers

查看:18
本文介绍了CFBundleShortVersionString 必须是最多三个非负整数的句点分隔列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When submitting my app to the app store I get this error:

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

Here is the relevant part from my info.plist file:

    <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>

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

When I submit the app you can clearly see that there is no version 1.0.0.pre.

我也使用 CocoaPods.

I use CocoaPods as well.

我该如何解决这个问题?

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

Update: Here is what I try on my project path: find . -name "*.plist" -exec grep -o -A 1 "CFBundleShortVersionString" {} \; and here is the result:

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 我收到以下错误:

Update 2: Doing: xcodebuild > build.log I get the following error:

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 **

推荐答案

检查 1:

您可能想在构建设置中搜索版本".在奇怪的情况下,我通常使用这个视图":

You may want to search for "version" in the build settings. In case of weird situations I usually use this "view":

  1. 转到构建设置.
  2. 在基本全部"左侧选择全部"
  3. 在组合级别"的左侧选择级别"
  4. 在搜索框中输入版本",然后按回车/回车

在我的 MacOSX 测试项目中,它看起来像这样:

In my MacOSX test project it looks like this:

请注意,有一个名为版本名称后缀"的条目.我不确定,这是否存在于 iOS 项目中(稍后会测试).在任何情况下,您都可以查看轻松"与版本"相关的设置.

Note that there is an entry named "version name suffix". I'm not sure, whether or not this exists in an iOS project (will test later). In any case you can look through the settings which "easily" relate to "version".

检查 2:

或者,您可以 grep 项目文件:

Alternatively you could grep the project file:

grep pre MyProject.xcodeproj/project.pbxproj

检查 3:

打开终端并在项目目录中调用:

Open a terminal and in the project directory call this:

xcodebuild clean
xcodebuild > build.log

cocoapods 可能是这样的:

with cocoapods likely this:

xcodebuild -workspace PRJ.xcworkspace -scheme PRJ clean
xcodebuild -workspace PRJ.xcworkspace -scheme PRJ > build.log

build.log 中搜索ProcessInfoPlistFile".就我而言,它看起来像这样:(手动包装 - 实际项目名称已更改)

In build.log search for "ProcessInfoPlistFile". In my case it looks like this: (manually wrapped - actual project name changed)

ProcessInfoPlistFile build/Release-iphoneos/PRJ.app/Info.plist PRJ/Info.plist
    cd /Users/fsc/prj/PRJ
    export PATH="/Applications/Xcode.app/..."
    builtin-infoPlistUtility /Users/fsc/prj/PRJ/PRJ/Info.plist 
-genpkginfo /Users/fsc/prj/PRJ/build/Release-iphoneos/PRJ.app/PkgInfo 
-expandbuildsettings -format binary -platform iphoneos 
-additionalcontentfile /Users/fsc/prj/PRJ/build/PRJ.build/Release-iphoneos/PRJ.build/Main-SBPartialInfo.plist 
-additionalcontentfile /Users/fsc/prj/PRJ/build/PRJ.build/Release-iphoneos/PRJ.build/LaunchScreen-PartialInfo.plist 
-additionalcontentfile /Users/fsc/prj/PRJ/build/PRJ.build/Release-iphoneos/PRJ.build/assetcatalog_generated_info.plist 
-o /Users/fsc/prj/PRJ/build/Release-iphoneos/PRJ.app/Info.plist

注意-additionalcontentfile.请检查列出了哪些其他文件并检查这些.

Note the -additionalcontentfile. Please check which additional files are listed and check these.

检查 4:

查看 IPA 档案以查看1.0.0.pre"的实际位置.对于打开的窗口 > 管理器",选择您的应用程序并按导出...".选择保存用于 iOS App Store 部署".结果将是一个 .ipa 文件.将其重命名为 PRJ.ipa.zip - 然后您可以解压缩它.查找 .plist 文件并检查其内容.

Look into the IPA archive to see where the "1.0.0.pre" actually is found. For that open "Window > Organizer", select your app and press "Export...". Select "Save for iOS App Store Deployment". The result will be an .ipa file. Rename it to PRJ.ipa.zip - then you can unpack it. Look for the .plist files and check their content.

这篇关于CFBundleShortVersionString 必须是最多三个非负整数的句点分隔列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆