将我的应用程序提交到应用程序商店时,出现此错误:
这是我的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>
Run Code Online (Sandbox Code Playgroud)
当我提交应用程序时,您可以清楚地看到没有版本1.0.0.pre.
我也使用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>
Run Code Online (Sandbox Code Playgroud)
更新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 **
Run Code Online (Sandbox Code Playgroud)
由于您没有在项目中看到字符串,因此可能存在与您的项目相关联的包,框架或库.从项目中最顶层的目录中find,除了grep查找罪魁祸首之外,您还可以使用它:
find . -name "*.plist" -exec grep -iq "CFBundleShortVersionString" {} \; \
-exec grep -Him 1 "1.0.0.pre" {} \;
Run Code Online (Sandbox Code Playgroud)
这可能会返回可能类似于以下内容的结果:
Binary file ./FooProject/Foo.framework/Info.plist matches
./FooProject/Resources/Info.plist- <string>1.0.0.pre</string>
Run Code Online (Sandbox Code Playgroud)
如果返回结果,那么您将找到" ERROR ITMS-90096此捆绑包无效的原因.密钥CFBundleVersionShortString的值...... ".如果返回的结果是在上面第一个结果(例如Binary file)或另一个包/库中显示的框架内,那么您将需要更改其定义项目中的值(前提是它只是版本号中的错误).您还可以创建一个清理脚本,以便在代码签名之前替换构建时的值.
但更重要的是,为什么你的应用程序被拒绝以及1.0.0.pre专门创建的版本是什么.使用有目的地使您的应用程序被拒绝的版本标记意味着阻止您在生产应用程序中使用预发行代码 - 这是设计的.创建该特定pod,bundle,framework,library的人告诉你:
"请勿在计划部署到公众的应用程序中使用此预发布代码".
我建议不要只是简单地更改项目的版本号,.plist以便您的应用程序成功提交 - 而是检查用于生产的稳定版本.
框架,窗格和捆绑包都有自己的.plist版本号和版本号.它们不是"覆盖"您的主要应用程序版本号,而是简单地拥有自己的(其中一个显然无效).
检查1:
您可能希望在构建设置中搜索"版本".在奇怪的情况下,我通常使用这个"视图":
在我的MacOSX测试项目中,它看起来像这样:
请注意,有一个名为"版本名称后缀"的条目.我不确定,这是否存在于iOS项目中(稍后将测试).在任何情况下,您都可以查看"轻松"与"版本"相关的设置.
检查2:
或者你可以grep项目文件:
grep pre MyProject.xcodeproj/project.pbxproj
Run Code Online (Sandbox Code Playgroud)
检查3:
打开一个终端并在项目目录中调用:
xcodebuild clean
xcodebuild > build.log
Run Code Online (Sandbox Code Playgroud)
与cocoapods可能这样:
xcodebuild -workspace PRJ.xcworkspace -scheme PRJ clean
xcodebuild -workspace PRJ.xcworkspace -scheme PRJ > build.log
Run Code Online (Sandbox Code Playgroud)
在build.log搜索"ProcessInfoPlistFile".在我的情况下,它看起来像这样:(手动包装 - 实际项目名称已更改)
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
Run Code Online (Sandbox Code Playgroud)
请注意-additionalcontentfile.请检查列出了哪些附加文件并检查这些文件.
检查4:
查看IPA存档以查看实际找到"1.0.0.pre"的位置.对于打开的"Window> Organizer",选择您的应用程序并按"导出...".选择"保存iOS App Store部署".结果将是一个.ipa文件.将其重命名为PRJ.ipa.zip- 然后您可以将其解压缩.查找.plist文件并检查其内容.
| 归档时间: |
|
| 查看次数: |
2429 次 |
| 最近记录: |