[BUG] Notification not showing
veldrict opened this issue · 5 comments
Describe the bug
My project use alice for check network using dio.
After i add package onesignal_flutter, notification not showing anymore. It work fine on android but on iOS is stop showing.
To Reproduce
Steps to reproduce the behavior:
- install onesignal_flutter latest version
- set up onesignal_flutter
- Get data from api
- Notification not showing
Expected behavior
Notification show like on android
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-x64, locale
en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.61.2)
[!] Connected device
! No devices available
Alice version
- Version: 0.2.4
Smartphone :
- Device: iPhone 7 and iphone emulator
- OS: iOS 15
Additional context
i think the problem is from local notification on alice.
Seems like flutter_local_notifications plugin doesn't work well with onesignal_flutter. Please check this issue: OneSignal/OneSignal-Flutter-SDK#197 (comment). You can check if this solution will work for you.
Right now I don't see anything that I could change in Alice.
hmm, maybe you can use awesome notification for exchange the local notification.
because someone recommend it in this commentOneSignal/OneSignal-Flutter-SDK#197 (comment)..
And I cant change the OneSignal because it from my client.
For logging networking with toggleable UI, please try analytics_debugger
Please update to 0.4.1
.
I tried adding the below line of code in the AppDelegate.swift file in the iOS module. It's working fine now.
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
Reference: Notification Setup in iOS