In this tutorial, we are going to learn how to quickly build our premium React Native Fitness app. Our fitness app template is fully functional and can be quickly started by following a couple of basic npm/react-native commands. Without further ado, let’s see how you can make a mobile native app by leveraging our premium fitness app template, fully coded in React Native. We are going to assume that you have Node.js already installed on your computer. If you don’t, just head over to the documentation and install it.
Running the Fitness App Template on Android
To run our fitness app template on Android, you either need a real Android device or an Android emulator. To install an Android emulator, you can simply install Android Studio, which comes with emulators by default. You can use Android Studio to start those emulators as well, from the AVD Manager.
- Connect your Android device or Open an Android Emulator
- In your terminal, change directory to the unarchived app template folder and run:
yarn install && react-native run-android
That’s it. Once this build finishes, you will be able to see the app running on your Android device. Easy, right?
Running the Fitness App Template on iOS
Similarly, to run our fitness app template on iOS, you will need a real iOS device (iPhone or iPad) or an iOS Simulator. To install & open an iOS Simulator, you can simply install Xcode.
- Connect your iPhone / Open an iOS Simulator
- In your terminal, change directory to the unarchived app template folder and run
yarn install
Once this command finishes, go ahead with the next step.
- In your terminal, change directory to the ios folder and install the Cocoapods dependencies.
cd ios && pod install
If you don’t have Cocoapods installed, you can do so by following the official documentation.
- Open FitnessApp.xcworkspace in Xcode This file lives under the ios folder. Please make sure you open the correct file, otherwise, the React Native project won’t work.
- In your terminal, open the metro bundler by running
npm start
- Run project in Xcode, by pressing Command + R in Xcode, or by clicking the “Play” button on top
That’s it. You can now play with the app on the simulator / on your iPhone, as pictured below: