Skip to content

Commit

Permalink
Adds and modifies deprecation messages (#1202)
Browse files Browse the repository at this point in the history
* Adds and modifies deprecation messages

* Addresses Comments
  • Loading branch information
protocol86 committed May 1, 2018
1 parent d5e748d commit d8e9113
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
29 changes: 11 additions & 18 deletions Firebase/Auth/Source/Public/FIRAuth.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,9 @@ NS_SWIFT_NAME(Auth)
password:(NSString *)password
completion:(nullable FIRAuthDataResultCallback)completion
DEPRECATED_MSG_ATTRIBUTE(
"signInAndRetrieveDataWithEmail:password:completion: is "
"deprecated. Please use"
" signInWithEmail:password:completion: for Objective-C or"
" signIn(withEmail:password:completion:) for Swift instead.");
"Please use signInWithEmail:password:completion: for"
" Objective-C or signIn(withEmail:password:completion:) for"
" Swift instead.");

/** @fn signInWithCredential:completion:
@brief Please use `signInAndRetrieveDataWithCredential:completion:` for Objective-C or
Expand Down Expand Up @@ -475,11 +474,9 @@ NS_SWIFT_NAME(Auth)
*/
- (void)signInWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE(
"signInWithCredential:completion: is"
" deprecated. Please use"
" signInAndRetrieveDataWithCredential:completion: for"
" Objective-C or signInAndRetrieveData(with:completion:) for"
" Swift instead.");
"Please use signInAndRetrieveDataWithCredential:completion:"
" for Objective-C or signInAndRetrieveData(with:completion:)"
" for Swift instead.");

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

/** @fn signInWithCustomToken:completion:
Expand Down Expand Up @@ -616,8 +612,7 @@ NS_SWIFT_NAME(Auth)
- (void)signInAndRetrieveDataWithCustomToken:(NSString *)token
completion:(nullable FIRAuthDataResultCallback)completion
DEPRECATED_MSG_ATTRIBUTE(
"signInAndRetrieveDataWithCustomToken:completion: is"
" deprecated. Please use signInWithCustomToken:completion:"
"Please use signInWithCustomToken:completion:"
"for Objective-C or signIn(withCustomToken:completion:) for"
" Swift instead.");

Expand Down Expand Up @@ -678,11 +673,9 @@ NS_SWIFT_NAME(Auth)
password:(NSString *)password
completion:(nullable FIRAuthDataResultCallback)completion
DEPRECATED_MSG_ATTRIBUTE(
"createUserAndRetrieveDataWithEmail:password:completion: is"
" deprecated. Please use"
" createUserWithEmail:password:completion: for Objective-C or"
" createUser(withEmail:password:completion:) for Swift"
" instead.");
"Please use createUserWithEmail:password:completion: for"
" Objective-C or createUser(withEmail:password:completion:)"
" for Swift instead.");

/** @fn confirmPasswordResetWithCode:newPassword:completion:
@brief Resets the password given a code sent to the user outside of the app and a new password
Expand Down
25 changes: 17 additions & 8 deletions Firebase/Auth/Source/Public/FIRUser.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,18 @@ NS_SWIFT_NAME(User)
- (void)reloadWithCompletion:(nullable FIRUserProfileChangeCallback)completion;

/** @fn reauthenticateWithCredential:completion:
@brief Convenience method for `reauthenticateAndRetrieveDataWithCredential:completion:` This
method doesn't return additional identity provider data.
@brief Please use reauthenticateAndRetrieveDataWithCredential:completion: for Objective-C or
reauthenticateAndRetrieveData(WithCredential:completion:) for Swift instead.
*/
- (void)reauthenticateWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRUserProfileChangeCallback)completion;

/** @fn reauthenticateWithCredential:completion:
completion:(nullable FIRUserProfileChangeCallback)completion
DEPRECATED_MSG_ATTRIBUTE( "Please use"
" reauthenticateAndRetrieveDataWithCredential:completion: for"
" Objective-C or"
" reauthenticateAndRetrieveData(WithCredential:completion:)"
" for Swift instead.");

/** @fn reauthenticateAndRetrieveDataWithCredential:completion:
@brief Renews the user's authentication tokens by validating a fresh set of credentials supplied
by the user and returns additional identity provider data.
Expand Down Expand Up @@ -322,11 +327,15 @@ NS_SWIFT_NAME(User)
completion:(nullable FIRAuthTokenCallback)completion;

/** @fn linkWithCredential:completion:
@brief Convenience method for `linkAndRetrieveDataWithCredential:completion:` This method
doesn't return additional identity provider data.
@brief Please use linkAndRetrieveDataWithCredential:completion: for Objective-C or
linkAndRetrieveData(WithCredential:completion:) for Swift instead.
*/
- (void)linkWithCredential:(FIRAuthCredential *)credential
completion:(nullable FIRAuthResultCallback)completion;
completion:(nullable FIRAuthResultCallback)completion DEPRECATED_MSG_ATTRIBUTE(
"Please use linkAndRetrieveDataWithCredential:completion: for"
" Objective-C or"
" linkAndRetrieveData(WithCredential:completion:) for"
" Swift instead.");

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

0 comments on commit d8e9113

Please sign in to comment.