Skip to content

[firebase_messaging] iOS onLaunch and onResume not being called #1757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
emadd opened this issue Jan 4, 2020 · 3 comments
Closed

[firebase_messaging] iOS onLaunch and onResume not being called #1757

emadd opened this issue Jan 4, 2020 · 3 comments
Labels
type: bug Something isn't working

Comments

@emadd
Copy link

emadd commented Jan 4, 2020

Fairly certain I've followed every step described in the README but I have never received a callback in my app for onLaunch or onResume.

Here is log from XCode when launching from push...

2020-01-03 19:40:45.113050-0500 Runner[32913:15066629] Warning: UNUserNotificationCenter delegate received call to -userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: but the completion handler was never called.
2020-01-03 19:40:45.114034-0500 Runner[32913:15066697] flutter: didChangeAppLifecycleState: AppLifecycleState.paused -> AppLifecycleState.inactive
2020-01-03 19:40:45.463431-0500 Runner[32913:15066697] flutter: didChangeAppLifecycleState: AppLifecycleState.inactive -> AppLifecycleState.resumed

[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G103, locale en-US)
• Flutter version 1.12.13+hotfix.5 at /Users/xxx/development/flutter
• Framework revision 27321ebbad (3 weeks ago), 2019-12-10 18:15:01 -0800
• Engine revision 2994f7e1e6
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/xxx/development/Android
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/xxx/development/Android
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3, Build version 11C29
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.41.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.7.1

[✓] Connected device (1 available)
• Monolith Pro • 00008030-001910411E10802E • ios • iOS 13.3

@emadd emadd added the type: bug Something isn't working label Jan 4, 2020
@rscsam
Copy link

rscsam commented Jan 4, 2020

This isn't a "solution" per se, but removing
if #available(iOS 10.0, *) { UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate }
from my AppDelegate.swift fixed this problem for me.

The official documentation for this is either flawed or out of date unfortunately.

@olivierkastel
Copy link

Thank you so much ! It also fixed the issue for me

@emadd
Copy link
Author

emadd commented Jan 4, 2020

@rscsam Thank you so much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants