Skip to content

Commit 9f5f8d3

Browse files
committed
remove onesignal from app.js
1 parent f96f6a5 commit 9f5f8d3

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

source/app.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import './globalize-fetch'
44
import './setup-moment'
5-
import OneSignal from 'react-native-onesignal'
65

76
import * as React from 'react'
87
import {Provider} from 'react-redux'
@@ -36,45 +35,13 @@ type Props = {}
3635

3736
export default class App extends React.Component<Props> {
3837
componentWillMount() {
39-
OneSignal.addEventListener('received', this.onReceived)
40-
OneSignal.addEventListener('opened', this.onOpened)
41-
OneSignal.addEventListener('registered', this.onRegistered)
42-
OneSignal.addEventListener('ids', this.onIds)
43-
44-
// When we finally want to ask for push notifications, enable this:
45-
// OneSignal.registerForPushNotifications()
46-
4738
startStatusBarColorChanger()
4839
}
4940

5041
componentWillUnmount() {
51-
OneSignal.removeEventListener('received', this.onReceived)
52-
OneSignal.removeEventListener('opened', this.onOpened)
53-
OneSignal.removeEventListener('registered', this.onRegistered)
54-
OneSignal.removeEventListener('ids', this.onIds)
55-
5642
stopStatusBarColorChanger()
5743
}
5844

59-
onReceived(notification: any) {
60-
console.log('Notification received:', notification)
61-
}
62-
63-
onOpened(openResult: any) {
64-
console.log('Message:', openResult.notification.payload.body)
65-
console.log('Data:', openResult.notification.payload.additionalData)
66-
console.log('isActive:', openResult.notification.isAppInFocus)
67-
console.log('openResult:', openResult)
68-
}
69-
70-
onRegistered(notifData: any) {
71-
console.log('Device is now registered for push notifications!', notifData)
72-
}
73-
74-
onIds(device: any) {
75-
console.log('Device info:', device)
76-
}
77-
7845
trackScreenChanges(
7946
prevState: NavigationState,
8047
currentState: NavigationState,

0 commit comments

Comments
 (0)