Xcode 8 Crashing on AppStore Upload

I'm running Xcode b5 on a 2014 retina iMac (El Cap 10.11.5). My iOS 10 app (Swift 3, Messages extension, bit code enabled) archives without a problem, but Xcode crashes after selecting a Developer Teram during AppStore Upload.


Anyone seen this? (rdar://27805900)


Here's the stack trace from the crash log:



Crashed Thread: 0 Dispatch queue: MainQueue: __60-[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke.41



Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000

Exception Note: EXC_CORPSE_NOTIFY



Application Specific Information:

ProductBuildVersion: 8S193k

ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-11228.2/IDEFoundation/Distribution/IDEDistributionSummaryStep.m:213

Details: A method claimed to have succeeded but provided an error!

Object: <IDEDistributionSummaryStep>

Method: +_distributionItemsWithoutBitcodeForPlatforms:flattenedDistributionItems:archive:withError:

Thread: <NSThread: 0x7fc613413080>{number = 1, name = main}

Hints: None

Backtrace:

0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)

1 _DVTAssertionHandler (in DVTFoundation)

2 _DVTAssertionFailureHandler (in DVTFoundation)

3 +[IDEDistributionSummaryStep _distributionItemsWithoutBitcodeForPlatforms:flattenedDistributionItems:archive:withError:] (in IDEFoundation)

4 -[IDEDistributionSummaryStep distributionItemsWithoutBitcodeForPlatforms:withError:] (in IDEFoundation)

5 -[IDEDistributionSummaryStepViewController setupBitcodeAskCheckbox] (in IDEKit)

6 -[IDEDistributionSummaryStepViewController viewDidInstall] (in IDEKit)

7 -[DVTViewController _viewDidInstall] (in DVTKit)

8 -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTKit)

9 -[NSView _setWindow:] (in AppKit)

10 -[NSView addSubview:] (in AppKit)

11 -[NSView setSubviews:] (in AppKit)

12 -[DVTBorderedView setContentView:] (in DVTKit)

13 -[IDEDistributionAssistantWindowController setDistributionStepViewController:] (in IDEKit)

14 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)

15 _NSSetObjectValueAndNotify (in Foundation)

16 -[IDEDistributionAssistantWindowController next:] (in IDEKit)

17 __60-[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke_2.44 (in IDEKit)

18 __DVTDispatchGroupNotify_block_invoke (in DVTFoundation)

19 _dispatch_call_block_and_release (in libdispatch.dylib)

20 _dispatch_client_callout (in libdispatch.dylib)

21 _dispatch_queue_drain (in libdispatch.dylib)

22 _dispatch_queue_invoke (in libdispatch.dylib)

23 _dispatch_main_queue_callback_4CF (in libdispatch.dylib)

24 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation)

25 __CFRunLoopRun (in CoreFoundation)

26 CFRunLoopRunSpecific (in CoreFoundation)

27 RunCurrentEventLoopInMode (in HIToolbox)

28 ReceiveNextEventCommon (in HIToolbox)

29 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)

30 _DPSNextEvent (in AppKit)

31 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)

32 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)

33 -[NSApplication run] (in AppKit)

34 NSApplicationMain (in AppKit)

35 start (in libdyld.dylib)


abort() called



Application Specific Signatures:

!__localError

Okay, I found the problem. If I include lipo'd frameworks in the build, it fails. Once I replaced all my lipo'd frameworks with device-only builds. it all worked fine.


Ben

Getting a similar error trying to export a store ipa from Xcode 8 GM, on 10.11.6. App has an embeded framework which only contains device architectures. Any help would be grately appreciated. Bitcode is enabled on both the app and the framework and the framework has BITCODE_GENERATION_MODE set to bitcode for release build


2016-09-08 17:26:31.847 xcodebuild[9568:150855] [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:archive:withError:

Thread: <NSThread: 0x7fddc8d08450>{number = 1, name = main}

Hints: None

Backtrace:

0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat: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 0x000000010cc71202 (in xcodebuild)

10 start (in libdyld.dylib)

Abort trap: 6

Im now getting this issue too. Right pain, plus Im not sure what you mean by "lipo'd"

I'm having the same issue. Bitcode is disabled for all frameworks and they only have devices architectures. Any Update?

I am getting the same error. What is lipo'd framework? Can you please give us some more information.

Can you please give us some more information on how you resolved the problem as I am stuck on it for another day.

Any idea? I'm getting the issue (Xcode 8.0 and Xcode 8.1 beta) but not with every archive. There is something wrong with the archive I guess.

I have submitted a bug (28404200) with apple and requested help from developer support. Once I have news I will let you know.


There is definately something off with the archieve, but xcode should give us an indication on what is wrong instead of crashing.


I hope bengottlieb which claims that has sorted the problem will give us more information on how he accomplished that.

Ok found out what is going on. (for short version skip to point 2.)

  1. I was able to go through the first part of validation (part before selecting the team for binary and entitlement) only with
    bitcode enabled = NO
    and have seen something weird. My app with entitlement was here but it was not alone. A class file with
    .o
    postfix was there, but it should not.
  2. So I turned
    bitcode enabled
    to
    YES
    (not necessary to solve that), review the
    Copy bundle resources
    in
    Build phases
    and found that there really is the
    .m
    file of that class. So I removed it, check that the class is still part of the target (target membership) and everything is working now.

I'm also being hit by this. The iOS target (main app binary + frameworks) don't use Bitcode and have Bitcode turned off. Our watch app includes Bitcode, since iTunes Connect/the App Store requires it.


I'm disappointed Apple could ship Xcode 8 with this massive bug.

I finally found a solution to the above problem. I had a framework (added through carthage) that was including libraries and other frameworks. You can identify that you have the same problem as me using the following steps:


- Do a carthage update and add all framework on xcode (you have probably already done this step when you setup xcode).

- Then open xcode and on the left side go to the frameworks folden and expand.

- You should get a list with all frameworks installed

- Then expand each framework.

- You should only see a folder called "Headers"

- If you see a folder called "Frameworks", then you have the problem I had.


To solve it you need to create a fork on github (or the git site that you checked out the framework) and go to the build settings and set the following:


ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;

Hi,


I've been struggling with this one for days. Finally found the cause of the issue (for me at least).


I have 2 frameworks that contain my core code. I found that Xcode 8 was bundling libswiftRemoteMirror.dylib in each framework product. Once I archived my main project, I as able to find the archive directory (~/Library/Developer/Xcode/Archives/) and remove libswiftRemoteMirror.dylib from each framework directory. Going back to Xcode Organizer, I was then able to upload a build without it crashing.


Hope this helps.

I found the solution guys! All you have to do is disable bitcode in Xcode. At least that workd for me. Cheers.

The solution I found was this...


1. Archive the Project

2. Go to organizer and Export Save for Ad Hoc deployment

3. Upload resultant the IPA to the store using Aplication Loader

This gave me a meaningful error message...


ERROR ITMS-90171: "Invalid Bundle Structure - The binary file 'XXXXXXXX.app/XxxxxxXxxxInfo.o' is not permitted. Your app can’t contain standalone executables or libraries, other than the CFBundleExecutable of supported bundles. Refer to the Bundle Programming Guide at https://developer.apple.com/go/?id=bundle-structure for information on the iOS app bundle structure."


This meant that inadvertently a swift file had been added to my Copy Bundle Resources in Build Phases. By removing the swift file it fix the uploading and Xcode8 from crashing.


<TL:DR> Make sure you don't have source code files in your copy bundle resources


Hopefully Apple will fix this crash to be an error message 🙂 (I think they need more unhappy test case flows on store uploading!)

Thanks..The solution worked for me..I had one 3rd party library which had libswiftRemoteMirror.dylib. Removed it manually from the archive and tried to export the IPA for test flight and it worked well.

Xcode 8 Crashing on AppStore Upload
 
 
Q