Merge branch 'charlesmchen/instrumentRegistrationFunnel'

pull/1/head
Matthew Chen 7 years ago
commit 0113bb2c11

@ -125,7 +125,7 @@ EXTERNAL SOURCES:
:branch: signal-master
:git: https://github.com/WhisperSystems/JSQMessagesViewController.git
SignalServiceKit:
:path: "."
:path: .
SocketRocket:
:git: https://github.com/facebook/SocketRocket.git

@ -8,6 +8,7 @@
#import "SignalsNavigationController.h"
#import "SignalsViewController.h"
#import "StringUtil.h"
#import "UIViewController+OWS.h"
#import <PromiseKit/AnyPromise.h>
#import <SignalServiceKit/OWSError.h>
#import <SignalServiceKit/TSAccountManager.h>
@ -260,8 +261,11 @@ NS_ASSUME_NONNULL_BEGIN
- (void)verifyChallengeAction:(nullable id)sender
{
[self startActivityIndicator];
OWSProdInfo(@"registration_registering_code");
[self.accountManager registerWithVerificationCode:[self validationCodeFromTextField]]
.then(^{
OWSProdInfo(@"registration_registering_submitted_code");
DDLogInfo(@"%@ Successfully registered Signal account.", self.tag);
dispatch_async(dispatch_get_main_queue(), ^{
[self stopActivityIndicator];
@ -276,6 +280,7 @@ NS_ASSUME_NONNULL_BEGIN
});
})
.catch(^(NSError *_Nonnull error) {
OWSProdInfo(@"registration_registration_failed");
DDLogError(@"%@ error verifying challenge: %@", self.tag, error);
dispatch_async(dispatch_get_main_queue(), ^{
[self stopActivityIndicator];
@ -319,6 +324,8 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - Send codes again
- (void)sendCodeViaSMSAction:(id)sender {
OWSProdInfo(@"registration_registering_requested_new_code_by_sms");
[self enableServerActions:NO];
[_requestCodeAgainSpinner startAnimating];
@ -336,6 +343,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)sendCodeViaVoiceAction:(id)sender {
OWSProdInfo(@"registration_registering_requested_new_code_by_voice");
[self enableServerActions:NO];
[_requestCallSpinner startAnimating];
@ -365,6 +374,8 @@ NS_ASSUME_NONNULL_BEGIN
}
- (void)backButtonPressed:(id)sender {
OWSProdInfo(@"registration_verification_back");
[self.navigationController popViewControllerAnimated:YES];
}

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

Loading…
Cancel
Save