diff --git a/Classes/BITAuthenticator.h b/Classes/BITAuthenticator.h index 0d0f7f0d39..721e1c5560 100644 --- a/Classes/BITAuthenticator.h +++ b/Classes/BITAuthenticator.h @@ -113,8 +113,8 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) * This module automatically disables itself when running in an App Store build by default! * * @warning It is mandatory to call `authenticateInstallation` somewhen after calling - * `[[BITHockeyManager sharedHockeyManager] startManager]` or disable `automaticMode` - * and fully customize the identification and validation workflow yourself. + * `[[BITHockeyManager sharedHockeyManager] startManager]` or fully customize the identification + * and validation workflow yourself. * If your app shows a modal view on startup, make sure to call `authenticateInstallation` * either once your modal view is fully presented (e.g. its `viewDidLoad:` method is processed) * or once your modal view is dismissed. @@ -138,23 +138,6 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) */ @property (nonatomic, assign) BITAuthenticatorIdentificationType identificationType; -/** - Defines if the BITAuthenticator automatically identifies the user and also - checks if he's still allowed to use the app (depending on `restrictApplicationUsage`) - - If this is set to NO, it's your responsiblity to call - - - (void) identifyWithCompletion:(void(^)(BOOL identified, NSError *error)) completion; - - and - - - (void) validateWithCompletion:(void(^)(BOOL identified, NSError *error)) completion; - - at approciate times and also block the application or re-identify the user if validation failed. - - _Default_: `YES` - */ -@property (nonatomic, assign) BOOL automaticMode; /** * Enables or disables checking if the user is allowed to run this app @@ -309,7 +292,6 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) * @warning You need to call this method in your code even if automatic mode is enabled! * * @see identificationType - * @see automaticMode */ - (void) authenticateInstallation; @@ -324,7 +306,8 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) * once needed. * * @see identificationType - * @see automaticMode + * @see authenticateInstallation + * @see validateWithCompletion: * * @param completion Block being executed once identification completed */ @@ -349,7 +332,8 @@ typedef NS_ENUM(NSUInteger, BITAuthenticatorAppRestrictionEnforcementFrequency) * once needed. * * @see identificationType - * @see automaticMode + * @see authenticateInstallation + * @see identifyWithCompletion: * * @param completion Block being executed once validation completed */ diff --git a/Classes/BITAuthenticator.m b/Classes/BITAuthenticator.m index c1ce305da5..c70b01238b 100644 --- a/Classes/BITAuthenticator.m +++ b/Classes/BITAuthenticator.m @@ -64,7 +64,6 @@ static NSString* const kBITAuthenticatorAuthTokenTypeKey = @"BITAuthenticatorAut _webpageURL = [NSURL URLWithString:@"https://rink.hockeyapp.net/"]; _identificationType = BITAuthenticatorIdentificationTypeAnonymous; - _automaticMode = YES; _isSetup = NO; _restrictApplicationUsage = NO; _restrictionEnforcementFrequency = BITAuthenticatorAppRestrictionEnforcementOnFirstLaunch; @@ -108,9 +107,6 @@ static NSString* const kBITAuthenticatorAuthTokenTypeKey = @"BITAuthenticatorAut } - (void) authenticate { - //when running in manual mode, we don't actually do anything ourselves - if(!self.automaticMode) return; - [self identifyWithCompletion:^(BOOL identified, NSError *error) { if(identified) { if([self needsValidation]) { diff --git a/docs/HowTo-Authenticating-Users-on-iOS-template.md b/docs/HowTo-Authenticating-Users-on-iOS-template.md index 94d3117932..0aa79c7b7f 100644 --- a/docs/HowTo-Authenticating-Users-on-iOS-template.md +++ b/docs/HowTo-Authenticating-Users-on-iOS-template.md @@ -28,11 +28,11 @@ Previous versions of HockeySDK for iOS used the response of the method `UIDevice The `BITAuthenticator` class doesn't do anything on its own. In addition to setting up the behavior, you also need to trigger the process yourself. -If `automaticMode` is enabled (default), you simply need to place a call to `[[BITHockeyManager sharedHockeyManager] authenticateInstallation]` in your code. This will show a UI asking for identification details according to the chosen strategy. +The most simple option is to place a call to `[[BITHockeyManager sharedHockeyManager] authenticateInstallation]` in your code. This will show a UI asking for identification details according to the chosen strategy. **IMPORTANT**: If your app shows a modal view on startup, make sure to call `authenticateInstallation` either once your modal view is fully presented (e.g. its `viewDidLoad:` method is processed) or once your modal view is dismissed. -If `automaticMode` is disabled, you need to implement your own workflow by using +The second option is to implement your own workflow by using - (void) identifyWithCompletion:(void(^)(BOOL identified, NSError *error)) completion;