Skip to content

Commit d8e9113

Browse files
authored
Adds and modifies deprecation messages (#1202)
* Adds and modifies deprecation messages * Addresses Comments
1 parent d5e748d commit d8e9113

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

Firebase/Auth/Source/Public/FIRAuth.h

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,9 @@ NS_SWIFT_NAME(Auth)
429429
password:(NSString *)password
430430
completion:(nullable FIRAuthDataResultCallback)completion
431431
DEPRECATED_MSG_ATTRIBUTE(
432-
"signInAndRetrieveDataWithEmail:password:completion: is "
433-
"deprecated. Please use"
434-
" signInWithEmail:password:completion: for Objective-C or"
435-
" signIn(withEmail:password:completion:) for Swift instead.");
432+
"Please use signInWithEmail:password:completion: for"
433+
" Objective-C or signIn(withEmail:password:completion:) for"
434+
" Swift instead.");
436435

437436
/** @fn signInWithCredential:completion:
438437
@brief Please use `signInAndRetrieveDataWithCredential:completion:` for Objective-C or
@@ -475,11 +474,9 @@ NS_SWIFT_NAME(Auth)
475474
*/
476475
- (void)signInWithCredential:(FIRAuthCredential *)credential
477476
completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE(
478-
"signInWithCredential:completion: is"
479-
" deprecated. Please use"
480-
" signInAndRetrieveDataWithCredential:completion: for"
481-
" Objective-C or signInAndRetrieveData(with:completion:) for"
482-
" Swift instead.");
477+
"Please use signInAndRetrieveDataWithCredential:completion:"
478+
" for Objective-C or signInAndRetrieveData(with:completion:)"
479+
" for Swift instead.");
483480

484481
/** @fn signInAndRetrieveDataWithCredential:completion:
485482
@brief Asynchronously signs in to Firebase with the given 3rd-party credentials (e.g. a Facebook
@@ -564,8 +561,7 @@ NS_SWIFT_NAME(Auth)
564561
*/
565562
- (void)signInAnonymouslyAndRetrieveDataWithCompletion:
566563
(nullable FIRAuthDataResultCallback)completion
567-
DEPRECATED_MSG_ATTRIBUTE("signInAnonymouslyAndRetrieveDataWithCompletion: is deprecated."
568-
" Please use signInAnonymouslyWithCompletion: for Objective-C or"
564+
DEPRECATED_MSG_ATTRIBUTE("Please use signInAnonymouslyWithCompletion: for Objective-C or"
569565
" signInAnonymously(Completion:) for swift instead.");
570566

571567
/** @fn signInWithCustomToken:completion:
@@ -616,8 +612,7 @@ NS_SWIFT_NAME(Auth)
616612
- (void)signInAndRetrieveDataWithCustomToken:(NSString *)token
617613
completion:(nullable FIRAuthDataResultCallback)completion
618614
DEPRECATED_MSG_ATTRIBUTE(
619-
"signInAndRetrieveDataWithCustomToken:completion: is"
620-
" deprecated. Please use signInWithCustomToken:completion:"
615+
"Please use signInWithCustomToken:completion:"
621616
"for Objective-C or signIn(withCustomToken:completion:) for"
622617
" Swift instead.");
623618

@@ -678,11 +673,9 @@ NS_SWIFT_NAME(Auth)
678673
password:(NSString *)password
679674
completion:(nullable FIRAuthDataResultCallback)completion
680675
DEPRECATED_MSG_ATTRIBUTE(
681-
"createUserAndRetrieveDataWithEmail:password:completion: is"
682-
" deprecated. Please use"
683-
" createUserWithEmail:password:completion: for Objective-C or"
684-
" createUser(withEmail:password:completion:) for Swift"
685-
" instead.");
676+
"Please use createUserWithEmail:password:completion: for"
677+
" Objective-C or createUser(withEmail:password:completion:)"
678+
" for Swift instead.");
686679

687680
/** @fn confirmPasswordResetWithCode:newPassword:completion:
688681
@brief Resets the password given a code sent to the user outside of the app and a new password

Firebase/Auth/Source/Public/FIRUser.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,18 @@ NS_SWIFT_NAME(User)
221221
- (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion;
222222

223223
/** @fn reauthenticateWithCredential:completion:
224-
@brief Convenience method for `reauthenticateAndRetrieveDataWithCredential:completion:` This
225-
method doesn't return additional identity provider data.
224+
@brief Please use reauthenticateAndRetrieveDataWithCredential:completion: for Objective-C or
225+
reauthenticateAndRetrieveData(WithCredential:completion:) for Swift instead.
226226
*/
227227
- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential
228-
completion:(nullable FIRUserProfileChangeCallback)completion;
229-
230-
/** @fn reauthenticateWithCredential:completion:
228+
completion:(nullable FIRUserProfileChangeCallback)completion
229+
DEPRECATED_MSG_ATTRIBUTE( "Please use"
230+
" reauthenticateAndRetrieveDataWithCredential:completion: for"
231+
" Objective-C or"
232+
" reauthenticateAndRetrieveData(WithCredential:completion:)"
233+
" for Swift instead.");
234+
235+
/** @fn reauthenticateAndRetrieveDataWithCredential:completion:
231236
@brief Renews the user's authentication tokens by validating a fresh set of credentials supplied
232237
by the user and returns additional identity provider data.
233238
@@ -322,11 +327,15 @@ NS_SWIFT_NAME(User)
322327
completion:(nullable FIRAuthTokenCallback)completion;
323328

324329
/** @fn linkWithCredential:completion:
325-
@brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method
326-
doesn't return additional identity provider data.
330+
@brief Please use linkAndRetrieveDataWithCredential:completion: for Objective-C or
331+
linkAndRetrieveData(WithCredential:completion:) for Swift instead.
327332
*/
328333
- (void)linkWithCredential:(FIRAuthCredential *)credential
329-
completion:(nullable FIRAuthResultCallback)completion;
334+
completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE(
335+
"Please use linkAndRetrieveDataWithCredential:completion: for"
336+
" Objective-C or"
337+
" linkAndRetrieveData(WithCredential:completion:) for"
338+
" Swift instead.");
330339

331340
/** @fn linkAndRetrieveDataWithCredential:completion:
332341
@brief Associates a user account from a third-party identity provider with this user and

0 commit comments

Comments
 (0)