-
Notifications
You must be signed in to change notification settings - Fork 24
/
index.js
30 lines (25 loc) · 1015 Bytes
/
index.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
/**
* Copyright (c) Hathor Labs and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import './i18nInit';
import { AppRegistry } from 'react-native';
import { setJSExceptionHandler } from 'react-native-exception-handler';
import App from './src/App';
import { name as appName } from './app.json';
import { errorHandler } from './src/errorHandler';
import {
setBackgroundMessageListener,
setNotifeeBackgroundListener,
} from './src/workers/backgroundListeners';
// Set the background listeners for push notifications
setNotifeeBackgroundListener();
setBackgroundMessageListener();
// - errorHandler is the callback
// - second parameter is an optional boolean and defines the error handler behavior
// If set to true the handler will be called in place of red screen
// in development mode also (default is false)
setJSExceptionHandler(errorHandler);
AppRegistry.registerComponent(appName, () => App);