-
Notifications
You must be signed in to change notification settings - Fork 84
/
App.js
42 lines (34 loc) · 1.29 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
* @author Vadim Savin
*/
import React, { useEffect } from 'react';
import { StatusBar } from 'react-native';
import 'react-native-gesture-handler';
import Purchases from 'react-native-purchases';
import Router from './src/navigation/Router';
import { API_KEY } from './src/constants';
const App: () => React$Node = () => {
useEffect(() => {
/* Enable debug logs before calling `setup`. */
Purchases.setLogLevel(Purchases.LOG_LEVEL.DEBUG);
/*
Initialize the RevenueCat Purchases SDK.
- appUserID is nil, so an anonymous ID will be generated automatically by the Purchases SDK. Read more about Identifying Users here: https://docs.revenuecat.com/docs/user-ids
- observerMode is false, so Purchases will automatically handle finishing transactions. Read more about Observer Mode here: https://docs.revenuecat.com/docs/observer-mode
- useAmazon is false, so it will use the Play Store in Android and App Store in iOS by default.
*/
Purchases.configure({ apiKey: API_KEY, appUserID: null, observerMode: false, useAmazon: false });
}, []);
return (
<>
<StatusBar barStyle="light-content" />
<Router />
</>
);
};
export default App;