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

Originator:m4ttcheetham
Number:rdar://22029699 Date Originated:28-Jul-2015 02:59 PM
Status:Duplicate of 16703091 (Closed) Resolved:21-Jul-2015
Product:Developer Tools Product Version:Xcode 6.3.1 (6D1002)
Classification:Serious Bug Reproducible:Always
 
This is a duplicate of rdar://20898925

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

the xcodebuild -exportArchive parameters have changed

The parameters have changed to include an export options plist instead of having -exportFormat. -more info: http://encyclopediaofdaniel.com/blog/xcarchive-to-ipa/

By Prows.Daniel at Oct. 8, 2015, 11:33 p.m. (reply...)

Apple Developer Relations

Engineering has determined that your bug report (22029699) is a duplicate of another issue (16703091) and will be closed.

By m4ttcheetham at July 31, 2015, 7:14 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!