Skip to content

Commit c3eb728

Browse files
App Check Jazzydoc comment edits (#7955)
* Jazzydoc comment edits * Tweaks * Correction
1 parent 08743d5 commit c3eb728

File tree

7 files changed

+45
-34
lines changed

7 files changed

+45
-34
lines changed

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheck.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ NS_SWIFT_NAME(AppCheck)
2828

2929
/// Returns a default instance of `AppCheck`.
3030
/// @return An instance of `AppCheck` for `FirebaseApp.defaultApp()`.
31-
/// @throw Throws an exception if the default app is not configured yet or required `FirebaseApp`
31+
/// @throw Throws an exception if the default app is not configured yet or required `FirebaseApp`
3232
/// options are missing.
3333
+ (instancetype)appCheck NS_SWIFT_NAME(appCheck());
3434

3535
/// Returns an instance of `AppCheck` for an application.
3636
/// @param firebaseApp A configured `FirebaseApp` instance if exists.
3737
/// @returns An instance of `AppCheck` corresponding to the passed application.
38-
/// @throw May throws an exception if required `FirebaseApp` options are missing.
38+
/// @throw Throws an exception if required `FirebaseApp` options are missing.
3939
+ (nullable instancetype)appCheckWithApp:(FIRApp *)firebaseApp NS_SWIFT_NAME(appCheck(app:));
4040

41-
/// Set an instance of a Firebase app check provider factory. An instance of
42-
/// `DeviceCheckProviderFactory` is used by default. An instance of `AppCheckDebugProvider` can be
43-
/// used to test on a simulator on a local machine or a build server.
44-
/// NOTE: Make sure to call the method before `FirebaseApp.configure()`. If the method is called
45-
/// after configuring Firebase, the changes will not be applied.
41+
/// Sets the `AppCheckProviderFactory` to use to generate
42+
/// `AppCheckDebugProvider` objects.
43+
///
44+
/// An instance of `DeviceCheckProviderFactory` is used by default, but you can
45+
/// also use a custom `AppCheckProviderFactory` implementation or an
46+
/// instance of `AppCheckDebugProviderFactory` to test your app on a simulator
47+
/// on a local machine or a build server.
48+
///
49+
/// NOTE: Make sure to call this method before `FirebaseApp.configure()`. If
50+
/// this method is called after configuring Firebase, the changes will not take
51+
/// effect.
4652
+ (void)setAppCheckProviderFactory:(nullable id<FIRAppCheckProviderFactory>)factory;
4753

4854
/// If this flag is disabled then Firebase app check will not periodically auto-refresh the app

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckDebugProvider.h

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,34 @@
2323

2424
NS_ASSUME_NONNULL_BEGIN
2525

26-
/// A Firebase app check provider that can exchange a debug token registered in Firebase console to
27-
/// a Firebase app check token. The debug provider is designed to enable testing applications on a
28-
/// simulator or platforms that are not supported yet.
26+
/// A Firebase App Check provider that can exchange a debug token registered
27+
/// in the Firebase console for a Firebase App Check token. The debug provider
28+
/// is designed to enable testing applications on a simulator or test
29+
/// environment.
2930
///
30-
/// NOTE: Please make sure the debug provider is not used in applications used by real users.
31+
/// NOTE: Do not use the debug provider in applications used by real users.
3132
///
32-
/// WARNING: Keep the Firebase app check debug token in secret. If you accidentally shared one (e.g.
33-
/// committed to a public source repo) make sure to remove it in the Firebase console ASAP.
33+
/// WARNING: Keep the Firebase App Check debug token secret. If you
34+
/// accidentally share one (e.g. commit to a public source repo), remove it in
35+
/// the Firebase console ASAP.
3436
///
3537
/// To use `AppCheckDebugProvider` on a local simulator:
36-
/// 1. Configure `AppCheckDebugProviderFactory` before `FirebaseApp.configure()`
37-
/// `AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory())`
38-
/// 2. Enable debug logging by adding `-FIRDebugEnabled` launch argument to the app target.
39-
/// 3. Launch the app. A local debug token will be logged when Firebase is configured. For example:
38+
/// 1. Configure `AppCheckDebugProviderFactory` before `FirebaseApp.configure()`:
39+
/// ```AppCheck.setAppCheckProviderFactory(AppCheckDebugProviderFactory())```
40+
/// 2. Enable debug logging by adding the `-FIRDebugEnabled` launch argument to
41+
/// the app target.
42+
/// 3. Launch the app. A local debug token will be logged when Firebase is
43+
/// configured. For example:
4044
/// "[Firebase/AppCheck][I-FAA001001] Firebase App Check Debug Token:
4145
/// '3BA09C8C-8A0D-4030-ACD5-B96D99DB73F9'".
4246
/// 4. Register the debug token in the Firebase console.
4347
///
4448
/// Once the debug token is registered the debug provider will be able to provide a valid Firebase
45-
/// app check token.
49+
/// App Check token.
4650
///
4751
/// To use `AppCheckDebugProvider` on a simulator on a build server:
48-
/// 1. Create a new Firebase app check debug token in the Firebase console
49-
/// 2. Add the debug token to the secure storage of your build environment, e.g. see [Encrypted
52+
/// 1. Create a new Firebase App Check debug token in the Firebase console
53+
/// 2. Add the debug token to the secure storage of your build environment. E.g. see [Encrypted
5054
/// secrets](https://docs.github.com/en/actions/reference/encrypted-secrets) for GitHub Actions,
5155
/// etc.
5256
/// 3. Configure `AppCheckDebugProviderFactory` before `FirebaseApp.configure()`
@@ -69,8 +73,9 @@ NS_SWIFT_NAME(AppCheckDebugProvider)
6973

7074
/** Returns the currently used App Check debug token. The priority:
7175
* - `FIRAAppCheckDebugToken` env variable value
72-
* - previously generated stored local token
73-
* - newly generated random token
76+
* - A previously generated token, stored locally on the device
77+
* - A newly generated random token. The generated token will be stored
78+
* locally for future use
7479
* @return The currently used App Check debug token.
7580
*/
7681
- (NSString *)currentDebugToken;

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckProvider.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
NS_ASSUME_NONNULL_BEGIN
2222

23-
/// Defines the methods required to be implemented by a specific Firebase app check
23+
/// Defines the methods required to be implemented by a specific Firebase App Check
2424
/// provider.
2525
NS_SWIFT_NAME(AppCheckProvider)
2626
@protocol FIRAppCheckProvider <NSObject>
2727

28-
/// Returns a new Firebase app check token.
29-
/// @param handler The completion handler. Please make sure to call the handler with either a token
28+
/// Returns a new Firebase App Check token.
29+
/// @param handler The completion handler. Make sure to call the handler with either a token
3030
/// or an error.
3131
- (void)getTokenWithCompletion:
3232
(void (^)(FIRAppCheckToken *_Nullable token, NSError *_Nullable error))handler

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckProviderFactory.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
NS_ASSUME_NONNULL_BEGIN
2424

25-
/// The protocol defines interface for classes that can create Firebase app check providers.
25+
/// This protocol defines the interface for classes that can create Firebase App Check providers.
2626
NS_SWIFT_NAME(AppCheckProviderFactory)
2727
@protocol FIRAppCheckProviderFactory <NSObject>
2828

29-
/// Creates a new instance of a Firebase app check provider.
29+
/// Creates a new instance of a Firebase App Check provider.
3030
/// @param app An instance of `FirebaseApp` to create the provider for.
3131
/// @return A new instance implementing `AppCheckProvider` protocol.
3232
- (nullable id<FIRAppCheckProvider>)createProviderWithApp:(FIRApp *)app;

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRAppCheckToken.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818

1919
NS_ASSUME_NONNULL_BEGIN
2020

21-
/// An object representing Firebase app check token.
21+
/// An object representing a Firebase App Check token.
2222
NS_SWIFT_NAME(AppCheckToken)
2323
@interface FIRAppCheckToken : NSObject
2424

25-
/// A Firebase app check token.
25+
/// A Firebase App Check token.
2626
@property(nonatomic, readonly) NSString *token;
27-
/// A Firebase app check token expiration date in the device local time.
27+
/// The App Check token's expiration date in the device's local time.
2828
@property(nonatomic, readonly) NSDate *expirationDate;
2929

3030
- (instancetype)init NS_UNAVAILABLE;
3131

3232
/// The designated initializer.
33-
/// @param token A Firebase app check token.
34-
/// @param expirationDate A Firebase app check token expiration date in the device local time.
33+
/// @param token A Firebase App Check token.
34+
/// @param expirationDate A Firebase App Check token expiration date in the device local time.
3535
- (instancetype)initWithToken:(NSString *)token
3636
expirationDate:(NSDate *)expirationDate NS_DESIGNATED_INITIALIZER;
3737

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRDeviceCheckProvider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
NS_ASSUME_NONNULL_BEGIN
2626

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

FirebaseAppCheck/Sources/Public/FirebaseAppCheck/FIRDeviceCheckProviderFactory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
2222

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

0 commit comments

Comments
 (0)