Skip to main content

πŸš€ React Native Quick Start

Prerequisites​

Step 1: Install package​

From Downloads:

yarn add /path/to/react-native-azeoo-lib-*.tgz
# or Bitbucket URL from downloads page

Step 2: Android Gradle (required)​

In project-level android/build.gradle:

apply from: "../node_modules/react-native-azeoo-lib/android/azeoolib-dependencies.gradle"

Step 3: Initialize​

import { AzeooSDK } from 'react-native-azeoo-lib';

await AzeooSDK.initialize('YOUR_API_KEY', {
locale: 'en',
analyticsEnabled: true,
offlineEnabled: true,
});

Step 4: Connect​

Pass a User JWT created by your backend. See Creating the User JWT for the payload spec and backend code examples.

await AzeooSDK.connect(
userJwt, // JWT from YOUR backend β€” see link above
gender,
height, // see Configuration for shape
weight,
);

Do not pass userId β€” the SDK resolves the user from the JWT.

Step 5: Show UI​

Use embedded components from the package (e.g. nutrition/training views) after connect succeeds.

Navigate programmatically:

import { Destination } from 'react-native-azeoo-lib';

AzeooSDK.navigate(Destination.nutrition.home());

Step 6: Lifecycle​

Forward app lifecycle when documented for your version:

AzeooSDK.onPause();
AzeooSDK.onResume();

Logout​

await AzeooSDK.disconnect();

Next steps​