Closed leejh10003 closed 4 years ago
After deleting this swift native code from AppDelegate.application function, it works.
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
}
Now my AppDelegate.swift looks like this:
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Describe the bug I want to implement Propagate Remote Config updates in real time on flutter, and implemented it on Android. But on iOS, failed.
To Reproduce Steps to reproduce the behavior:
pubspec.yaml
info.plist
app.dart
on server side, sent message with this node.js code
Expected behavior onBackgroundMessageHandler to be called when data message sent to Android when app is in background, and onMessage to be called when app comes back from background or terminated to foreground as described here
Additional context Add any other context about the problem here.
Flutter doctor Run
flutter doctor
and paste the output below: