iOS/Swift + Objective-c

[iOS] 프레임워크 시뮬레이터 아키텍처 삭제 (platform doesn't have any non-simulator SDKs)

안경 쓴 귀니 2020. 3. 6. 21:52
반응형

 

 

 

ios IPA 생성 시 아래와 같은 오류가 발생했다.

 

IPA processing failed

 

(해당 문제는 App Store Connect, Enterprise 시 발생하는듯?)

 

 

 

 

로그 파일로 자세히 보니 아래와 같은 오류가 있었다.

 

Configuration issue: platform AppleTVSimulator.platform doesn't have any non-simulator SDKs; ignoring it

Configuration issue: platform WatchSimulator.platform doesn't have any non-simulator SDKs; ignoring it

Configuration issue: platform iPhoneSimulator.platform doesn't have any non-simulator SDKs; ignoring it

 

이 오류는 앱에 시뮬레이터 아키텍처가 포함되어 있어서 생긴 문제다.

 

(시뮬레이터 아키텍처 : i386, x86_64)

 

사용하는 라이브러리에 시뮬레이터 아키텍처가 있는지 확인한다.

 

앱에 시뮬레이터 아키텍처가 포함되어있으면 간단하게 해결되지만,

사용하는 프레임워크에 있다면 아래와 같은 방법으로 확인하고 삭제를 진행한다.

 

 

프레임워크에서 아키텍처 확인법

터미널에서 프레임워크가 있는 폴더로 이동하여 아래 명령 실행

$ lipo -info 프레임워크명.framework/프레임워크명

실행 결과 : Architectures in the fat file: 프레임워크명.framework/프레임워크명 are: i386 x86_64 armv7 armv7s arm64 

 

 

 

프레임워크에서 시뮬레이터 아키텍처 삭제 방법

터미널에서 프레임워크가 있는 폴더로 이동하여 아래 명령 실행

$ lipo -remove i386 프레임워크명.framework/프레임워크명 -o 프레임워크명.framework/프레임워크명
$ lipo -remove x86_64 프레임워크명.framework/프레임워크명 -o 프레임워크명.framework/프레임워크명

삭제 후 조회 결과 : Architectures in the fat file: 프레임워크명.framework/프레임워크명 are:  armv7 armv7s arm64 

 

 

 

정적 라이브러리에서 아키텍처 확인법 (.a)

터미널에서 정적 라이브러리가 있는 폴더로 이동하여 아래 명령 실행

$ file 라이브러리명.a

실행 결과 :

라이브러리명.a: Mach-O universal binary with 2 architectures: [arm_v7:current ar archive random library] [arm64:current ar archive random library]

라이브러리명.a (for architecture armv7): current ar archive random library

라이브러리명.a (for architecture arm64): current ar archive random library

 

 

 

TIP

프레임워크명 입력할 때 앞에 몇글자만 입력한 후 Tab키를 누르면 자동으로 입력된다.

프레임워크명.framework/프레임워크명 => 프레임워크명 입력 중 Tab키 눌러서 자동완성하고, 다시 프레임워크명 입력 중 Tab 키 눌러서 자동완성 (총 2번 입력해야함)

 

 

관련 링크 : https://stackoverflow.com/questions/42641806/check-and-remove-unsupported-architecture-x86-64-i386-in-ipa-archive

반응형