DEV Community

Nguyễn Hữu Hiếu
Nguyễn Hữu Hiếu

Posted on • Edited on

3 3

react-native: run application on specific ios simulator

This post will guide you how to run your application on specific ios simulator

# list all ios simulator
xcrun simctl list devices
# == Devices ==
# -- iOS 13.3 --
#    iPhone 8 (F71514A5-9B42-4FFF-93B0-AAAA)
#    iPhone 8 Plus (EE9676FF-8508-4B7C-B955-BBBB) 

# -- iOS 13.6 --
#    iPhone 8 (F71514A5-9B42-4FFF-93B0-XXXX)
#    iPhone 8 Plus (EE9676FF-8508-4B7C-B955-YYYY) 

Enter fullscreen mode Exit fullscreen mode

Run with device name

// package.json
{
  "scripts": {
    "start:iphone8": "react-native run-ios --simulator='iPhone 8'"
    // will choose F71514A5-9B42-4FFF-93B0-AAAA
  }
}
Enter fullscreen mode Exit fullscreen mode

Run with uuid

  • In some case you want to specific version of iOS (13.3, 13.6)
// package.json
{
  "scripts": {
    "start:iphone8Plus": "react-native run-ios --udid EE9676FF-8508-4B7C-B955-YYYY"
  }
}
Enter fullscreen mode Exit fullscreen mode

Run on the real device

npx react-native run-ios --configuration Release --device 'Boss's iPhone'
Enter fullscreen mode Exit fullscreen mode

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay