Quellcode durchsuchen

Update documentation (#17)

* Update README.md

* Apply suggestions from code review

Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com>

* Update README.md

* Update CHANGELOG.md

* Update GIDSignInButton class docs.

* Fix spelling regression.

* Don't generate docs for NS_UNAVAILABLE methods.

* Don't generate docs for NS_UNAVAILABLE methods.

Co-authored-by: Kevin Cheung <kevinthecheung@users.noreply.github.com>
Peter Andrews vor 4 Jahren
Ursprung
Commit
fe0b6760fc

+ 27 - 21
CHANGELOG.md

@@ -1,22 +1,28 @@
-# 6.0.0 (2021-7-14)
+# 6.0.0 (2021-7-13)
 - Google Sign-In for iOS is now open source.
 - Swift Package Manager support.
 - Support for Simulator on M1 Macs.
 - API surface updates
-    - `GIDSignIn`
-        - `sharedInstance` is now a class property.
-        - `signIn` is now `signInWithConfiguration:presentingViewController:callback:` and always requests basic profile scopes.
-        - `addScopes:presentingViewController:callback:` is the new way to add scopes beyond basic profile to a currently signed-in user.
-        - `restorePreviousSignIn` is now `restorePreviousSignInWithCallback:`.
-        - `disconnect` is now `disconnectWithCallback:`.
-        - The `GIDSignInDelegate` protocol has been removed in favor of `GIDSignInCallback` and `GIDDisconnectCallback` blocks.
-        - All sign-in flow configuration properties have been moved to `GIDConfiguration`.
-    - The `GIDConfiguration` class had been added to represent the configuration needed to sign in a user.
-    - `GIDAuthentication`
-        - `getTokensWithHandler:` is now `doWithFreshTokens:`.
-        - The `GIDAuthenticationHandler` typedef has been renamed `GIDAuthenticationAction`.
-        - `refreshTokensWithHandler:` has been removed, use `doWithFreshTokens:` instead.
-    - `GIDSignInButton` no longer makes calls to `GIDSignIn` internally and will need to be wired to an `IBAction` or similar in order for you to call `signInWithConfiguration:presentingViewController:callback:` to initiate a sign-in flow.
+  - `GIDSignIn`
+    - `sharedInstance` is now a class property.
+    - `signIn` is now `signInWithConfiguration:presentingViewController:callback:` and always
+      requests basic profile scopes.
+    - `addScopes:presentingViewController:callback:` is the new way to add scopes beyond basic
+      profile to a currently signed-in user.
+    - `restorePreviousSignIn` is now `restorePreviousSignInWithCallback:`.
+    - `disconnect` is now `disconnectWithCallback:`.
+    - The `GIDSignInDelegate` protocol has been removed in favor of `GIDSignInCallback` and
+      `GIDDisconnectCallback` blocks.
+    - All sign-in flow configuration properties have been moved to `GIDConfiguration`.
+  - The `GIDConfiguration` class had been added to represent the configuration needed to sign in a
+    user.
+  - `GIDAuthentication`
+    - `getTokensWithHandler:` is now `doWithFreshTokens:`.
+    - The `GIDAuthenticationHandler` typedef has been renamed `GIDAuthenticationAction`.
+    - `refreshTokensWithHandler:` has been removed, use `doWithFreshTokens:` instead.
+  - `GIDSignInButton` no longer makes calls to `GIDSignIn` internally and will need to be wired to
+    an `IBAction` or similar in order for you to call
+    `signInWithConfiguration:presentingViewController:callback:` to initiate a sign-in flow.
 
 # 5.0.2 (2019-11-7)
 - Fixes the wrong error code being sent to `signIn:didSignInForUser:withError:` when the user
@@ -28,14 +34,14 @@
 
 # 5.0.0 (2019-8-14)
 - Changes to GIDSignIn
-    - `uiDelegate` has been replaced with `presentingViewController`.
-    - `hasAuthInKeychain` has been replaced with `hasPreviousSignIn`.
-    - `signInSilently` has been replaced with `restorePreviousSignIn`.
-    - Removed deprecated `kGIDSignInErrorCodeNoSignInHandlersInstalled` error code.
+  - `uiDelegate` has been replaced with `presentingViewController`.
+  - `hasAuthInKeychain` has been replaced with `hasPreviousSignIn`.
+  - `signInSilently` has been replaced with `restorePreviousSignIn`.
+  - Removed deprecated `kGIDSignInErrorCodeNoSignInHandlersInstalled` error code.
 - Changes to GIDAuthentication
-    - Removed deprecated methods `getAccessTokenWithHandler:` and `refreshAccessTokenWithHandler:`.
+  - Removed deprecated methods `getAccessTokenWithHandler:` and `refreshAccessTokenWithHandler:`.
 - Changes to GIDGoogleUser
-    - Removed deprecated property `accessibleScopes`, use `grantedScopes` instead.
+  - Removed deprecated property `accessibleScopes`, use `grantedScopes` instead.
 - Adds dependencies on AppAuth and GTMAppAuth.
 - Removes the dependency on GoogleToolboxForMac.
 - Drops support for iOS 7.

+ 1 - 0
GoogleSignIn/Sources/Public/GoogleSignIn/GIDConfiguration.h

@@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property(nonatomic, readonly, nullable) NSString *openIDRealm;
 
 /// Unavailable.  Please use `initWithClientID:` or one of the other initializers below.
+/// :nodoc:
 - (instancetype)init NS_UNAVAILABLE;
 
 /// Initialize a `GIDConfiguration` object with a client ID.

+ 2 - 0
GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignIn.h

@@ -64,9 +64,11 @@ typedef void (^GIDDisconnectCallback)(NSError *_Nullable error);
 @property(nonatomic, readonly, nullable) GIDGoogleUser *currentUser;
 
 /// Unavailable. Use the `sharedInstance` property to instantiate `GIDSignIn`.
+/// :nodoc:
 + (instancetype)new NS_UNAVAILABLE;
 
 /// Unavailable. Use the `sharedInstance` property to instantiate `GIDSignIn`.
+/// :nodoc:
 - (instancetype)init NS_UNAVAILABLE;
 
 /// This method should be called from your `UIApplicationDelegate`'s `application:openURL:options:`

+ 3 - 3
GoogleSignIn/Sources/Public/GoogleSignIn/GIDSignInButton.h

@@ -40,9 +40,9 @@ typedef NS_ENUM(NSInteger, GIDSignInButtonColorScheme) {
 /// This class provides the "Sign in with Google" button.
 ///
 /// You can instantiate this class programmatically or from a NIB file. You
-/// should set up the `GIDSignIn` shared instance with your client ID and any
-/// additional scopes, implement the delegate methods for `GIDSignIn`, and add
-/// this button to your view hierarchy.
+/// should connect this control to an `IBAction`, or something similar, that
+/// calls signInWithConfiguration:presentingViewController:callback: on
+/// `GIDSignIn` and add it to your view hierarchy.
 @interface GIDSignInButton : UIControl
 
 /// The layout style for the sign-in button.

+ 15 - 9
README.md

@@ -5,19 +5,25 @@
 
 # Google Sign-In for iOS
 
-Google Sign-In for iOS allows users to sign in with their Google account from
-third-party apps.
+Get users into your apps quickly and securely, using a registration system they already use and trust—their Google account.
 
-Please visit [our developer site](https://developers.google.com/identity/sign-in/ios/)
+Visit [our developer site](https://developers.google.com/identity/sign-in/ios/)
 for integration instructions, documentation, support information, and terms of
 service.
 
 ## Getting Started
 
-* Try our example app with:
-  ```
-  $ pod try GoogleSignIn
-  ```
-  and follow the directions [here](https://developers.google.com/identity/sign-in/ios/start).
-* Read our [getting started guides](https://developers.google.com/identity/sign-in/ios/start-integrating).
+* Try the [sample app](Sample).
+  * Using [CocoaPods](https://cocoapods.org):
+    ```
+    pod try GoogleSignIn
+    ```
+  * Using [Swift Package Manager](https://swift.org/package-manager/):
+    ```
+    git clone https://github.com/google/GoogleSignIn-iOS
+    ```
+    ```
+    open GoogleSignIn-iOS/Sample/SignInSample.xcodeproj
+    ```
+* Add Google Sign-In to your own app by following our [getting started guides](https://developers.google.com/identity/sign-in/ios/start-integrating).
 * Take a look at the [API reference](https://developers.google.com/identity/sign-in/ios/api/).