So i’m reading the documentation about notificationhandling, but for iOS, i have to use some custom-UI if the app is in foreground, right?
Does Expo has something already build in? Because i can’t get it to work. I can already handle notifications, but i have nothing to display for the user.
For example, if you get a message on Messenger for iOS, have the app foregrounded, but do not have that conversation open, you will see the notification slide down from the top of the screen with a custom notification UI.
Thankfully, handling push notifications is straightforward with Expo, all you need to do is add a listener to the Notifications object.
_handleNotification = (notification) => {
if(notification.origin == 'received'){
//something should be shown here, ios :(
Notifications.presentLocalNotificationAsync(localNotification);
}
Notifications.setBadgeNumberAsync(0);
};
ends in a loop, so it seems that i really need some custome-component… does somebody has a hint for me how to archive this?