mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Review documentation.
This commit is contained in:
parent
fd70d1ec97
commit
cb2782cefb
@ -42,27 +42,27 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorIdentificationType) {
|
|||||||
* The user will not be asked anything and an anonymous ID will be generated.
|
* The user will not be asked anything and an anonymous ID will be generated.
|
||||||
* This helps identifying this installation being unique but HockeyApp won't be able
|
* This helps identifying this installation being unique but HockeyApp won't be able
|
||||||
* to identify who actually is running this installation and on which device
|
* to identify who actually is running this installation and on which device
|
||||||
* it is installed.
|
* the app is installed.
|
||||||
*/
|
*/
|
||||||
BITAuthenticatorIdentificationTypeAnonymous,
|
BITAuthenticatorIdentificationTypeAnonymous,
|
||||||
/**
|
/**
|
||||||
* Ask for the HockeyApp account email
|
* Ask for the HockeyApp account email
|
||||||
*
|
*
|
||||||
* This will present a user interface requesting the user to provide his/her
|
* This will present a user interface requesting the user to provide their
|
||||||
* HockeyApp user email address.
|
* HockeyApp user email address.
|
||||||
*
|
*
|
||||||
* The provided email address has to match an email address of a registered
|
* The provided email address has to match an email address of a registered
|
||||||
* HockeyApp user who is invited to the app
|
* HockeyApp user who is a member or tester of the app
|
||||||
*/
|
*/
|
||||||
BITAuthenticatorIdentificationTypeHockeyAppEmail,
|
BITAuthenticatorIdentificationTypeHockeyAppEmail,
|
||||||
/**
|
/**
|
||||||
* Ask for the HockeyApp account by email and password
|
* Ask for the HockeyApp account by email and password
|
||||||
*
|
*
|
||||||
* This will present a user interface requesting the user to provide his/her
|
* This will present a user interface requesting the user to provide their
|
||||||
* HockeyApp user credentials.
|
* HockeyApp user credentials.
|
||||||
*
|
*
|
||||||
* The provided user account has to match a registered HockeyApp user who is
|
* The provided user account has to match a registered HockeyApp user who is
|
||||||
* invited to the app
|
* a member or tester of the app
|
||||||
*/
|
*/
|
||||||
BITAuthenticatorIdentificationTypeHockeyAppUser,
|
BITAuthenticatorIdentificationTypeHockeyAppUser,
|
||||||
/**
|
/**
|
||||||
@ -73,7 +73,7 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorIdentificationType) {
|
|||||||
* of the current devices UDID, it will request the user to install the HockeyApp web clip
|
* of the current devices UDID, it will request the user to install the HockeyApp web clip
|
||||||
* which will provide the UDID to users session in the browser.
|
* which will provide the UDID to users session in the browser.
|
||||||
*
|
*
|
||||||
* This requires the app also needs to register a URL scheme. See the linked property and methods
|
* This requires the app to register an URL scheme. See the linked property and methods
|
||||||
* for further documentation on this.
|
* for further documentation on this.
|
||||||
*
|
*
|
||||||
* @see `[BITAuthentiactor urlScheme]`
|
* @see `[BITAuthentiactor urlScheme]`
|
||||||
@ -86,7 +86,7 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorIdentificationType) {
|
|||||||
* Restriction enforcement styles
|
* Restriction enforcement styles
|
||||||
*
|
*
|
||||||
* Specifies how often the Authenticator checks if the user is allowed to use
|
* Specifies how often the Authenticator checks if the user is allowed to use
|
||||||
* use this app.
|
* this app.
|
||||||
*
|
*
|
||||||
* If `restrictApplicationUsage` is disabled, then this has no effect.
|
* If `restrictApplicationUsage` is disabled, then this has no effect.
|
||||||
*
|
*
|
||||||
@ -95,11 +95,11 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorIdentificationType) {
|
|||||||
*/
|
*/
|
||||||
typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) {
|
typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) {
|
||||||
/**
|
/**
|
||||||
* Check if the user is allowed to use the app the first time a version is started
|
* Checks if the user is allowed to use the app at the first time a version is started
|
||||||
*/
|
*/
|
||||||
BITAuthenticatorAppRestrictionEnforcementOnFirstLaunch,
|
BITAuthenticatorAppRestrictionEnforcementOnFirstLaunch,
|
||||||
/**
|
/**
|
||||||
* Check if the user is allowed to use the app everytime the app becomes active
|
* Checks if the user is allowed to use the app everytime the app becomes active
|
||||||
*/
|
*/
|
||||||
BITAuthenticatorAppRestrictionEnforcementOnAppActive,
|
BITAuthenticatorAppRestrictionEnforcementOnAppActive,
|
||||||
};
|
};
|
||||||
@ -107,20 +107,19 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
@protocol BITAuthenticatorDelegate;
|
@protocol BITAuthenticatorDelegate;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
Identify and authenticate users of Ad-Hoc or Enterprise builds
|
* Identify and authenticate users of Ad-Hoc or Enterprise builds
|
||||||
|
*
|
||||||
`BITAuthenticator` serves 2 purposes:
|
* `BITAuthenticator` serves 2 purposes:
|
||||||
1) Identifying who is running your Ad-Hoc or Enterprise builds
|
* 1) Identifying who is running your Ad-Hoc or Enterprise builds
|
||||||
`BITAuthenticator` provides an identifier for the rest of the HockeySDK
|
* `BITAuthenticator` provides an identifier for the rest of the HockeySDK
|
||||||
to work with, e.g. update checking and crash reports.
|
* to work with, e.g. in-app update checks and crash reports.
|
||||||
|
*
|
||||||
2) Optional regular checking if an identified user is still allowed
|
* 2) Optional regular checking if an identified user is still allowed
|
||||||
to run this application
|
* to run this application. The `BITAuthenticator` can be used to make
|
||||||
The `BITAuthenticator` can be used to make sure only users who are
|
* sure only users who are testers of your app are allowed to run it.
|
||||||
testers of your app are allowed to run it.
|
*
|
||||||
|
* This module automatically disables itself when running in an App Store build by default!
|
||||||
This module automatically disables itself when running in an App Store build by default!
|
|
||||||
*/
|
*/
|
||||||
@interface BITAuthenticator : BITHockeyBaseManager
|
@interface BITAuthenticator : BITHockeyBaseManager
|
||||||
|
|
||||||
@ -191,8 +190,10 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
@property (nonatomic, assign) BITAuthenticatorAppRestrictionEnforcementFrequency restrictionEnforcementFrequency;
|
@property (nonatomic, assign) BITAuthenticatorAppRestrictionEnforcementFrequency restrictionEnforcementFrequency;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The authentication secret from HockeyApp. To find the right secret, click on your app on the HockeyApp dashboard,
|
* The authentication secret from HockeyApp. To find the right secret,
|
||||||
* then on Show next to "Secret:".
|
* click on your app on the HockeyApp dashboard, then on Show next to
|
||||||
|
* "Secret:".
|
||||||
|
*
|
||||||
* This is only needed if `identificationType` is set to `BITAuthenticatorIdentificationTypeHockeyAppEmail`
|
* This is only needed if `identificationType` is set to `BITAuthenticatorIdentificationTypeHockeyAppEmail`
|
||||||
*
|
*
|
||||||
* @see identificationType
|
* @see identificationType
|
||||||
@ -200,7 +201,8 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
@property (nonatomic, copy) NSString *authenticationSecret;
|
@property (nonatomic, copy) NSString *authenticationSecret;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delegate that can be used to do any last minute configurations on the presented viewController.
|
* Delegate that can be used to do any last minute configurations on the
|
||||||
|
* presented viewController.
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, weak) id<BITAuthenticatorDelegate> delegate;
|
@property (nonatomic, weak) id<BITAuthenticatorDelegate> delegate;
|
||||||
|
|
||||||
@ -213,8 +215,8 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The baseURL of the webpage the user is redirected to if `identificationType` is `BITAuthenticatorIdentificationTypeDevice`
|
* The baseURL of the webpage the user is redirected to if `identificationType` is
|
||||||
* defaults to https://rink.hockeyapp.net
|
* set to `BITAuthenticatorIdentificationTypeDevice`; defaults to https://rink.hockeyapp.net.
|
||||||
*
|
*
|
||||||
* @see `identificationType`
|
* @see `identificationType`
|
||||||
*/
|
*/
|
||||||
@ -233,7 +235,7 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
@property (nonatomic, strong) NSString *urlScheme;
|
@property (nonatomic, strong) NSString *urlScheme;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Should be used by the app-delegate to forward handle application:openURL:sourceApplication:annotation: calls
|
Should be used by the app-delegate to forward handle application:openURL:sourceApplication:annotation: calls.
|
||||||
|
|
||||||
This is required if `identificationType` is set to `BITAuthenticatorIdentificationTypeDevice`.
|
This is required if `identificationType` is set to `BITAuthenticatorIdentificationTypeDevice`.
|
||||||
Your app needs to implement the default `ha<APP_ID>` URL scheme or register its own scheme
|
Your app needs to implement the default `ha<APP_ID>` URL scheme or register its own scheme
|
||||||
@ -254,11 +256,11 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@param url The URL that was passed to the app
|
@param url Param `url` that was passed to the app
|
||||||
@param sourceApplication sourceApplication that was passed to the app
|
@param sourceApplication Param `sourceApplication` that was passed to the app
|
||||||
@param annotation annotation that was passed to the app
|
@param annotation Param `annotation` that was passed to the app
|
||||||
|
|
||||||
@return YES if the URL request was handled, NO if the URL could not be handled/identified
|
@return YES if the URL request was handled, NO if the URL could not be handled/identified.
|
||||||
|
|
||||||
@see `identificationType`
|
@see `identificationType`
|
||||||
@see `urlScheme`
|
@see `urlScheme`
|
||||||
@ -274,10 +276,12 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
///-----------------------------------------------------------------------------
|
///-----------------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Identifies the user according to the type specified in `identificationType`
|
* Identifies the user according to the type specified in `identificationType`.
|
||||||
|
*
|
||||||
* If the `BITAuthenticator` is in manual mode, it's your responsibility to call
|
* If the `BITAuthenticator` is in manual mode, it's your responsibility to call
|
||||||
* this method. Depending on the `identificationType`, this method
|
* this method. Depending on the `identificationType`, this method
|
||||||
* might present a viewController to let the user enter his/her credentials.
|
* might present a viewController to let the user enter his/her credentials.
|
||||||
|
*
|
||||||
* If the Authenticator is in auto-mode, this is called by the authenticator itself
|
* If the Authenticator is in auto-mode, this is called by the authenticator itself
|
||||||
* once needed.
|
* once needed.
|
||||||
*
|
*
|
||||||
@ -287,7 +291,7 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
- (void) identifyWithCompletion:(void(^)(BOOL identified, NSError *error)) completion;
|
- (void) identifyWithCompletion:(void(^)(BOOL identified, NSError *error)) completion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns YES if this app is identified according to the setting in `identificationType`
|
* Returns YES if this app is identified according to the setting in `identificationType`.
|
||||||
*
|
*
|
||||||
* @see `identificationType`
|
* @see `identificationType`
|
||||||
*/
|
*/
|
||||||
@ -296,9 +300,11 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
/**
|
/**
|
||||||
* Validates if the identified user is allowed to run this application. This checks
|
* Validates if the identified user is allowed to run this application. This checks
|
||||||
* with the HockeyApp backend and calls the completion-block once completed.
|
* with the HockeyApp backend and calls the completion-block once completed.
|
||||||
|
*
|
||||||
* If the `BITAuthenticator` is in manual mode, it's your responsibility to call
|
* If the `BITAuthenticator` is in manual mode, it's your responsibility to call
|
||||||
* this method. If the application is not yet identified, validation is not possible
|
* this method. If the application is not yet identified, validation is not possible
|
||||||
* and the completion-block is called with an error set.
|
* and the completion-block is called with an error set.
|
||||||
|
*
|
||||||
* If the `BITAuthenticator` is in auto-mode, this is called by the authenticator itself
|
* If the `BITAuthenticator` is in auto-mode, this is called by the authenticator itself
|
||||||
* once needed.
|
* once needed.
|
||||||
*
|
*
|
||||||
@ -308,18 +314,18 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency)
|
|||||||
- (void) validateWithCompletion:(void(^)(BOOL validated, NSError *error)) completion;
|
- (void) validateWithCompletion:(void(^)(BOOL validated, NSError *error)) completion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates if this installation is validated
|
* Indicates if this installation is validated.
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, assign, readonly, getter = isValidated) BOOL validated;
|
@property (nonatomic, assign, readonly, getter = isValidated) BOOL validated;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes all previously stored authentication tokens, UDIDs, etc
|
* Removes all previously stored authentication tokens, UDIDs, etc.
|
||||||
*/
|
*/
|
||||||
- (void) cleanupInternalStorage;
|
- (void) cleanupInternalStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This can be used by the application to identify the user.
|
* Returns different values depending on `identificationType`. This can be used
|
||||||
* returns different values depending on `identificationType`.
|
* by the application to identify the user.
|
||||||
*
|
*
|
||||||
* @see `identificationType`
|
* @see `identificationType`
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user