You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
765 B
Swift
22 lines
765 B
Swift
|
2 months ago
|
import Flutter
|
||
|
|
import UIKit
|
||
|
|
import FirebaseCore
|
||
|
|
import FirebaseMessaging
|
||
|
|
|
||
|
|
@main
|
||
|
|
@objc class AppDelegate: FlutterAppDelegate {
|
||
|
|
override func application(
|
||
|
|
_ application: UIApplication,
|
||
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||
|
|
) -> Bool {
|
||
|
|
FirebaseApp.configure()
|
||
|
|
GeneratedPluginRegistrant.register(with: self)
|
||
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||
|
|
}
|
||
|
|
|
||
|
|
override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken:Data){
|
||
|
|
Messaging.messaging().apnsToken = deviceToken
|
||
|
|
super.application(application, didRegisterForRemoteNotificationsWithDeviceToken: deviceToken)
|
||
|
|
}
|
||
|
|
}
|