forked from Jellify-Music/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (33 loc) · 1.3 KB
/
Copy pathindex.js
File metadata and controls
37 lines (33 loc) · 1.3 KB
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
import 'react-native-gesture-handler'
import './globals'
// Initialize console override early - disable all console methods in production
import './src/utils/console-override'
import { AppRegistry, Platform, __DEV__ } from 'react-native'
import App from './App'
import { name as appName } from './app.json'
import { enableFreeze, enableScreens } from 'react-native-screens'
import { GLITCHTIP_DSN } from './src/configs/config'
import * as Sentry from '@sentry/react-native'
import registerNitroPlayer from './src/services/player'
import configureDownloadManager from './src/services/downloads'
enableScreens(true)
enableFreeze(true)
Sentry.init({
dsn: GLITCHTIP_DSN,
enableNative: !__DEV__,
tracesSampleRate: 0.01,
enableAutoSessionTracking: false,
enabled: !!GLITCHTIP_DSN,
})
registerNitroPlayer()
configureDownloadManager()
// Lazy require the CarPlayService on iOS so react-native-carplay's native
// module is never accessed on Android, as it's only linked for iOS in react-native.config.js
if (Platform.OS === 'ios') {
const { registerCarPlayService } = require('./src/services/carplay')
registerCarPlayService()
} else if (Platform.OS === 'android') {
const { registerAndroidAutoService } = require('./src/services/android-auto')
registerAndroidAutoService()
}
AppRegistry.registerComponent(appName, () => App)