I have been reading React Native's documentation as well as forums, and answers to similar questions but cannot figure out how to run my application on my device.
I have tried what was mentioned in this question "Run react-native application on iOS device directly from command line?", as well as deleting the build folder from the ios directory and rerunning the script. I will run this command npm run ios --device "Anthony’s iPhone"
, but it results in this Launching iPhone 6 (iOS 11.3)...
I have also tried running npm run ios --simulator "iPhone 5s"
but again I get Launching iPhone 6 (iOS 11.3)...
. I am not sure where to go from here, more information can be seen below. Of course, the simulator is always launched and functions properly but I would like to control whether it runs on a device or in which simulator.
Anthonys-MacBook-Pro:fitness-app anthonysette$ npm run ios --device "Anthony’s iPhone"
> FitnessApp@0.1.0 ios /Users/anthonysette/Documents/fitness-app
> react-native run-ios "Anthony’s iPhone"
Scanning folders for symlinks in /Users/anthonysette/Documents/fitness-app/node_modules (15ms)
Found Xcode workspace FitnessApp.xcworkspace
Launching iPhone 6 (iOS 11.3)...
Building using "xcodebuild -workspace FitnessApp.xcworkspace -configuration Debug -scheme FitnessApp -destination id=28DE4434-4D1A-4B5E-8C16-0AC2C101F8E0 -derivedDataPath build"
User defaults from command line:
Edit: Added info from package.json
My package.json has a portion called scripts which contains the following
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"rename": "node ./bin/rename.js",
"start": "react-native start",
"test": "jest"
},