Код: Выделить всё
flutter: -\[\__NSCFString objectForKeyedSubscript:\]: unrecognized selector sent to instance 0x600001755880
Код: Выделить всё
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await FirebaseAuth.instance.verifyPhoneNumber(
phoneNumber: widget.phoneNumber,
verificationCompleted: (PhoneAuthCredential credential)async {
p ('verificationCompleted*****************************************');
},
verificationFailed: (FirebaseAuthException e) {
p ('verificationFailed*****************************************');
p (e.message);
},
codeSent: (String verificationId, int? resendToken)async {
p ('codeSent*****************************************');
},
codeAutoRetrievalTimeout: (String verificationId) {
p ('codeAutoRetrievalTimeout*****************************************');
},
);
Код: Выделить всё
firebase_core: ^2.31.1
firebase_messaging: ^14.9.3
firebase_auth: ^4.19.6
cloud_firestore: ^4.17.4
flutter_local_notifications: ^17.1.2
AppDelegate.swift
Код: Выделить всё
import UIKit
import Flutter
import FirebaseCore
@UIApplicationMain
@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)
}
}
Код: Выделить всё
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.6, on macOS 14.5 23F79 darwin-arm64, locale
en-IQ)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.89.1)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
Есть ли какие-либо советы или решения для этого исключения?
Подробнее здесь: https://stackoverflow.com/questions/785 ... ebase-auth
Мобильная версия