0

Is there a way to show the native notification (iOS) dialog when a push notification has been received and the app is open ? More specifically I mean the black dialog that appears at the top of the screen that can be swiped up to close.

I am using https://github.com/phonegap-build/PushPlugin this plugin to get push notification..

Thanks a lot.

Gokrazee
  • 81
  • 1
  • 7

2 Answers2

0

No, you have to build it yourself and catch the push notification in the app delegate.

TheEye
  • 9,280
  • 2
  • 42
  • 58
  • can u elaborate little more ... @TheEye – Gokrazee Dec 04 '15 at 12:54
  • Simulator menu -> Window -> Scale -> 100%. If it is not at 100%, the screen is interpolated, so if you have 1 pixel lines they might not show on the simulator. – TheEye Dec 04 '15 at 12:57
0

You need to implement below method:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

in that method use this condition:

if (application.applicationState == UIApplicationStateActive ) {

// Show Notification using custom view/alert

}
Dimple Shah
  • 304
  • 3
  • 18