Oracle Help Center | Oracle Push Cloud Service (Standalone) title

Displaying Alerts While App Is Running

If your app is running, and you want to pop-up an alert view with the alert message text, modify the following method in your AppDelegate.m file:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
  [[PushIOManager sharedInstance] didReceiveRemoteNotification:userInfo];

  NSDictionary *payload = [userInfo objectForKey:@"aps"];
  NSString *alertMessage = [payload objectForKey:@"alert"];
  UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:nil message:alertMessage delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

  [alertView show];
}

NOTE: This sample does not release the alertView instance. If your project is not using ARC, you will need to do so.