![run react native on android emulator mac run react native on android emulator mac](https://user-images.githubusercontent.com/27573161/79906865-2ff1a280-844b-11ea-89d7-eda329cfbafa.png)
- #RUN REACT NATIVE ON ANDROID EMULATOR MAC INSTALL#
- #RUN REACT NATIVE ON ANDROID EMULATOR MAC CODE#
- #RUN REACT NATIVE ON ANDROID EMULATOR MAC SIMULATOR#
I suppose this shouldn’t be surprising, but after working on some Swift projects, it felt like going backwards a bit. In the /ios directory, you find the standard header. I was a little disappointed to find the Objective-C iOS project under the hood.
#RUN REACT NATIVE ON ANDROID EMULATOR MAC SIMULATOR#
Having done a fair amout of iOS development in the past, I was able to identify the root cause as a disabled simulator hardware keyboard. The other issue I ran into was not being able to Cmd R to hot-reload changes in the iOS simulator. I had a hunch that my version of Watchman was possibly out of date, so I reinstalled it via: Note the message: Loading dependency graph./Users/matt/Library/LaunchAgents/.plist: Could not find specified service The initial terminal window that launched alongside the iOS simulator looked like this: The iOS setup was simple, though I did run into two smaller issues that were easy to fix. That was it! Everything was up and running in about 10 minutes. After cding into the DemoProject directory and running the following,Ī terminal window launched, and the Hello World app started up in the iOS simulator. Have an Android emulator running (quickest way to get started), or a device connected Running this results in the following output:Ĭd /Users/matt/repo/blog_posts/react-native/DemoProject Once that was done, I created a project directory and initialized a new React Native project into it.
#RUN REACT NATIVE ON ANDROID EMULATOR MAC INSTALL#
I already had Xcode, Node, and Watchman installed, but I still needed to install the react-native-cli. Since you have to choose one, I chose iOS first, then went back and set up the Android environment afterwards. I’m using macOS, but I wanted to set up something that could target both iOS and Android. The instructions require you to choose a development platform and a target OS.
#RUN REACT NATIVE ON ANDROID EMULATOR MAC CODE#
Instead, I followed the Building Projects with Native Code instructions. I opted against it because of the caveats described in the docs. One approach to set up a project uses create-react-native-app. To set up my development environment, I followed the instructions in the React Native docs. I was able to get the Hello World app up and running on both iOS and Android in less than an hour. I was happy to find that my experience was the exact opposite. Ignoring React Native’s complexity as a development platform, I have also heard that it’s a huge pain to set it up and get running. However, I had never set up or used React Native prior to this experiment. Note that I went into this having some experience with both React and native mobile development. I chose to l/xoad trending gifs from Giphy, because who doesn’t love gifs? Writing a simple, unpolished app with cross-platform tabbed navigation that loads some data from the cloud.Setting up and configuring a React Native development environment that targets both iOS and Android.In this post, I’ll walk through my experience with: Since I have no React Native experience, I wanted to understand how much work is required to get started. The idea of using a React (and Redux) approach to developing cross-platform-ish native apps is really appealing. I’ve been watching React Native for a while.