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:20

Check your code signing. I had this error while using automatic signing. I Put my dev profile for dev and production profile for release version and error is gone.

查看更多
叼着烟拽天下
3楼-- · 2019-01-04 23:22

If you're building via xcodebuild or Xcode Server (or anything other than the Organizer window in Xcode), the IPA is missing SwiftSupport. See this discussion of the problem.

The solution is essentially to export the IPA yourself. CaveJohnson has a command to export an IPA with the correct SwiftSupport, so you can build an IPA like so:

cavejohnson xcodeGUITricks --archive-path my.xcarchive --new-ipa-path myapp.ipa
查看更多
Lonely孤独者°
4楼-- · 2019-01-04 23:22

I had this problem too

I tried to set the flag of EMBEDDED_CONTENT_CONTAINS_SWIFT to YES and NO. Both were not working for me.

Eventually I tried it with CaveJohnson mentioned by Drew. But that didn't work either.

At last I created a new project and inserted my swift files and frameworks etc. That was it!

The solution in my case: Create a new project

查看更多
可以哭但决不认输i
5楼-- · 2019-01-04 23:25

I was able to fix this by opening the archive, going into SwiftSupport and deleting the folder for WatchOS because it was empty. I guess my Watch target was set to embed Swift, so it included the folder but didn't generate anything inside it. So iTC saw an empty folder and errors out. By removing the empty folder it worked.

查看更多
等我变得足够好
6楼-- · 2019-01-04 23:28

The problem might come from cocoapods if you are using Swift pods. To fix it, use the branch xcode7-invalid-swift-support-fix (usage). Or do it manually by editing Pods/Target Support Files/Pods/Pods-frameworks.sh and commenting the block after

 # Embed linked Swift runtime libraries

More info:

查看更多
时光不老,我们不散
7楼-- · 2019-01-04 23:28

OK, I have been working on this for many hours now and finally found a solution.

To pre-frame the answer here is what I did: - tried everything in the previous answers - spent an hour on the phone with Apple Tech support. - read every Apple developer forum having to do with "invalid swift" in their developer network. Tried each of the proposed solutions.

I finally uninstalled and reinstalled Xcode and what do you know, it works now. Sometimes I don't know why this isn't my first idea for a solution.

查看更多
登录 后发表回答