Installation
In this section, we will see how to clone the project and launch the tutorial application.
1. Clone the project​
To begin, you need to clone the tutorial project. To do so, open a terminal and run the following command:
git clone git@github.com:icure/icure-medical-device-react-native-app-tutorial-template.git
Alternatively, create a repository from the tutorial template (More information here).
2. Install dependencies​
Once the project is cloned, you need to install the project dependencies. To do so, open a terminal and run the following command:
yarn
3. Install pods (iOS only)​
If you want to run the application on iOS, you need to install the pods. To do so, open a terminal and run the following command:
yarn run pod-install
In case of issue with pod installation​
During the writing of this tutorial, we encountered an issue with pod installation.
Your Ruby version is X.X.X, but your Gemfile specified X.X.X​
If you installed XCode on your machine, it is possible that it installed as well a version of Ruby which is not compatible with the version required by ReactNative. If that's the case, the following error will output when executing the pod-install yarn command: Your Ruby version is X.X.X, but your Gemfile specified X.X.X
.
In this case, we suggest using RVM or rbenv to install a version of Ruby required by the project.
Once the Ruby version is installed, you will have to install the pods by using this additional command:
cd ios && bundle install && cd ..
yarn run pod-install
version X.X.X is not installed​
It is also possible that you don't have the Ruby version used by the tutorial project (See file .ruby-version) installed on your machine.
You will therefore have the error rbenv: version 'X.X.X' is not installed
.
To resolve this issue, use RVM or rbenv to install the required Ruby version.
pod: command not found​
When trying to install your pods, you can also get the error pod: command not found
.
To resolve this issue, you have to install the cocoapods gem using: sudo gem install cocoapods
.
Could not find ... in locally installed gems​
Pod-install command can also leads you to a similar error message: Could not find cocoapods-1.11.3, ... in locally installed gems
.
To resolve this issue, you will have to install the bundle manually to install the missing gems. For this, execute the following command:
cd ios && bundle install && cd ..
4. Launch the application​
Once the dependencies are installed, you need to launch the application to verify that everything is correct. To do so, open a terminal and run the following command:
- iOS
- Android
yarn run ios
yarn run android
Let's now configure your first iCure solution.