C++ 在Mac app Store上提交Qt 5.3应用程序供审查

C++ 在Mac app Store上提交Qt 5.3应用程序供审查,c++,qt,mac-app-store,info.plist,qt5.3,C++,Qt,Mac App Store,Info.plist,Qt5.3,在上下文中,我在OSX 10.9上使用Qt5.3.1和Xcode 5.1.1 经过一番努力,我终于能够通过应用程序加载器上传我的应用程序的PKG文件,并出现在iTunes Connect中我的应用程序的“预发布”构建列表中。然而,一旦我将构建添加到应用程序中并单击“提交以供审阅”,我会收到以下大量错误: ITC.apps.assetvalidation.DESKTOP_MISSING_NESTED_BUNDLE_IDENTIFIER.error.message The Info.plist of

在上下文中,我在OSX 10.9上使用Qt5.3.1和Xcode 5.1.1

经过一番努力,我终于能够通过应用程序加载器上传我的应用程序的PKG文件,并出现在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.
我正在应用此答案中提到的注释:

基本上,我通过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>

CbundlePackageType
模板
CbundleShortVersionString
5.3
cfbundlegetingfostring
由Qt/QMake创建
CFBundleSignature
????
Cbundlexecutable
QT并发
注
请不要更改此文件--它是由Qt/QMake生成的。
所以,我不明白为什么Mac应用商店会抱怨。有人有什么想法吗


谢谢大家!

我终于熬过去了。Qt Info.plist文件似乎已损坏,即它们没有足够的信息,Apple服务器上的最后一步验证失败

为了解决这个问题,我从一个常规的XCode编译框架中获取了一个Info.plist文件,该框架包含在一个本地Mac应用程序中,并在之前通过了验证。内容是这样的:

<?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>BuildMachineOSBuild</key>
    <string>13E28</string>
    <key>CFBundleDevelopmentRegion</key>
    <string>English</string>
    <key>CFBundleExecutable</key>
    <string>BUNDLE_NAME</string>
    <key>CFBundleIdentifier</key>
    <string>BUNDLE_IDENTITY</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>BUNDLE_NAME</string>
    <key>CFBundlePackageType</key>
    <string>FMWK</string>
    <key>CFBundleShortVersionString</key>
    <string>BUNDLE_VERSION</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>BUNDLE_VERSION</string>
    <key>DTCompiler</key>
    <string>com.apple.compilers.llvm.clang.1_0</string>
    <key>DTPlatformBuild</key>
    <string>5B1008</string>
    <key>DTPlatformVersion</key>
    <string>GM</string>
    <key>DTSDKBuild</key>
    <string>12F37</string>
    <key>DTSDKName</key>
    <string>macosx10.8</string>
    <key>DTXcode</key>
    <string>0511</string>
    <key>DTXcodeBuild</key>
    <string>5B1008</string>
</dict>
</plist>

BuildMachineOSBuild
13E28
CfBundledDevelopmentRegion
英语
Cbundlexecutable
BUNDLE\u名称
CbundleIdentifier
BUNDLE\u恒等式
CbundleInfo字典版本
6
CFBundleName
BUNDLE\u名称
CbundlePackageType
模板
CbundleShortVersionString
BUNDLE\u版本
CFBundleSignature
????
循环流化床锅炉
BUNDLE\u版本
DTC编译器
com.apple.compilers.llvm.clang.1_0
DTPlatformBuild
5B1008
数据平台版本
转基因的
DTSDKBuild
12F37
DTSDKName
macosx10.8
DTXcode
0511
DTXcodeBuild
5B1008
我用占位符字符串替换了原始文件的捆绑包版本、名称和标识符,然后将此文件用作Qt框架的Info.plist,通过Perl脚本将占位符替换为正确的值


有了一些额外的修复程序,比如正确的符号链接,我终于让我的Qt 4.8应用程序通过了审查,我相信你应该能够用Qt 5+获得相同的结果。

这里也一样。我认为在嵌套包的plist文件中有主应用程序的可执行名称(即YouApp.app而不是framework name)可能是一个新的要求,但我无法确认这个想法是正确的还是错误的,因为iTunesConnect不允许我更新构建。我删除了一个旧版本,上传了一个新版本,但服务器上仍然只有一个版本(上传分离)。如果你知道如何重新上传二进制文件,我可以试试我的想法并报告。我通过增加版本号完成了新二进制文件的上传。即使更改了版本号,我也无法在iTunes中看到新版本,但每次上传我都会收到一封带有相同问题列表的邮件。所以,我想,我的想法行不通。我终于成功了,我的应用程序终于被批准审查。谢谢谢谢如果其他人想知道占位符使用什么字符串(例如QtCore 4.8):BUNDLE\u NAME->QtCore,BUNDLE\u IDENTITY->QtCore,BUNDLE\u VERSION->4I也有同样的问题,但应用新的plist并不能解决问题,它仍然会说Cbundleexecuitable键不正确。您能否提供有关如何修复此错误的更多信息?Hydrix已为我的占位符声明了一些正确的(示例)值,包括Cbundleexecuitable键的值。此键应包含准确的框架名称,即代码框架的“QtCore”,xml框架的“QtXML”,等等。非常感谢您的建议。我已将QtCore设置为Cbundleexecuitable,但appstore仍给出此错误。非常困惑。你能给点建议吗?