
👋 들어가기 전
어제 면접을 맞치고 돌아온 후, 결과 발표전까지 무엇을 할까
고민중, 과제를 하면서 swift와 UIKit은 한번 점검을 했으니 xcodebuild 커맨드를 한번
정리하고 가면 좋을 것 같다고 생각이 들었다.
🧹 clean
⭐️ 역할
기존 빌드 결과물을 삭제하여 깨끗한 상태에서 다시 빌드할 수 있게 만들어준다.
🤖 사용
xcodebuild clean [clean 후 실형될 명령어]
보통 위와 같이 어떤 명령어를 실행하기 전 앞에서 clean을 해준다.
🧪 test
⭐️ 역할
테스트를 실행한다.
🤖 사용
xcodebuild test \
[-workspace <your_workspace_name>] \
[-project <your_project_name>] \
-scheme <your_scheme_name> \
-destination <destination-specifier> \
[-only-testing:<test-identifier>] \
[-skip-testing:<test-identifier>]
xcodebuild build-for-testing \
[-workspace <your_workspace_name>] \
[-project <your_project_name>] \
-scheme <your_scheme_name> \
-destination <destination-specifier> \
xcodebuild test-without-building \
[-workspace <your_workspace_name>] \
[-project <your_project_name>] \
-scheme <your_scheme_name> \
-destination <destination-specifier> \
[-only-testing:<test-identifier>] \
[-skip-testing:<test-identifier>] \
xcodebuild test-without-building
-xctestrun <your_xctestrun_name>.xctestrun \
-destination <destination-specifier> \
[-only-testing:<test-identifier>] \
[-skip-testing:<test-identifier>]
📋 list
⭐️ 역할
사용 가능한 타겟, 스킴, 설정 확인
🤖 사용
xcodebuild -list

📱simctl list
⭐️ 역할
사용 가능한 시뮬레이터 및 디바이스 목록
🤖 사용
xcrun simctl list

🧰 select
⭐️ 역할
특정 Xcode 버전을 사용
🤖 사용
sudo xcode-select -s /Applications/Xcode_16.0.app/Contents/Developer
출처
'CI-CD' 카테고리의 다른 글
Fastlane (2) 출시 및 배포 (0) | 2025.02.13 |
---|---|
Fastlane (1) 설치 및 테스트 (0) | 2025.02.12 |