@@ -51,13 +51,13 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
5151 kGIDSignInErrorCodeMismatchWithCurrentUser = -9 ,
5252};
5353
54- // / This class signs the user in with Google.
54+ // / This class is used to sign in users with their Google account and manage their session .
5555// /
56- // / For reference, please see "Google Sign-In for iOS" at
56+ // / For reference, please see "Google Sign-In for iOS and macOS " at
5757// / https://developers.google.com/identity/sign-in/ios
5858@interface GIDSignIn : NSObject
5959
60- // / A shared `GIDSignIn` instance.
60+ // / The shared `GIDSignIn` instance.
6161@property (class , nonatomic , readonly ) GIDSignIn *sharedInstance;
6262
6363// / The `GIDGoogleUser` object representing the current user or `nil` if there is no signed-in user.
@@ -81,29 +81,29 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
8181// / @return `YES` if `GIDSignIn` handled this URL.
8282- (BOOL )handleURL : (NSURL *)url ;
8383
84- // / Checks if there is a previously authenticated user saved in keychain.
84+ // / Checks if there is a previous user sign-in saved in keychain.
8585// /
86- // / @return `YES` if there is a previously authenticated user saved in keychain.
86+ // / @return `YES` if there is a previous user sign-in saved in keychain.
8787- (BOOL )hasPreviousSignIn ;
8888
89- // / Attempts to restore a previously authenticated user without interaction.
89+ // / Attempts to restore a previous user sign-in without interaction.
9090// /
9191// / @param completion The block that is called on completion. This block will be called asynchronously
9292// / on the main queue.
9393- (void )restorePreviousSignInWithCompletion : (nullable void (^)(GIDGoogleUser *_Nullable user,
9494 NSError *_Nullable error))completion;
9595
96- // / Marks current user as being in the signed out state .
96+ // / Signs out the `currentUser`, removing it from the keychain .
9797- (void )signOut ;
9898
99- // / Disconnects the current user from the app and revokes previous authentication. If the operation
100- // / succeeds, the OAuth 2.0 token is also removed from keychain.
99+ // / Disconnects the `currentUser` by signing them out and revoking all OAuth2 scope grants made to the app.
101100// /
102101// / @param completion The optional block that is called on completion.
103102// / This block will be called asynchronously on the main queue.
104103- (void )disconnectWithCompletion : (nullable void (^)(NSError *_Nullable error))completion;
105104
106105#if TARGET_OS_IOS || TARGET_OS_MACCATALYST
106+
107107// / Starts an interactive sign-in flow on iOS.
108108// /
109109// / The completion will be called at the end of this process. Any saved sign-in state will be
@@ -114,7 +114,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
114114// / @param presentingViewController The view controller used to present `SFSafariViewContoller` on
115115// / iOS 9 and 10 and to supply `presentationContextProvider` for `ASWebAuthenticationSession` on
116116// / iOS 13+.
117- // / @param completion The `GIDSignInCompletion` block that is called on completion. This block will
117+ // / @param completion The optional block that is called on completion. This block will
118118// / be called asynchronously on the main queue.
119119- (void )signInWithPresentingViewController:(UIViewController *)presentingViewController
120120 completion:(nullable void (^)(GIDUserAuth *_Nullable userAuth,
@@ -133,7 +133,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
133133// / iOS 13+.
134134// / @param hint An optional hint for the authorization server, for example the user's ID or email
135135// / address, to be prefilled if possible.
136- // / @param completion The `GIDSignInCompletion` block that is called on completion. This block will
136+ // / @param completion The optional block that is called on completion. This block will
137137// / be called asynchronously on the main queue.
138138- (void )signInWithPresentingViewController:(UIViewController *)presentingViewController
139139 hint:(nullable NSString *)hint
@@ -153,7 +153,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
153153// / @param hint An optional hint for the authorization server, for example the user's ID or email
154154// / address, to be prefilled if possible.
155155// / @param additionalScopes An optional array of scopes to request in addition to the basic profile scopes.
156- // / @param completion The `GIDSignInCompletion` block that is called on completion. This block will
156+ // / @param completion The optional block that is called on completion. This block will
157157// / be called asynchronously on the main queue.
158158
159159- (void )signInWithPresentingViewController:(UIViewController *)presentingViewController
@@ -164,6 +164,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
164164 NS_EXTENSION_UNAVAILABLE(" The sign-in flow is not supported in App Extensions." );
165165
166166#elif TARGET_OS_OSX
167+
167168// / Starts an interactive sign-in flow on macOS.
168169// /
169170// / The completion will be called at the end of this process. Any saved sign-in state will be
@@ -172,7 +173,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
172173// / `restorePreviousSignInWithCompletion:` method to restore a previous sign-in.
173174// /
174175// / @param presentingWindow The window used to supply `presentationContextProvider` for `ASWebAuthenticationSession`.
175- // / @param completion The `GIDSignInCompletion` block that is called on completion. This block will
176+ // / @param completion The optional block that is called on completion. This block will
176177// / be called asynchronously on the main queue.
177178- (void )signInWithPresentingWindow:(NSWindow *)presentingWindow
178179 completion:(nullable void (^)(GIDUserAuth *_Nullable userAuth,
@@ -188,7 +189,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
188189// / @param presentingWindow The window used to supply `presentationContextProvider` for `ASWebAuthenticationSession`.
189190// / @param hint An optional hint for the authorization server, for example the user's ID or email
190191// / address, to be prefilled if possible.
191- // / @param completion The `GIDSignInCompletion` block that is called on completion. This block will
192+ // / @param completion The optional block that is called on completion. This block will
192193// / be called asynchronously on the main queue.
193194- (void )signInWithPresentingWindow:(NSWindow *)presentingWindow
194195 hint:(nullable NSString *)hint
@@ -206,7 +207,7 @@ typedef NS_ERROR_ENUM(kGIDSignInErrorDomain, GIDSignInErrorCode) {
206207// / @param hint An optional hint for the authorization server, for example the user's ID or email
207208// / address, to be prefilled if possible.
208209// / @param additionalScopes An optional array of scopes to request in addition to the basic profile scopes.
209- // / @param completion The `GIDSignInCompletion` block that is called on completion. This block will
210+ // / @param completion The optional block that is called on completion. This block will
210211// / be called asynchronously on the main queue.
211212- (void )signInWithPresentingWindow:(NSWindow *)presentingWindow
212213 hint:(nullable NSString *)hint
0 commit comments