parent
f30cd7c7fa
commit
4680a2465a
|
@ -174,7 +174,6 @@
|
|||
45C9DEB81DF4E35A0065CA84 /* WebRTCCallMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C9DEB71DF4E35A0065CA84 /* WebRTCCallMessageHandler.swift */; };
|
||||
45C9DEB91DF4E35A0065CA84 /* WebRTCCallMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45C9DEB71DF4E35A0065CA84 /* WebRTCCallMessageHandler.swift */; };
|
||||
45CB2FA81CB7146C00E1B343 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 45CB2FA71CB7146C00E1B343 /* Launch Screen.storyboard */; };
|
||||
45CD81A61DBFF8FC004C9430 /* Registration.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 45CD81A51DBFF8FC004C9430 /* Registration.storyboard */; };
|
||||
45CD81EF1DC030E7004C9430 /* AccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45CD81EE1DC030E7004C9430 /* AccountManager.swift */; };
|
||||
45CD81F21DC03A22004C9430 /* OWSLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 45CD81F11DC03A22004C9430 /* OWSLogger.m */; };
|
||||
45D231771DC7E8F10034FA89 /* SessionResetJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45D231761DC7E8F10034FA89 /* SessionResetJob.swift */; };
|
||||
|
@ -586,7 +585,6 @@
|
|||
45C681C31D305C9E0050903A /* OWSDisplayedMessageCollectionViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OWSDisplayedMessageCollectionViewCell.xib; sourceTree = "<group>"; };
|
||||
45C9DEB71DF4E35A0065CA84 /* WebRTCCallMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WebRTCCallMessageHandler.swift; sourceTree = "<group>"; };
|
||||
45CB2FA71CB7146C00E1B343 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "Signal/src/util/Launch Screen.storyboard"; sourceTree = SOURCE_ROOT; };
|
||||
45CD81A51DBFF8FC004C9430 /* Registration.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Registration.storyboard; path = Storyboards/Registration.storyboard; sourceTree = "<group>"; };
|
||||
45CD81EE1DC030E7004C9430 /* AccountManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AccountManager.swift; sourceTree = "<group>"; };
|
||||
45CD81F01DC03A22004C9430 /* OWSLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSLogger.h; sourceTree = "<group>"; };
|
||||
45CD81F11DC03A22004C9430 /* OWSLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSLogger.m; sourceTree = "<group>"; };
|
||||
|
@ -1131,7 +1129,6 @@
|
|||
children = (
|
||||
45CB2FA71CB7146C00E1B343 /* Launch Screen.storyboard */,
|
||||
A5509EC91A69AB8B00ABA4BC /* Main.storyboard */,
|
||||
45CD81A51DBFF8FC004C9430 /* Registration.storyboard */,
|
||||
);
|
||||
name = Storyboards;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1837,7 +1834,6 @@
|
|||
AD83FF441A73426500B5C81A /* audio_pause_button.png in Resources */,
|
||||
B6F509971AA53F760068F56A /* Localizable.strings in Resources */,
|
||||
AD41D7B51A6F6F0600241130 /* play_button.png in Resources */,
|
||||
45CD81A61DBFF8FC004C9430 /* Registration.storyboard in Resources */,
|
||||
B633C59D1A1D190B0059AC12 /* endcall@2x.png in Resources */,
|
||||
FC5CDF391A3393DD00B47253 /* error_white@2x.png in Resources */,
|
||||
B633C5D21A1D190B0059AC12 /* savephoto@2x.png in Resources */,
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
//
|
||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "SignalsViewController.h"
|
||||
|
||||
extern NSString *const AppDelegateStoryboardMain;
|
||||
extern NSString *const AppDelegateStoryboardRegistration;
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#import "Pastelog.h"
|
||||
#import "PropertyListPreferences.h"
|
||||
#import "PushManager.h"
|
||||
#import "RegistrationViewController.h"
|
||||
#import "Release.h"
|
||||
#import "SendExternalFileViewController.h"
|
||||
#import "Signal-Swift.h"
|
||||
|
@ -36,7 +37,6 @@
|
|||
@import Intents;
|
||||
|
||||
NSString *const AppDelegateStoryboardMain = @"Main";
|
||||
NSString *const AppDelegateStoryboardRegistration = @"Registration";
|
||||
|
||||
static NSString *const kInitialViewControllerIdentifier = @"UserInitialViewController";
|
||||
static NSString *const kURLSchemeSGNLKey = @"sgnl";
|
||||
|
@ -114,15 +114,19 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
|
|||
return YES;
|
||||
}
|
||||
|
||||
UIStoryboard *storyboard;
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
storyboard = [UIStoryboard storyboardWithName:AppDelegateStoryboardMain bundle:[NSBundle mainBundle]];
|
||||
} else {
|
||||
storyboard = [UIStoryboard storyboardWithName:AppDelegateStoryboardRegistration bundle:[NSBundle mainBundle]];
|
||||
}
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
|
||||
self.window.rootViewController = [storyboard instantiateInitialViewController];
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
UIStoryboard *storyboard =
|
||||
[UIStoryboard storyboardWithName:AppDelegateStoryboardMain bundle:[NSBundle mainBundle]];
|
||||
self.window.rootViewController = [storyboard instantiateInitialViewController];
|
||||
} else {
|
||||
RegistrationViewController *viewController = [RegistrationViewController new];
|
||||
UINavigationController *navigationController =
|
||||
[[UINavigationController alloc] initWithRootViewController:viewController];
|
||||
self.window.rootViewController = navigationController;
|
||||
}
|
||||
|
||||
[self.window makeKeyAndVisible];
|
||||
|
||||
// performUpdateCheck must be invoked after Environment has been initialized because
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="zqr-Ab-axp">
|
||||
<device id="retina4_0" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--_1.0 Registration Screen-->
|
||||
<scene sceneID="mx5-Ld-bVC">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="RegistrationViewController" id="nS2-Vr-sRt" userLabel="_1.0 Registration Screen" customClass="RegistrationViewController" sceneMemberID="viewController">
|
||||
<navigationItem key="navigationItem" id="PhN-sR-LcA"/>
|
||||
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="YTE-zH-eXO" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-4663.125" y="-735.21126760563379"/>
|
||||
</scene>
|
||||
<!--_1.1 Verification Screen-->
|
||||
<scene sceneID="9FI-Mi-3YV">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="CodeVerificationViewController" id="vAf-74-zQH" userLabel="_1.1 Verification Screen" customClass="CodeVerificationViewController" sceneMemberID="viewController">
|
||||
<navigationItem key="navigationItem" id="KvQ-qd-ysw"/>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<connections>
|
||||
<segue destination="ZlQ-iw-Vxb" kind="presentation" identifier="CompletedRegistration" modalPresentationStyle="fullScreen" modalTransitionStyle="crossDissolve" id="Hry-60-bHY"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="uR6-Tv-iw7" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-3780" y="-735"/>
|
||||
</scene>
|
||||
<!--Main-->
|
||||
<scene sceneID="sjs-Ns-GrM">
|
||||
<objects>
|
||||
<viewControllerPlaceholder storyboardName="Main" id="ZlQ-iw-Vxb" sceneMemberID="viewController"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="nhi-5D-Zp3" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-3149" y="-736"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="WHz-EP-SUz">
|
||||
<objects>
|
||||
<navigationController automaticallyAdjustsScrollViewInsets="NO" navigationBarHidden="YES" id="zqr-Ab-axp" sceneMemberID="viewController">
|
||||
<toolbarItems/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="Aon-Yn-49y">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<nil name="viewControllers"/>
|
||||
<toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="Axh-eu-RXJ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</toolbar>
|
||||
<connections>
|
||||
<segue destination="nS2-Vr-sRt" kind="relationship" relationship="rootViewController" id="Sw7-Sg-eg7"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="tQU-cc-dJl" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-5502" y="-735"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString *const kCompletedRegistrationSegue = @"CompletedRegistration";
|
||||
|
||||
@interface CodeVerificationViewController () <UITextFieldDelegate>
|
||||
|
||||
@property (nonatomic, readonly) AccountManager *accountManager;
|
||||
|
@ -266,7 +264,19 @@ NSString *const kCompletedRegistrationSegue = @"CompletedRegistration";
|
|||
DDLogInfo(@"%@ Successfully registered Signal account.", self.tag);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self stopActivityIndicator];
|
||||
[self performSegueWithIdentifier:kCompletedRegistrationSegue sender:nil];
|
||||
|
||||
UIStoryboard *storyboard = [UIStoryboard main];
|
||||
UIViewController *viewController = [storyboard instantiateInitialViewController];
|
||||
OWSAssert([viewController isKindOfClass:[SignalsNavigationController class]]);
|
||||
SignalsNavigationController *navigationController = (SignalsNavigationController *)viewController;
|
||||
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
||||
appDelegate.window.rootViewController = navigationController;
|
||||
OWSAssert([navigationController.topViewController isKindOfClass:[SignalsViewController class]]);
|
||||
|
||||
DDLogDebug(@"%@ notifying signals view controller of new user.", self.tag);
|
||||
SignalsViewController *signalsViewController
|
||||
= (SignalsViewController *)navigationController.topViewController;
|
||||
signalsViewController.newlyRegisteredUser = YES;
|
||||
});
|
||||
})
|
||||
.catch(^(NSError *_Nonnull error) {
|
||||
|
@ -310,30 +320,6 @@ NSString *const kCompletedRegistrationSegue = @"CompletedRegistration";
|
|||
return [self.challengeTextField.text stringByReplacingOccurrencesOfString:@"-" withString:@""];
|
||||
}
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(nullable id)sender
|
||||
{
|
||||
DDLogInfo(@"%@ preparing for CompletedRegistrationSeque", self.tag);
|
||||
if ([segue.identifier isEqualToString:kCompletedRegistrationSegue]) {
|
||||
if (![segue.destinationViewController isKindOfClass:[SignalsNavigationController class]]) {
|
||||
DDLogError(@"%@ Unexpected destination view controller: %@", self.tag, segue.destinationViewController);
|
||||
return;
|
||||
}
|
||||
|
||||
SignalsNavigationController *snc = (SignalsNavigationController *)segue.destinationViewController;
|
||||
|
||||
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
|
||||
appDelegate.window.rootViewController = snc;
|
||||
if (![snc.topViewController isKindOfClass:[SignalsViewController class]]) {
|
||||
DDLogError(@"%@ Unexpected top view controller: %@", self.tag, snc.topViewController);
|
||||
return;
|
||||
}
|
||||
|
||||
DDLogDebug(@"%@ notifying signals view controller of new user.", self.tag);
|
||||
SignalsViewController *signalsViewController = (SignalsViewController *)snc.topViewController;
|
||||
signalsViewController.newlyRegisteredUser = YES;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Send codes again
|
||||
|
||||
- (void)sendCodeViaSMSAction:(id)sender {
|
||||
|
|
Loading…
Reference in New Issue