Installation
1. Create a Github Personal Access Token (classic) with read:packages
access selected.
2. Create an .npmrc
file in the root of your project with the following lines replacing GITHUB_ACCESS_TOKEN
with the token you've created.
//npm.pkg.github.com/:_authToken=GITHUB_ACCESS_TOKEN
@passiolife:registry=https://npm.pkg.github.com
3. Add the Passio SDK dependency to your package.json
and run npm install
or yarn
.
npm install @passiolife/nutritionai-react-native-sdk-v3
or
yarn add @passiolife/nutritionai-react-native-sdk-v3
4. Ensure the native dependencies are linked to your app.
If your project uses Expo, follow the steps below to work with a rebuild. Ignore the following command if your project is not based on Expo.
npx expo prebuild --clean
For iOS, run pod install.
cd ios; pod install
If pod install is failed with error message Specs satisfying the ReactNativePassioSDK (from ../node_modules/@passiolife/nutritionai-react-native-sdk-v3) dependency were found, but they required a higher minimum deployment target.
, ensure Podfile is configured with minimum ios version '13.0'
platform :ios, '13.0'
Also for Android, make sure the android project is configured with minSdkVersion 26 or above (check the project's build.gradle
file).
buildscript {
ext {
...
minSdkVersion = 26
...
}
}
If at any point you need help from the Passio team, please reach out to us at support@passiolife.com
If your project uses Expo, follow the steps below to work with a rebuild:
Last updated