From 9006ff604f49aa4b1b119adce68b94fe67571331 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Thu, 1 Sep 2016 15:30:46 -0400 Subject: [PATCH] Multi device read receipts. All the heavy lifting is in SignalServiceKit. // FREEBIE --- Podfile | 3 +-- Podfile.lock | 14 +++++++++----- Signal/src/AppDelegate.m | 7 ++++++- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Podfile b/Podfile index d61c253e0..9928bc2de 100644 --- a/Podfile +++ b/Podfile @@ -3,8 +3,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'Signal' do pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git' - #pod 'SignalServiceKit', :git => 'https://github.com/WhisperSystems/SignalServiceKit.git' - pod 'SignalServiceKit', path: '../SignalServiceKit' + pod 'SignalServiceKit', :git => 'https://github.com/WhisperSystems/SignalServiceKit.git', branch: 'dt' pod 'OpenSSL', '~> 1.0.208' pod 'PastelogKit', '~> 1.3' pod 'FFCircularProgressView', '~> 0.5' diff --git a/Podfile.lock b/Podfile.lock index 59de4c003..856386904 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -33,7 +33,7 @@ PODS: - JSQMessagesViewController (7.3.4): - JSQSystemSoundPlayer (~> 2.0.1) - JSQSystemSoundPlayer (2.0.1) - - libPhoneNumber-iOS (0.8.15) + - libPhoneNumber-iOS (0.8.16) - Mantle (2.0.7): - Mantle/extobjc (= 2.0.7) - Mantle/extobjc (2.0.7) @@ -119,16 +119,20 @@ DEPENDENCIES: - OpenSSL (~> 1.0.208) - PastelogKit (~> 1.3) - SCWaveformView (~> 1.0) - - SignalServiceKit (from `../SignalServiceKit`) + - SignalServiceKit (from `https://github.com/WhisperSystems/SignalServiceKit.git`, branch `dt`) - SocketRocket (from `https://github.com/facebook/SocketRocket.git`) EXTERNAL SOURCES: SignalServiceKit: - :path: "../SignalServiceKit" + :branch: dt + :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :git: https://github.com/facebook/SocketRocket.git CHECKOUT OPTIONS: + SignalServiceKit: + :commit: 80be2b6db99ceb5e8f77d84a219d0c2a9dd9f5a2 + :git: https://github.com/WhisperSystems/SignalServiceKit.git SocketRocket: :commit: 8096fef47d582bff8ae3758c9ae7af1d55ea53d6 :git: https://github.com/facebook/SocketRocket.git @@ -143,7 +147,7 @@ SPEC CHECKSUMS: HKDFKit: c058305d6f64b84f28c50bd7aa89574625bcb62a JSQMessagesViewController: 39fed975e3c9f8eba7292071e29eeb541d105e66 JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d - libPhoneNumber-iOS: 62a740e1ea5741060f5cec0f788b52071115cf31 + libPhoneNumber-iOS: acb5805f67892db37adc3440290a367923672b51 Mantle: bc40bb061d8c2c6fb48d5083e04d928c3b7f73d9 OpenSSL: b187269d386b07452f56af273764ea0636dd5da8 PastelogKit: 7b475be4cf577713506a943dd940bcc0499c8bca @@ -158,6 +162,6 @@ SPEC CHECKSUMS: UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d YapDatabase: 713d4018cfacbd6e77dd430710ca84730e450980 -PODFILE CHECKSUM: fa9416a71a75bf01fde5554c0505c69f88921ab7 +PODFILE CHECKSUM: bcac03a0ce180ba50c3467068062f8e55e11e778 COCOAPODS: 1.0.1 diff --git a/Signal/src/AppDelegate.m b/Signal/src/AppDelegate.m index 8040e0454..1659a1fd7 100644 --- a/Signal/src/AppDelegate.m +++ b/Signal/src/AppDelegate.m @@ -2,10 +2,10 @@ #import "AppStoreRating.h" #import "CategorizingLogger.h" #import "CodeVerificationViewController.h" -#import "OWSContactsManager.h" #import "DebugLogger.h" #import "Environment.h" #import "NotificationsManager.h" +#import "OWSContactsManager.h" #import "PreferencesUtil.h" #import "PushManager.h" #import "Release.h" @@ -15,6 +15,7 @@ #import "TSSocketManager.h" #import "TextSecureKitEnv.h" #import "VersionMigrations.h" +#import static NSString *const kStoryboardName = @"Storyboard"; static NSString *const kInitialViewControllerIdentifier = @"UserInitialViewController"; @@ -24,6 +25,7 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; @interface AppDelegate () @property (nonatomic, retain) UIWindow *screenProtectionWindow; +@property (nonatomic) OWSReadReceiptObserver *readReceiptObserver; @end @@ -117,6 +119,9 @@ static NSString *const kURLHostVerifyPrefix = @"verify"; [TextSecureKitEnv sharedEnv].contactsManager = [Environment getCurrent].contactsManager; [[TSStorageManager sharedManager] setupDatabase]; [TextSecureKitEnv sharedEnv].notificationsManager = [[NotificationsManager alloc] init]; + self.readReceiptObserver = + [[OWSReadReceiptObserver alloc] initWithMessagesManager:[TSMessagesManager sharedManager]]; + [self.readReceiptObserver startObserving]; } - (void)application:(UIApplication *)application