私はSwiftのiOSアプリケーションでFirebaseの通知を使用していますが、最近Firebase Messagingを1.2.3から2に更新し、コードが左と右の中心を壊し始めました。私はほとんどの問題を修正しましたが、私はこの問題に悩まされています。タイプ 'NSNotification.Name?' 'firInstanceIDTokenRefresh'のメンバーはありません
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
UIApplication.shared.statusBarStyle = .lightContent
...
FirebaseApp.configure()
// [START add_token_refresh_observer]
// Add observer for InstanceID token refresh callback.
NotificationCenter.default.addObserver(self,
selector: #selector(self.tokenRefreshNotification),
name: .firInstanceIDTokenRefresh,
object: nil)
// [END add_token_refresh_observer]
return true
}
私は私のアプリを実行しようとすると、私は次のエラーを取得する:
Type 'NSNotification.Name?' has no member 'firInstanceIDTokenRefresh'
はfirInstanceIDTokenRefreshに名前が変更されました。ここ
は私に問題を引き起こしてAppDelegateのアプリケーション機能の私の一部であります何か?
ありがとうございました! – Amit