Binary rejected with "Invalid Swift Support" error when generated with xcodebuild -exportArchive

Originator:dieter.komendera
Number:rdar://18864315 Date Originated:04-Nov-2014
Status:Duplicate Resolved:
Product:Developer Tools Product Version:6.1 (6A1052c)
Classification: Reproducible:
 
Summary:
When building an submitting with xcodebuild, the generated .ipa is rejected with "Invalid Swift Support - The bundle contains an invalid implementation of Swift. The app may have been built or signed with non-compliant or pre-release tools."

The steps I use to produce the binary:

xcodebuild -workspace SLComplete.xcworkspace -scheme '#{app[:schema]}' -configuration Release -destination 'generic/platform=iOS' archive -archivePath '#{archive_path}'

xcodebuild -exportArchive -exportFormat IPA -archivePath '#{archive_path}' -exportPath '#{ipa_filename}' -exportProvisioningProfile 'XC: #{details[:bundle_id]}'

./altool --upload-app --file '#{ipa_filename}' --username #{ITC_USER} --password #{ITC_PASSWORD}"

When building the same project with the exact same configuration from Xcode the binary is valid and accepted.

Steps to Reproduce:
Build an app containing Swift code with the steps above and upload the generated .ipa to iTunes Connect

Expected Results:
Valid binary

Actual Results:
Invalid binary

Version:
Version 6.1 (6A1052c), Mac OS 10.10 (14A388a)

Notes:
others having the same issue: https://devforums.apple.com/thread/245492?start=0&tstart=0

(use of atool from this thread: https://devforums.apple.com/message/1068619#1068619)

Configuration:


Attachments:

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:31 p.m. (reply...)

Duplicate of 16703091

By dieter.komendera at Jan. 8, 2015, 12:14 p.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!