Nice programing

잘못된 Swift 지원 / 잘못된 신속한 구현

nicepro 2020. 12. 8. 20:01
반응형

잘못된 Swift 지원 / 잘못된 신속한 구현


신속하게 작성된 앱을 업로드하고 싶습니다. 애플리케이션 로더는 앱을 성공적으로 전달하지만 몇 분 후 사과에서 다음과 같은 응답을받습니다.

잘못된 Swift 지원-번들에 잘못된 Swift 구현이 포함되어 있습니다. 앱이 비준수 또는 시험판 도구로 빌드되었거나 서명되었을 수 있습니다. 자세한 내용은 developer.apple.com을 방문하십시오.

xCode 버전 6.0.1 (6A317), Swift iOS SDK 8.0을 사용하고 xcode로 앱을 빌드합니다.

swift의 유효한 구현을 얻는 방법에 대한 정보는 어디에서 찾을 수 있습니까? 애플은 구체적인 말을하지 않습니다.

고마워


비슷한 문제가있었습니다. 이 문제를 해결하고 빌드를 iTunesConnect에 푸시하려면 다음을 수행해야했습니다.

  • 대상 설정에서 플래그 EMBEDDED_CONTENT_CONTAINS_SWIFTYES로 설정하십시오.
  • 빌드 단계에 다른 이상한 대상이 포함되지 않았는지 확인하십시오.
  • LogoutXcode의 모든 Apple Developper 계정을 사용 하고 앱을 푸시하려는 계정으로 만 로그인 합니다.
  • 아카이브 및 앱 제출 with XcodeNOT 응용 프로그램 로더와 함께합니다.

모든 Apple Developper 계정에서 로그 아웃해야하는 이유는 무엇입니까?

Xcode는 바이너리를 업로드하는 데 사용할 계정을 모르기 때문입니다. Application Loader가 처음에 요청했지만 업로드 된 빌드가 유효하지 않습니다.

최신 정보:

Xcode 7.1 과 Swift의 새 버전 부터 다시 오류가 발생했습니다. 현재 해결 방법은 다음을 수행하는 것입니다.

  • Xcode에서 로컬로 아카이브 만들기 (내 CI에서 작동하지 않음)
  • Organizer에서 AppStore 빌드로 내 보냅니다 .
  • Application Loader를 사용하여 바이너리를 업로드합니다.

몇 분 (~ 10) 후에 iTunesConnect에서 빌드를 사용할 수 있습니다.


Swift 포드를 사용하는 경우 문제는 cocoapods에서 발생할 수 있습니다. 이를 수정하려면 xcode7-invalid-swift-support-fix 브랜치를 사용하세요 ( usage ). 또는 Pods / Target Support Files / Pods / Pods-frameworks.sh를 편집 하고 다음에 블록에 주석을 달아 수동으로 수행하십시오.

 # Embed linked Swift runtime libraries

더 많은 정보:


xcodebuild 솔루션

  • 임시 폴더 만들기

  • 임시 폴더에 ipa 파일 압축 해제

  • 임시 폴더 안에 SwiftSupport 폴더 생성
  • Payload / * app / framworks에서 SwiftSupport 폴더로 신속한 라이브러리 복사
  • 패키지 ipa 파일에는 임시 폴더 (Payload 및 SwiftSupport 폴더가 있음) 내에 포함됩니다.

여기 ipa에 Swift libs를 추가하는 쉘 스크립트

https://github.com/huhuvipi/VH_ipa_packger

기존 ipa 파일 인 경우 다음을 수행하십시오.

path/to/package_ipa.sh /path/to/ipafile


명령 줄 (xcodebuild)로 빌드합니까?

그렇다면 : 동일한 문제가 발생했습니다. 문제는 생성 된 ipa 파일이 유효하지 않다는 것입니다. SwiftSupport 폴더가 없습니다. 이 폴더는 Swift로 프로젝트가 Xcode Gui로 빌드 될 때 XCode에 의해 추가됩니다.

문제는 공개 레이더 티켓에 대한 참조와 함께이 Apple 개발자 포럼 스레드에 설명되어 있습니다. https://devforums.apple.com/message/1042117#1042117


다른 버전의 Xcode가 설치되어 있습니까?

최신 Xcode를 연 다음 환경 설정 (Xcode 메뉴-> 환경 설정)으로 이동하고 위치 탭으로 전환 한 다음 명령 줄 도구가 Xcode 버전과 일치하는지 확인합니다.


xcodebuild또는 Xcode Server (또는 Xcode의 Organizer 창 이외의 다른 항목) 를 통해 빌드 하는 경우 IPA가 없습니다 SwiftSupport. 문제에 대한이 토론참조하십시오 .

해결책은 본질적으로 IPA를 직접 내보내는 것입니다. CaveJohnson 에는 올바른 SwiftSupport로 IPA를 내보내는 명령이 있으므로 다음과 같이 IPA를 빌드 할 수 있습니다.

cavejohnson xcodeGUITricks --archive-path my.xcarchive --new-ipa-path myapp.ipa

나는 똑같은 문제에 처해 있었고 제안 된 모든 것을 시도했지만 항상 실패했습니다 ... 내 앱은 SwiftSupport 폴더를 생성합니다. 방금이 솔루션으로 해결했습니다.

.ipa 파일을 보내 주셔서 감사합니다. 이 문제는 SwiftSupport 디렉토리의 libswiftXCTest.dylib로 인해 발생합니다. 해당 dylib는 테스트 대상에서 사용되며 개발 빌드에 포함되는 것은 정상이지만 App Store 용 아카이브 빌드에는이 dylib가 포함되지 않아야합니다.

이 문제를 해결하려면 다음 단계를 따르십시오.

  1. Xcode 프로젝트 열기
  2. 제품> 체계> 체계 편집을 선택합니다.
  3. 왼쪽 사이드 바에서 빌드를 클릭합니다.
  4. 테스트 대상의 경우 보관 확인란을 선택 취소합니다.
  5. 닫기 버튼을 클릭합니다
  6. 제품> 아카이브를 선택하십시오.
  7. App Store에 최신 아카이브 제출

나도이 문제가 있었다

EMBEDDED_CONTENT_CONTAINS_SWIFT의 플래그를 YES 및 NO로 설정하려고했습니다. 둘 다 나를 위해 일하지 않았습니다.

결국 Drew가 언급 한 CaveJohnson과 함께 시도했습니다. 그러나 그것도 작동하지 않았습니다.

마침내 새 프로젝트를 만들고 신속한 파일과 프레임 워크 등을 삽입했습니다. 그게 다였습니다!

제 경우의 해결책 : 새 프로젝트 만들기


좋아, 나는 이것에 대해 많은 시간 동안 일하고 마침내 해결책을 찾았습니다.

대답을 미리 구성하기 위해 내가 한 일은 다음과 같습니다.-이전 답변의 모든 것을 시도했습니다-Apple Tech 지원과 전화로 한 시간을 보냈습니다. -개발자 네트워크에서 "잘못된 신속"과 관련된 모든 Apple 개발자 포럼을 읽어보십시오. 제안 된 각 솔루션을 시도했습니다.

마침내 Xcode를 제거하고 다시 설치했으며 지금은 작동합니다. 때로는 이것이 솔루션에 대한 첫 번째 아이디어가 아닌 이유를 모르겠습니다 .


코드 서명을 확인하십시오. 자동 서명을 사용하는 동안이 오류가 발생했습니다. 개발자 용 개발 프로필을, 릴리스 버전 용 프로덕션 프로필을 입력했는데 오류가 사라졌습니다.


간단한 솔루션 :

안녕하세요, 나는 같은 문제가 있었고 아래는 해결책입니다.

Target, Project 및 testTarget과 같은 모든 곳의 빌드 설정에서 플래그 EMBEDDED_CONTENT_CONTAINS_SWIFTNO설정하십시오 .


메인 앱 빌드 설정에서 "Embedded Content Contains Swift Code"를 YES에서 NO로 변경 (확장 프로그램에서 YES로 설정)하면 시계 (및 전화)에서 실행된다는 사실을 발견했습니다. 바이너리를 업로드하는 동시에 Apple은 "Invalid Binary"로 표시된 다른 업로드 빌드가 "Processing"으로 되돌아 간 후 나중에 "Inactive"로 화면을 넘겼으므로 ITC 백엔드를 변경했을 것입니다.

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)


Here's a solution when using command line http://www.matrixprojects.net/p/xcodebuild-export-options-plist/

Basicly all what needs to be done is to create xcodebuild exportOptions plist file which looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>teamID</key>
        <string>MYTEAMID123</string>
        <key>method</key>
        <string>app-store</string>
        <key>uploadSymbols</key>
        <true/>
</dict>
</plist>

Most important key here is method app-store

And then run xcode build with archive

xcodebuild -scheme MyApp -archivePath builds/MyApp.xcarchive archive

After that run xcrun with export archive

xcrun xcodebuild -exportArchive -exportOptionsPlist exportPlist.plist -archivePath builds/MyApp.xcarchive -exportPath builds

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


seriously. I spent two days on this problem, and I tried all methods above. Nothing works!Finall. I used my friend's mac. And this time, it works. After that I realized that I downloaded the xcode from developer center not in mac app store. So I removed all xcode from my mac, and reinstall the xcode from app store, and it worked. And there is no difference between the two versions, which shared the exactly the same version number.


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.


We had a similar problem after upgrading to Xcode 7. Had to add the -exportOptionsPlist option and supply method and teamID. Messed things up but works now.


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 ;)


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!


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.


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.


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


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)

참고URL : https://stackoverflow.com/questions/26163856/invalid-swift-support-invalid-implementation-of-swift

반응형