willpresentnotification 方法没有被调用

RAM*_*RAM 5 push-notification firebase swift3 firebase-cloud-messaging unusernotificationcenter

乍一看,这可能与堆栈溢出的许多其他问题类似,但我没有找到解决我面临的问题的方法。我正在使用 xcode 8.3.2 和 ios 10.3.2 并配置 FCM 以发送推送通知。我在前台、后台和未运行状态下收到推送通知,因此 Firebase 端或证书没有问题。我也为 UNUserNotificationCenter 和 FIRMessaging 设置了委托。我正在通过从 firebase 控制台发送通知来测试服务。当我按下通知启动应用程序时,方法 userNotificationCenter didReceive 响应方法被调用,但是当应用程序处于前台时 userNotificationCenter willPresent 通知不会在通知到达时被调用。我也尝试过启用和禁用方法 swizzling。没有帮助。