How to run react native app in iOS Stimulator?
I'm using npm run ios
but I'm getting this error missing srcipt: ios
How to solve this?
How to run react native app in iOS Stimulator?
I'm using npm run ios
but I'm getting this error missing srcipt: ios
How to solve this?
You can run your project with just simple
react-native run-ios
And if you want to run on any particular simulator device run this
react-native run-ios --simulator="iPhone 6s" // Check your available devices
Usually we have package.json
with any command line scripts, for example:
"scripts": {
"test": "node ./node_modules/jest/bin/jest.js --watchAll",
"dev": "exp start --dev --lan",
"build-android": "exp build:android",
"build-ios": "exp build:ios"
},
In your case, I am not sure from which source you initialized or cloned your project. But you will need to add and you can add without any issue the missing scripts.
You can label them by anything, e.g. "test"
can be named by "mytest"
.
The example I have given above, you can see command exp
, this is a module that you will need to install globally in order to run this command.
using npm install -g exp
command. Then you can run the custom added scripts.
Find anything confusing, ask again.
Did you try running react-native run-ios
?
https://facebook.github.io/react-native/docs/running-on-simulator-ios.html
If that doesn't work, you can always open project-directory/app/ios/[your-project-name].xcodeproj in xcode, and run the simulator in xcode directly.