TypeError: RNPushNotification.getInitialNotification is not a function
See original GitHub issueHi guys,
I’m having some issues, before update to 2.0.1
I was able to call PushNotification.configure
from componentWillMount
lifecycle method, but now it throws a warning and the app do not load (white screen).
Here’s the code:
import PushNotification from 'react-native-push-notification'
module.exports = React.createClass({
componentWillMount() {
PushNotification.configure({
onNotification: function(notification) {
console.log(notification)
},
})
},
...
})
Any idea what could be the problem?
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
react-native-push-notification is undefined - Stack Overflow
Its all working on iOS but on android I get undefined is not an object(evaluating RNPushnotification.getInitialNotifications).
Read more >cljsrn 2022-01-29 - Slack Archive
Could not evaluate form: (function (){try{return ... [TypeError: null is not an object (evaluating 'RNPushNotification.
Read more >Discussion of React Native Push Notifications
getInitialNotification() , in order to get the initial notification on iOS. ... typeError null:null is not an object evaluating.this.
Read more >react-native-push-notification - npm
java ensure that function includes a super call on onNewIntent (if your MainActivity.java does not have an @Override for onNewIntent skip this):.
Read more >messaging | React Native Firebase
getInitialNotification (): Promise<RemoteMessage | null>;. getIsHeadless. </>. Returns whether the root view is headless or not i.e true if the app was ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same problem, using android 6.0 “react-native”: “0.49.3”, “react-native-push-notification”: “^3.0.1” any solution?
TypeError: RNPushNotification.getInitialNotification is not a function I am implemented this with Expo ,is this working with Expo Applications? I have the same problem, using Android 10 “react-native-push-notification”: “^3.0.1” I am using Android 10 any solution?