iosobjective-cgoogle-cloud-messagingapns-php

GCM Notification in IOS Not displayed on status Bar


I have implemented all the steps defined in the Google link https://developers.google.com/cloud-messaging/ios/client and my app receiving the notification whenever we open the app. But this notification not displayed in the status bar. I have used the below payloads. Please suggest someone.

    $msg['aps'] = array
    (
     'alert'       => $pushmessage,
     'sound'         => 'default',

     );

Solution

  • When your application is running, the incoming notifications are not shown by device. You must handle it(didreceiveremotenotification) and show any type of alert to user or anything else. Maybe you want to use a component like OTNotification or RKDropdownAlert

    When your application is not running, if your device does not show notification, check this Q&A to test.

    I hope it helps