再来一次友盟推送

未运行,点通知中心启动APP
didFinishLaunchingWithOptions(参数有内容,可以不管。因为会进入didReceiveNotificationResponse)-》didReceiveNotificationResponse
点app图标,啥也不会有。

运行在后台,点通知中心启动APP
didReceiveNotificationResponse
点app图标,啥也不会有。

运行在前台,
收到通知--马上进入到willPresentNotification
点击通知中心,-》didReceiveNotificationResponse

调试记录:

// 普通消息
2017-09-19 17:18:19.146527+0800 XXX[2085:447214] -[AppDelegate userNotificationCenter:willPresentNotification:withCompletionHandler:] ----------> {
    UNNotificationRequest =     {
        UNNotificationContent =         {
            UNNotificationAttachment =             (
            );
            badge = 0;
            body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d2";
            categoryIdentifier = "";
            launchImageName = "";
            subtitle = "";
            threadIdentifier = "";
            title = "";
            userInfo =             {
                aps =                 {
                    alert =                     {
                        body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d2";
                        subtitle = "";
                        title = "";
                    };
                    sound = default;
                };
                d = us96166150581269377811;
                p = 0;
            };
        };
        identifier = us96166150581269377811;
    };
    date = "2017-09-19  17:18:18";
}




2017-09-19 17:19:48.571306+0800 XXX[2085:447214] -[AppDelegate userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:] ----------> {
    UNNotificationResponse =     {
        UNNotificationRequest =         {
            UNNotificationContent =             {
                UNNotificationAttachment =                 (
                );
                badge = 0;
                body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d2";
                categoryIdentifier = "";
                launchImageName = "";
                subtitle = "";
                threadIdentifier = "";
                title = "";
                userInfo =                 {
                    aps =                     {
                        alert =                         {
                            body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d2";
                            subtitle = "";
                            title = "";
                        };
                        sound = default;
                    };
                    d = us96166150581269377811;
                    p = 0;
                };
            };
            identifier = us96166150581269377811;
        };
        date = "2017-09-19  17:18:18";
    };
    actionIdentifier = "com.apple.UNNotificationDefaultActionIdentifier";
}

// 自定义字段


2017-09-19 17:23:51.013074+0800 XXX[2085:447214] -[AppDelegate userNotificationCenter:willPresentNotification:withCompletionHandler:] ----------> {
    UNNotificationRequest =     {
        UNNotificationContent =         {
            UNNotificationAttachment =             (
            );
            badge = 0;
            body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
            categoryIdentifier = "";
            launchImageName = "";
            subtitle = "";
            threadIdentifier = "";
            title = "";
            userInfo =             {
                aps =                 {
                    alert =                     {
                        body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
                        subtitle = "";
                        title = "";
                    };
                    sound = default;
                };
                bussinessLine = common;
                d = us66157150581302741311;
                p = 0;
            };
        };
        identifier = us66157150581302741311;
    };
    date = "2017-09-19  17:23:49";
}


2017-09-19 17:23:54.104388+0800 XXX[2085:447214] -[AppDelegate userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:] ----------> {
    UNNotificationResponse =     {
        UNNotificationRequest =         {
            UNNotificationContent =             {
                UNNotificationAttachment =                 (
                );
                badge = 0;
                body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
                categoryIdentifier = "";
                launchImageName = "";
                subtitle = "";
                threadIdentifier = "";
                title = "";
                userInfo =                 {
                    aps =                     {
                        alert =                         {
                            body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
                            subtitle = "";
                            title = "";
                        };
                        sound = default;
                    };
                    bussinessLine = common;
                    d = us66157150581302741311;
                    p = 0;
                };
            };
            identifier = us66157150581302741311;
        };
        date = "2017-09-19  17:23:49";
    };
    actionIdentifier = "com.apple.UNNotificationDefaultActionIdentifier";
}



// 内容链接
2017-09-19 17:26:05.435575+0800 XXX[2085:447214] -[AppDelegate userNotificationCenter:willPresentNotification:withCompletionHandler:] ----------> {
    UNNotificationRequest =     {
        UNNotificationContent =         {
            UNNotificationAttachment =             (
            );
            badge = 0;
            body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
            categoryIdentifier = "";
            launchImageName = "";
            subtitle = "";
            threadIdentifier = "";
            title = "";
            userInfo =             {
                aps =                 {
                    alert =                     {
                        body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
                        subtitle = "";
                        title = "";
                    };
                    bussinessLine = common;
                    "mutable-content" = 1;
                    sound = default;
                };
                bussinessLine = common;
                d = us61490150581316196211;
                p = 0;
            };
        };
        identifier = us61490150581316196211;
    };
    date = "2017-09-19  17:26:03";
}


2017-09-19 17:26:32.002471+0800 XXX[2085:447214] -[AppDelegate userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:] ----------> {
    UNNotificationResponse =     {
        UNNotificationRequest =         {
            UNNotificationContent =             {
                UNNotificationAttachment =                 (
                );
                badge = 0;
                body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
                categoryIdentifier = "";
                launchImageName = "";
                subtitle = "";
                threadIdentifier = "";
                title = "";
                userInfo =                 {
                    aps =                     {
                        alert =                         {
                            body = "\U662f\U7684\U963f\U65af\U987f\U53d1\U8212\U670d3";
                            subtitle = "";
                            title = "";
                        };
                        bussinessLine = common;
                        "mutable-content" = 1;
                        sound = default;
                    };
                    bussinessLine = common;
                    d = us61490150581316196211;
                    p = 0;
                };
            };
            identifier = us61490150581316196211;
        };
        date = "2017-09-19  17:26:03";
    };
    actionIdentifier = "com.apple.UNNotificationDefaultActionIdentifier";
}


 2017/09/19 17:41:06:210  -[AppDelegate application:didFinishLaunchingWithOptions:]----> {
  "UIApplicationLaunchOptionsRemoteNotificationKey" : {
    "d" : "us94553150581405739511",
    "p" : 0,
    "custom_bussinessLine" : "custom_common",
    "aps" : {
      "mutable-content" : 1,
      "alert" : {
        "title" : "",
        "subtitle" : "",
        "body" : "是的阿斯顿发舒服1001"
      },
      "bussinessLine" : "common",
      "sound" : "default"
    }
  }
}






最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容