I am using react-native to develope an iOS app. When I click on an error
on the iOS simulator, it opens Sublime Text
as the editor.
Is there a way to change the behaviour so it opens the error file in another IDE(webstorm)?
I've tried deleting Sublime Text or changing the file association in Get Info, none of them worked.
Specifying a device You can specify the device the simulator should run with the --simulator flag, followed by the device name as a string. The default is "iPhone 13" . If you wish to run your app on an iPhone SE (2nd generation), run npx react-native run-ios --simulator='iPhone SE (2nd generation)' .
Using Xcode directly The second way to build and run a React Native app is to use Xcode directly, which is the method I use. Inside Xcode navigate to File → Open and browse to your project directory. In the iOS folder, select appName. xcodeproject or appName.
You should add an environment variable named REACT_EDITOR
in your profile file and set it to your IDE of choice. I work with zshell so I added the following line to my .zshrc
file
export REACT_EDITOR="/Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea"
Don't forget to close all of your terminal windows and restart the react-native packager before you try it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With