I suceffuly registered the token and received the push notifications on Android, but it doesn’t show on IOS
Im using a real device, to receive.
How can i show the notification on IOS when the app is on background ?
I’ve the the event listener, but i didn’t understand how to do it well
Here’s the code:
import React, { Component } from 'react';
import {
Notifications,
} from 'expo';
import AppNavigator from './AppNavigator';
import {
Text,
View,
} from 'react-native';
class App extends Component {
constructor(props) {
super(props);
this.state = {
notification: {},
};
}
componentWillMount() {
this._notificationSubscription = Notifications.addListener(this._handleNotification);
}
_handleNotification = (notification) => {
this.setState({notification: notification});
};
render() {
return (
<AppNavigator></AppNavigator>
);
}
}
export default App;