From 2e5ba529af6b968dbd770888e6e02c35a3d44c5e Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Sat, 1 Jul 2017 14:23:50 -0700 Subject: [PATCH 1/6] [SSK] Update SSK to hotfix/2.13.4.0. // FREEBIE --- Podfile | 2 +- Podfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Podfile b/Podfile index 9142205b5..d2d69f78c 100644 --- a/Podfile +++ b/Podfile @@ -5,7 +5,7 @@ target 'Signal' do pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git' pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git' #pod 'AxolotlKit', path: '../SignalProtocolKit' - pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git', branch: 'hotfix/2.13.3.0' + pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git', branch: 'hotfix/2.13.4.0' #pod 'SignalServiceKit', path: '../SignalServiceKit' pod 'JSQMessagesViewController', git: 'https://github.com/WhisperSystems/JSQMessagesViewController.git', branch: 'mkirk/retain-keyboard-view' #pod 'JSQMessagesViewController', path: '../JSQMessagesViewController' diff --git a/Podfile.lock b/Podfile.lock index 03d3f7edf..7cfef19b4 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -112,7 +112,7 @@ DEPENDENCIES: - JSQMessagesViewController (from `https://github.com/WhisperSystems/JSQMessagesViewController.git`, branch `mkirk/retain-keyboard-view`) - PureLayout - Reachability - - SignalServiceKit (from `https://github.com/WhisperSystems/SignalServiceKit.git`, branch `hotfix/2.13.3.0`) + - SignalServiceKit (from `https://github.com/WhisperSystems/SignalServiceKit.git`, branch `hotfix/2.13.4.0`) - SocketRocket (from `https://github.com/facebook/SocketRocket.git`) EXTERNAL SOURCES: @@ -122,7 +122,7 @@ EXTERNAL SOURCES: :branch: mkirk/retain-keyboard-view :git: https://github.com/WhisperSystems/JSQMessagesViewController.git SignalServiceKit: - :branch: hotfix/2.13.3.0 + :branch: hotfix/2.13.4.0 :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :git: https://github.com/facebook/SocketRocket.git @@ -135,7 +135,7 @@ CHECKOUT OPTIONS: :commit: 521686c112bbae7a762f85d52b1e41eeb1760772 :git: https://github.com/WhisperSystems/JSQMessagesViewController.git SignalServiceKit: - :commit: e24f18320d3aefe87d2532c9f0520348c4598cb2 + :commit: 49f0e315afb67581389b7000755949956f3c64a7 :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf @@ -162,6 +162,6 @@ SPEC CHECKSUMS: UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266 -PODFILE CHECKSUM: 9418ef3ac76aae00ac06776ba8cb66a140fdd743 +PODFILE CHECKSUM: e2e17a51b233efc28178f2dd3c8ea55054a127ef COCOAPODS: 1.2.1 From ac48b138823b95d20c2c1ada6087aa06bd8c8008 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Jul 2017 14:57:17 -0400 Subject: [PATCH 2/6] Bump version number to 2.13.4.0. // FREEBIE --- Signal/Signal-Info.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist index 24973a55d..7d4a48dc1 100644 --- a/Signal/Signal-Info.plist +++ b/Signal/Signal-Info.plist @@ -38,7 +38,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.13.3 + 2.13.4 CFBundleSignature ???? CFBundleURLTypes @@ -55,7 +55,7 @@ CFBundleVersion - 2.13.3.0 + 2.13.4.0 ITSAppUsesNonExemptEncryption LOGS_EMAIL From d94ee7ab112597581bb7e431ded643226487f748 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Jul 2017 14:52:01 -0400 Subject: [PATCH 3/6] Add options to send 3k debug messages. // FREEBIE --- Signal/src/ViewControllers/DebugUI/DebugUIMessages.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m index 539091e0e..a5e9ee0c5 100644 --- a/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m +++ b/Signal/src/ViewControllers/DebugUI/DebugUIMessages.m @@ -53,6 +53,10 @@ NS_ASSUME_NONNULL_BEGIN actionBlock:^{ [DebugUIMessages sendTextMessages:1000 thread:thread]; }], + [OWSTableItem itemWithTitle:@"Send 3,000 messages (1/sec.)" + actionBlock:^{ + [DebugUIMessages sendTextMessages:3000 thread:thread]; + }], [OWSTableItem itemWithTitle:@"Send 10 tiny attachments" actionBlock:^{ [DebugUIMessages sendTinyAttachments:10 thread:thread]; @@ -65,6 +69,10 @@ NS_ASSUME_NONNULL_BEGIN actionBlock:^{ [DebugUIMessages sendTinyAttachments:1000 thread:thread]; }], + [OWSTableItem itemWithTitle:@"Send 3,000 tiny attachments" + actionBlock:^{ + [DebugUIMessages sendTinyAttachments:3000 thread:thread]; + }], [OWSTableItem itemWithTitle:@"Create 10 fake messages" actionBlock:^{ [DebugUIMessages sendFakeMessages:10 thread:thread]; From 50387448116ded41918c7acb350ca703394d3b6c Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Jul 2017 14:50:13 -0400 Subject: [PATCH 4/6] =?UTF-8?q?Fix=20missing=20=E2=80=9Cdatabase=20upgrade?= =?UTF-8?q?=E2=80=9D=20label=20on=20launch=20screen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/AppDelegate.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index b9d9026a9..71e4cc5a8 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -156,12 +156,14 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [[UIStoryboard storyboardWithName:@"Launch Screen" bundle:nil] instantiateInitialViewController]; BOOL shouldShowUpgradeLabel = NO; - NSString *lastAppVersion = AppVersion.instance.lastAppVersion; NSString *lastCompletedLaunchAppVersion = AppVersion.instance.lastCompletedLaunchAppVersion; - BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && - [VersionMigrations isVersion:lastAppVersion atLeast:@"2.0.0" andLessThan:@"2.13.0"]); + NSString *kLastVersionWithDatabaseViewChange = @"2.13.0"; + BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && lastCompletedLaunchAppVersion && + [VersionMigrations isVersion:lastCompletedLaunchAppVersion + atLeast:@"2.0.0" + andLessThan:kLastVersionWithDatabaseViewChange]); BOOL hasCompletedUpgrade = (lastCompletedLaunchAppVersion && - [VersionMigrations isVersion:lastCompletedLaunchAppVersion atLeast:@"2.13.0"]); + [VersionMigrations isVersion:lastCompletedLaunchAppVersion atLeast:kLastVersionWithDatabaseViewChange]); // We added a number of database views in v2.13.0. if (mayNeedUpgrade && !hasCompletedUpgrade) { From ab9770c175dc0ea2c787af3bc7255f13eb816cb7 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Jul 2017 14:54:00 -0400 Subject: [PATCH 5/6] =?UTF-8?q?Fix=20missing=20=E2=80=9Cdatabase=20upgrade?= =?UTF-8?q?=E2=80=9D=20label=20on=20launch=20screen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/AppDelegate.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 71e4cc5a8..e1b31a459 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -158,10 +158,11 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; BOOL shouldShowUpgradeLabel = NO; NSString *lastCompletedLaunchAppVersion = AppVersion.instance.lastCompletedLaunchAppVersion; NSString *kLastVersionWithDatabaseViewChange = @"2.13.0"; - BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && lastCompletedLaunchAppVersion && - [VersionMigrations isVersion:lastCompletedLaunchAppVersion - atLeast:@"2.0.0" - andLessThan:kLastVersionWithDatabaseViewChange]); + BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] + && (!lastCompletedLaunchAppVersion || + [VersionMigrations isVersion:lastCompletedLaunchAppVersion + atLeast:@"2.0.0" + andLessThan:kLastVersionWithDatabaseViewChange])); BOOL hasCompletedUpgrade = (lastCompletedLaunchAppVersion && [VersionMigrations isVersion:lastCompletedLaunchAppVersion atLeast:kLastVersionWithDatabaseViewChange]); From 9aa54cad630b07a08cef730e880fe11c5bbdaa31 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Thu, 6 Jul 2017 15:10:47 -0400 Subject: [PATCH 6/6] =?UTF-8?q?Fix=20missing=20=E2=80=9Cdatabase=20upgrade?= =?UTF-8?q?=E2=80=9D=20label=20on=20launch=20screen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit // FREEBIE --- Signal/src/AppDelegate.m | 23 ++++++---------------- Signal/src/environment/VersionMigrations.h | 2 ++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index e1b31a459..5d4c987bb 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -155,27 +155,16 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; UIViewController *viewController = [[UIStoryboard storyboardWithName:@"Launch Screen" bundle:nil] instantiateInitialViewController]; - BOOL shouldShowUpgradeLabel = NO; + NSString *lastLaunchedAppVersion = AppVersion.instance.lastAppVersion; NSString *lastCompletedLaunchAppVersion = AppVersion.instance.lastCompletedLaunchAppVersion; + // We added a number of database views in v2.13.0. NSString *kLastVersionWithDatabaseViewChange = @"2.13.0"; - BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] + BOOL mayNeedUpgrade = ([TSAccountManager isRegistered] && lastLaunchedAppVersion && (!lastCompletedLaunchAppVersion || [VersionMigrations isVersion:lastCompletedLaunchAppVersion - atLeast:@"2.0.0" - andLessThan:kLastVersionWithDatabaseViewChange])); - BOOL hasCompletedUpgrade = (lastCompletedLaunchAppVersion && - [VersionMigrations isVersion:lastCompletedLaunchAppVersion atLeast:kLastVersionWithDatabaseViewChange]); - - // We added a number of database views in v2.13.0. - if (mayNeedUpgrade && !hasCompletedUpgrade) { - shouldShowUpgradeLabel = YES; - } - DDLogInfo(@"%@ shouldShowUpgradeLabel: %d, %d -> %d", - self.tag, - mayNeedUpgrade, - hasCompletedUpgrade, - shouldShowUpgradeLabel); - if (shouldShowUpgradeLabel) { + lessThan:kLastVersionWithDatabaseViewChange])); + DDLogInfo(@"%@ mayNeedUpgrade: %d", self.tag, mayNeedUpgrade); + if (mayNeedUpgrade) { UIView *rootView = viewController.view; UIImageView *iconView = nil; for (UIView *subview in viewController.view.subviews) { diff --git a/Signal/src/environment/VersionMigrations.h b/Signal/src/environment/VersionMigrations.h index bc0064fa3..9b9c00f93 100644 --- a/Signal/src/environment/VersionMigrations.h +++ b/Signal/src/environment/VersionMigrations.h @@ -18,4 +18,6 @@ + (BOOL)isVersion:(NSString *)thisVersionString atLeast:(NSString *)thatVersionString; ++ (BOOL)isVersion:(NSString *)thisVersionString lessThan:(NSString *)thatVersionString; + @end