Apply assert to ensure singletons are only created once.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent afcb08c105
commit d00c892158

@ -5,8 +5,8 @@ target 'Signal' do
pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git' pod 'SocketRocket', :git => 'https://github.com/facebook/SocketRocket.git'
pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git' pod 'AxolotlKit', git: 'https://github.com/WhisperSystems/SignalProtocolKit.git'
#pod 'AxolotlKit', path: '../SignalProtocolKit' #pod 'AxolotlKit', path: '../SignalProtocolKit'
pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git' #pod 'SignalServiceKit', git: 'https://github.com/WhisperSystems/SignalServiceKit.git'
#pod 'SignalServiceKit', path: '../SignalServiceKit' pod 'SignalServiceKit', path: '../SignalServiceKit'
pod 'OpenSSL' pod 'OpenSSL'
pod 'SCWaveformView', '~> 1.0' pod 'SCWaveformView', '~> 1.0'
pod 'JSQMessagesViewController' pod 'JSQMessagesViewController'

@ -116,14 +116,14 @@ DEPENDENCIES:
- OpenSSL - OpenSSL
- PureLayout - PureLayout
- SCWaveformView (~> 1.0) - SCWaveformView (~> 1.0)
- SignalServiceKit (from `https://github.com/WhisperSystems/SignalServiceKit.git`) - SignalServiceKit (from `../SignalServiceKit`)
- SocketRocket (from `https://github.com/facebook/SocketRocket.git`) - SocketRocket (from `https://github.com/facebook/SocketRocket.git`)
EXTERNAL SOURCES: EXTERNAL SOURCES:
AxolotlKit: AxolotlKit:
:git: https://github.com/WhisperSystems/SignalProtocolKit.git :git: https://github.com/WhisperSystems/SignalProtocolKit.git
SignalServiceKit: SignalServiceKit:
:git: https://github.com/WhisperSystems/SignalServiceKit.git :path: ../SignalServiceKit
SocketRocket: SocketRocket:
:git: https://github.com/facebook/SocketRocket.git :git: https://github.com/facebook/SocketRocket.git
@ -131,9 +131,6 @@ CHECKOUT OPTIONS:
AxolotlKit: AxolotlKit:
:commit: cbf2f47d59dd54d6d720fe787f835bd767443bb6 :commit: cbf2f47d59dd54d6d720fe787f835bd767443bb6
:git: https://github.com/WhisperSystems/SignalProtocolKit.git :git: https://github.com/WhisperSystems/SignalProtocolKit.git
SignalServiceKit:
:commit: 8b5f82eb6d8393074987697cea6986b55fec800e
:git: https://github.com/WhisperSystems/SignalServiceKit.git
SocketRocket: SocketRocket:
:commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf :commit: 877ac7438be3ad0b45ef5ca3969574e4b97112bf
:git: https://github.com/facebook/SocketRocket.git :git: https://github.com/facebook/SocketRocket.git
@ -161,6 +158,6 @@ SPEC CHECKSUMS:
UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d
YapDatabase: b1e43555a34a5298e23a045be96817a5ef0da58f YapDatabase: b1e43555a34a5298e23a045be96817a5ef0da58f
PODFILE CHECKSUM: a060377074cb361576f346a58d1503b3bd708440 PODFILE CHECKSUM: cb02bca5a68f5b03df77200dae4ce1235a007807
COCOAPODS: 1.2.0 COCOAPODS: 1.2.0

@ -39,6 +39,8 @@ typedef void (^pushTokensSuccessBlock)(NSString *pushToken, NSString *voipToken)
@interface PushManager : NSObject <PKPushRegistryDelegate> @interface PushManager : NSObject <PKPushRegistryDelegate>
- (instancetype)init NS_UNAVAILABLE;
+ (PushManager *)sharedManager; + (PushManager *)sharedManager;
/** /**

@ -77,6 +77,8 @@
_callBackgroundTask = UIBackgroundTaskInvalid; _callBackgroundTask = UIBackgroundTaskInvalid;
_currentNotifications = [NSMutableArray array]; _currentNotifications = [NSMutableArray array];
OWSSingletonAssert();
return self; return self;
} }

Loading…
Cancel
Save