Describe the bug
The onMessage handler does not fire unless run via Xcode.
To Reproduce
Steps to reproduce the behavior:
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
onMessage handler and show your print statement.flutter run and you won't be able to see the print statement because onMessage is never called.Expected behavior
onMessage should always be called.
Additional context
firebase_messaging: ^6.0.12
Flutter 1.14.6 • channel beta • https://github.com/flutter/flutter.git
Framework • revision fabeb2a16f (6 weeks ago) • 2020-01-28 07:56:51 -0800
Engine • revision c4229bfbba
Tools • Dart 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)
I found this to be due to a project cleaning issue. After doing flutter clean, xcodebuild clean, deleting derived data, deleting pods, and starting again this no longer happens.
Most helpful comment
I found this to be due to a project cleaning issue. After doing flutter clean, xcodebuild clean, deleting derived data, deleting pods, and starting again this no longer happens.