Tuist

Tuist 사용법 및 에러 모음

bamtorii 2023. 8. 24. 12:59
반응형

Tuist 사용법

1. 프로젝트 클론

 

2. tuist 설치

-  터미널에 curl -Ls <https://install.tuist.io> | bash 입력

 

3. tuist clean 명령어 입력

 

4. tuist fetch 명령어 입력

 

5. tuist generate 명령어 입력

 

→  이후에 tuist edit할 경우 3,4,5 과정 수행

(정확히 말하면 345를 항상 모두 수행할 필요는 없는걸로 아는데 자세한 내용은 구글에서 검색하시길..)


Carthage was not found in the environment. 에러

 

tuist fetch 시 다음과 같은 에러 발생.

 

이 경우 cartage가 설치되어 있지 않은 상태이기 때문에

brew install carthage
명령어를 통해 carthage를 설치해주면 된다.

 


tuist fetch 명령어 실행 시 에러

error: terminated(1): /usr/bin/xcrun --sdk macosx --show-sdk-platform-path output:

xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation

xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

 

과 같은 에러가 발생할 경우

 

명령어 입력 1:

$ xcrun --show-sdk-path --sdk macosx

 

출력 결과:

/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk

 

명령어 입력2:

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

 

참고 링크:

https://stackoverflow.com/questions/43418533/running-swift-build-in-terminal-leading-to-platform-path-errors

 

Running Swift build in Terminal leading to "Platform Path" errors

I recently reformatted my Mac. Today I tried building a swift executable via Terminal to start a server-side swift project. Here are the commands I've used: swift package init --type executable sw...

stackoverflow.com

 


경로 관련 에러

~/Sources 혹은 Resources 폴더가 없다는 경고문 출력시 해당 경로에 Sources/Resources 폴더 추가 후 tuist generate 명령어 입력

(다른 파일들도 마찬가지)

 

접근제어자 관련 에러

작업 도중 “모듈 내 AClass를 찾을 수 없다”와 같은 문구가 출력될 수도 있습니다.

해당 원인 발생 이유가 여러가지가 있을 수 있지만 먼저 AClass를 public으로 선언했는지 확인해주세요.

모듈들이 분리되어 있기 때문에 다른 모듈에 접근하기 위해서는 public으로 선언해주어야 합니다.


참고 문헌:

[iOS] 준 Clean Architecture With RIBs, ReactorKit 그리고 Tuist를 이용한 프로젝트 모듈화 설계(2) - Tuist

https://minsone.github.io/mac/ios/ios-clean-architecture-with-ribs-reactorkit-and-modularization-using-tuist-2

현재 Tuist edit 참고:

https://cheonsong.tistory.com/15

반응형