XCode iOS 원하는 디바이스로 열기

출판일자 

읽는 데 걸리는 시간 1분


https://stackoverflow.com/questions/31179706/how-can-i-launch-the-ios-simulator-from-terminal 🔗

React Native 실행 시에 ios simulator 가 원하지 않는 타겟으로 열릴 때가 있는데,

react-native run-ios —simulator=“iPhone 14 Pro""

로 여는 것도 가능하지만, 프로젝트 열기전에 마치고 싶다면

xcrun simctl list 로 현재 맥에 설치된 시뮬레이터의 deviceId 를 얻어온다음 그걸로 simulator 를 연다.

내 맥에서 iphone 14 pro 는 사진1과 같이 나오고, iPhone 14 Pro (1D2B9448-EA54-4E30-9613-538E90870B79) (Booted)

명시된 GUID 같이 생긴 deviceId 로 시뮬레이터를 열면 끝.

open -a Simulator.app —args -CurrentDeviceUDID 1D2B9448-EA54-4E30-9613-538E90870B79