Fixing localization and performance issues

- Cleaning up unused VC xib
- Optimization in Call Server Requests
- Fixing localization issues in Registration flow
- Changing order of labels for the Settings view
//FREEBIE
pull/1/head
Frederic Jacobs 11 years ago
parent 619b53cb0b
commit 50e1b8012b

@ -306,7 +306,6 @@
76EB066D18170B34006006FC /* ContactDetailTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB051F18170B33006006FC /* ContactDetailTableViewCell.xib */; };
76EB066F18170B34006006FC /* ContactDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052018170B33006006FC /* ContactDetailViewController.xib */; };
76EB067118170B34006006FC /* DialerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052118170B33006006FC /* DialerViewController.xib */; };
76EB067318170B34006006FC /* DowngradeCallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052218170B33006006FC /* DowngradeCallViewController.xib */; };
76EB067518170B34006006FC /* FavouritesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052318170B33006006FC /* FavouritesViewController.xib */; };
76EB067718170B34006006FC /* InboxFeedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052418170B33006006FC /* InboxFeedViewController.xib */; };
76EB067918170B34006006FC /* InCallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052518170B33006006FC /* InCallViewController.xib */; };
@ -550,7 +549,6 @@
E148750418A06966002CC4F3 /* ContactDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052018170B33006006FC /* ContactDetailViewController.xib */; };
E148750518A06966002CC4F3 /* CountryCodeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B97CBFA718860EA3008E0DE9 /* CountryCodeViewController.xib */; };
E148750618A06966002CC4F3 /* DialerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052118170B33006006FC /* DialerViewController.xib */; };
E148750718A06966002CC4F3 /* DowngradeCallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052218170B33006006FC /* DowngradeCallViewController.xib */; };
E148750818A06966002CC4F3 /* FavouritesViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052318170B33006006FC /* FavouritesViewController.xib */; };
E148750918A06966002CC4F3 /* InboxFeedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052418170B33006006FC /* InboxFeedViewController.xib */; };
E148750A18A06966002CC4F3 /* InCallViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 76EB052518170B33006006FC /* InCallViewController.xib */; };
@ -992,7 +990,6 @@
76EB051F18170B33006006FC /* ContactDetailTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ContactDetailTableViewCell.xib; sourceTree = "<group>"; };
76EB052018170B33006006FC /* ContactDetailViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ContactDetailViewController.xib; sourceTree = "<group>"; };
76EB052118170B33006006FC /* DialerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DialerViewController.xib; sourceTree = "<group>"; };
76EB052218170B33006006FC /* DowngradeCallViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DowngradeCallViewController.xib; sourceTree = "<group>"; };
76EB052318170B33006006FC /* FavouritesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FavouritesViewController.xib; sourceTree = "<group>"; };
76EB052418170B33006006FC /* InboxFeedViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InboxFeedViewController.xib; sourceTree = "<group>"; };
76EB052518170B33006006FC /* InCallViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = InCallViewController.xib; sourceTree = "<group>"; };
@ -2161,7 +2158,6 @@
76EB052018170B33006006FC /* ContactDetailViewController.xib */,
B97CBFA718860EA3008E0DE9 /* CountryCodeViewController.xib */,
76EB052118170B33006006FC /* DialerViewController.xib */,
76EB052218170B33006006FC /* DowngradeCallViewController.xib */,
76EB052318170B33006006FC /* FavouritesViewController.xib */,
76EB052418170B33006006FC /* InboxFeedViewController.xib */,
76EB052518170B33006006FC /* InCallViewController.xib */,
@ -3153,7 +3149,6 @@
E148750418A06966002CC4F3 /* ContactDetailViewController.xib in Resources */,
E148750518A06966002CC4F3 /* CountryCodeViewController.xib in Resources */,
E148750618A06966002CC4F3 /* DialerViewController.xib in Resources */,
E148750718A06966002CC4F3 /* DowngradeCallViewController.xib in Resources */,
E148750818A06966002CC4F3 /* FavouritesViewController.xib in Resources */,
E148750918A06966002CC4F3 /* InboxFeedViewController.xib in Resources */,
E148750A18A06966002CC4F3 /* InCallViewController.xib in Resources */,
@ -3324,7 +3319,6 @@
765052B3182BF839008313E1 /* HelveticaNeueLTStd-Th.otf in Resources */,
76B818A1182C39460088060E /* PreferenceListViewController.xib in Resources */,
76EB066D18170B34006006FC /* ContactDetailTableViewCell.xib in Resources */,
76EB067318170B34006006FC /* DowngradeCallViewController.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

@ -33,16 +33,13 @@ MacrosSingletonImplemention
NSURL *endPointURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://%@:%hu", endpoint.hostname, endpoint.port]];
NSURLSessionConfiguration *sessionConf = [NSURLSessionConfiguration ephemeralSessionConfiguration];
self.operationManager = [[AFHTTPSessionManager alloc] initWithBaseURL:endPointURL sessionConfiguration:sessionConf];
[self.operationManager setSecurityPolicy:[AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]];
self.operationManager.responseSerializer = [AFJSONResponseSerializer serializer];
self.operationManager.securityPolicy.allowInvalidCertificates = YES;
NSString *certPath = [[NSBundle mainBundle] pathForResource:@"whisperReal" ofType:@"cer"];
NSData *certData = [NSData dataWithContentsOfFile:certPath];
SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
self.operationManager.securityPolicy.pinnedCertificates = @[(__bridge_transfer NSData *)SecCertificateCopyData(cert)];
self.operationManager.securityPolicy.allowInvalidCertificates = YES; // We use a custom certificate, not signed by a CA.
self.operationManager.responseSerializer = [AFJSONResponseSerializer serializer];
self.operationManager.securityPolicy.SSLPinningMode = AFSSLPinningModePublicKey;
}
return self;
}

@ -88,7 +88,6 @@
return;
}
// @todo: maybe a more general mechanism, so other things can watch?
[[[Environment getCurrent] recentCallManager] addMissedCallDueToBusy:session];
[[CallConnectUtil asyncSignalTooBusyToAnswerCallWithSessionDescriptor:session] catchDo:^(id error) {

@ -263,7 +263,6 @@ static NSInteger connectingFlashCounter = 0;
if ([termination type] == CallTerminationType_ServerMessage) {
CallFailedServerMessage* serverMessage = [termination messageInfo];
// @todo: forcing it to be a prefix is not particularly localizable
message = [message stringByAppendingString:[serverMessage text]];
}

@ -38,6 +38,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
[self localizeButtonText];
DDLogInfo(@"Opened Registration View");
@ -186,6 +187,8 @@
if ([badResponse getStatusCode] == 401) {
UIAlertView *incorrectChallengeCodeAV = [[UIAlertView alloc]initWithTitle:REGISTER_CHALLENGE_ALERT_VIEW_TITLE message:REGISTER_CHALLENGE_ALERT_VIEW_BODY delegate:nil cancelButtonTitle:REGISTER_CHALLENGE_ALERT_DISMISS otherButtonTitles:nil, nil];
[incorrectChallengeCodeAV show];
_challengeButton.enabled = YES;
[_challengeActivityIndicator stopAnimating];
return;
}
}
@ -202,10 +205,8 @@
[[PushManager sharedManager] askForPushRegistrationWithSuccess:^{
[Environment setRegistered:YES];
[registered trySetResult:@YES];
[self dismissView];
_challengeButton.enabled = YES;
[_challengeActivityIndicator stopAnimating];
[[[Environment getCurrent] phoneDirectoryManager] forceUpdate];
[self dismissView];
} failure:^{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:REGISTER_ERROR_ALERT_VIEW_TITLE message:REGISTER_ERROR_ALERT_VIEW_BODY delegate:nil cancelButtonTitle:REGISTER_ERROR_ALERT_VIEW_DISMISS otherButtonTitles:nil, nil];
[alertView show];

@ -136,9 +136,9 @@ static NSString *const CHECKBOX_EMPTY_IMAGE_NAME = @"checkbox_empty";
- (NSArray *)privacyAndSecurityCells {
return @[_hideContactImagesCell,
_disableHistoryCell,
_disableAutocorrectCell,
_enableScreenSecurityCell,
_disableAutocorrectCell,
_disableHistoryCell,
_clearHistoryLogCell];
}

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4457.6" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3682.6"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DowngradeCallViewController">
<connections>
<outlet property="cancelButton" destination="5" id="32"/>
<outlet property="downgradeButton" destination="6" id="31"/>
<outlet property="view" destination="1" id="3"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="center" id="1">
<rect key="frame" x="0.0" y="0.0" width="320" height="218"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4">
<rect key="frame" x="5" y="6" width="310" height="94"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<string key="text">That number, which I will not mention here to save time, is not a red phone client. Did you perhaps want to reconsider not being insecure?</string>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="5">
<rect key="frame" x="207" y="123" width="74" height="61"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Cancel">
<color key="titleColor" red="0.44830587640000003" green="0.010568237290000001" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="cancel" destination="-1" eventType="touchUpInside" id="34"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="6">
<rect key="frame" x="26" y="128" width="137" height="56"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
<state key="normal" title="Downgrade (5s)">
<color key="titleColor" red="0.52156865600000002" green="0.4406287083" blue="0.061527636220000001" alpha="1" colorSpace="calibratedRGB"/>
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<state key="highlighted">
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="downgrade" destination="-1" eventType="touchUpInside" id="33"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
</document>

@ -61,7 +61,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.0" green="0.73333333329999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="25"/>
<state key="normal" title="REGISTER">
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
@ -169,7 +169,7 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.0" green="0.73333333329999995" blue="0.87058823529999996" alpha="1" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" name="HelveticaNeue-Medium" family="Helvetica Neue" pointSize="25"/>
<state key="normal" title="VALIDATE">
<state key="normal">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>

Loading…
Cancel
Save