0

I am using react-native version .28 and created a project which works fine.

I can run it through two ways either from xcode and other from command: react-native run-ios

But I do not want to use Xcode, I only want to use the command, but through command, I can chose only a default device: Iphone 6(9.2)

How can I change the device?

Cœur
39k25 gold badges206 silver badges281 bronze badges
asked Jul 1, 2016 at 4:39
3
  • Possible duplicate of React Native Change Default iOS Simulator Device Commented Jul 1, 2016 at 5:48
  • @DanielBasedow My question is totally different, I want to know How to change the device like from iphone 5s to 6? Commented Jul 1, 2016 at 10:38
  • What do you mean by "change"? If you want to run on iPhone 5s you use react-native run-ios --simulator="iPhone 5s" if you want to run on iPhone 6 you type react-native run-ios --simulator="iPhone 6" Commented Jul 1, 2016 at 11:10

1 Answer 1

0

Yes, You can change the device by running:

react-native run-ios --simulator="iPhone 6" 

or if you want to make it default you can create an alias at ~/.bash_profile file:

alias rn-iphone6="react-native run-ios --simulator \"iPhone 6\""

after that run it by the created alias:

rn-iphone6
answered Aug 12, 2016 at 11:04
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.