
ตรวจสอบเครื่อง Mac ว่ามี Runtimes หรือ iOS เวอร์ชั่นอะไรที่สามารถนำมาใช้งานได้ ด้วยคำสั่ง Terminal
xcrun simctl list runtimes
ผลลัพธ์

🕯️ ต้องลง XCode ก่อนนะ
คำสั่งสำหรับดู Device ที่รองรับ
xcrun simctl list devicetypes runtimes
ผลลัพธ์

เราจะใช้คำสั่งในรูปแบบ
xcrun simctl create “<name>” “<device type id>” “<runtime id>”
โดย
<name> ชื่อของ Simulator เป็นอะไรก็ได้
<device type id> id ของเครื่องที่เรามีอยู่
<runtime id> id ของ iOS ที่เรามีอยู่
ตัวอย่าง
xcrun simctl create "CreateByCommand" "iPhone 16 Pro" "com.apple.CoreSimulator.SimRuntime.iOS-18-3"
ผลลัพธ์

ใช้งานได้ด้วยคำสั่ง
xcrun simctl boot “<name>”
หรือ
xcrun simctl boot “<Identifier>”
ได้ด้วยคำสั่ง
xcrun simctl list devices
ผลลัพธ์
