diff --git a/Podfile.lock b/Podfile.lock index d9a1338fb4..04daa08c19 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -132,7 +132,7 @@ CHECKOUT OPTIONS: :commit: cbf2f47d59dd54d6d720fe787f835bd767443bb6 :git: https://github.com/WhisperSystems/SignalProtocolKit.git SignalServiceKit: - :commit: 4f9e053248dd87f59e198be5d00be5b9bd48bfa9 + :commit: 45b8dc9c96fe3aeb6e0c46eff7912670d2fc41a9 :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf diff --git a/Signal/Signal-Prefix.pch b/Signal/Signal-Prefix.pch index f5ce9f9e98..fb20452f68 100644 --- a/Signal/Signal-Prefix.pch +++ b/Signal/Signal-Prefix.pch @@ -19,7 +19,7 @@ #import #import #import - #import "iOSVersions.h" + #import #define SignalAlertView(title,msg) [[[UIAlertView alloc] initWithTitle:title message:msg delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil, nil] show] #endif diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index a991ef06dd..88d303f19a 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -191,7 +191,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [Environment setCurrent:[Release releaseEnvironment]]; // Encryption/Descryption mutates session state and must be synchronized on a serial queue. - [SessionCipher setSessionCipherDispatchQueue:[OWSDispatch sessionCipher]]; + [SessionCipher setSessionCipherDispatchQueue:[OWSDispatch sessionStoreQueue]]; TextSecureKitEnv *sharedEnv = [[TextSecureKitEnv alloc] initWithCallMessageHandler:[Environment getCurrent].callMessageHandler diff --git a/Signal/src/ViewControllers/DebugUITableViewController.m b/Signal/src/ViewControllers/DebugUITableViewController.m index 2af90b643f..300080ed3b 100644 --- a/Signal/src/ViewControllers/DebugUITableViewController.m +++ b/Signal/src/ViewControllers/DebugUITableViewController.m @@ -67,12 +67,29 @@ NS_ASSUME_NONNULL_BEGIN }], ]]]; - [contents addSection:[OWSTableSection sectionWithTitle:@"Print to Debug Log" - items:@[ [OWSTableItem itemWithTitle:@"Print all sessions" - actionBlock:^{ - [[TSStorageManager sharedManager] - printAllSessions]; - }] ]]]; + [contents + addSection:[OWSTableSection + sectionWithTitle:@"Session State" + items:@[ + [OWSTableItem itemWithTitle:@"Print all sessions" + actionBlock:^{ + dispatch_async([OWSDispatch sessionStoreQueue], ^{ + [[TSStorageManager sharedManager] printAllSessions]; + }); + }], + [OWSTableItem itemWithTitle:@"Delete session (Contact Thread Only)" + actionBlock:^{ + if (![thread isKindOfClass:[TSContactThread class]]) { + DDLogError(@"Trying to delete session for group thread."); + OWSAssert(NO); + } + dispatch_async([OWSDispatch sessionStoreQueue], ^{ + [[TSStorageManager sharedManager] + deleteAllSessionsForContact:thread.contactIdentifier]; + }); + }], + + ]]]; DebugUITableViewController *viewController = [DebugUITableViewController new]; viewController.contents = contents; diff --git a/Signal/src/environment/iOSVersions.h b/Signal/src/environment/iOSVersions.h deleted file mode 100644 index d1f60d207d..0000000000 --- a/Signal/src/environment/iOSVersions.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// iOSVersions.h -// Signal -// -// Created by Frederic Jacobs on 03/08/14. -// Copyright (c) 2014 Open Whisper Systems. All rights reserved. -// - -#import -#include - -#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(major, minor) \ - ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = major, .minorVersion = minor, .patchVersion = 0}]) - diff --git a/Signal/src/util/UIFont+OWS.m b/Signal/src/util/UIFont+OWS.m index 8f5aa895e4..7757294aee 100644 --- a/Signal/src/util/UIFont+OWS.m +++ b/Signal/src/util/UIFont+OWS.m @@ -3,7 +3,6 @@ // #import "UIFont+OWS.h" -#import "iOSVersions.h" @implementation UIFont (OWS)