浏览代码

App Check Jazzydoc comment edits (#7955)

* Jazzydoc comment edits

* Tweaks

* Correction
Kevin Cheung 5 年之前
父节点
当前提交
c3eb728a1e

+ 13 - 7
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheck.h

@@ -28,21 +28,27 @@ NS_SWIFT_NAME(AppCheck)
 
 /// Returns a default instance of `AppCheck`.
 /// @return An instance of `AppCheck` for `FirebaseApp.defaultApp()`.
-/// @throw Throws an exception if the default app is not configured yet or required  `FirebaseApp`
+/// @throw Throws an exception if the default app is not configured yet or required `FirebaseApp`
 /// options are missing.
 + (instancetype)appCheck NS_SWIFT_NAME(appCheck());
 
 /// Returns an instance of `AppCheck` for an application.
 /// @param firebaseApp A configured `FirebaseApp` instance if exists.
 /// @returns An instance of `AppCheck` corresponding to the passed application.
-/// @throw May throws an exception if required `FirebaseApp` options are missing.
+/// @throw Throws an exception if required `FirebaseApp` options are missing.
 + (nullable instancetype)appCheckWithApp:(FIRApp *)firebaseApp NS_SWIFT_NAME(appCheck(app:));
 
-/// Set an instance of a Firebase app check provider factory. An instance of
-/// `DeviceCheckProviderFactory` is used by default. An instance of `AppCheckDebugProvider` can be
-/// used to test on a simulator on a local machine or a build server.
-/// NOTE: Make sure to call the method before `FirebaseApp.configure()`. If the method is called
-/// after configuring Firebase, the changes will not be applied.
+/// Sets the `AppCheckProviderFactory` to use to generate
+/// `AppCheckDebugProvider` objects.
+///
+/// An instance of `DeviceCheckProviderFactory` is used by default, but you can
+/// also use a custom `AppCheckProviderFactory` implementation or an
+/// instance of `AppCheckDebugProviderFactory` to test your app on a simulator
+/// on a local machine or a build server.
+///
+/// NOTE: Make sure to call this method before `FirebaseApp.configure()`. If
+/// this method is called after configuring Firebase, the changes will not take
+/// effect.
 + (void)setAppCheckProviderFactory:(nullable id<FIRAppCheckProviderFactory>)factory;
 
 /// If this flag is disabled then Firebase app check will not periodically auto-refresh the app

+ 20 - 15
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckDebugProvider.h

@@ -23,30 +23,34 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/// A Firebase app check provider that can exchange a debug token registered in Firebase console to
-/// a Firebase app check token. The debug provider is designed to enable testing applications on a
-/// simulator or platforms that are not supported yet.
+/// A Firebase App Check provider that can exchange a debug token registered
+/// in the Firebase console for a Firebase App Check token. The debug provider
+/// is designed to enable testing applications on a simulator or test
+/// environment.
 ///
-/// NOTE: Please make sure the debug provider is not used in applications used by real users.
+/// NOTE: Do not use the debug provider in applications used by real users.
 ///
-/// WARNING: Keep the Firebase app check debug token in secret. If you accidentally shared one (e.g.
-/// committed to a public source repo) make sure to remove it in the Firebase console ASAP.
+/// WARNING: Keep the Firebase App Check debug token secret. If you
+/// accidentally share one (e.g. commit to a public source repo), remove it in
+/// the Firebase console ASAP.
 ///
 /// To use `AppCheckDebugProvider` on a local simulator:
-/// 1. Configure  `AppCheckDebugProviderFactory` before `FirebaseApp.configure()`
-/// `AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory())`
-/// 2. Enable debug logging by adding `-FIRDebugEnabled` launch argument to the app target.
-/// 3. Launch the app. A local debug token will be logged when Firebase is configured. For example:
+/// 1. Configure `AppCheckDebugProviderFactory` before `FirebaseApp.configure()`:
+///    ```AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory())```
+/// 2. Enable debug logging by adding the `-FIRDebugEnabled` launch argument to
+///    the app target.
+/// 3. Launch the app. A local debug token will be logged when Firebase is
+///    configured. For example:
 /// "[Firebase/AppCheck][I-FAA001001] Firebase App Check Debug Token:
 /// '3BA09C8C-8A0D-4030-ACD5-B96D99DB73F9'".
 /// 4. Register the debug token in the Firebase console.
 ///
 /// Once the debug token is registered the debug provider will be able to provide a valid Firebase
-/// app check token.
+/// App Check token.
 ///
 /// To use `AppCheckDebugProvider` on a simulator on a build server:
-/// 1. Create a new Firebase app check debug token in the Firebase console
-/// 2. Add the debug token to the secure storage of your build environment, e.g. see [Encrypted
+/// 1. Create a new Firebase App Check debug token in the Firebase console
+/// 2. Add the debug token to the secure storage of your build environment. E.g. see [Encrypted
 /// secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) for GitHub Actions,
 /// etc.
 /// 3. Configure  `AppCheckDebugProviderFactory` before `FirebaseApp.configure()`
@@ -69,8 +73,9 @@ NS_SWIFT_NAME(AppCheckDebugProvider)
 
 /** Returns the currently used App Check debug token. The priority:
  *  - `FIRAAppCheckDebugToken` env variable value
- *  - previously generated stored local token
- *  - newly generated random token
+ *  - A previously generated token, stored locally on the device
+ *  - A newly generated random token. The generated token will be stored
+ *    locally for future use
  * @return The currently used App Check debug token.
  */
 - (NSString *)currentDebugToken;

+ 3 - 3
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckProvider.h

@@ -20,13 +20,13 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/// Defines the methods required to be implemented by a specific Firebase app check
+/// Defines the methods required to be implemented by a specific Firebase App Check
 /// provider.
 NS_SWIFT_NAME(AppCheckProvider)
 @protocol FIRAppCheckProvider <NSObject>
 
-/// Returns a new Firebase app check token.
-/// @param handler The completion handler. Please make sure to call the handler with either a token
+/// Returns a new Firebase App Check token.
+/// @param handler The completion handler. Make sure to call the handler with either a token
 /// or an error.
 - (void)getTokenWithCompletion:
     (void (^)(FIRAppCheckToken *_Nullable token, NSError *_Nullable error))handler

+ 2 - 2
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckProviderFactory.h

@@ -22,11 +22,11 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/// The protocol defines interface for classes that can create Firebase app check providers.
+/// This protocol defines the interface for classes that can create Firebase App Check providers.
 NS_SWIFT_NAME(AppCheckProviderFactory)
 @protocol FIRAppCheckProviderFactory <NSObject>
 
-/// Creates a new instance of a Firebase app check provider.
+/// Creates a new instance of a Firebase App Check provider.
 /// @param app An instance of `FirebaseApp` to create the provider for.
 /// @return A new instance implementing `AppCheckProvider` protocol.
 - (nullable id<FIRAppCheckProvider>)createProviderWithApp:(FIRApp *)app;

+ 5 - 5
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckToken.h

@@ -18,20 +18,20 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/// An object representing Firebase app check token.
+/// An object representing a Firebase App Check token.
 NS_SWIFT_NAME(AppCheckToken)
 @interface FIRAppCheckToken : NSObject
 
-/// A Firebase app check token.
+/// A Firebase App Check token.
 @property(nonatomic, readonly) NSString *token;
-/// A Firebase app check token expiration date in the device local time.
+/// The App Check token's expiration date in the device's local time.
 @property(nonatomic, readonly) NSDate *expirationDate;
 
 - (instancetype)init NS_UNAVAILABLE;
 
 /// The designated initializer.
-/// @param token A Firebase app check token.
-/// @param expirationDate A Firebase app check token expiration date in the device local time.
+/// @param token A Firebase App Check token.
+/// @param expirationDate A Firebase App Check token expiration date in the device local time.
 - (instancetype)initWithToken:(NSString *)token
                expirationDate:(NSDate *)expirationDate NS_DESIGNATED_INITIALIZER;
 

+ 1 - 1
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRDeviceCheckProvider.h

@@ -24,7 +24,7 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
-/// Firebase app check provider that verifies the app integrity using
+/// Firebase App Check provider that verifies app integrity using the
 /// [DeviceCheck](https://developer.apple.com/documentation/devicecheck) API.
 API_AVAILABLE(ios(11.0), macos(10.15), tvos(11.0))
 API_UNAVAILABLE(watchos)

+ 1 - 1
FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRDeviceCheckProviderFactory.h

@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 /// An implementation of `AppCheckProviderFactory` that creates a new instance of
 /// `DeviceCheckProvider` for the specified `FirebaseApp` on request. Currently
-/// `DeviceCheckProviderFactory` is the default that will be used by Firebase app check if no other
+/// `DeviceCheckProviderFactory` is the default that will be used by Firebase App Check if no other
 /// provider is specified. See `AppCheck` class for more details.
 API_AVAILABLE(ios(11.0), macos(10.15), tvos(11.0))
 API_UNAVAILABLE(watchos)