-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
30 lines (26 loc) · 1.02 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
/**
* @format
*/
import "react-native-gesture-handler"; // First import to prevent crashes in iOS (https://docs.swmansion.com/react-native-gesture-handler/docs/fundamentals/installation#ios)
import { AppRegistry } from "react-native";
import { sanitizeErrorForRollbar } from "./source/logic/utils";
import { rollbar, rollbarInit } from "./source/logic/rollbar";
import { trackPlayerInit } from "./source/logic/songs/audiofiles/playerservice";
import App from "./source/App";
import { name as appName } from "./app.json";
try {
rollbarInit();
} catch (error) {
rollbar.error("Failed to initialize rollbar", sanitizeErrorForRollbar(error));
}
try {
AppRegistry.registerComponent(appName, () => App);
} catch (error) {
rollbar.error("Failed to register app", sanitizeErrorForRollbar(error));
}
try {
const TrackPlayer = require("react-native-track-player").default;
TrackPlayer.registerPlaybackService(() => trackPlayerInit);
} catch (error) {
rollbar.error("Failed to register TrackPlayer", sanitizeErrorForRollbar(error));
}