File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
samples/objc/FirebaseUI-demo-objc/Samples/Auth Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,11 @@ __attribute__((deprecated("Instead use authUI:didSignInWithAuthDataResult:error:
190
190
*/
191
191
@property (nonatomic , copy , nullable ) NSURL *TOSURL;
192
192
193
- /* * @property autoUpgradeAnonymousUsers
193
+ /* * @property shouldAutoUpgradeAnonymousUsers
194
194
@brief Whether to enable auto upgrading of anonymous accounts, defaults to NO.
195
195
*/
196
- @property (nonatomic , assign , getter =isAutoUpgradeAnonymousUsers) BOOL autoUpgradeAnonymousUsers;
196
+ @property (nonatomic , assign , getter =shouldAutoUpgradeAnonymousUsers) BOOL
197
+ shouldAutoUpgradeAnonymousUsers;
197
198
198
199
/* * @property delegate
199
200
@brief A delegate that receives callbacks or provides custom UI for @c FUIAuth.
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
191
191
};
192
192
193
193
// Check for the presence of an anonymous user and whether automatic upgrade is enabled.
194
- if (_auth.currentUser .isAnonymous && [FUIAuth defaultAuthUI ].autoUpgradeAnonymousUsers ) {
194
+ if (_auth.currentUser .isAnonymous && [FUIAuth defaultAuthUI ].shouldAutoUpgradeAnonymousUsers ) {
195
195
[_auth.currentUser
196
196
linkAndRetrieveDataWithCredential: credential
197
197
completion: ^(FIRAuthDataResult *_Nullable authResult,
@@ -212,8 +212,8 @@ - (void)signInWithProviderUI:(id<FUIAuthProvider>)providerUI
212
212
mergeError = [NSError errorWithDomain: FUIAuthErrorDomain
213
213
code: FUIAuthErrorCodeMergeConflict
214
214
userInfo: userInfo];
215
- result (nil , error );
216
- completeSignInBlock (authResult, error );
215
+ result (nil , mergeError );
216
+ completeSignInBlock (authResult, mergeError );
217
217
} else {
218
218
if (!isAuthPickerShown || error.code != FUIAuthErrorCodeUserCancelledSignIn) {
219
219
[self invokeResultCallbackWithAuthDataResult: nil error: error];
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ - (IBAction)onAuthUIDelegateChanged:(UISwitch *)sender {
229
229
230
230
- (IBAction )onAuthorization : (id )sender {
231
231
if (!_auth.currentUser || _auth.currentUser .isAnonymous ) {
232
- FUIAuth.defaultAuthUI .autoUpgradeAnonymousUsers = YES ;
232
+ FUIAuth.defaultAuthUI .shouldAutoUpgradeAnonymousUsers = YES ;
233
233
_authUI.providers = [self getListOfIDPs ];
234
234
_authUI.signInWithEmailHidden = ![self isEmailEnabled ];
235
235
@@ -266,7 +266,7 @@ - (void)authUI:(FUIAuth *)authUI
266
266
FIRAuthCredential *credential = error.userInfo [FUIAuthCredentialKey];
267
267
NSString *anonymousUserID = authUI.auth .currentUser .uid ;
268
268
NSString *messsage = [NSString stringWithFormat: @" A merge conflict occurred. The old user ID "
269
- " was: %@ . You are now sig in with the following credential type: %@ " , anonymousUserID,
269
+ " was: %@ . You are now signed in with the following credential type: %@ " , anonymousUserID,
270
270
[credential.provider uppercaseString ]];
271
271
[self showAlertWithTitlte: @" Merge Conflict" message: messsage];
272
272
NSLog (@" %@ " , messsage);
You can’t perform that action at this time.
0 commit comments