IT박스

유효성 검사 오류 : 잘못된 번들입니다.

itboxs 2020. 6. 12. 21:51
반응형

유효성 검사 오류 : 잘못된 번들입니다. …의 번들에 허용되지 않는 파일 'Frameworks'가 포함되어 있습니다.


Xcode6 GM으로 앱을 제출하려고하는데 유효성 검사 시이 오류가 발생합니다. 이 앱에는 액션 확장 프로그램과 확장 프로그램과 앱 자체간에 공유되는 동적 프레임 워크가 있습니다.

프로젝트 어딘가에 'Frameworks'라는 파일이 없으므로 이것이 무엇을 의미하는지 잘 모르겠습니다. 누구 든지이 문제를 겪었거나 아이디어가 있습니까?오류는 다음과 같습니다


오류는 Swift 사용과 관련이 있습니다 (앱과 확장 프로그램 모두 Swift를 사용함).

응용 프로그램의 경우 다음을 설정해야했습니다.

Embedded Content Contains Swift Code: YES

그리고 연장을 위해 :

Embedded Content Contains Swift Code: NO

Xcode 8 및 9

Always Embed Swift Standard LibrariesXcode 8 및 9에서 이름이 다음과 같이 변경되었습니다 .

Always Embed Swift Standard Libraries: YES

그리고 연장을 위해 :

Always Embed Swift Standard Libraries: NO

나를 위해 일한 유일한 해결책은이 실행 스크립트를 App Extension 대상에 추가하는 것입니다.

cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/"
if [[ -d "Frameworks" ]]; then 
    rm -fr Frameworks
fi

여기에 이미지 설명을 입력하십시오 출처 : https://github.com/CocoaPods/CocoaPods/issues/4203


빌드 설정에서이 문제를 해결하는 3 단계

  1. 컨테이너 앱 : Embedded Content Contains Swift Code: YES
  2. 신장: Embedded Content Contains Swift Code: NO
  3. 확장명 : Runpath Search Path = @executable_path/../../Frameworks

내 경우에는 방금 CocoaPods 1.0.1로 업그레이드했는데 이것은 새로운 버그 인 것 같습니다.

포드 업데이트는 내 확장의 대상에 실행 스크립트를 추가하여 Frameworks 폴더를 만듭니다. @Roman의 실행 스크립트를 추가하여 제거하려고했습니다.

해결책은 확장의 빌드 단계에서이 스크립트를 삭제하는 것이 었습니다. 여기에 가야했던 것이 있습니다 ...

여기에 이미지 설명을 입력하십시오


제목에 단어가있는 확장의 모든 빌드 단계제거하십시오 embed.

또한 :

  • Yes확장 대상에 포함 된 컨텐츠에는 스위프트 코드포함되어 있어야합니다 .

None of the above answers worked for me. This was because the error was caused not by the parent app or it's extension. Rather one of the linked libraries was at fault.

To confirm, first archive using Xcode then using Organiser select the entry and locate using Show in Finder. This will show the .xcarchive file.

Select that file and choose "Show Package Contents".

Select the .app in the Products/Applications folder and again choose "Show Package Contents".

Locate the offending module in the Frameworks folder. For example if the error is:

ERROR ITMS-90206: "Invalid Bundle. The bundle at 'MyApp.app/Frameworks/MyLib.framework' contains disallowed file 'Frameworks'."

Then in the Frameworks/MyLib.framework the following will probably be visible:

../Frameworks/libswiftContacts.dylib
../Frameworks/libswiftCore.dylib
../Frameworks/libswiftCoreData.dylib
../Frameworks/libswiftCoreGraphics.dylib
../Frameworks/libswiftCoreImage.dylib
../Frameworks/libswiftCoreLocation.dylib
../Frameworks/libswiftDarwin.dylib
../Frameworks/libswiftDispatch.dylib
../Frameworks/libswiftFoundation.dylib
../Frameworks/libswiftLocalAuthentication.dylib
../Frameworks/libswiftObjectiveC.dylib
../Frameworks/libswiftPassKit.dylib
../Frameworks/libswiftUIKit.dylib
../Frameworks/libswiftWebKit.dylib

These are present because the linked library - or module - that the parent app includes has the EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;

Locate the dependent module in Xcode and update the flag:

여기에 이미지 설명을 입력하십시오

Note that having overcome this issue the app may still be rejected with an explanatory email from the iTunes Store:

Invalid Swift Support - The Watch OS application has Swift libraries at both...

Again this comes back to the EMBEDDED_CONTENT_CONTAINS_SWIFT flag. Ensure that only the parent app has this set to YES. Both the WatchKit app and extension must have this flag set to NO. This is as detailed in @Mike's answer above.


In my case the solution was to remove my framework from my extension's Embedded Binaries and add it to my extension's Linked Frameworks and Libraries. (Both can be found in the extension's General tab.)


In my case, there was one CocoaPod library "Blockly" that was specifying Yes for "Always Embed Swift Standard Libraries". After making NO for the option, it worked.여기에 이미지 설명을 입력하십시오


If Embed Pods Frameworks script and Roman's script both exist in the same target.

Please check if the Embed Pods Frameworks locates before the other one. If not, just move Roman's script to the last.


I was unable to find any settings for Embedded Content Contains Swift Code but I was able to find a setting Always Embed Swift Standard Libraries and setting this to NO for my framework did fix this issue.


  1. Container App: Build Setting -> Embedded Content Contains Swift Code: YES
  2. Extension: Build Setting -> Embedded Content Contains Swift Code: NO
  3. Extension: Build Phase -> added the following Run Script in

cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/" if [[ -d "Frameworks" ]]; then rm -fr Frameworks fi

  1. (important)Extension: Build Phase -> move the Run Script to the Last (after Embed Pods Frameworks script )

If you're using CocoaPods, I would consider deleting the Embed frameworks build phase on the problematic target (the extension), this fixed the problem for me.


I found lots of questions like this and none helped me fix my problem, so hopefully this might help someone.

I'm creating an app that has an Intent extension (for Siri shortcuts) and I'm using a framework for code shared between the extension and my app, as recommended by Apple.

I had added my framework to my extension in the "Frameworks and Libraries" section of the "General" settings for the target. When you add a framework here, there are two columns. One says the name of the framework and the other is titled "Embed". I had nothing showing up in the "Embed" column so I thought that was fine, but I had to explicitly choose a "Do Not Embed" option for that column for my framework. When I did that and archived in Xcode, I could see during validation that the framework wasn't listed in my ipa content under each target anymore, but just once, and validation succeeded finally.


I had this problem the first time with XCode 7.1.1 for my app that has a Today Extension (there is no Swift in my project). The script (https://github.com/CocoaPods/CocoaPods/issues/4203) didn't work for me.

Downgrading cocoapods to version 0.39.0.beta.3, running pod install, and then re-archiving solved the problem.


I was getting this same error, along with a

Disallowed nested bundles error

My problem was with the SquareReaderSDK.framework specifically but I had to add a new run script per their instructions:

FRAMEWORKS="${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
"${FRAMEWORKS}/SquareReaderSDK.framework/setup"

None of the Build Settings listed here resolved this issue for me. However, I did get this to work after moving some frameworks from "Embedded Binaries" to "Linked Frameworks and Libraries".

It appears that my main app and one of my custom frameworks had the same framework dependency in both and that seems to be a No No but moving it in my main app from the Embedded area to the Linked area allowed me to upload the app successfully with no errors.


I was getting the same error, and it is because I was copying the framework into the extension bundle. As it turns out, frameworks that are used by the extension should be copied into the Main App bundle and only linked in the extension build settings (not copied). Be sure to have the search path '@executable_path/../../Frameworks' in the extension build. I think that path was added automatically by XCode 10.

참고URL : https://stackoverflow.com/questions/25777958/validation-error-invalid-bundle-the-bundle-at-contains-disallowed-file-fr

반응형