Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ import UserNotifications
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool
{
FirebaseApp.configure()

// Start APNs registration during native launch. With Flutter's implicit-engine
// lifecycle, Firebase Messaging plugin registration happens later, which can
// otherwise leave the APNs token unavailable when Dart first accesses FCM.
application.registerForRemoteNotifications()

let flutterResult = super.application(application, didFinishLaunchingWithOptions: launchOptions)
return flutterResult
}
Expand Down
6 changes: 6 additions & 0 deletions kids/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ import UIKit
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()

// Start APNs registration during native launch. With Flutter's implicit-engine
// lifecycle, Firebase Messaging plugin registration happens later, which can
// otherwise leave the APNs token unavailable when Dart first accesses FCM.
application.registerForRemoteNotifications()

return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

Expand Down
Loading