Xcode trying to match frameworks bundle ID when uploading iOS app to App Store
在开发了我的第一个iOS应用4个月之后,该将其提交到
存档后,我去了
错误:
(对于Google员工:未找到合适的应用程序记录。请确认您的捆绑包标识符"
错误消息表明它正在尝试根据框架的名称而不是我自己的捆绑包(例如
1 2 3 4 5 6 7 8 9 10 | post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] ="" config.build_settings['CODE_SIGNING_REQUIRED'] ="NO" config.build_settings['CODE_SIGNING_ALLOWED'] ="NO" end end end |
问题:
- 我做的步骤正确吗?
-
为什么
Xcode 试图匹配framework's bundle id 而不是仅匹配我的主应用程序? - 我如何克服这个问题才能最终提交我的应用程序?
编辑1:我能够解决此问题,但是稍后又导致了另一个问题,因此我仍然没有解决方案。基本上,Alamofire Pod(来自Cocoapods)具有束ID
1 | 4/22/16, 12:50:29 AM itunesstored[124]: [ApplicationWorkspace]: Failed to install application: com.xxx.myAppName; /var/mobile/Media/Downloads/5927832272594571027/-6969961974973998640; Error Domain=LaunchServicesError Code=0"(null)" UserInfo={Error=DuplicateIdentifier, ErrorDescription=The parent bundle has the same identifier (com.xxx.myAppName) as sub-bundle at /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.IVHCuO/extracted/Payload/MyApp.app/Frameworks/Alamofire.framework} |
对我来说效果很好。我只是找到Info.plist,右键单击" "源代码"打开,然后将
1 2 | <key>CFBundlePackageType</key> <string>APPL</string> |
尝试将应用程序提交到iTunes Connect时,我收到此确切错误:"找不到合适的应用程序记录。请验证您的捆绑包标识符\\'org.cocoapods.Alamofire \\'是正确的"。
我终于通过将Bundle OS Type代码更改为APPL来修复了它。
经过一段时间的努力之后,我得以实现它。基本上,只有Alamofire提出此问题。这是我的工作:
我为框架
刚刚遇到此问题,尝试上传到App Store时显示以下错误。
iTunes Store operation failed.
No suitable application records were found. Verify your bundle identifier 'org.cocoapods.Alamofire' is correct
我们在尝试上载(虽然使用Cocoapods)并且找不到修复程序时遇到了这个问题,采取了从整个项目中删除Cocoapods的剧烈动作,而是手动将每个吊舱添加为框架。
然后......上载到App Store仍然失败,并显示基本相同的错误! ??
iTunes Store operation failed.
No suitable application records were found. Verify your bundle identifier 'org.alamofire.Alamofire' is correct
所以看起来这可能是与Xcode本身中的框架使用有关的错误。
发现这不一定是由Cocoapods引起的,我们决定继续使用Cocoapods,并提出了以下步骤来解决此问题。
解决方法:
我们的项目包含2个目标(忽略单元测试目标等)。 1用于应用程序(我们将其称为MyApp),另一个用于网络层和其他非应用程序特定功能(我们将其称为MyAppKit)。
仍在仔细研究此处的情况,但认为这可能对当前正在经历此情况的任何人有用。
最近,我在使用cocoapods发布应用程序时遇到了同样的问题。
这是Objective-C项目,一直在将pod集成为动态框架。
这是已报告的错误。
因此,我建议采用以下2种替代方法来解决此问题:
-
使用静态库代替动态框架。
为此,您可以评论#use_frameworks!您的pod文件中的一行。 -
如果需要使用框架,可以尝试以下步骤:
-
将框架作为嵌入式二进制文件添加到Xcode目标中。
-
在目标的构建阶段,添加一个运行脚本:
示例脚本:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Stripping framework only for archive if ["$ACTION" ="install" ]; then FRAMEWORK_NAME="Framework name" SCRIPT_FILE_NAME="strip-framework.sh" # Set working directory to product’s embedded frameworks cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/${FRAMEWORK_NAME}.framework" # Get architectures for current file ARCHS="$(lipo -info"${FRAMEWORK_NAME}" | rev | cut -d ':' -f1 | rev)" for ARCH in $ARCHS; do if ! [["${VALID_ARCHS}" == *"$ARCH"* ]]; then # Strip non-valid architectures in-place lipo -remove"$ARCH" -output"$FRAMEWORK_NAME""$FRAMEWORK_NAME" || exit 1 fi done echo"Framework was successfully stripped with unsupported architectures" fi # Removing script from framework folder if [ -f ${SCRIPT_FILE_NAME} ]; then rm -rf"${SCRIPT_FILE_NAME}" fi |
Note: please replace your framework name in this script!, you ensure to put this script file named as"strip-framework.sh" into the top level of framework directory.
第三方框架从未由提供者签署,并且没有承担消费者的责任。
因此,当您存档时,它会与您的应用程序包一起签署框架。但是在执行此操作之后,应用程序加载程序会将您的捆绑包标识符视为框架之一。还很奇怪。
经过2天的工作后,我终于可以发布我的应用了。
即使您可以通过这种棘手的方式提交,也永远不会将其安装在设备上。
Finally, I got a perfect solution and found out the reason. This is
happening because your 3rd party frameworks have some issues in it.
For example, in my case Quickblox framework has never supported
bitcode yet. So I had to disable bitcode in build settings for the
main target and frameworks totally. This will fix your issue for sure.
请查看以下屏幕截图:
希望对您有帮助。
干杯!
首先,请检查您的捆绑商品标识符。接下来,请确保您的应用是在应用内商店连接中创建的,这可能是无法将应用上传到商店的原因之一。
就我而言,我必须从Pods子项目中删除Provisioning配置文件设置
如果您的应用程序标题中通常带有斜杠" /",则xcode无法对其进行签名,并认为我正在上传第一个框架org.cocoapods。***
我所做的-将斜杠更改为类似的符号∕
(第一个斜杠,下一个-其他Unicode符号:∕/)