0

我收到推送通知,但不显示通知:

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    print("Message ID2: \(userInfo)")
    completionHandler(UIBackgroundFetchResult.newData)
}

打印消息 ID2 没关系:

消息 ID2:[AnyHashable("google.cae"): 1, AnyHashable("TEXT"): NEXT, AnyHashable("gcm.notification.POSITION"): 票证, AnyHashable("POSITION"): 票证, AnyHashable("TITLE "): TEST, AnyHashable("gcm.message_id"): 0:1534328572978948%f6f48aeff6f48aef, AnyHashable("aps"): { alert = { body = NEXT; 标题=测试;}; 声音=默认;}]

setting > app接受所有许可

4

0 回答 0