Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 34 additions & 5 deletions GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
- (void)signInWithConfiguration:(GIDConfiguration *)configuration
presentingViewController:(UIViewController *)presentingViewController
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("signIn(with:presenting:)")))
#endif
NS_EXTENSION_UNAVAILABLE("The sign-in flow is not supported in App Extensions.");

/// Starts an interactive sign-in flow on iOS using the provided configuration and a login hint.
Expand All @@ -143,6 +146,9 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
presentingViewController:(UIViewController *)presentingViewController
hint:(nullable NSString *)hint
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("signIn(with:presenting:hint:)")))
#endif
NS_EXTENSION_UNAVAILABLE("The sign-in flow is not supported in App Extensions.");

/// Starts an interactive sign-in flow on iOS using the provided configuration and a login hint.
Expand All @@ -165,7 +171,11 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
presentingViewController:(UIViewController *)presentingViewController
hint:(nullable NSString *)hint
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes
callback:(nullable GIDSignInCallback)callback;
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("signIn(with:presenting:hint:additionalScopes:)")))
#endif
;

/// Starts an interactive consent flow on iOS to add scopes to the current user's grants.
///
Expand All @@ -181,6 +191,9 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
- (void)addScopes:(NSArray<NSString *> *)scopes
presentingViewController:(UIViewController *)presentingViewController
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("addScopes(_:presenting:)")))
#endif
NS_EXTENSION_UNAVAILABLE("The add scopes flow is not supported in App Extensions.");

#elif TARGET_OS_OSX
Expand All @@ -197,7 +210,11 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
/// called asynchronously on the main queue.
- (void)signInWithConfiguration:(GIDConfiguration *)configuration
presentingWindow:(NSWindow *)presentingWindow
callback:(nullable GIDSignInCallback)callback;
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("signIn(with:presenting:)")))
#endif
;

/// Starts an interactive sign-in flow on macOS using the provided configuration and a login hint.
///
Expand All @@ -215,7 +232,11 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
- (void)signInWithConfiguration:(GIDConfiguration *)configuration
presentingWindow:(NSWindow *)presentingWindow
hint:(nullable NSString *)hint
callback:(nullable GIDSignInCallback)callback;
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("signIn(with:presenting:hint:)")))
#endif
;

/// Starts an interactive sign-in flow on macOS using the provided configuration and a login hint.
///
Expand All @@ -236,7 +257,11 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
presentingWindow:(NSWindow *)presentingWindow
hint:(nullable NSString *)hint
additionalScopes:(nullable NSArray<NSString *> *)additionalScopes
callback:(nullable GIDSignInCallback)callback;
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("signIn(with:presenting:hint:additionalScopes:)")))
#endif
;

/// Starts an interactive consent flow on macOS to add scopes to the current user's grants.
///
Expand All @@ -249,7 +274,11 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
/// called asynchronously on the main queue.
- (void)addScopes:(NSArray<NSString *> *)scopes
presentingWindow:(NSWindow *)presentingWindow
callback:(nullable GIDSignInCallback)callback;
callback:(nullable GIDSignInCallback)callback
#if __has_attribute(swift_async_name)
__attribute__((swift_async_name("addScopes(_:presenting:)")))
#endif
;

#endif

Expand Down