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

Number:rdar://18864315 Date Originated:04-Nov-2014
Status:Duplicate Resolved:
Product:Developer Tools Product Version:6.1 (6A1052c)
Classification: Reproducible:
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 6.1 (6A1052c), Mac OS 10.10 (14A388a)

others having the same issue:

(use of atool from this thread:




The xcodebuild -exportArchive parameters have changed

The parameters have changed to include an export options plist instead of having -exportFormat. -more info:

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 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!