MacinCloud Managed Servers have many frameworks pre-installed to help you get started with Mobile development right out of the box. React Native is pre-installed on MacinCloud Managed Servers and is ready to generate a project. This article explains how to initialize your React Native app on macOS.
If you would like to have full control of your development environment with sudo/admin access, we recommend the Dedicated Server Plan. With this plan, you will be able to manage all dependencies without contacting our support team.
Along with React Native, there are other dependencies that work hand-in-hand with React Native. Note that the dependencies below are also pre-installed on the Managed Server Plan:
Here are other articles that may be useful for you!
Initializing your React Native App
Note: MacinCloud provides technical support to service your Mac server. If you have questions or issues regarding development, please look at native documentation or contact the support team for the respective software.
In order to initialize your application with React Native, you must run the command below. This will create your project within the directory that you are in at the time of running the command.
npx react-native init <Your Project Name Goes Here>
Once you have initialized your application, you should see the following image and output below.
Next, you must start metro before boot your application onto an iOS Simulator. To do this, change directories into the project folder that was generated with your project name, and then run the command below.
npx react-native start
Once you have initialized metro, you should see the following image and output below.
Your application is now ready to be opened within an iOS Simulator. Open a new tab within the terminal window or open a completely new terminal window within the project directory. Boot the application within a simulator using the command below. Note, building an application onto a simulator may take a couple minutes.
If your application booted successfully, you should see the following prompt within the terminal window, along with the following application within the iOS simulator.
Interested in MacinCloud Managed Servers?
Visit the Managed Server Plan page to obtain a Managed server.
Do you require full root/admin privileges on a MacinCloud Server?
Visit the Dedicated Server Plan page to obtain a Dedicated Server.