Archives created by xcodebuild -exportArchive are missing SwiftSupport and WatchKitSupport folders

Originator:benchatelain
Number:rdar://20898925 Date Originated:2015-05-11
Status:Dup of 16703091 Resolved:
Product:Developer Tools Product Version:Xcode 6.3.1 (6D1002)
Classification:Serious Bug Reproducible:Always
 
Creating an archive of an iOS app containing a WatchKit app (containing some Swift) using xcodebuild's -exportArchive generates an invalid .ipa file. Attempting to install this .ipa file onto an iPhone using Xcode works, but the Watch app deployment fails with the message "Application Verification Failed"

Steps to Reproduce:
1. Create an iPhone app using only Objective-C
2. Add a Watch extension and app target that uses mixed Objective-C and Swift
3. Build the app using the xcodebuild "archive" command
4. Package up an .ipa file from the resulting .xcarchive using the xcodebuild -exportArchive option
5. Deploy the .ipa file to a device using the Xcode Devices window
6. Deploy the watch app to a device

Expected Results:
The watch app will deploy successfully.

Actual Results:
The watch app deployment fails with a generic message: 

    <App Name>
    Failed to install <App Name>, error: Application Verification Failed

Configuration: (hardware)
MacBook Pro (Retina, 15-inch, Late 2013)
OS X 10.10.3 (14D136)

Version & Build:
Xcode 6.3.1 (6D1002)

Regression:


Additional Notes:
Note that importing the .xcarchive file into Xcode and using the "Export..." button to export for Enterprise Deployment generates an .ipa file that deploys to a watch successfully. Inspecting the contents of these working .ipa files reveals two folders not present in the .ipa generated by xcodebuild -exportArchive: SwiftSupport and WatchKitSupport.

Here is shell script that packages up the .ipa file correctly using an .xcarchive:
https://gist.github.com/phatblat/6eb8895e2202f796960e

Comments

It can be fixed now

It's still an issue with Xcode 7, but it will work when you set the -exportOptionsPlist parameter and point it to a plist which looks like this:

teamID MYTEAMID123 method app-store uploadSymbols

Source: http://www.matrixprojects.net/p/xcodebuild-export-options-plist

By cristan.meijer at Sept. 18, 2015, 12:19 p.m. (reply...)

Still happening?

Is this still ongoing?

Running into the same issue here today with the latest Xcode.

By m4ttcheetham at July 28, 2015, 11:02 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!