Xcode 8 在提交 App Store 时崩溃

7

我有一个奇怪的问题,以前从未遇到过。当我尝试将我的Xcode8(Swift3)项目提交到AppStore时,在我选择并确认组织后,Xcode会崩溃,并出现奇怪的问题报告,上面写着:

2016-09-17 12:32:29.604 xcodebuild[4347:14903] [MT] IDEDistribution: - [IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at   path '/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/Degoo-iOS_2016-09- 17_12-32-29.600.xcdistributionlogs'.
2016-09-17 12:32:31.335 xcodebuild[4347:14903] [MT] DVTAssertions:   ASSERTION FAILURE in  /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks- 11246/IDEFoundation/Distribution/IDEDistributionSummaryStep.m:213
Details:  A method claimed to have succeeded but provided an error!
Object:   <IDEDistributionSummaryStep>
Method:   +_distributionItemsWithoutBitcodeForPlatforms:flattenedDistributionItems:ar chive:withError:
Thread:   <NSThread: 0x7ff94ac07fe0>{number = 1, name = main}
Hints: None
Backtrace:
0   -[DVTAssertionHandler   handleFailureInMethod:object:fileName:lineNumber:assertionSignature:message Format:arguments:] (in DVTFoundation) 
1   _DVTAssertionHandler (in DVTFoundation)
2   _DVTAssertionFailureHandler (in DVTFoundation)
3   +[IDEDistributionSummaryStep _distributionItemsWithoutBitcodeForPlatforms:flattenedDistributionItems:archive:withError:] (in IDEFoundation)
4   -[IDEDistributionSummaryStep distributionItemsWithoutBitcodeForPlatforms:withError:] (in IDEFoundation)
5   -[IDEDistributionSummaryStep loadFromPropertyList:error:] (in IDEFoundation)
6   -[IDEDistributionDriver runWithDestinationPath:error:] (in IDEFoundation)
7   -[Xcode3CommandLineBuildTool _distributeArchiveAndExit] (in Xcode3Core)
8   -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
9  0x00000001047bb202 (in xcodebuild)
10   start (in libdyld.dylib)

我也尝试使用 Bitrise 上传应用程序,但是我失败了,不过至少我知道了更多。下面是一个在上述崩溃日志之前的 xcodebuild 回溯:

** ARCHIVE SUCCEEDED **


Generating exportOptionsPlist...
Using plist 3.1.0
Using bundler 1.13.1
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

Configs:
  * export_options_path: /Users/vagrant/deploy/export_options.plist
  * archive_path:  /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise- xcarchive.akKFUHmn/MyApp-iOS.xcarchive
  * export_method: app-store
  * upload_bitcode: yes
  * compile_bitcode: yes
  * team_id: 
  * plist_content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>method</key>
  <string>app-store</string>
  <key>uploadBitcode</key>
  <true/>
</dict>
</plist>

Exporting IPA from generated Archive...
$ xcodebuild -exportArchive -archivePath  "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise-  xcarchive.akKFUHmn/MyApp-iOS.xcarchive" -exportPath "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/bitrise-xcarchive.Jj61X7yX" -exportOptionsPlist "/Users/vagrant/deploy/export_options.plist"

我也遇到了同样的问题,我将一个项目转换为Swift 3和Xcode 8后出现了这个问题。你的项目里有使用Carthage或其他框架吗? - Bjarte
@Bjarte 我使用Cocoapods。 - LakaLe_
我更新了我的答案并修复了它。 - Jakub Truhlář
5个回答

1

我花了很多时间在这个问题上,但是一无所获。我决定从一个空白项目开始,将除了项目文件以外的所有文件备份并重新配置。虽然花费了2个小时,但问题现在已经解决了。


我也做了这个,对我也起作用。我不知道差别在哪里,但我注意到的唯一几件事是LIBRARY_SEARCH_PATHS = ( "$(inherited)", );变成了LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";objectVersion从46变成了48,启用了模块,并且链接框架(在项目-常规中,UIKit和CoreData原来去的地方)不再是必要的。 - Tin Can

0
这或许是一个冒险的尝试,不过你是否正在使用Reveal且将旧式集成库复制到你的应用程序包中呢?我的构建也是这么做的,但如果配置为“ReleaseAppStore”则应该跳过它,而这可能是一个旧名称来进行归档。我将其移除后,成功验证并上传了我的存档文件。

0

好的,我知道发生了什么事情。(如果想看简短版本,请跳到第二点。)

  1. 我只有在启用 bitcode enabled = NO 的情况下通过验证的第一部分(在选择二进制和授权之前的部分),并且看到了一些奇怪的东西。我的带有授权的应用程序在那里,但不是唯一的。有一个带有 .o 后缀的类文件,但它不应该存在。

  2. 所以我把 bitcode enabled 改成了 YES (这不是解决问题所必需的),查看 Build phases 中的 Copy bundle resources 并发现确实有那个类的 .m 文件。因此,我将其删除,检查该类是否仍然是目标的一部分(目标成员资格),现在一切都正常运行。

还需要登录您的iTunes Connect帐户,并检查是否需要审核更新的Apple Developer Program License Agreement。如果是,请进行审核后再尝试。


0

使用Xcode 8版本编译项目,并将ipa文件发送到最新的Xcode beta版本的商店。或者尝试清理项目和构建文件夹,然后重试。


0

我有一个第三方库,其中包含了libswiftRemoteMirror.dylib。我手动从档案中删除它,并尝试导出IPA进行测试飞行,结果顺利。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接