프로그래밍/iOS
[ios] simulator용 라이브러리와 device용 라이브러리 합치기, lipo
삶의안식처
2015. 4. 9. 15:02
먼저 터미널로 해당 라이브러리가 있는 directory까지 접근한 후
(파일 클릭후 go2Shell 앱을 실행시키거나 터미널을 켠 후 cd 명령어로 찾아 들어가거나..)
lipo -output 결과파일 -create 디바이스라이브러리 -arch i386 시뮬레이터라이브러리
만약 디바이스라이브러리가 lib_device.a고 시뮬레이터라이브러리가 lib_sim.a 라면
lipo -output lib.a -create lib_device.a -arch i386 lib_sim.a
위와 같이 터미널에서 쓰면 된다.
만약 위와 같이 lipo 사용시 architecture specifed for fat input file
위와 같은 에러가 난다면
lipo -output lib.a -create lib_device.a lib_sim.a
위와 같이 사용하면 된다.