From 22a943708d156712a97d29dcd11ee903cb9d8494 Mon Sep 17 00:00:00 2001 From: Zsika Phillip Date: Sun, 29 Apr 2018 19:29:48 -0700 Subject: Adds phone auth testing. (disableAppVerification) (#1192) --- Example/Auth/Sample/SettingsViewController.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Example/Auth/Sample') diff --git a/Example/Auth/Sample/SettingsViewController.m b/Example/Auth/Sample/SettingsViewController.m index 24a6513..4815f32 100644 --- a/Example/Auth/Sample/SettingsViewController.m +++ b/Example/Auth/Sample/SettingsViewController.m @@ -214,9 +214,26 @@ static NSString *truncatedString(NSString *string, NSUInteger length) { [weakSelf loadTableView]; }], ]], + [StaticContentTableViewSection sectionWithTitle:@"Auth Settings" cells:@[ + [StaticContentTableViewCell cellWithTitle:@"Disable App Verification (Phone)" + value:[AppManager auth].settings. + appVerificationDisabledForTesting ? @"Yes" : @"No" + action:^{ + [weakSelf toggleDisableAppVerification]; + [weakSelf loadTableView]; + }], + ]], ]]; } +/** @fn toggleDisableAppVerification + @brief Toggles the appVerificationDisabledForTesting flag on the current Auth instance. + */ +- (void)toggleDisableAppVerification { + [AppManager auth].settings.appVerificationDisabledForTesting = + ![AppManager auth].settings.appVerificationDisabledForTesting; +} + /** @fn toggleAPIHostWithRequestClassName: @brief Toggles the host name of the server that handles RPCs. @param requestClassName The name of the RPC request class. -- cgit v1.2.3