-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.js
44 lines (38 loc) · 1.12 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @format
*/
if (__DEV__) {
global.XMLHttpRequest = global.originalXMLHttpRequest ?
global.originalXMLHttpRequest :
global.XMLHttpRequest;
global.FormData = global.originalFormData ?
global.originalFormData :
global.FormData;
global.Blob = global.originalBlob ?
global.originalBlob :
global.Blob;
global.FileReader = global.originalFileReader ?
global.originalFileReader :
global.FileReader;
}
console.disableYellowBox = true;
import {AppRegistry, Alert} from 'react-native';
import App from './App';
import EmbeddedView from './EmbeddedView';
import {name as appName} from './app.json';
import {Navigation} from "./src/AliceSDK/Navigation";
import {setJSExceptionHandler, setNativeExceptionHandler} from 'react-native-exception-handler';
const exceptionhandler = (error, isFatal) => {
Navigation.goHome();
Alert.alert(
'App Crashed',
error,
[
{text: 'OK'},
],
);
};
setNativeExceptionHandler(exceptionhandler);
setJSExceptionHandler(exceptionhandler);
AppRegistry.registerComponent('EmbeddedView', () => EmbeddedView);
AppRegistry.registerComponent(appName, () => App);