This library provides a RNInfomaniakOnboardingView component that displays the onboarding screens and manages the entire login flow. After a successful login, the view returns a list of access tokens.
<RNInfomaniakOnboardingView
loginConfiguration={{
...
}}
onboardingConfiguration={{
...
}}
onLoginSuccess={(event) => console.log(event.nativeEvent.accessTokens)}
onLoginError={(event) => console.error(event.nativeEvent.error)}
/>Check the example app: example/App.tsx
See all available options: src/RNInfomaniakOnboarding.types.ts
This project use a module with a custom flavor dimension distribution� with the flavors standard� and fdroid�.
If the project app doesn't define this dimension, you must tell Gradle which flavor to use when resolving the dependency.
In your android/app/build.gradle�, add the following inside the android { defaultConfig { ... } }� block:
android {
defaultConfig {
// Choose the flavor of the library to use when your app
// doesn't define the "distribution" flavor dimension.'
missingDimensionStartegy 'distribution', 'standard'
}
}- Install Node.js https://nodejs.org/en/download
- Install dependencies from the root of the project
npm install
- Make sure your Android Studio is closed before doing this. From the root of the git project, open Android Studio via terminal
so it inherits your Node install:
open -a "Android Studio" example/android - Navigate to the example app:
cd example - Install dependencies from the root of this example project
npm install
- Start the Expo development server (keep this terminal open):
npx expo start - In Android Studio, run the example app as a regular Android project.
Important
Whatever you do, do not use "Expo Go"
- If you use Proxyman, make sure it's correctly setup because if the api calls do not work they app won't be able to run correctly at all when you try to build it on the emulator.