Instrument registration happy path with analytics.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent 0189f601c4
commit d4af62adcc

@ -260,8 +260,11 @@ NS_ASSUME_NONNULL_BEGIN
- (void)verifyChallengeAction:(nullable id)sender - (void)verifyChallengeAction:(nullable id)sender
{ {
[self startActivityIndicator]; [self startActivityIndicator];
OWSProdInfo(@"registration_registering_code");
[self.accountManager registerWithVerificationCode:[self validationCodeFromTextField]] [self.accountManager registerWithVerificationCode:[self validationCodeFromTextField]]
.then(^{ .then(^{
OWSProdInfo(@"registration_registered_complete");
DDLogInfo(@"%@ Successfully registered Signal account.", self.tag); DDLogInfo(@"%@ Successfully registered Signal account.", self.tag);
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
[self stopActivityIndicator]; [self stopActivityIndicator];

@ -52,6 +52,12 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi
[[Environment getCurrent] setSignUpFlowNavigationController:self.navigationController]; [[Environment getCurrent] setSignUpFlowNavigationController:self.navigationController];
} }
- (void)viewDidLoad {
[super viewDidLoad];
OWSProdInfo(@"registration_began");
}
- (void)createViews - (void)createViews
{ {
self.view.backgroundColor = [UIColor ows_signalBrandBlueColor]; self.view.backgroundColor = [UIColor ows_signalBrandBlueColor];
@ -335,6 +341,8 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi
__weak RegistrationViewController *weakSelf = self; __weak RegistrationViewController *weakSelf = self;
[TSAccountManager registerWithPhoneNumber:parsedPhoneNumber [TSAccountManager registerWithPhoneNumber:parsedPhoneNumber
success:^{ success:^{
OWSProdInfo(@"registration_registered_phone_number");
[weakSelf.spinnerView stopAnimating]; [weakSelf.spinnerView stopAnimating];
CodeVerificationViewController *vc = [CodeVerificationViewController new]; CodeVerificationViewController *vc = [CodeVerificationViewController new];

Loading…
Cancel
Save