[lib] Carthage란?

Carthage

사용법

  1. Carthage 설치
    • brew를 사용한 설치
      brew install carthage
      
  2. Cartfile 생성
    • 다음과 같은 방법으로 파일 생성
      // 1번
      touch Cartfile
      // 2번
      vim Carfile
      
  3. Cartfile 안에 사용할 라이브러리 입력
    github "SwiftyJSON/SwiftyJSON" ~> 4.0
    
  4. carthage update
    carthage update
    // option: iOS와 관련된것만 설치
    carthage update --platform iOS
    // 빌드 에러시
    carthage update --use-xcframeworks
    
  5. 프로젝트에 라이브러리 연결
    • Link Binary With Libraries 에 Carthage -> Build -> iOS 안에 있는 .framework 파일 추가
  6. Build Phase에 run script 명령어 추가 스크린샷 2021-04-25 오후 6 06 37
  1. simulator 에러시
    • Build Setting -> build option에 있는 Vaildate workspace 를 yes로 변경
  2. gitignore
    • Carthage 폴더 추가 필수, 안하면 git에 대량의 파일들이 업로드된다..

참고 사이트

  1. 우아한형제들 기술 블로그
  2. Cartage 설치 방법