【问题标题】:GCM Notification in IOS Not displayed on status BarIOS 中的 GCM 通知未显示在状态栏上
【发布时间】:2016-01-15 04:14:57
【问题描述】:

我已经实现了 Google 链接 https://developers.google.com/cloud-messaging/ios/client 中定义的所有步骤,并且每当我们打开应用程序时我的应用程序都会收到通知。但此通知未显示在状态栏中。我使用了以下有效载荷。请推荐某人。

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

     );

【问题讨论】:

    标签: ios objective-c google-cloud-messaging apns-php


    【解决方案1】:

    当您的应用程序运行时,设备不会显示传入的通知。您必须处理它(didreceiveremotenotification)并向用户或其他任何内容显示任何类型的警报。 也许你想使用像 OTNotificationRKDropdownAlert 这样的组件

    当您的应用程序未运行时,如果您的设备没有显示通知,请检查this Q&A 进行测试。

    希望对你有帮助

    【讨论】:

    【解决方案2】:

    尝试添加徽章。

        $msg['aps'] = array
        (
         'alert'       => $pushmessage,
         'badge'       => '1',
         'sound'         => 'default',
    
         );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-21
      • 1970-01-01
      相关资源
      最近更新 更多