question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Local notification is seen on simulator but not on real device.

See original GitHub issue
export default class App extends Component {
  componentDidMount() {
    setTimeout(() => {
      PushNotification.localNotification({
        message: 'My Notification Message', // (required)
      });
    }, 10000);
  }
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js
        </Text>
        <Text style={styles.instructions}>
          Press Cmd+R to reload,{'\n'}
          Cmd+D or shake for dev menu
        </Text>
      </View>
    );
  }
}

This code works find on simulator and displays a local notification. However, it doesn’t show anything on real device. Any idea what’s causing this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18

github_iconTop GitHub Comments

1reaction
iBichacommented, Jun 7, 2017

It can be a permission issue

0reactions
goldyluckscommented, Apr 14, 2022

?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ios - Local notifications are not working on device but working ...
The main problem is that this method works only on simulator with iOS version 8.0 and it doesn't work on iPhone 4 with...
Read more >
Local Notification is shown in simulator but not on the device.
Hi @katzer im having a problem on local notification for IOS. my problem is it is showing in the simulator but when i...
Read more >
Local Notification not working in Background Mode
Everything works fine in simulator, i can see notifications are displayed in foreground as well as background mode. But when i run the...
Read more >
Not getting local notification in IOS neither on simulator nor on ...
Coding example for the question Not getting local notification in IOS neither on simulator nor on physical device.
Read more >
Send Push Notifications to the iOS Simulator - Medium
Yes, that's true. I always wondered if I can send a Push Notification on iOS simulator instead getting a real device while developing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found