diff --git a/Podfile.lock b/Podfile.lock
index 06cbdd7fc..b427296cb 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -130,7 +130,7 @@ EXTERNAL SOURCES:
CHECKOUT OPTIONS:
SignalServiceKit:
- :commit: 2dba7d141a4840eb96c1482e0dd2db11a854e6a3
+ :commit: 1098bc203e4ca2d7ae444b5a6e913b123455c5da
:git: https://github.com/WhisperSystems/SignalServiceKit.git
SocketRocket:
:commit: 8096fef47d582bff8ae3758c9ae7af1d55ea53d6
diff --git a/Signal/Signal-Info.plist b/Signal/Signal-Info.plist
index de417bee2..25023fcdc 100644
--- a/Signal/Signal-Info.plist
+++ b/Signal/Signal-Info.plist
@@ -21,7 +21,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.5.1
+ 2.5.2
CFBundleSignature
????
CFBundleURLTypes
@@ -38,7 +38,7 @@
CFBundleVersion
- 2.5.1.0
+ 2.5.2.2
ITSAppUsesNonExemptEncryption
LOGS_EMAIL
diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m
index 514af3c05..05d0f23d6 100644
--- a/Signal/src/AppDelegate.m
+++ b/Signal/src/AppDelegate.m
@@ -60,8 +60,6 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
}
[Environment.getCurrent initCallListener];
- [self setupTSKitEnv];
-
BOOL loggingIsEnabled;
#ifdef DEBUG
@@ -78,6 +76,8 @@ static NSString *const kURLHostVerifyPrefix = @"verify";
[DebugLogger.sharedLogger enableFileLogging];
}
+ [self setupTSKitEnv];
+
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:kStoryboardName bundle:[NSBundle mainBundle]];
UIViewController *viewController =
[storyboard instantiateViewControllerWithIdentifier:kInitialViewControllerIdentifier];
diff --git a/Signal/src/environment/VersionMigrations.m b/Signal/src/environment/VersionMigrations.m
index 722ec6f91..7c5c3ba11 100644
--- a/Signal/src/environment/VersionMigrations.m
+++ b/Signal/src/environment/VersionMigrations.m
@@ -75,6 +75,14 @@
});
}
+ if ([self isVersion:previousVersion atLeast:@"2.0.0" andLessThan:@"2.5.2"] && [TSAccountManager isRegistered]) {
+ [[TSStorageManager sharedManager].dbConnection
+ readWriteWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
+ NSUInteger legacyRecipientCount = [transaction numberOfKeysInCollection:@"TSRecipient"];
+ DDLogWarn(@"Removing %lu objects from TSRecipient collection", (unsigned long)legacyRecipientCount);
+ [transaction removeAllObjectsInCollection:@"TSRecipient"];
+ }];
+ }
[Environment.preferences setAndGetCurrentVersion];
}