- static library 정리
https://zeddios.tistory.com/1308
(Static/Dynamic) Library
안녕하세요 :) Zedd입니다. ~ 애플 문서를 보던 중 ~ Overview of Dynamic Libraries Overview of Dynamic Libraries Two important factors that determine the performance of apps are their launch times and their memory footprints. Reducing the size
zeddios.tistory.com
- staticlibrary로 나온 .a 파일과 헤더파일 → 헤더파일이 해당이름의 .a파일을 가르키고있기 때문에 .a파일의 이름을 바꾸게 되면 찾지못하고 에러가 뜨게된다.따라서 이를 구분해주기 위해 build setting에서 library search path를 지정해주어야한다. 만약 디버깅을 할 때 시뮬레이터, 디바이스용을 구분하고 싶다면 Debug안에 분기하여 path를 알맞게 적어주면 된다.
- 잊지말아야할 것은 build phases의 library link에 꼭 library.a를 넣어주어야 링크가 된다는 것!
- 따라서 시뮬레이터용과 디바이스용 static library가 같은 이름으로 되어있으면, xcode의 타겟의 General에서 frameworks, library…에 추가가 하나의 이름으로 된다. 왜냐하면 xcode는 같은 이름의 라이브러리 등의 파일을 동일시하다고 여기기 때문이다.
728x90
'개발일기 > IOS' 카테고리의 다른 글
iOS 개발할 때 유용한 사이트 모음 (0) | 2024.06.25 |
---|---|
UIView.animate 메모리릭 관련하여... (0) | 2024.06.25 |
Xcode build setting 때 inherited 의미 (0) | 2024.06.25 |
[Xcode] 멀티 디바이스 세팅(feat. rosetta) (0) | 2024.06.25 |
[Xcode] build setting - build active architecture only (0) | 2024.06.25 |