Skip to content

推送消息能收到,推送通知无法收到 #35

@vfiee

Description

@vfiee
User authored notification.
[CloudPush Verbose]: appKey/appSecret changed, clear store info.
[CloudPush Debug]: Network status changed.
[CloudPush Debug]: Request url is: https://mpush-api.aliyun.com/config
[CloudPush Debug]: Connect to network, status: 1
[CloudPush Debug]: Request url is: https://mpush-api.aliyun.com/sid
[CloudPush Debug]: Request url is: https://mpush-api.aliyun.com/active
[CloudPush Debug]: Session init success.
[CloudPush Debug]: Connect to AS, IP: ********, Port: 443
[CloudPush Debug]: CCP socket start monitor reading and writing.
[CloudPush Debug]: Start CCP protocol shake hands.
[CloudPush Debug]: CCP protocol shake hands, send auth info, waiting for ack.
[CloudPush Debug]: MPChannelStatusConnecting
[CloudPush Debug]: CCP connect ack statusCode is 0
Push SDK init success, deviceId: ae0dc93de9544cfe97cae875d2d297cb.
[CloudPush Debug]: CCP channel connected success time: Mar 22 2021 18:53:17
[CloudPush Debug]: CCP channel connected, cancel timeout timer.
[CloudPush Debug]: AS connect ack, seq: 1, statusCode: 0
[CloudPush Debug]: Push message.
[CloudPush Debug]: Receive message, title: title, content: content
[CloudPush Debug]: Push message.
[CloudPush Debug]: Receive message, title: test, content: testccccc
[CloudPush Debug]: Push message.
[CloudPush Debug]: Receive message, title: 13212312, content: 1231231
[CloudPush Debug]: Push message.
[CloudPush Debug]: Receive message, title: test, content: testaa
[CloudPush Debug]: Push message.
[CloudPush Debug]: Receive message, title: 12313123, content: 12312313

以上是推送的日志,IOS设备上,推送的消息能收到,但是推送的通知无法收到

// 初始化阿里云推送服务结果回调(可能多次调用: 调用不成功,根据重调机制调用)
    initCloudChannelResult.listen((data) {
      print("----------->initCloudChannelResult ${data.toString()}");
    });

    /// 接收服务端推送消息
    /// 消息不会弹窗,而是回调该方法。
    onMessageArrived.listen((data) {
      print("---------> onMessageArrived -> ${data.toString()}");
    });

    ///客户端接收到通知后,回调该方法。
    onNotification.listen((data) {
      print("-----------> onNotification ${data.toString()}");
    });

    /// 打开APP通知回调
    onNotificationOpened.listen((data) {
      print("-----------> onNotificationOpened ${data.toString()} 被点了");
    });

    /// App通知被删除回调
    onNotificationRemoved.listen((data) {
      print("----------->  onNotificationRemoved ${data.toString()} 被删除了");
    });

    /// 打开无跳转逻辑(open=4)通知时回调该方法(v2.3.2及以上版本支持),
    /// 通知打开上报由SDK自动完成。
    onNotificationClickedWithNoAction.listen((data) {
      print("----------> onNotificationClickedWithNoAction ${data.toString()}");
    });

    /// 当用户创建自定义通知样式,并且设置推送应用内到达不创建通知弹窗时调用该回调,
    /// 且此时不调用onNotification回调(v2.3.3及以上版本支持)
    onNotificationReceivedInApp.listen((data) {
      print("-----------> onNotificationReceivedInApp ${data.toString()}");
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions