对于上下文,我在 OSX 10.9 上使用 Qt 5.3.1 和 Xcode 5.1.1。
经过一番努力,我终于能够让我的应用程序的 PKG 文件通过 Application Loader 上传,并出现在 iTunes Connect 中我的应用程序的“预发布”构建列表中。但是,一旦我将构建添加到应用程序并单击“提交以供审核”,我会收到以下一系列错误:
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
The nested bundle must contain an executable that matches the CFBundleExecutable key in the Info.plist of the nested bundle .
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message
The Info.plist of the nested bundle must contain a valid CFBundleExecutable key.
我正在应用此答案中提到的注释:为 OSX 10.9 签署框架
基本上,我通过 Xcode(在发布模式下)构建我的应用程序,然后我使用我编写的一个小 Python 脚本来帮助自动化应用商店的准备工作。脚本的要点在这里:
import os
import shutil
import subprocess
import sys
bundleFolder = '/path/to/the/bundle/app'
qtFolder = '/path/to/qt/et/al'
entitlements = '/path/to/entitlesments/file'
print 'Bundle folder: ', bundleFolder
print 'Qt Folder: ', qtFolder
print 'Executing macdeploy'
subprocess.call([qtFolder + '/bin/macdeployqt', bundleFolder + '/Program.app'])
frameworks = ['QtConcurrent', 'QtCore', 'QtGui', 'QtMultimedia', 'QtMultimediaWidgets', 'QtNetwork',
'QtOpenGL', 'QtPositioning', 'QtPrintSupport', 'QtQml', 'QtQuick', 'QtSensors', 'QtSql',
'QtWebKit', 'QtWebKitWidgets', 'QtWidgets', 'QtXml', 'QtXmlPatterns']
for fwork in frameworks :
print ('Copying Info.plist to frameworks: ' + fwork)
fworkFolder = qtFolder + '/lib/' + fwork + '.framework/Contents/Info.plist'
destFolder = bundleFolder + '/Program.app/Contents/Frameworks/' + fwork + '.framework/Resources/'
if (os.path.exists(destFolder)) :
print 'Copying ' + fworkFolder + ' to ' + destFolder
shutil.copy(fworkFolder,destFolder)
print ('Deleting unnecessary PlugIns')
rmFiles = ['accessible','audio', 'mediaservice', 'printsupport']
for rmFile in rmFiles :
fullFile = bundleFolder + r'/Program.app/Contents/PlugIns/' + rmFile
if (os.path.exists(fullFile)) :
print ('Deleting directory: ' + fullFile)
shutil.rmtree(fullFile)
print ('Signing Qt Executables')
for fwork in frameworks :
subprocess.call([r'/usr/bin/codesign',
r'--deep',
r'--force',
r'--verify',
r'--verbose',
r'--sign',
r'3rd Party Mac Developer Application: [valid info]',
r'--entitlements',
entitlements,
bundleFolder + '/Program.app/Contents/Frameworks/' + fwork + '.framework/Versions/5/' + fwork
])
print ('Signing Bundle')
subprocess.call([r'/usr/bin/codesign',
r'--deep',
r'--force',
r'--verify',
r'--verbose',
r'--sign',
r'3rd Party Mac Developer Application: [valid info]',
r'--entitlements',
entitlements,
bundleFolder + '/Program.app',
])
print ("Building PKG")
subprocess.call([r'/usr/bin/productbuild',
r'--component',
bundleFolder + '/Program.app',
r'/Applications',
r'Program-Installer.pkg'
])
print ("Building Signed PKG")
subprocess.call([r'/usr/bin/productsign',
r'--sign',
r'3rd Party Mac Developer Installer: [valid info]',
r'Program-Installer.pkg',
r'Program-Installer-Signed.pkg'
])
我猜问题出在每个 Qt*.framework 的 Info.plist 文件中,但是当我查看它们时,据我所知,这些信息看起来是有效的,例如:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.3</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>QtConcurrent</string>
<key>NOTE</key>
<string>Please, do NOT change this file -- It was generated by Qt/QMake.</string>
</dict>
</plist>
所以,我不明白为什么 Mac App Store 会抱怨。有人有想法吗?
谢谢!