Invalid Swift Support / invalid implementation of

2019-01-04 23:09发布

I'd like to upload an app written in swift. Application loader delivers the app successfully, but after a few minutes I get a reply by apple telling:

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. Visit developer.apple.com for more information.

I use xCode Version 6.0.1 (6A317), Swift iOS SDK 8.0 and just build the app with xcode.

Where can I find any information on how to get a valid implementation of swift? Apple does not say anything concrete.

Thx

23条回答
我想做一个坏孩纸
2楼-- · 2019-01-04 23:11

After Swift project update in new xcode was getting similar error and below is my solution.

Open project.pbxproj file and remove below line

EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;

and was able to submit app successfully.

查看更多
小情绪 Triste *
3楼-- · 2019-01-04 23:12

For me this is what worked for distribution.

Goto -> Xcode->product->Archive->Export

After this a folder will be created with current date. You can save it somewhere for later use. Then open Application loader and you can submit to the itunesConnect from here. Everything will be cleared. Make sure you create Build(.ipa) file by clicking on Export option in the organizer window. Then use Application loader to submit build to iTunesConnect.

I hope it helps. Let me know if you need more information.

查看更多
We Are One
4楼-- · 2019-01-04 23:14

Do you have any other version of Xcode installed?

Open your latest Xcode, then go to preferences (Xcode menu -> Preferences), switch to the Locations tab and verify that the Command Line Tools matches your Xcode version.

查看更多
混吃等死
5楼-- · 2019-01-04 23:14

Five Step Solution:

  1. Go to build settings and make flag Embedded Content Contains Swift Code -> YES, if your code contains partial swift code or entirely made in Swift
  2. Archive your build using Xcode->Product->Archive
  3. Export the Archive Build you will suddenly see the difference build size will be 40+ MBs this is because XCode has added SwiftSupport folder which was missing
  4. Now upload this build using Application loader
  5. If this does not work check that if you have multiple XCode on your system goto Xcode->Preferences->Location->Command Lines Tools has the same latest or the same Xcode from drop down selected on which you have done the coding & vola it's done.

This is slightly a drawback as swift carries the baggage and has to be compatible with earlier version and Objective C code.

My many hours were wasted hope you will find this helpful ;)

查看更多
走好不送
6楼-- · 2019-01-04 23:16

Thought I should share since I spent a few days trying to solve this problem.

Everyone keeps saying to set EMBEDDED_CONTENT_CONTAINS_SWIFT = NO or =YES

I had an iPhone app written entirely in Objective-C and a Watch Kit app written entirely in Swift.

I set EMBEDDED_CONTENT_CONTAINS_SWIFT = NO for everything (Project Target, iPhone app target, Tests, UITests, and WatchKit)

The place where I set EMBEDDED_CONTENT_CONTAINS_SWIFT = YES is in the WatchKit Extension. This solved my problem and I was able to upload to the App Store through Xcode.

Hope this can help somebody!

查看更多
We Are One
7楼-- · 2019-01-04 23:20

I had a similar problem. To fix it and be able to push a build to iTunesConnect I had to do the following:

  • Set the flag EMBEDDED_CONTENT_CONTAINS_SWIFT to YES in the target settings
  • Be sure that Build Phases did not include any other weird targets
  • Logout all Apple Developper accounts from Xcode and login with just the one you want to push the app with.
  • Archive and submit the app with Xcode and NOT with Application Loader.

Why did I need to logout from all of my Apple Developper accounts?

Because Xcode does not know which account to use to upload the binary. Application Loader ask you in the beginning but then, the uploaded build isn't valid...

UPDATE:

Since Xcode 7.1 and the new versions of Swift I got the error again. The current workaround is to do the following:

  • Create an archive locally on Xcode (does not work on my CI)
  • On Organizer, export it as an AppStore build.
  • Use Application Loader to upload the binary.

After few minutes (~10) the build should be available on iTunesConnect.

查看更多
登录 后发表回答