- android works well
2.from firebase site to iOS real device works well (below this push to ios is ok) 3. remote push from iOS to andriod works well
- but remote push message to iOS not working
my Appdelegate.swift
import UIKit
import Flutter
import Firebase
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure() //add this before the code below
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
CodePudding user response:
Actually I had faced this issue , after long research realised that I haven't permit permission for notification, so used permission_handler plugin to ask permission for remote notification .
like this:
Future<Map<Permission, PermissionStatus>> requestPermission() async {
Map<Permission, PermissionStatus> statuses = await [
Permission.notification
].request();
return statuses;
}
- Uninstall the application
- add above code
- Call this function at starting
- give permission