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

Do you build with command line (xcodebuild)?

If so: I encountered the same problem. The problem is that the generated ipa file is invalid. It is missing the SwiftSupport folder. The folder is added by XCode when a project with Swift is built with the Xcode Gui.

The problem is described in this apple developer forum thread with a reference to an open radar ticket: https://devforums.apple.com/message/1042117#1042117

查看更多
Deceive 欺骗
3楼-- · 2019-01-04 23:32

I was with the same problem and tried everything proposed, but always failed... My apps generates SwiftSupport Folders, I just solved with this solution:

Thank you for sending that .ipa file. The issue is caused by libswiftXCTest.dylib in the SwiftSupport directory. That dylib is used by testing targets and is normal for development builds to include, but an archive build for the App Store should not include this dylib.

In order to resolve this issue, please follow these steps:

  1. Open your Xcode project
  2. Select Product > Scheme > Edit Scheme
  3. Click Build in the left sidebar
  4. For your test target, uncheck the Archive checkbox
  5. Click the Close button
  6. Select Product > Archive
  7. Submit the latest archive to the App Store
查看更多
劫难
4楼-- · 2019-01-04 23:32

If you have cocoapods, simply delete all of the pods and then reinstall pod install.

Very annoying since I have -22421 error when uploading directly from Xcode and Invalid Swift support when using Application Loader

查看更多
欢心
5楼-- · 2019-01-04 23:33

I discovered that changing "Embedded Content Contains Swift Code" from YES to NO in the main app build settings (and leaving it set to YES in the extension) would run on the watch (and the phone). At the same time as I uploaded that binary, Apple must have made a change to the ITC backend as my other uploaded builds which had been marked "Invalid Binary" reverted to "Processing" and later passed the screen to "Inactive".

So I submitted the build with "Embedded Content Contains Swift Code" YES in the extension only for review.

Main app: Embedded Content Contains Swift Code = YES (if its a swift project. else NO)

WatchKit Extension: Embedded Content Contains Swift Code = YES (if its a swift project. else NO)

WatchKit App: Embedded Content Contains Swift Code = NO (In any case)

查看更多
不美不萌又怎样
6楼-- · 2019-01-04 23:33

I was facing same problem . The solution that worked for me was to update my xcode and then create new project and copy paste all my work to that project

查看更多
Animai°情兽
7楼-- · 2019-01-04 23:33

I actually just solved this with a completely different, unrelated and really weird fix. Had the above error, but did NOT change anything in the Project or build Environment.

After a lot of Rebuild and Upload Cycles, it turned out that it was an Ad-Hoc certificate that was causing this issue. Using fastlane and setting the gym flag ad_hoc to false as well as using a Release Config for the build (not sure which one fixed it) finally worked. Here is my gym line:

identifier = "de.xxx.yyy"
config = "Release"
ad_hoc = false
scheme = "Schema"
gym(verbose: false, scheme: scheme, codesigning_identity: "iPhone Distribution: YTB)", configuration: config)
查看更多
登录 后发表回答