L-j-h-c/TIL

[Project] tuist 사용하기

Opened this issue · 1 comments

Tuist란?

Tuist는 Xcode projects와 상호작용하고, 유지보수하고, 생성할 수 있게 도와주는 command line tool이다.
기존에 팀 단위 협업을 할 때에 파일의 생성, 디렉토리 변경, 수정 등의 이유로 xcode project 파일이 바뀌어서 Merge 시에 conflict를 모두 수동으로 해결해야 하는 경우가 빈번했다. Tuist는

tuist 설치하기

bash <(curl -Ls https://install.tuist.io)

원하는 디렉토리로 이동후에 tuist init 하기

tuist init --platform ios

여기까지 하면 tuist가 초기화된 프로젝트가 생성된다.
image

전체적으로 아래와 같은 구조를 가진다.

  • Plugins / { 프로젝트 이름 } /
    • Package.swift
    • Plugins.swift
    • ProjectDescriptionHelpers/
    • Sources
  • Targets /
    • { 프로젝트 이름 } /
    • { 프로젝트 이름 } Kit /
    • { 프로젝트 이름 } UI /
  • Tuist /
    • Config.swift
    • ProjectDescriptionHelpers /
  • Project.swift

image

Project.Swift

Project(
    name: "",
    organizationName: "",
    options: .options(),
    packages: [],
    settings: .settings(),
    targets: [],
    schemes: [],
    fileHeaderTemplate: nil,
    additionalFiles: [],
    resourceSynthesizers: []
)

SceneDelegate

SceneDeleagte에서 실행되게 하기