Prevent notification from being show when app is open

138 views Asked by At

Lets say my app is open and on foreground(i.e. the user is using it) and I get a notification. I don't want it to show up on the notification center as I want to display a custom notification on my app screen. How do I prevent it from being shown?

TIA!

1

There are 1 answers

0
Bek On

The method - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo will be called if you receive a notification while your app is already open. Implement this method in your AppDelegate file to display a customized message regarding the notification.