[firebase_auth] Fix iOS updatePhoneNumberCredential crash (#1666)
diff --git a/AUTHORS b/AUTHORS
index 20f919c..d1fc7e4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -34,4 +34,5 @@
Thomas Stockx <thomas@stockxit.com>
Sarbagya Dhaubanjar <sarbagyastha@gmail.com>
Ozkan Eksi <ozeksi@gmail.com>
-ko2ic <ko2ic.dev@gmail.com>
\ No newline at end of file
+ko2ic <ko2ic.dev@gmail.com>
+Jonathan Younger <jonathan@daikini.com>
\ No newline at end of file
diff --git a/packages/firebase_auth/CHANGELOG.md b/packages/firebase_auth/CHANGELOG.md
index e3d2190..753147d 100644
--- a/packages/firebase_auth/CHANGELOG.md
+++ b/packages/firebase_auth/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 0.11.1+4
+
+* Fix `updatePhoneNumberCredential` on iOS.
+
## 0.11.1+3
* Add missing template type parameter to `invokeMethod` calls.
diff --git a/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m b/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m
index 3da06a6..9891e26 100644
--- a/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m
+++ b/packages/firebase_auth/ios/Classes/FirebaseAuthPlugin.m
@@ -206,13 +206,8 @@
error:error];
}];
} else if ([@"updatePhoneNumberCredential" isEqualToString:call.method]) {
- NSString *verificationId = call.arguments[@"verificationId"];
- NSString *smsCode = call.arguments[@"smsCode"];
-
FIRPhoneAuthCredential *credential =
- [[FIRPhoneAuthProvider provider] credentialWithVerificationID:verificationId
- verificationCode:smsCode];
-
+ (FIRPhoneAuthCredential *)[self getCredential:call.arguments];
[[self getAuth:call.arguments].currentUser
updatePhoneNumberCredential:credential
completion:^(NSError *_Nullable error) {
diff --git a/packages/firebase_auth/pubspec.yaml b/packages/firebase_auth/pubspec.yaml
index 1ad651d..b6b9352 100755
--- a/packages/firebase_auth/pubspec.yaml
+++ b/packages/firebase_auth/pubspec.yaml
@@ -4,7 +4,7 @@
like Google, Facebook and Twitter.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/firebase_auth
-version: "0.11.1+3"
+version: "0.11.1+4"
flutter:
plugin: