iOS 9 Support
- Fixing size classes rendering bugs. - Supporting native iOS San Francisco font. - Quick Reply - Settings now slide to the left as suggested in original designed opposed to modal. - Simplification of restraints on many screens. - Full-API compatiblity with iOS 9 and iOS 8 legacy support. - Customized AddressBook Permission prompt when restrictions are enabled. If user installed Signal previously and already approved access to Contacts, don't bugg him again. - Fixes crash in migration for users who installed Signal <2.1.3 but hadn't signed up yet. - Xcode 7 / iOS 9 Travis Support - Bitcode Support is disabled until it is better understood how exactly optimizations are performed. In a first time, we will split out the crypto code into a separate binary to make it easier to optimize the non-sensitive code. Blog post with more details coming. - Partial ATS support. We are running our own Certificate Authority at Open Whisper Systems. Signal is doing certificate pinning to verify that certificates were signed by our own CA. Unfortunately Apple's App Transport Security requires to hand over chain verification to their framework with no control over the trust store. We have filed a radar to get ATS features with pinned certificates. In the meanwhile, ATS is disabled on our domain. We also followed Amazon's recommendations for our S3 domain we use to upload/download attachments. (#891) - Implement a unified `AFSecurityOWSPolicy` pinning strategy accross libraries (AFNetworking RedPhone/TextSecure & SocketRocket).
This commit is contained in:
parent
33428d45fd
commit
bbde7cd2a8
10
.travis.yml
10
.travis.yml
|
@ -1,6 +1,12 @@
|
|||
language: objective-c
|
||||
osx_image: beta-xcode6.3
|
||||
xcode_sdk: iphonesimulator8.3
|
||||
|
||||
osx_image: xcode7
|
||||
xcode_sdk: iphonesimulator9.0
|
||||
|
||||
before_install:
|
||||
- brew update
|
||||
- brew uninstall xctool && brew install --HEAD xctool
|
||||
install: true
|
||||
|
||||
xcode_workspace: Signal.xcworkspace
|
||||
xcode_scheme: Signal
|
||||
|
|
|
@ -642,7 +642,7 @@
|
|||
A1B9895C1725EC1300B6E8B5 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0500;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = "Twisted Oak Studios";
|
||||
};
|
||||
buildConfigurationList = A1B9895F1725EC1300B6E8B5 /* Build configuration list for PBXProject "spandsp" */;
|
||||
|
@ -686,6 +686,7 @@
|
|||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0610"
|
||||
LastUpgradeVersion = "0700"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -23,21 +23,24 @@
|
|||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
|
@ -52,10 +55,10 @@
|
|||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
|
|
|
@ -472,7 +472,7 @@
|
|||
A1FDCBF216DBC57D00868894 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0500;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = "Twisted Oak Studios";
|
||||
};
|
||||
buildConfigurationList = A1FDCBF516DBC57D00868894 /* Build configuration list for PBXProject "speex" */;
|
||||
|
@ -562,6 +562,7 @@
|
|||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0610"
|
||||
LastUpgradeVersion = "0700"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -23,21 +23,24 @@
|
|||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
|
@ -52,10 +55,10 @@
|
|||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
|
|
13
Podfile
13
Podfile
|
@ -1,23 +1,22 @@
|
|||
platform :ios, '7.0'
|
||||
platform :ios, '8.0'
|
||||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
inhibit_all_warnings!
|
||||
|
||||
link_with ["Signal", "SignalTests"]
|
||||
|
||||
pod 'OpenSSL', '~> 1.0.204'
|
||||
pod 'OpenSSL', '~> 1.0.204.1'
|
||||
pod 'libPhoneNumber-iOS', '~> 0.8.7'
|
||||
pod 'AxolotlKit', '~> 0.7'
|
||||
pod 'AxolotlKit'
|
||||
pod 'PastelogKit', '~> 1.3'
|
||||
pod 'TwistedOakCollapsingFutures','~> 1.0'
|
||||
pod 'AFNetworking', '~> 2.5.4'
|
||||
pod 'AFNetworking', '~> 2.6'
|
||||
pod 'Mantle', '~> 2.0.4'
|
||||
pod 'FFCircularProgressView', '~> 0.5'
|
||||
pod 'SCWaveformView', '~> 1.0'
|
||||
pod 'YapDatabase/SQLCipher', '~> 2.7'
|
||||
pod 'YapDatabase/SQLCipher', '~> 2.7.2'
|
||||
pod 'iRate', '~> 1.11'
|
||||
pod 'SSKeychain'
|
||||
pod 'DJWActionSheet'
|
||||
|
||||
pod 'SocketRocket', :git => 'https://github.com/FredericJacobs/SocketRocket.git', :commit => 'f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b'
|
||||
pod 'SocketRocket', :git => 'https://github.com/FredericJacobs/SocketRocket.git', :commit => 'dd7e47fed78214785d7c032081da94008335fc35'
|
||||
pod 'JSQMessagesViewController', :git => 'https://github.com/WhisperSystems/JSQMessagesViewController', :commit => 'e5582fef8a6b3e35f8070361ef37237222da712b'
|
||||
pod 'APDropDownNavToolbar', :git => 'https://github.com/corbett/APDropDownNavToolbar.git', :branch => 'master'
|
||||
|
|
88
Podfile.lock
88
Podfile.lock
|
@ -1,24 +1,24 @@
|
|||
PODS:
|
||||
- 25519 (2.0.1)
|
||||
- AFNetworking (2.5.4):
|
||||
- AFNetworking/NSURLConnection (= 2.5.4)
|
||||
- AFNetworking/NSURLSession (= 2.5.4)
|
||||
- AFNetworking/Reachability (= 2.5.4)
|
||||
- AFNetworking/Security (= 2.5.4)
|
||||
- AFNetworking/Serialization (= 2.5.4)
|
||||
- AFNetworking/UIKit (= 2.5.4)
|
||||
- AFNetworking/NSURLConnection (2.5.4):
|
||||
- 25519 (2.0.2)
|
||||
- AFNetworking (2.6.1):
|
||||
- AFNetworking/NSURLConnection (= 2.6.1)
|
||||
- AFNetworking/NSURLSession (= 2.6.1)
|
||||
- AFNetworking/Reachability (= 2.6.1)
|
||||
- AFNetworking/Security (= 2.6.1)
|
||||
- AFNetworking/Serialization (= 2.6.1)
|
||||
- AFNetworking/UIKit (= 2.6.1)
|
||||
- AFNetworking/NSURLConnection (2.6.1):
|
||||
- AFNetworking/Reachability
|
||||
- AFNetworking/Security
|
||||
- AFNetworking/Serialization
|
||||
- AFNetworking/NSURLSession (2.5.4):
|
||||
- AFNetworking/NSURLSession (2.6.1):
|
||||
- AFNetworking/Reachability
|
||||
- AFNetworking/Security
|
||||
- AFNetworking/Serialization
|
||||
- AFNetworking/Reachability (2.5.4)
|
||||
- AFNetworking/Security (2.5.4)
|
||||
- AFNetworking/Serialization (2.5.4)
|
||||
- AFNetworking/UIKit (2.5.4):
|
||||
- AFNetworking/Reachability (2.6.1)
|
||||
- AFNetworking/Security (2.6.1)
|
||||
- AFNetworking/Serialization (2.6.1)
|
||||
- AFNetworking/UIKit (2.6.1):
|
||||
- AFNetworking/NSURLConnection
|
||||
- AFNetworking/NSURLSession
|
||||
- APDropDownNavToolbar (1.1)
|
||||
|
@ -26,13 +26,13 @@ PODS:
|
|||
- 25519 (~> 2.0.1)
|
||||
- HKDFKit (~> 0.0.3)
|
||||
- ProtocolBuffers (~> 1.9.8)
|
||||
- CocoaLumberjack (2.0.1):
|
||||
- CocoaLumberjack/Default (= 2.0.1)
|
||||
- CocoaLumberjack/Extensions (= 2.0.1)
|
||||
- CocoaLumberjack/Core (2.0.1)
|
||||
- CocoaLumberjack/Default (2.0.1):
|
||||
- CocoaLumberjack (2.2.0):
|
||||
- CocoaLumberjack/Default (= 2.2.0)
|
||||
- CocoaLumberjack/Extensions (= 2.2.0)
|
||||
- CocoaLumberjack/Core (2.2.0)
|
||||
- CocoaLumberjack/Default (2.2.0):
|
||||
- CocoaLumberjack/Core
|
||||
- CocoaLumberjack/Extensions (2.0.1):
|
||||
- CocoaLumberjack/Extensions (2.2.0):
|
||||
- CocoaLumberjack/Default
|
||||
- DJWActionSheet (1.0.4)
|
||||
- FFCircularProgressView (0.5)
|
||||
|
@ -41,16 +41,16 @@ PODS:
|
|||
- JSQMessagesViewController (7.1.0):
|
||||
- JSQSystemSoundPlayer (~> 2.0.1)
|
||||
- JSQSystemSoundPlayer (2.0.1)
|
||||
- libPhoneNumber-iOS (0.8.7)
|
||||
- Mantle (2.0.4):
|
||||
- Mantle/extobjc (= 2.0.4)
|
||||
- Mantle/extobjc (2.0.4)
|
||||
- OpenSSL (1.0.204)
|
||||
- libPhoneNumber-iOS (0.8.8)
|
||||
- Mantle (2.0.5):
|
||||
- Mantle/extobjc (= 2.0.5)
|
||||
- Mantle/extobjc (2.0.5)
|
||||
- OpenSSL (1.0.204.1)
|
||||
- PastelogKit (1.3):
|
||||
- CocoaLumberjack (~> 2.0)
|
||||
- ProtocolBuffers (1.9.8)
|
||||
- ProtocolBuffers (1.9.9.1)
|
||||
- SCWaveformView (1.0.0)
|
||||
- SocketRocket (0.3.1-beta2)
|
||||
- SocketRocket (0.4.2)
|
||||
- SQLCipher/common (3.1.0)
|
||||
- SQLCipher/fts (3.1.0):
|
||||
- SQLCipher/common
|
||||
|
@ -58,15 +58,15 @@ PODS:
|
|||
- TwistedOakCollapsingFutures (1.0.0):
|
||||
- UnionFind (~> 1.0)
|
||||
- UnionFind (1.0.1)
|
||||
- YapDatabase/SQLCipher (2.7.1):
|
||||
- YapDatabase/SQLCipher (2.7.3):
|
||||
- CocoaLumberjack (~> 2)
|
||||
- SQLCipher/fts
|
||||
|
||||
DEPENDENCIES:
|
||||
- AFNetworking (~> 2.5.4)
|
||||
- AFNetworking (~> 2.6)
|
||||
- APDropDownNavToolbar (from `https://github.com/corbett/APDropDownNavToolbar.git`,
|
||||
branch `master`)
|
||||
- AxolotlKit (~> 0.7)
|
||||
- AxolotlKit
|
||||
- DJWActionSheet
|
||||
- FFCircularProgressView (~> 0.5)
|
||||
- iRate (~> 1.11)
|
||||
|
@ -74,14 +74,14 @@ DEPENDENCIES:
|
|||
commit `e5582fef8a6b3e35f8070361ef37237222da712b`)
|
||||
- libPhoneNumber-iOS (~> 0.8.7)
|
||||
- Mantle (~> 2.0.4)
|
||||
- OpenSSL (~> 1.0.204)
|
||||
- OpenSSL (~> 1.0.204.1)
|
||||
- PastelogKit (~> 1.3)
|
||||
- SCWaveformView (~> 1.0)
|
||||
- SocketRocket (from `https://github.com/FredericJacobs/SocketRocket.git`, commit
|
||||
`f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b`)
|
||||
`dd7e47fed78214785d7c032081da94008335fc35`)
|
||||
- SSKeychain
|
||||
- TwistedOakCollapsingFutures (~> 1.0)
|
||||
- YapDatabase/SQLCipher (~> 2.7)
|
||||
- YapDatabase/SQLCipher (~> 2.7.2)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
APDropDownNavToolbar:
|
||||
|
@ -91,7 +91,7 @@ EXTERNAL SOURCES:
|
|||
:commit: e5582fef8a6b3e35f8070361ef37237222da712b
|
||||
:git: https://github.com/WhisperSystems/JSQMessagesViewController
|
||||
SocketRocket:
|
||||
:commit: f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b
|
||||
:commit: dd7e47fed78214785d7c032081da94008335fc35
|
||||
:git: https://github.com/FredericJacobs/SocketRocket.git
|
||||
|
||||
CHECKOUT OPTIONS:
|
||||
|
@ -102,32 +102,32 @@ CHECKOUT OPTIONS:
|
|||
:commit: e5582fef8a6b3e35f8070361ef37237222da712b
|
||||
:git: https://github.com/WhisperSystems/JSQMessagesViewController
|
||||
SocketRocket:
|
||||
:commit: f1567f1be7ce49ecf2c9d284ead8ea7c422ee99b
|
||||
:commit: dd7e47fed78214785d7c032081da94008335fc35
|
||||
:git: https://github.com/FredericJacobs/SocketRocket.git
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
'25519': cd3f6f0658ac9dd4f95d7fb906378e1d0649c46c
|
||||
AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e
|
||||
'25519': dc4bad7e2dbcbf1efa121068a705a44cd98c80fc
|
||||
AFNetworking: 8e4e60500beb8bec644cf575beee72990a76d399
|
||||
APDropDownNavToolbar: 5d0c3f363208543d20e86ddb4630927c28cdfd4b
|
||||
AxolotlKit: 8652fca51f4bc8225cbda791b0026c21e912b694
|
||||
CocoaLumberjack: 019d1361244274a6138c788c6cb80baabc13fb8f
|
||||
CocoaLumberjack: 17fe8581f84914d5d7e6360f7c70022b173c3ae0
|
||||
DJWActionSheet: 2fe54b1298a7f0fe44462233752c76a530e0cd80
|
||||
FFCircularProgressView: 683a4ab1e1bd613246a3dffa61503ffdebcde8d8
|
||||
HKDFKit: c058305d6f64b84f28c50bd7aa89574625bcb62a
|
||||
iRate: 599ed07c854e0695f3c605d1b2a64c67d912acb7
|
||||
JSQMessagesViewController: ca11f86fa68ca70835f05e169df9244147c1dc40
|
||||
JSQSystemSoundPlayer: c5850e77a4363ffd374cd851154b9af93264ed8d
|
||||
libPhoneNumber-iOS: 1bccd3288375d954b0b904e26061cecaa0fb83d6
|
||||
Mantle: 6bee68168423948be0c0c5924832bf3af188e099
|
||||
OpenSSL: 576b352e6e6e60793ca133c6785736e3cbc31a09
|
||||
libPhoneNumber-iOS: fe877b7c44c270a9da2082d3e2892d5316f6a2f9
|
||||
Mantle: 1912395033f601de5adc8ee91e48f46e4c7051ad
|
||||
OpenSSL: 7f853fcada78e5162c2183b4d90ebbd0aa02f5ac
|
||||
PastelogKit: 7b475be4cf577713506a943dd940bcc0499c8bca
|
||||
ProtocolBuffers: 9a4a171c0c7cc8f21dd29aeca4f9ac775d84a880
|
||||
ProtocolBuffers: 1aac782c597fd7b95c5d278df55c34bff2937909
|
||||
SCWaveformView: 52a96750255d817e300565a80c81fb643e233e07
|
||||
SocketRocket: 70df1983148525857ced17c57207bfb939bc6b8e
|
||||
SocketRocket: ffe08119b00ef982f6c37052a4705a057c8494ad
|
||||
SQLCipher: c44fcca49c31483c2489cfb79aa7a69407f3794a
|
||||
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
|
||||
TwistedOakCollapsingFutures: f359b90f203e9ab13dfb92c9ff41842a7fe1cd0c
|
||||
UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d
|
||||
YapDatabase: e9ff9a189e99268a331575411e8462e4c6df2bc3
|
||||
YapDatabase: 6d6a30e97face6c3158830823c27614afe83e1e0
|
||||
|
||||
COCOAPODS: 0.38.2
|
||||
|
|
2
Pods
2
Pods
|
@ -1 +1 @@
|
|||
Subproject commit 1101c9b712ac694978812826833de1177e71a7a4
|
||||
Subproject commit e7975283fc4cca612967198d5c749e1700d0c78b
|
|
@ -7,6 +7,9 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
057B54FA6208D8269CFE6146 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D488327B732CFBE8349C7024 /* libPods.a */; };
|
||||
28508611F3DF531CEDF5103D /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D488327B732CFBE8349C7024 /* libPods.a */; };
|
||||
53EF5134D8FB5FCBDEDE2A35 /* (null) in Frameworks */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
701231B518ECAA4500D456C4 /* EvpMessageDigest.m in Sources */ = {isa = PBXBuildFile; fileRef = 701231B418ECAA4500D456C4 /* EvpMessageDigest.m */; };
|
||||
70377AAB1918450100CAF501 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70377AAA1918450100CAF501 /* MobileCoreServices.framework */; };
|
||||
7038632718F70C0700D4A43F /* CryptoTools.m in Sources */ = {isa = PBXBuildFile; fileRef = 7038632418F70C0700D4A43F /* CryptoTools.m */; };
|
||||
|
@ -16,9 +19,6 @@
|
|||
70B800AF190C548D0042E3F0 /* libspeex.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 70B800AC190C54790042E3F0 /* libspeex.a */; };
|
||||
70B8FEE21909FE360042E3F0 /* 171756__nenadsimic__picked-coin-echo-2.wav in Resources */ = {isa = PBXBuildFile; fileRef = 70B8FEE11909FE360042E3F0 /* 171756__nenadsimic__picked-coin-echo-2.wav */; };
|
||||
70BAFD5D190584BE00FA5E0B /* NotificationTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 70BAFD5C190584BE00FA5E0B /* NotificationTracker.m */; };
|
||||
765052AA18294C9F008313E1 /* HelveticaNeueLTStd-Lt.otf in Resources */ = {isa = PBXBuildFile; fileRef = 765052A518294C9F008313E1 /* HelveticaNeueLTStd-Lt.otf */; };
|
||||
765052AC18294C9F008313E1 /* HelveticaNeueLTStd-Md.otf in Resources */ = {isa = PBXBuildFile; fileRef = 765052A618294C9F008313E1 /* HelveticaNeueLTStd-Md.otf */; };
|
||||
765052B3182BF839008313E1 /* HelveticaNeueLTStd-Th.otf in Resources */ = {isa = PBXBuildFile; fileRef = 765052B1182BF839008313E1 /* HelveticaNeueLTStd-Th.otf */; };
|
||||
768A1A2B17FC9CD300E00ED8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 768A1A2A17FC9CD300E00ED8 /* libz.dylib */; };
|
||||
76919BF71805D190008C664A /* ContactManagerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 76919BF61805D190008C664A /* ContactManagerTest.m */; };
|
||||
76C87F19181EFCE600C4ACAB /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */; };
|
||||
|
@ -223,6 +223,7 @@
|
|||
76EB065B18170B34006006FC /* NextResponderScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 76EB051018170B33006006FC /* NextResponderScrollView.m */; };
|
||||
76EB068618170B34006006FC /* ContactTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 76EB052F18170B33006006FC /* ContactTableViewCell.m */; };
|
||||
76EB068718170B34006006FC /* ContactTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 76EB052F18170B33006006FC /* ContactTableViewCell.m */; };
|
||||
7FAA7C04BD50D54101D1BB1A /* (null) in Frameworks */ = {isa = PBXBuildFile; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
A10FDF79184FB4BB007FF963 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */; };
|
||||
A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */; };
|
||||
A123C14916F902EE000AE905 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A163E8AA16F3F6A90094D68B /* Security.framework */; };
|
||||
|
@ -280,7 +281,7 @@
|
|||
A59E6D721A79E5D100D98E2E /* MIMETypeUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = A59E6D711A79E5D100D98E2E /* MIMETypeUtil.m */; };
|
||||
A5D0699B1A50E9CB004CB540 /* ShowGroupMembersViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A5D069991A50E9CB004CB540 /* ShowGroupMembersViewController.m */; };
|
||||
A5E9D4BB1A65FAD800E4481C /* TSVideoAttachmentAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = A5E9D4B91A65FAD800E4481C /* TSVideoAttachmentAdapter.m */; };
|
||||
AA0C8E498E2046B0B81EEE6E /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8313AE91B4954215858A5662 /* libPods.a */; };
|
||||
AA0C8E498E2046B0B81EEE6E /* (null) in Frameworks */ = {isa = PBXBuildFile; };
|
||||
AD41D7B51A6F6F0600241130 /* play_button.png in Resources */ = {isa = PBXBuildFile; fileRef = AD41D7B31A6F6F0600241130 /* play_button.png */; };
|
||||
AD41D7B61A6F6F0600241130 /* play_button@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = AD41D7B41A6F6F0600241130 /* play_button@2x.png */; };
|
||||
AD83FF3F1A73426500B5C81A /* audio_pause_button_blue.png in Resources */ = {isa = PBXBuildFile; fileRef = AD83FF381A73426500B5C81A /* audio_pause_button_blue.png */; };
|
||||
|
@ -307,6 +308,7 @@
|
|||
B62EFBEC1A91352F0072ADD3 /* TSInvalidIdentityKeyErrorMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = B62EFBE71A91352F0072ADD3 /* TSInvalidIdentityKeyErrorMessage.m */; };
|
||||
B62EFBED1A91352F0072ADD3 /* TSInvalidIdentityKeyReceivingErrorMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = B62EFBE91A91352F0072ADD3 /* TSInvalidIdentityKeyReceivingErrorMessage.m */; };
|
||||
B62EFBEE1A91352F0072ADD3 /* TSInvalidIdentityKeySendingErrorMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = B62EFBEB1A91352F0072ADD3 /* TSInvalidIdentityKeySendingErrorMessage.m */; };
|
||||
B63006431B9631EC00F2FEB5 /* AFSecurityOWSPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = B63006421B9631EC00F2FEB5 /* AFSecurityOWSPolicy.m */; settings = {ASSET_TAGS = (); }; };
|
||||
B633C5861A1D190B0059AC12 /* call@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B633C5041A1D190B0059AC12 /* call@2x.png */; };
|
||||
B633C58D1A1D190B0059AC12 /* contact_default_feed.png in Resources */ = {isa = PBXBuildFile; fileRef = B633C50B1A1D190B0059AC12 /* contact_default_feed.png */; };
|
||||
B633C59D1A1D190B0059AC12 /* endcall@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B633C51B1A1D190B0059AC12 /* endcall@2x.png */; };
|
||||
|
@ -409,7 +411,6 @@
|
|||
B6FE7EBA1ADD63AE00A6D22F /* NSData+ows_StripToken.m in Sources */ = {isa = PBXBuildFile; fileRef = B6FE7EB91ADD63AE00A6D22F /* NSData+ows_StripToken.m */; };
|
||||
B90418E6183E9DD40038554A /* DateUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B90418E5183E9DD40038554A /* DateUtil.m */; };
|
||||
B90418E7183E9DD40038554A /* DateUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B90418E5183E9DD40038554A /* DateUtil.m */; };
|
||||
B96A3100187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = B96A30FE187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf */; };
|
||||
B97940271832BD2400BD66CB /* UIUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B97940261832BD2400BD66CB /* UIUtil.m */; };
|
||||
B97940281832BD2400BD66CB /* UIUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = B97940261832BD2400BD66CB /* UIUtil.m */; };
|
||||
B97CBFA818860EA3008E0DE9 /* CountryCodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B97CBFA618860EA3008E0DE9 /* CountryCodeViewController.m */; };
|
||||
|
@ -436,6 +437,7 @@
|
|||
D221A0E8169DFFC500537ABF /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A0E7169DFFC500537ABF /* AVFoundation.framework */; };
|
||||
D24B5BD5169F568C00681372 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D24B5BD4169F568C00681372 /* AudioToolbox.framework */; };
|
||||
D2AEACDC16C426DA00C364C0 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */; };
|
||||
DE9907A5A8074160B34A8261 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
|
||||
E1368CBE18A1C36B00109378 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9EB5ABC1884C002007CBB57 /* MessageUI.framework */; };
|
||||
E1370BE018A0686600826894 /* busy.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40718A05754001A532A /* busy.mp3 */; };
|
||||
E1370BE118A0686C00826894 /* completed.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40818A05754001A532A /* completed.mp3 */; };
|
||||
|
@ -444,10 +446,6 @@
|
|||
E1370BE418A0686C00826894 /* outring.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40B18A05754001A532A /* outring.mp3 */; };
|
||||
E1370BE518A0686C00826894 /* r.caf in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40C18A05754001A532A /* r.caf */; };
|
||||
E1370BE618A0686C00826894 /* sonarping.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = E18AB40D18A05754001A532A /* sonarping.mp3 */; };
|
||||
E148751218A06AFD002CC4F3 /* HelveticaNeueLTStd-Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = B96A30FE187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf */; };
|
||||
E148751318A06AFD002CC4F3 /* HelveticaNeueLTStd-Th.otf in Resources */ = {isa = PBXBuildFile; fileRef = 765052B1182BF839008313E1 /* HelveticaNeueLTStd-Th.otf */; };
|
||||
E148751418A06AFD002CC4F3 /* HelveticaNeueLTStd-Lt.otf in Resources */ = {isa = PBXBuildFile; fileRef = 765052A518294C9F008313E1 /* HelveticaNeueLTStd-Lt.otf */; };
|
||||
E148751518A06AFD002CC4F3 /* HelveticaNeueLTStd-Md.otf in Resources */ = {isa = PBXBuildFile; fileRef = 765052A618294C9F008313E1 /* HelveticaNeueLTStd-Md.otf */; };
|
||||
E16E5BEE18AAC40200B7C403 /* EC25KeyAgreementParticipant.m in Sources */ = {isa = PBXBuildFile; fileRef = E16E5BE918AAC40200B7C403 /* EC25KeyAgreementParticipant.m */; };
|
||||
E16E5BEF18AAC40200B7C403 /* EC25KeyAgreementProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = E16E5BEB18AAC40200B7C403 /* EC25KeyAgreementProtocol.m */; };
|
||||
E16E5BF018AAC40200B7C403 /* EvpKeyAgreement.m in Sources */ = {isa = PBXBuildFile; fileRef = E16E5BED18AAC40200B7C403 /* EvpKeyAgreement.m */; };
|
||||
|
@ -473,7 +471,6 @@
|
|||
E197B62418BBF5BB00F073E5 /* SoundPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = E197B62318BBF5BB00F073E5 /* SoundPlayer.m */; };
|
||||
E197B62718BBF63B00F073E5 /* SoundBoard.m in Sources */ = {isa = PBXBuildFile; fileRef = E197B62618BBF63B00F073E5 /* SoundBoard.m */; };
|
||||
E1CD329618BCFF9900B1A496 /* SoundInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = E1CD329518BCFF9900B1A496 /* SoundInstance.m */; };
|
||||
F995AC2FFD6D4442B012604A /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8313AE91B4954215858A5662 /* libPods.a */; };
|
||||
FC31962A1A067D8F0094C78E /* MessageComposeTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FC3196291A067D8F0094C78E /* MessageComposeTableViewController.m */; };
|
||||
FC31962D1A06A2190094C78E /* FingerprintViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FC31962C1A06A2190094C78E /* FingerprintViewController.m */; };
|
||||
FC3196301A0814130094C78E /* SettingsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FC31962F1A0814130094C78E /* SettingsTableViewController.m */; };
|
||||
|
@ -555,9 +552,6 @@
|
|||
70BAFD5B190584BE00FA5E0B /* NotificationTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotificationTracker.h; sourceTree = "<group>"; };
|
||||
70BAFD5C190584BE00FA5E0B /* NotificationTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotificationTracker.m; sourceTree = "<group>"; };
|
||||
70E803ED18F6DD1400BF77BC /* EvpUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EvpUtil.h; sourceTree = "<group>"; };
|
||||
765052A518294C9F008313E1 /* HelveticaNeueLTStd-Lt.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "HelveticaNeueLTStd-Lt.otf"; sourceTree = "<group>"; };
|
||||
765052A618294C9F008313E1 /* HelveticaNeueLTStd-Md.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "HelveticaNeueLTStd-Md.otf"; sourceTree = "<group>"; };
|
||||
765052B1182BF839008313E1 /* HelveticaNeueLTStd-Th.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "HelveticaNeueLTStd-Th.otf"; sourceTree = "<group>"; };
|
||||
768A1A2A17FC9CD300E00ED8 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||
76919BF61805D190008C664A /* ContactManagerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ContactManagerTest.m; path = contact/ContactManagerTest.m; sourceTree = "<group>"; };
|
||||
76C87F18181EFCE600C4ACAB /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
|
||||
|
@ -773,7 +767,6 @@
|
|||
76EB051018170B33006006FC /* NextResponderScrollView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NextResponderScrollView.m; sourceTree = "<group>"; };
|
||||
76EB052E18170B33006006FC /* ContactTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactTableViewCell.h; sourceTree = "<group>"; };
|
||||
76EB052F18170B33006006FC /* ContactTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContactTableViewCell.m; sourceTree = "<group>"; };
|
||||
8313AE91B4954215858A5662 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
91E46203423941C0C94D90E9 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9CC6C6BD3B51923FD6317C94 /* Pods.ad-hoc distribution.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods.ad-hoc distribution.xcconfig"; path = "Pods/Target Support Files/Pods/Pods.ad-hoc distribution.xcconfig"; sourceTree = "<group>"; };
|
||||
A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
|
@ -883,6 +876,8 @@
|
|||
B62EFBE91A91352F0072ADD3 /* TSInvalidIdentityKeyReceivingErrorMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSInvalidIdentityKeyReceivingErrorMessage.m; sourceTree = "<group>"; };
|
||||
B62EFBEA1A91352F0072ADD3 /* TSInvalidIdentityKeySendingErrorMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TSInvalidIdentityKeySendingErrorMessage.h; sourceTree = "<group>"; };
|
||||
B62EFBEB1A91352F0072ADD3 /* TSInvalidIdentityKeySendingErrorMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TSInvalidIdentityKeySendingErrorMessage.m; sourceTree = "<group>"; };
|
||||
B63006411B9631EC00F2FEB5 /* AFSecurityOWSPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSecurityOWSPolicy.h; sourceTree = "<group>"; };
|
||||
B63006421B9631EC00F2FEB5 /* AFSecurityOWSPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityOWSPolicy.m; sourceTree = "<group>"; };
|
||||
B633C5041A1D190B0059AC12 /* call@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "call@2x.png"; sourceTree = "<group>"; };
|
||||
B633C50B1A1D190B0059AC12 /* contact_default_feed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = contact_default_feed.png; sourceTree = "<group>"; };
|
||||
B633C51B1A1D190B0059AC12 /* endcall@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "endcall@2x.png"; sourceTree = "<group>"; };
|
||||
|
@ -1095,7 +1090,6 @@
|
|||
B6FE7EB91ADD63AE00A6D22F /* NSData+ows_StripToken.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+ows_StripToken.m"; sourceTree = "<group>"; };
|
||||
B90418E4183E9DD40038554A /* DateUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateUtil.h; sourceTree = "<group>"; };
|
||||
B90418E5183E9DD40038554A /* DateUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DateUtil.m; sourceTree = "<group>"; };
|
||||
B96A30FE187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "HelveticaNeueLTStd-Bd.otf"; sourceTree = "<group>"; };
|
||||
B97940251832BD2400BD66CB /* UIUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIUtil.h; sourceTree = "<group>"; };
|
||||
B97940261832BD2400BD66CB /* UIUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIUtil.m; sourceTree = "<group>"; };
|
||||
B97CBFA518860EA3008E0DE9 /* CountryCodeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountryCodeViewController.h; sourceTree = "<group>"; };
|
||||
|
@ -1121,6 +1115,7 @@
|
|||
D221A0E7169DFFC500537ABF /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = ../../../../../../System/Library/Frameworks/AVFoundation.framework; sourceTree = "<group>"; };
|
||||
D24B5BD4169F568C00681372 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = ../../../../../../System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<group>"; };
|
||||
D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; };
|
||||
D488327B732CFBE8349C7024 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E16E5BE818AAC40200B7C403 /* EC25KeyAgreementParticipant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EC25KeyAgreementParticipant.h; sourceTree = "<group>"; };
|
||||
E16E5BE918AAC40200B7C403 /* EC25KeyAgreementParticipant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EC25KeyAgreementParticipant.m; sourceTree = "<group>"; };
|
||||
E16E5BEA18AAC40200B7C403 /* EC25KeyAgreementProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EC25KeyAgreementProtocol.h; sourceTree = "<group>"; };
|
||||
|
@ -1252,7 +1247,7 @@
|
|||
D221A090169C9E5E00537ABF /* Foundation.framework in Frameworks */,
|
||||
D221A0E8169DFFC500537ABF /* AVFoundation.framework in Frameworks */,
|
||||
D24B5BD5169F568C00681372 /* AudioToolbox.framework in Frameworks */,
|
||||
F995AC2FFD6D4442B012604A /* libPods.a in Frameworks */,
|
||||
28508611F3DF531CEDF5103D /* libPods.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1275,7 +1270,11 @@
|
|||
D202868116DBE0E7009068E9 /* CFNetwork.framework in Frameworks */,
|
||||
D221A0AD169C9E5F00537ABF /* UIKit.framework in Frameworks */,
|
||||
D221A0AE169C9E5F00537ABF /* Foundation.framework in Frameworks */,
|
||||
AA0C8E498E2046B0B81EEE6E /* libPods.a in Frameworks */,
|
||||
AA0C8E498E2046B0B81EEE6E /* (null) in Frameworks */,
|
||||
53EF5134D8FB5FCBDEDE2A35 /* (null) in Frameworks */,
|
||||
DE9907A5A8074160B34A8261 /* (null) in Frameworks */,
|
||||
7FAA7C04BD50D54101D1BB1A /* (null) in Frameworks */,
|
||||
057B54FA6208D8269CFE6146 /* libPods.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1322,17 +1321,6 @@
|
|||
path = crypto;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
765052A318294C9F008313E1 /* Fonts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B96A30FE187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf */,
|
||||
765052B1182BF839008313E1 /* HelveticaNeueLTStd-Th.otf */,
|
||||
765052A518294C9F008313E1 /* HelveticaNeueLTStd-Lt.otf */,
|
||||
765052A618294C9F008313E1 /* HelveticaNeueLTStd-Md.otf */,
|
||||
);
|
||||
path = Fonts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
76919BF51805D169008C664A /* contact */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -1433,6 +1421,8 @@
|
|||
76EB041D18170B33006006FC /* network */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B63006411B9631EC00F2FEB5 /* AFSecurityOWSPolicy.h */,
|
||||
B63006421B9631EC00F2FEB5 /* AFSecurityOWSPolicy.m */,
|
||||
76EB041E18170B33006006FC /* dns */,
|
||||
76EB042318170B33006006FC /* failures */,
|
||||
76EB042818170B33006006FC /* http */,
|
||||
|
@ -2482,7 +2472,7 @@
|
|||
D221A08D169C9E5E00537ABF /* UIKit.framework */,
|
||||
D221A08F169C9E5E00537ABF /* Foundation.framework */,
|
||||
D221A091169C9E5E00537ABF /* CoreGraphics.framework */,
|
||||
8313AE91B4954215858A5662 /* libPods.a */,
|
||||
D488327B732CFBE8349C7024 /* libPods.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
|
@ -2492,7 +2482,6 @@
|
|||
children = (
|
||||
B657DDC91911A40500F45B0C /* Signal.entitlements */,
|
||||
B633C4FD1A1D190B0059AC12 /* Images */,
|
||||
765052A318294C9F008313E1 /* Fonts */,
|
||||
B67EBF5C19194AC60084CCFD /* Settings.bundle */,
|
||||
76EB03C118170B33006006FC /* src */,
|
||||
D221A094169C9E5E00537ABF /* Supporting Files */,
|
||||
|
@ -2726,7 +2715,7 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastTestingUpgradeCheck = 0600;
|
||||
LastUpgradeCheck = 0500;
|
||||
LastUpgradeCheck = 0700;
|
||||
ORGANIZATIONNAME = "Open Whisper Systems";
|
||||
TargetAttributes = {
|
||||
D221A088169C9E5E00537ABF = {
|
||||
|
@ -2872,12 +2861,8 @@
|
|||
FC9120411A39EFB70074545C /* qr@2x.png in Resources */,
|
||||
E1370BE618A0686C00826894 /* sonarping.mp3 in Resources */,
|
||||
B10C9B5F1A7049EC00ECA2BF /* pause_icon.png in Resources */,
|
||||
E148751218A06AFD002CC4F3 /* HelveticaNeueLTStd-Bd.otf in Resources */,
|
||||
AD83FF471A73428300B5C81A /* audio_play_button_blue.png in Resources */,
|
||||
AD83FF451A73426500B5C81A /* audio_pause_button@2x.png in Resources */,
|
||||
E148751318A06AFD002CC4F3 /* HelveticaNeueLTStd-Th.otf in Resources */,
|
||||
E148751418A06AFD002CC4F3 /* HelveticaNeueLTStd-Lt.otf in Resources */,
|
||||
E148751518A06AFD002CC4F3 /* HelveticaNeueLTStd-Md.otf in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -2885,12 +2870,8 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
B96A3100187DA1B600648F3E /* HelveticaNeueLTStd-Bd.otf in Resources */,
|
||||
765052AC18294C9F008313E1 /* HelveticaNeueLTStd-Md.otf in Resources */,
|
||||
76EB060118170B33006006FC /* InitiateSignal.proto in Resources */,
|
||||
765052AA18294C9F008313E1 /* HelveticaNeueLTStd-Lt.otf in Resources */,
|
||||
B6850E5A1995A4710068E715 /* whisperFake.cer in Resources */,
|
||||
765052B3182BF839008313E1 /* HelveticaNeueLTStd-Th.otf in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -3063,6 +3044,7 @@
|
|||
76EB061618170B33006006FC /* AnonymousOccurrenceLogger.m in Sources */,
|
||||
76EB063018170B33006006FC /* Conversions.m in Sources */,
|
||||
76EB065618170B34006006FC /* InCallViewController.m in Sources */,
|
||||
B63006431B9631EC00F2FEB5 /* AFSecurityOWSPolicy.m in Sources */,
|
||||
B6B096681A1D25ED008BFAA6 /* TSRecipient.m in Sources */,
|
||||
76EB05FE18170B33006006FC /* InitiateSignal.pb.m in Sources */,
|
||||
76EB05CA18170B33006006FC /* RecipientUnavailable.m in Sources */,
|
||||
|
@ -3475,6 +3457,8 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
|
||||
|
@ -3512,10 +3496,9 @@
|
|||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = "-fobjc-arc-exceptions";
|
||||
PROVISIONING_PROFILE = "";
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
@ -3543,6 +3526,7 @@
|
|||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
ENABLE_BITCODE = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
|
||||
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO;
|
||||
|
@ -3574,13 +3558,12 @@
|
|||
GCC_WARN_UNUSED_VALUE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
OTHER_CFLAGS = (
|
||||
"-DNS_BLOCK_ASSERTIONS=1",
|
||||
"-fobjc-arc-exceptions",
|
||||
);
|
||||
PROVISIONING_PROFILE = "";
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
|
@ -3629,10 +3612,9 @@
|
|||
);
|
||||
LLVM_LTO = NO;
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.signal;
|
||||
PRODUCT_NAME = Signal;
|
||||
PROVISIONING_PROFILE = "";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
TEST_AFTER_BUILD = YES;
|
||||
VALID_ARCHS = "arm64 armv7 armv7s i386";
|
||||
WRAPPER_EXTENSION = app;
|
||||
|
@ -3682,10 +3664,9 @@
|
|||
);
|
||||
LLVM_LTO = NO;
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.whispersystems.signal;
|
||||
PRODUCT_NAME = Signal;
|
||||
PROVISIONING_PROFILE = "";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
TEST_AFTER_BUILD = YES;
|
||||
VALID_ARCHS = "arm64 armv7 armv7s i386";
|
||||
WRAPPER_EXTENSION = app;
|
||||
|
@ -3734,6 +3715,7 @@
|
|||
"-ObjC",
|
||||
"$(inherited)",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = SignalTests;
|
||||
PROVISIONING_PROFILE = "";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
|
@ -3783,6 +3765,7 @@
|
|||
"-ObjC",
|
||||
"$(inherited)",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.${PRODUCT_NAME:rfc1034identifier}";
|
||||
PRODUCT_NAME = SignalTests;
|
||||
PROVISIONING_PROFILE = "";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0610"
|
||||
LastUpgradeVersion = "0700"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -23,10 +23,10 @@
|
|||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "NO"
|
||||
buildConfiguration = "Debug">
|
||||
shouldUseLaunchSchemeArgsEnv = "NO">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
|
@ -55,15 +55,18 @@
|
|||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Debug"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
@ -79,10 +82,10 @@
|
|||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "App Store Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "App Store Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C",
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
|
||||
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
|
||||
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C" : 0,
|
||||
"D74FB800F048CB516BB4BC70047F7CC676D291B9" : 0
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "1D917339-756B-4BA2-8BAF-70AFEDF98BC0",
|
||||
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
|
||||
"5D79A077E31B3FE97A3C6613CBFFDD71C314D14C" : "Signal-iOS",
|
||||
"D74FB800F048CB516BB4BC70047F7CC676D291B9" : "Signal-iOSPods"
|
||||
},
|
||||
"DVTSourceControlWorkspaceBlueprintNameKey" : "Signal",
|
||||
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
|
||||
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Signal.xcworkspace",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:WhisperSystems\/Signal-iOS.git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5D79A077E31B3FE97A3C6613CBFFDD71C314D14C"
|
||||
},
|
||||
{
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:FredericJacobs\/Precompiled-Signal-Dependencies.git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
|
||||
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D74FB800F048CB516BB4BC70047F7CC676D291B9"
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,10 +12,8 @@
|
|||
<string></string>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict/>
|
||||
<key>CFBundleIcons~ipad</key>
|
||||
<dict/>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.whispersystems.signal</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -23,7 +21,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.1.3</string>
|
||||
<string>2.1.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
|
@ -40,7 +38,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.1.80</string>
|
||||
<string>2.1.90</string>
|
||||
<key>LOGS_EMAIL</key>
|
||||
<string>support@whispersystems.org</string>
|
||||
<key>LOGS_URL</key>
|
||||
|
@ -49,17 +47,32 @@
|
|||
<string>public.app-category.social-networking</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>amazonaws.com</key>
|
||||
<dict>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
|
||||
<string>TLSv1.0</string>
|
||||
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<key>whispersystems.org</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
<key>NSIncludesSubdomains</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
<string>Signal uses your contacts to find users you know. We do not store your contacts on the server.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
<string>Signal needs access to your microphone to make and receive phone calls.</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>HelveticaNeueLTStd-Bd.otf</string>
|
||||
<string>HelveticaNeueLTStd-Lt.otf</string>
|
||||
<string>HelveticaNeueLTStd-Md.otf</string>
|
||||
<string>HelveticaNeueLTStd-Th.otf</string>
|
||||
</array>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
|
|
|
@ -20,4 +20,6 @@
|
|||
#define SignalAlertView(title,msg) [[[UIAlertView alloc] initWithTitle:title message:msg delegate:nil cancelButtonTitle:NSLocalizedString(@"OK", @"") otherButtonTitles:nil, nil] show]
|
||||
#define SignalReportError [Pastelog reportErrorAndSubmitLogsWithAlertTitle:NSLocalizedString(@"ERROR_WAS_DETECTED_TITLE", @"") alertBody:NSLocalizedString(@"ERROR_WAS_DETECTED_SUBMIT", @"")];
|
||||
|
||||
#define BLOCK_SAFE_RUN(block, ...) block ? block(__VA_ARGS__) : nil
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@property (strong, nonatomic) SignalsViewController *signalVC;
|
||||
|
||||
@end
|
||||
|
|
|
@ -34,6 +34,10 @@ static NSString * const kURLHostVerifyPrefix = @"verify";
|
|||
[AppStoreRating setupRatingLibrary];
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
[self setupAppearance];
|
||||
[[PushManager sharedManager] registerPushKitNotificationFuture];
|
||||
|
@ -162,20 +166,22 @@ static NSString * const kURLHostVerifyPrefix = @"verify";
|
|||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application {
|
||||
[self protectScreen];
|
||||
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
[self updateBadge];
|
||||
[TSSocketManager resignActivity];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateBadge {
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];
|
||||
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
|
||||
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:(NSInteger)[[TSMessagesManager sharedManager] unreadMessagesCount]];
|
||||
}
|
||||
UIBackgroundTaskIdentifier __block bgTask = UIBackgroundTaskInvalid;
|
||||
bgTask = [application beginBackgroundTaskWithExpirationHandler:^{
|
||||
|
||||
}];
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
[self protectScreen];
|
||||
if ([TSAccountManager isRegistered]) {
|
||||
[[[Environment getCurrent] signalsViewController] updateInboxCountLabel];
|
||||
[TSSocketManager resignActivity];
|
||||
}
|
||||
|
||||
[application endBackgroundTask:bgTask];
|
||||
bgTask = UIBackgroundTaskInvalid;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
- (void)prepareScreenshotProtection{
|
||||
|
@ -266,6 +272,10 @@ static NSString * const kURLHostVerifyPrefix = @"verify";
|
|||
[[PushManager sharedManager] application:application handleActionWithIdentifier:identifier forLocalNotification:notification completionHandler:completionHandler];
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler {
|
||||
[[PushManager sharedManager] application:application handleActionWithIdentifier:identifier forLocalNotification:notification withResponseInfo:responseInfo completionHandler:completionHandler];
|
||||
}
|
||||
|
||||
/**
|
||||
* Signal requires an iPhone to be unlocked after reboot to be able to access keying material.
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -113,17 +113,51 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
|
|||
}
|
||||
|
||||
+ (void)blockingContactDialog{
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"AB_PERMISSION_MISSING_TITLE", nil)
|
||||
message:NSLocalizedString(@"AB_PERMISSION_MISSING_BODY", nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"AB_PERMISSION_MISSING_ACTION", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
|
||||
}]];
|
||||
|
||||
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
switch (ABAddressBookGetAuthorizationStatus()) {
|
||||
case kABAuthorizationStatusRestricted:{
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"AB_PERMISSION_MISSING_TITLE", nil)
|
||||
message:NSLocalizedString(@"ADDRESSBOOK_RESTRICTED_ALERT_BODY", nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"ADDRESSBOOK_RESTRICTED_ALERT_BUTTON", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
exit(0);
|
||||
}]];
|
||||
|
||||
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
|
||||
break;
|
||||
}
|
||||
case kABAuthorizationStatusDenied: {
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"AB_PERMISSION_MISSING_TITLE", nil)
|
||||
message:NSLocalizedString(@"AB_PERMISSION_MISSING_BODY", nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"AB_PERMISSION_MISSING_ACTION", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
|
||||
}]];
|
||||
|
||||
[[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
break;
|
||||
}
|
||||
|
||||
case kABAuthorizationStatusNotDetermined: {
|
||||
DDLogInfo(@"AddressBook access not granted but status undetermined.");
|
||||
[[Environment getCurrent].contactsManager pullLatestAddressBook];
|
||||
break;
|
||||
}
|
||||
|
||||
case kABAuthorizationStatusAuthorized:{
|
||||
DDLogInfo(@"AddressBook access not granted but status authorized.");
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupLatestRedPhoneUsers:(NSArray *)users {
|
||||
|
@ -157,7 +191,7 @@ void onAddressBookChanged(ABAddressBookRef notifyAddressBook, CFDictionaryRef in
|
|||
|
||||
id addressBook = (__bridge_transfer id)addressBookRef;
|
||||
ABAddressBookRequestAccessWithCompletion(addressBookRef, ^(bool granted, CFErrorRef requestAccessError) {
|
||||
if (granted) {
|
||||
if (granted && ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusAuthorized) {
|
||||
dispatch_async(ADDRESSBOOK_QUEUE,^{
|
||||
[futureAddressBookSource trySetResult:addressBook];
|
||||
});
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#import "TSGroupModel.h"
|
||||
#import "TSStorageHeaders.h"
|
||||
|
||||
static NSString* const kCallSegue = @"2.0_6.0_Call_Segue";
|
||||
|
||||
/**
|
||||
*
|
||||
* Environment is a data and data accessor class.
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#import "TSContactThread.h"
|
||||
#import "TSGroupThread.h"
|
||||
|
||||
static NSString* const kCallSegue = @"2.0_6.0_Call_Segue";
|
||||
#define isRegisteredUserDefaultString @"isRegistered"
|
||||
|
||||
static Environment* environment = nil;
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
[self nonBlockingPushRegistration];
|
||||
}
|
||||
|
||||
if ([self isVersion:previousVersion atLeast:@"2.0.0" andLessThan:@"2.1.70"] || [self needsRegisterAttributes]) {
|
||||
if ([self isVersion:previousVersion atLeast:@"2.0.0" andLessThan:@"2.1.70"] && [TSAccountManager isRegistered]) {
|
||||
[self clearVideoCache];
|
||||
[self blockingAttributesUpdate];
|
||||
}
|
||||
|
@ -83,7 +83,7 @@
|
|||
DDLogWarn(@"Registered for VOIP Push.");
|
||||
} failure:failedBlock];
|
||||
} failure:failedBlock];
|
||||
|
||||
|
||||
}
|
||||
|
||||
+ (void)blockingPushRegistration{
|
||||
|
@ -146,7 +146,7 @@
|
|||
#pragma mark Upgrading to 2.1.3 - Adding VOIP flag on TS Server
|
||||
|
||||
+ (BOOL)needsRegisterAttributes {
|
||||
return [self userDefaultsBoolForKey:NEEDS_TO_REGISTER_ATTRIBUTES];
|
||||
return [self userDefaultsBoolForKey:NEEDS_TO_REGISTER_ATTRIBUTES] && [TSAccountManager isRegistered];
|
||||
}
|
||||
|
||||
+ (void)blockingAttributesUpdate {
|
||||
|
|
|
@ -93,6 +93,14 @@
|
|||
#define _iOS_8_2_0 NSFoundationVersionNumber_iOS_8_2_0
|
||||
#endif
|
||||
|
||||
#ifndef NSFoundationVersionNumber_iOS_9
|
||||
#define NSFoundationVersionNumber_iOS_9 1231 //extracted with NSLog(@"%f", NSFoundationVersionNumber)
|
||||
#endif
|
||||
|
||||
#ifdef NSFoundationVersionNumber_iOS_9
|
||||
#define _iOS_9 NSFoundationVersionNumber_iOS_9
|
||||
#endif
|
||||
|
||||
/**
|
||||
Add a Singelton implementation to the .m File
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// AFSecurityPolicyNone.h
|
||||
// Signal
|
||||
//
|
||||
// Created by Fred on 01/09/15.
|
||||
// Copyright © 2015 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AFSecurityPolicy.h"
|
||||
#import <SocketRocket/SRWebSocket.h>
|
||||
|
||||
@interface AFSecurityOWSPolicy : AFSecurityPolicy <CertificateVerifier>
|
||||
|
||||
+ (instancetype)OWS_PinningPolicy;
|
||||
|
||||
@end
|
|
@ -0,0 +1,100 @@
|
|||
//
|
||||
// AFSecurityPolicyNone.m
|
||||
// Signal
|
||||
//
|
||||
// Created by Fred on 01/09/15.
|
||||
// Copyright © 2015 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AFSecurityOWSPolicy.h"
|
||||
#import <AssertMacros.h>
|
||||
|
||||
@implementation AFSecurityOWSPolicy
|
||||
|
||||
+ (instancetype)OWS_PinningPolicy {
|
||||
static AFSecurityOWSPolicy *sharedMyManager = nil;
|
||||
@synchronized(self) {
|
||||
if (sharedMyManager == nil)
|
||||
sharedMyManager = [[self alloc] initWithOWSPolicy];
|
||||
}
|
||||
return sharedMyManager;
|
||||
}
|
||||
|
||||
- (instancetype)initWithOWSPolicy {
|
||||
self = [[super class] defaultPolicy];
|
||||
|
||||
if (self) {
|
||||
self.pinnedCertificates = @[[self certificateDataForService:@"textsecure"],
|
||||
[self certificateDataForService:@"redphone"]];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSArray*)certs {
|
||||
return @[(__bridge id)[self certificateForService:@"textsecure"]];
|
||||
}
|
||||
|
||||
- (NSData*)certificateDataForService:(NSString*)service
|
||||
{
|
||||
SecCertificateRef certRef = [self certificateForService:service];
|
||||
return (__bridge_transfer NSData *)SecCertificateCopyData(certRef);
|
||||
}
|
||||
|
||||
- (SecCertificateRef)certificateForService:(NSString*)service {
|
||||
NSString *path = [NSBundle.mainBundle pathForResource:service ofType:@"cer"];
|
||||
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:path]) {
|
||||
@throw [NSException exceptionWithName:@"Missing server certificate"
|
||||
reason:[NSString stringWithFormat:@"Missing signing certificate for service %@", service]
|
||||
userInfo:nil];
|
||||
}
|
||||
|
||||
NSData *certificateData = [NSData dataWithContentsOfFile:path];
|
||||
return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certificateData));
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
|
||||
forDomain:(NSString *)domain
|
||||
{
|
||||
NSMutableArray *policies = [NSMutableArray array];
|
||||
[policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)];
|
||||
|
||||
if (SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies) != errSecSuccess){
|
||||
DDLogError(@"The trust policy couldn't be set.");
|
||||
return NO;
|
||||
}
|
||||
|
||||
NSMutableArray *pinnedCertificates = [NSMutableArray array];
|
||||
for (NSData *certificateData in self.pinnedCertificates) {
|
||||
[pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)];
|
||||
}
|
||||
|
||||
if (SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates) != errSecSuccess){
|
||||
DDLogError(@"The anchor certificates couldn't be set.");
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (!AFServerTrustIsValid(serverTrust)) {
|
||||
NSLog(@"Fuck it, not trusted");
|
||||
return NO;
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) {
|
||||
BOOL isValid = NO;
|
||||
SecTrustResultType result;
|
||||
__Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out);
|
||||
|
||||
isValid = (result == kSecTrustResultUnspecified);
|
||||
|
||||
_out:
|
||||
return isValid;
|
||||
}
|
||||
|
||||
@end
|
|
@ -10,6 +10,8 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
#define Signal_Thread_UserInfo_Key @"Signal_Thread_Id"
|
||||
#define Signal_Message_UserInfo_Key @"Signal_Message_Id"
|
||||
|
||||
#define Signal_Call_UserInfo_Key @"Signal_Call_Id"
|
||||
|
||||
#define Signal_Call_Accept_Identifier @"Signal_Call_Accept"
|
||||
|
@ -18,10 +20,10 @@
|
|||
#define Signal_CallBack_Identifier @"Signal_CallBack"
|
||||
|
||||
#define Signal_Call_Category @"Signal_IncomingCall"
|
||||
#define Signal_Message_Category @"Signal_Message"
|
||||
#define Signal_Full_New_Message_Category @"Signal_Full_New_Message"
|
||||
#define Signal_CallBack_Category @"Signal_CallBack"
|
||||
|
||||
#define Signal_Message_View_Identifier @"Signal_Message_Read"
|
||||
#define Signal_Message_Reply_Identifier @"Signal_New_Message_Reply"
|
||||
#define Signal_Message_MarkAsRead_Identifier @"Signal_Message_MarkAsRead"
|
||||
|
||||
typedef void(^failedPushRegistrationBlock)(NSError *error);
|
||||
|
@ -71,6 +73,7 @@ typedef void (^registrationTokensSuccessBlock)(NSData *pushToken, NSData *voipTo
|
|||
-(TOCFuture*)registerPushKitNotificationFuture;
|
||||
- (BOOL)supportsVOIPPush;
|
||||
- (UILocalNotification*)closeVOIPBackgroundTask;
|
||||
- (void)presentNotification:(UILocalNotification*)notification;
|
||||
|
||||
#pragma mark Push Notifications Delegate Methods
|
||||
|
||||
|
@ -78,5 +81,6 @@ typedef void (^registrationTokensSuccessBlock)(NSData *pushToken, NSData *voipTo
|
|||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler;
|
||||
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void (^)())completionHandler;
|
||||
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification;
|
||||
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler;
|
||||
|
||||
@end
|
||||
|
|
|
@ -8,8 +8,11 @@
|
|||
|
||||
#import <PushKit/PushKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import "ContactsManager.h"
|
||||
#import "InCallViewController.h"
|
||||
#import "NSDate+millisecondTimeStamp.h"
|
||||
#import "TSMessagesManager+sendMessages.h"
|
||||
#import "NotificationTracker.h"
|
||||
|
||||
#import "PreferencesUtil.h"
|
||||
|
@ -25,8 +28,9 @@
|
|||
@property UIAlertView *missingPermissionsAlertView;
|
||||
@property (nonatomic, strong) NotificationTracker *notificationTracker;
|
||||
@property UILocalNotification *lastCallNotification;
|
||||
|
||||
@property (nonatomic, retain) NSMutableArray *currentNotifications;
|
||||
@property (nonatomic) UIBackgroundTaskIdentifier callBackgroundTask;
|
||||
|
||||
@end
|
||||
|
||||
@implementation PushManager
|
||||
|
@ -53,6 +57,7 @@
|
|||
cancelButtonTitle:NSLocalizedString(@"OK", @"")
|
||||
otherButtonTitles:nil, nil];
|
||||
_callBackgroundTask = UIBackgroundTaskInvalid;
|
||||
self.currentNotifications = [NSMutableArray array];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -99,7 +104,7 @@
|
|||
notification.category = Signal_Call_Category;
|
||||
notification.soundName = @"r.caf";
|
||||
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
|
||||
[[PushManager sharedManager] presentNotification:notification];
|
||||
_lastCallNotification = notification;
|
||||
|
||||
if (_callBackgroundTask == UIBackgroundTaskInvalid) {
|
||||
|
@ -143,15 +148,36 @@
|
|||
}
|
||||
|
||||
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
|
||||
if ([notification.category isEqualToString:Signal_Message_Category]) {
|
||||
NSString *threadId = [notification.userInfo objectForKey:Signal_Thread_UserInfo_Key];
|
||||
NSString *threadId = notification.userInfo[Signal_Thread_UserInfo_Key];
|
||||
if (threadId && [TSThread fetchObjectWithUniqueID:threadId]) {
|
||||
[Environment messageThreadId:threadId];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void (^)())completionHandler {
|
||||
[self application:application handleActionWithIdentifier:identifier forLocalNotification:notification withResponseInfo:@{} completionHandler:completionHandler];
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler {
|
||||
|
||||
if ([identifier isEqualToString:Signal_Call_Accept_Identifier]) {
|
||||
|
||||
if ([identifier isEqualToString:Signal_Message_Reply_Identifier]) {
|
||||
NSString *threadId = notification.userInfo[Signal_Thread_UserInfo_Key];
|
||||
|
||||
if (threadId) {
|
||||
TSThread *thread = [TSThread fetchObjectWithUniqueID:threadId];
|
||||
TSOutgoingMessage *message = [[TSOutgoingMessage alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp] inThread:thread messageBody:responseInfo[UIUserNotificationActionResponseTypedTextKey] attachments:nil];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:thread success:^{
|
||||
[self markAllInThreadAsRead:notification.userInfo completionHandler:completionHandler];
|
||||
} failure:^{
|
||||
UILocalNotification *failedSendNotif = [[UILocalNotification alloc] init];
|
||||
failedSendNotif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"NOTIFICATION_SEND_FAILED", nil), [thread name]];
|
||||
failedSendNotif.userInfo = @{Signal_Thread_UserInfo_Key:thread.uniqueId};
|
||||
[[PushManager sharedManager] presentNotification:failedSendNotif];
|
||||
completionHandler();
|
||||
}];
|
||||
}
|
||||
} else if ([identifier isEqualToString:Signal_Call_Accept_Identifier]) {
|
||||
[Environment.phoneManager answerCall];
|
||||
|
||||
completionHandler();
|
||||
|
@ -163,20 +189,37 @@
|
|||
completionHandler();
|
||||
});
|
||||
} else if([identifier isEqualToString:Signal_CallBack_Identifier]){
|
||||
NSString * contactId = [notification.userInfo objectForKeyedSubscript:Signal_Call_UserInfo_Key];
|
||||
NSString * contactId = notification.userInfo[Signal_Call_UserInfo_Key];
|
||||
PhoneNumber *number = [PhoneNumber tryParsePhoneNumberFromUserSpecifiedText:contactId];
|
||||
Contact *contact = [[Environment.getCurrent contactsManager] latestContactForPhoneNumber:number];
|
||||
[Environment.phoneManager initiateOutgoingCallToContact:contact atRemoteNumber:number];
|
||||
} else{
|
||||
NSString *threadId = [notification.userInfo objectForKey:Signal_Thread_UserInfo_Key];
|
||||
} else if ([identifier isEqualToString:Signal_Message_MarkAsRead_Identifier]){
|
||||
[self markAllInThreadAsRead:notification.userInfo completionHandler:completionHandler];
|
||||
} else {
|
||||
NSString *threadId = notification.userInfo[Signal_Thread_UserInfo_Key];
|
||||
[Environment messageThreadId:threadId];
|
||||
completionHandler();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)markAllInThreadAsRead:(NSDictionary*)userInfo completionHandler:(void (^)())completionHandler {
|
||||
NSString *threadId = userInfo[Signal_Thread_UserInfo_Key];
|
||||
|
||||
TSThread *thread = [TSThread fetchObjectWithUniqueID:threadId];
|
||||
[[TSStorageManager sharedManager].dbConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction * _Nonnull transaction) {
|
||||
[thread markAllAsReadWithTransaction:transaction];
|
||||
} completionBlock:^{
|
||||
[[[Environment getCurrent] signalsViewController] updateInboxCountLabel];
|
||||
[self cancelNotificationsWithThreadId:threadId];
|
||||
|
||||
completionHandler();
|
||||
}];
|
||||
}
|
||||
|
||||
- (BOOL)isRedPhonePush:(NSDictionary*)pushDict {
|
||||
NSDictionary *aps = [pushDict objectForKey:@"aps"];
|
||||
NSString *category = [aps objectForKey:@"category"];
|
||||
NSDictionary *aps = pushDict[@"aps"];
|
||||
NSString *category = aps[@"category"];
|
||||
|
||||
if ([category isEqualToString:Signal_Call_Category]) {
|
||||
return YES;
|
||||
|
@ -294,7 +337,7 @@
|
|||
NSError *error;
|
||||
|
||||
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:responseObject options:0 error:&error];
|
||||
NSString *tsToken = [dictionary objectForKey:@"token"];
|
||||
NSString *tsToken = dictionary[@"token"];
|
||||
|
||||
if (!tsToken || !pushToken || error) {
|
||||
failure(error);
|
||||
|
@ -315,25 +358,37 @@
|
|||
UIUserNotificationSettings *settings =
|
||||
[UIUserNotificationSettings settingsForTypes:(UIUserNotificationType)[self allNotificationTypes]
|
||||
categories:[NSSet setWithObjects:[self userNotificationsCallCategory],
|
||||
[self userNotificationsMessageCategory],
|
||||
[self fullNewMessageNotificationCategory],
|
||||
[self userNotificationsCallBackCategory], nil]];
|
||||
|
||||
[UIApplication.sharedApplication registerUserNotificationSettings:settings];
|
||||
return self.userNotificationFutureSource.future;
|
||||
}
|
||||
|
||||
- (UIUserNotificationCategory*)userNotificationsMessageCategory{
|
||||
UIMutableUserNotificationAction *action_view = [UIMutableUserNotificationAction new];
|
||||
action_view.identifier = Signal_Message_View_Identifier;
|
||||
action_view.title = NSLocalizedString(@"PUSH_MANAGER_VIEW", @"");
|
||||
action_view.activationMode = UIUserNotificationActivationModeForeground;
|
||||
action_view.destructive = NO;
|
||||
action_view.authenticationRequired = YES;
|
||||
- (UIUserNotificationCategory*)fullNewMessageNotificationCategory {
|
||||
UIMutableUserNotificationAction *action_markRead = [UIMutableUserNotificationAction new];
|
||||
action_markRead.identifier = Signal_Message_MarkAsRead_Identifier;
|
||||
action_markRead.title = NSLocalizedString(@"PUSH_MANAGER_MARKREAD", nil);
|
||||
action_markRead.destructive = NO;
|
||||
action_markRead.authenticationRequired = NO;
|
||||
action_markRead.activationMode = UIUserNotificationActivationModeBackground;
|
||||
|
||||
UIMutableUserNotificationAction *action_reply = [UIMutableUserNotificationAction new];
|
||||
action_reply.identifier = Signal_Message_Reply_Identifier;
|
||||
action_reply.title = NSLocalizedString(@"PUSH_MANAGER_REPLY", @"");
|
||||
action_reply.destructive = NO;
|
||||
action_reply.authenticationRequired = NO; // Since YES is broken in iOS 9 GM
|
||||
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(_iOS_9)) {
|
||||
action_reply.behavior = UIUserNotificationActionBehaviorTextInput;
|
||||
action_reply.activationMode = UIUserNotificationActivationModeBackground;
|
||||
} else {
|
||||
action_reply.activationMode = UIUserNotificationActivationModeForeground;
|
||||
}
|
||||
|
||||
UIMutableUserNotificationCategory *messageCategory = [UIMutableUserNotificationCategory new];
|
||||
messageCategory.identifier = Signal_Message_Category;
|
||||
[messageCategory setActions:@[action_view] forContext:UIUserNotificationActionContextMinimal];
|
||||
[messageCategory setActions:@[action_view] forContext:UIUserNotificationActionContextDefault];
|
||||
messageCategory.identifier = Signal_Full_New_Message_Category;
|
||||
[messageCategory setActions:@[action_markRead, action_reply] forContext:UIUserNotificationActionContextMinimal];
|
||||
[messageCategory setActions:@[] forContext:UIUserNotificationActionContextDefault];
|
||||
|
||||
return messageCategory;
|
||||
}
|
||||
|
@ -445,4 +500,20 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (void)presentNotification:(UILocalNotification*)notification {
|
||||
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
|
||||
[self.currentNotifications addObject:notification];
|
||||
}
|
||||
|
||||
- (void)cancelNotificationsWithThreadId:(NSString*)threadId {
|
||||
NSMutableArray *toDelete = [NSMutableArray array];
|
||||
[self.currentNotifications enumerateObjectsUsingBlock:^(UILocalNotification *notif, NSUInteger idx, BOOL *stop) {
|
||||
if ([notif.userInfo[Signal_Thread_UserInfo_Key] isEqualToString:threadId]) {
|
||||
[[UIApplication sharedApplication] cancelLocalNotification:notif];
|
||||
[toDelete addObject:notif];
|
||||
}
|
||||
}];
|
||||
[self.currentNotifications removeObjectsInArray:toDelete];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "Environment.h"
|
||||
|
||||
#import "AFHTTPSessionManager+SignalMethods.h"
|
||||
#import "AFSecurityOWSPolicy.h"
|
||||
|
||||
@interface RPServerRequestsManager ()
|
||||
|
||||
|
@ -29,14 +30,7 @@ MacrosSingletonImplemention
|
|||
HostNameEndPoint *endpoint = Environment.getCurrent.masterServerSecureEndPoint.hostNameEndPoint;
|
||||
NSURL *endPointURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://%@:%hu", endpoint.hostname, endpoint.port]];
|
||||
self.operationManager = [[AFHTTPSessionManager alloc] initWithBaseURL:endPointURL sessionConfiguration:sessionConfig];
|
||||
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
|
||||
securityPolicy.allowInvalidCertificates = YES; //The certificate is not signed by a CA in the iOS trust store.
|
||||
securityPolicy.validatesCertificateChain = NO; //Looking at AFNetworking's implementation of chain checking, we don't need to pin all certs in chain. https://github.com/AFNetworking/AFNetworking/blob/e4855e9f25e4914ac2eb5caee26bc6e7a024a840/AFNetworking/AFSecurityPolicy.m#L271 Trust to the trusted cert is already vertified before by AFServerTrustIsValid();
|
||||
NSString *certPath = [NSBundle.mainBundle pathForResource:@"redphone" ofType:@"cer"];
|
||||
NSData *certData = [NSData dataWithContentsOfFile:certPath];
|
||||
SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
|
||||
securityPolicy.pinnedCertificates = @[(__bridge_transfer NSData *)SecCertificateCopyData(cert)];
|
||||
self.operationManager.securityPolicy = securityPolicy;
|
||||
self.operationManager.securityPolicy = [AFSecurityOWSPolicy OWS_PinningPolicy];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
}];
|
||||
|
||||
if (message) {
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:thread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:thread success:nil failure:nil];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ dispatch_queue_t attachmentsQueue() {
|
|||
result.pointer.isDownloaded = YES;
|
||||
[result.pointer saveWithTransaction:transaction];
|
||||
}];
|
||||
[self sendMessage:outgoingMessage inThread:thread];
|
||||
[self sendMessage:outgoingMessage inThread:thread success:nil failure:nil];
|
||||
} else{
|
||||
DDLogWarn(@"Failed to upload attachment");
|
||||
}
|
||||
|
|
|
@ -10,6 +10,11 @@
|
|||
|
||||
@interface TSMessagesManager (sendMessages)
|
||||
|
||||
- (void)sendMessage:(TSOutgoingMessage*)message inThread:(TSThread*)thread;
|
||||
typedef void(^successSendingCompletionBlock)();
|
||||
typedef void(^failedSendingCompletionBlock)();
|
||||
|
||||
- (void)sendMessage:(TSOutgoingMessage*)message inThread:(TSThread*)thread
|
||||
success:(successSendingCompletionBlock)successCompletionBlock
|
||||
failure:(failedSendingCompletionBlock)failedCompletionBlock;
|
||||
|
||||
@end
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#import "TSServerMessage.h"
|
||||
|
||||
#import "TSInfoMessage.h"
|
||||
#import "CollapsingFutures.h"
|
||||
|
||||
#define RETRY_ATTEMPTS 3
|
||||
|
||||
@interface TSMessagesManager ()
|
||||
dispatch_queue_t sendingQueue(void);
|
||||
|
@ -43,7 +46,10 @@ dispatch_queue_t sendingQueue() {
|
|||
return queue;
|
||||
}
|
||||
|
||||
- (void)sendMessage:(TSOutgoingMessage*)message inThread:(TSThread*)thread{
|
||||
- (void)sendMessage:(TSOutgoingMessage*)message inThread:(TSThread*)thread
|
||||
success:(successSendingCompletionBlock)successCompletionBlock
|
||||
failure:(failedSendingCompletionBlock)failedCompletionBlock
|
||||
{
|
||||
[Environment.preferences setHasSentAMessage:YES];
|
||||
dispatch_async(sendingQueue(), ^{
|
||||
if ([thread isKindOfClass:[TSGroupThread class]]) {
|
||||
|
@ -54,16 +60,7 @@ dispatch_queue_t sendingQueue() {
|
|||
recipients = [groupThread recipientsWithTransaction:transaction];
|
||||
}];
|
||||
|
||||
for(TSRecipient *rec in recipients){
|
||||
// we don't need to send the message to ourselves, but otherwise we send
|
||||
if( ![[rec uniqueId] isEqualToString:[SignalKeyingStorage.localNumber toE164]]){
|
||||
[self sendMessage:message
|
||||
toRecipient:rec
|
||||
inThread:thread
|
||||
withAttemps:3];
|
||||
}
|
||||
}
|
||||
|
||||
[self groupSend:recipients Message:message inThread:thread success:successCompletionBlock failure:failedCompletionBlock];
|
||||
}
|
||||
else if([thread isKindOfClass:[TSContactThread class]]){
|
||||
TSContactThread *contactThread = (TSContactThread*)thread;
|
||||
|
@ -79,7 +76,9 @@ dispatch_queue_t sendingQueue() {
|
|||
[self sendMessage:message
|
||||
toRecipient:recipient
|
||||
inThread:thread
|
||||
withAttemps:3];
|
||||
withAttemps:RETRY_ATTEMPTS
|
||||
success:successCompletionBlock
|
||||
failure:failedCompletionBlock];
|
||||
}
|
||||
else {
|
||||
// Special situation: if we are sending to ourselves in a single thread, we treat this as an incoming message
|
||||
|
@ -91,10 +90,55 @@ dispatch_queue_t sendingQueue() {
|
|||
});
|
||||
}
|
||||
|
||||
/// For group sends, we're using chained futures to make the code more readable.
|
||||
|
||||
- (TOCFuture*)sendMessageFuture:(TSOutgoingMessage*)message
|
||||
recipient:(TSRecipient*)recipient
|
||||
inThread:(TSThread*)thread {
|
||||
TOCFutureSource *futureSource = [[TOCFutureSource alloc] init];
|
||||
|
||||
[self sendMessage:message toRecipient:recipient inThread:thread withAttemps:RETRY_ATTEMPTS success:^{
|
||||
[futureSource trySetResult:@1];
|
||||
} failure:^{
|
||||
[futureSource trySetFailure:@0];
|
||||
}];
|
||||
|
||||
return futureSource.future;
|
||||
}
|
||||
|
||||
- (void)groupSend:(NSArray<TSRecipient*>*)recipients
|
||||
Message:(TSOutgoingMessage*)message
|
||||
inThread:(TSThread*)thread
|
||||
success:(successSendingCompletionBlock)successBlock
|
||||
failure:(failedSendingCompletionBlock)failureBlock {
|
||||
|
||||
NSMutableArray<TOCFuture*> *futures = [NSMutableArray array];
|
||||
|
||||
for(TSRecipient *rec in recipients){
|
||||
// we don't need to send the message to ourselves, but otherwise we send
|
||||
if( ![[rec uniqueId] isEqualToString:[SignalKeyingStorage.localNumber toE164]]){
|
||||
[futures addObject:[self sendMessageFuture:message recipient:rec inThread:thread]];
|
||||
}
|
||||
}
|
||||
|
||||
TOCFuture *completionFuture = futures.toc_thenAll;
|
||||
|
||||
[completionFuture thenDo:^(id value) {
|
||||
BLOCK_SAFE_RUN(successBlock);
|
||||
}];
|
||||
|
||||
[completionFuture catchDo:^(id failure) {
|
||||
BLOCK_SAFE_RUN(failureBlock);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)sendMessage:(TSOutgoingMessage*)message
|
||||
toRecipient:(TSRecipient*)recipient
|
||||
inThread:(TSThread*)thread
|
||||
withAttemps:(int)remainingAttempts{
|
||||
withAttemps:(int)remainingAttempts
|
||||
success:(successSendingCompletionBlock)successBlock
|
||||
failure:(failedSendingCompletionBlock)failureBlock
|
||||
{
|
||||
|
||||
if (remainingAttempts > 0) {
|
||||
remainingAttempts -= 1;
|
||||
|
@ -107,7 +151,7 @@ dispatch_queue_t sendingQueue() {
|
|||
[recipient saveWithTransaction:transaction];
|
||||
}];
|
||||
[self handleMessageSent:message];
|
||||
|
||||
BLOCK_SAFE_RUN(successBlock);
|
||||
} failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response;
|
||||
long statuscode = response.statusCode;
|
||||
|
@ -116,11 +160,12 @@ dispatch_queue_t sendingQueue() {
|
|||
switch (statuscode) {
|
||||
case 404:{
|
||||
DDLogError(@"Recipient not found");
|
||||
[self.dbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
[self.dbConnection asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
[recipient removeWithTransaction:transaction];
|
||||
[message setMessageState:TSOutgoingMessageStateUnsent];
|
||||
[[TSInfoMessage userNotRegisteredMessageInThread:thread transaction:transaction] saveWithTransaction:transaction];
|
||||
}];
|
||||
BLOCK_SAFE_RUN(failureBlock);
|
||||
break;
|
||||
}
|
||||
case 409:{
|
||||
|
@ -140,7 +185,12 @@ dispatch_queue_t sendingQueue() {
|
|||
}
|
||||
|
||||
dispatch_async(sendingQueue(), ^{
|
||||
[self sendMessage:message toRecipient:recipient inThread:thread withAttemps:remainingAttempts];
|
||||
[self sendMessage:message
|
||||
toRecipient:recipient
|
||||
inThread:thread
|
||||
withAttemps:remainingAttempts
|
||||
success:successBlock
|
||||
failure:failureBlock];
|
||||
});
|
||||
|
||||
break;
|
||||
|
@ -157,19 +207,30 @@ dispatch_queue_t sendingQueue() {
|
|||
[self handleStaleDevicesWithResponse:responseData recipientId:recipient.uniqueId];
|
||||
|
||||
dispatch_async(sendingQueue(), ^{
|
||||
[self sendMessage:message toRecipient:recipient inThread:thread withAttemps:remainingAttempts];
|
||||
[self sendMessage:message
|
||||
toRecipient:recipient
|
||||
inThread:thread
|
||||
withAttemps:remainingAttempts
|
||||
success:successBlock
|
||||
failure:failureBlock];
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
[self sendMessage:message toRecipient:recipient inThread:thread withAttemps:remainingAttempts];
|
||||
[self sendMessage:message
|
||||
toRecipient:recipient
|
||||
inThread:thread
|
||||
withAttemps:remainingAttempts
|
||||
success:successBlock
|
||||
failure:failureBlock];
|
||||
break;
|
||||
}
|
||||
}];
|
||||
}];
|
||||
} else{
|
||||
[self saveMessage:message withState:TSOutgoingMessageStateUnsent];
|
||||
BLOCK_SAFE_RUN(failureBlock);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -290,7 +290,7 @@
|
|||
|
||||
thread = gThread;
|
||||
|
||||
} else{
|
||||
} else {
|
||||
TSContactThread *cThread = [TSContactThread getOrCreateThreadWithContactId:message.source
|
||||
transaction:transaction
|
||||
pushSignal:message];
|
||||
|
@ -424,7 +424,7 @@
|
|||
notification.soundName = @"NewMessage.aifc";
|
||||
notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"MSGVIEW_MISSED_CALL", nil), [thread name]];
|
||||
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
|
||||
[[PushManager sharedManager] presentNotification:notification];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -434,7 +434,6 @@
|
|||
|
||||
if (([UIApplication sharedApplication].applicationState != UIApplicationStateActive) && messageDescription) {
|
||||
UILocalNotification *notification = [[UILocalNotification alloc] init];
|
||||
notification.category = Signal_Message_Category;
|
||||
notification.userInfo = @{Signal_Thread_UserInfo_Key:thread.uniqueId};
|
||||
notification.soundName = @"NewMessage.aifc";
|
||||
|
||||
|
@ -452,7 +451,7 @@
|
|||
}
|
||||
notification.alertBody = alertBodyString;
|
||||
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
|
||||
[[PushManager sharedManager]presentNotification:notification];
|
||||
} else {
|
||||
if ([Environment.preferences soundInForeground]) {
|
||||
AudioServicesPlayAlertSound(_newMessageSound);
|
||||
|
@ -465,12 +464,14 @@
|
|||
|
||||
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && messageDescription) {
|
||||
UILocalNotification *notification = [[UILocalNotification alloc] init];
|
||||
notification.category = Signal_Message_Category;
|
||||
notification.userInfo = @{Signal_Thread_UserInfo_Key:thread.uniqueId};
|
||||
notification.soundName = @"NewMessage.aifc";
|
||||
|
||||
switch ([[Environment preferences] notificationPreviewType]) {
|
||||
case NotificationNamePreview:
|
||||
notification.category = Signal_Full_New_Message_Category;
|
||||
notification.userInfo = @{Signal_Thread_UserInfo_Key:thread.uniqueId,
|
||||
Signal_Message_UserInfo_Key:message.uniqueId};
|
||||
|
||||
if ([thread isGroupThread]) {
|
||||
NSString *sender = [[Environment getCurrent].contactsManager nameStringForPhoneIdentifier:message.authorId];
|
||||
if (!sender) {
|
||||
|
@ -484,6 +485,7 @@
|
|||
}
|
||||
break;
|
||||
case NotificationNameNoPreview:{
|
||||
notification.userInfo = @{Signal_Thread_UserInfo_Key:thread.uniqueId};
|
||||
if ([thread isGroupThread]) {
|
||||
notification.alertBody = [NSString stringWithFormat:@"%@ \"%@\"", NSLocalizedString(@"APN_MESSAGE_IN_GROUP",nil), name];
|
||||
} else {
|
||||
|
@ -499,7 +501,7 @@
|
|||
break;
|
||||
}
|
||||
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
|
||||
[[PushManager sharedManager] presentNotification:notification];
|
||||
} else {
|
||||
if ([Environment.preferences soundInForeground]) {
|
||||
AudioServicesPlayAlertSound(_newMessageSound);
|
||||
|
|
|
@ -26,12 +26,17 @@
|
|||
return nil;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wobjc-designated-initializers"
|
||||
|
||||
- (id)initWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval{
|
||||
[NSException raise:NSInternalInconsistencyException
|
||||
format:@"You must use the initWithURL method"];
|
||||
return nil;
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
- (void) makeAuthenticatedRequest{
|
||||
[self.parameters addEntriesFromDictionary:@{@"Authorization":[TSStorageManager serverAuthToken]}];
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#import <AFNetworking/AFNetworking.h>
|
||||
|
||||
#import "AFSecurityOWSPolicy.h"
|
||||
|
||||
#import "TSAccountManager.h"
|
||||
#import "TSNetworkManager.h"
|
||||
#import "TSRegisterWithTokenRequest.h"
|
||||
|
@ -36,14 +38,7 @@
|
|||
if (self = [super init]) {
|
||||
NSURLSessionConfiguration *sessionConf = NSURLSessionConfiguration.ephemeralSessionConfiguration;
|
||||
self.operationManager = [[AFHTTPSessionManager alloc] initWithBaseURL:[[NSURL alloc] initWithString:textSecureServerURL] sessionConfiguration:sessionConf];
|
||||
AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate];
|
||||
policy.allowInvalidCertificates = YES; //The certificate is not signed by a CA in the iOS trust store.
|
||||
policy.validatesCertificateChain = NO; //Looking at AFNetworking's implementation of chain checking, we don't need to pin all certs in chain. https://github.com/AFNetworking/AFNetworking/blob/e4855e9f25e4914ac2eb5caee26bc6e7a024a840/AFNetworking/AFSecurityPolicy.m#L271 Trust to the trusted cert is already vertified before by AFServerTrustIsValid();
|
||||
NSString *certPath = [NSBundle.mainBundle pathForResource:@"textsecure" ofType:@"cer"];
|
||||
NSData *certData = [NSData dataWithContentsOfFile:certPath];
|
||||
SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
|
||||
policy.pinnedCertificates = @[(__bridge_transfer NSData *)SecCertificateCopyData(cert)];
|
||||
self.operationManager.securityPolicy = policy;
|
||||
self.operationManager.securityPolicy = [AFSecurityOWSPolicy OWS_PinningPolicy];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -73,8 +68,7 @@
|
|||
[self.operationManager POST:[textSecureServerURL stringByAppendingString:request.URL.absoluteString] parameters:request.parameters success:success failure:failure];
|
||||
} else if ([request.HTTPMethod isEqualToString:@"PUT"]){
|
||||
[self.operationManager PUT:[textSecureServerURL stringByAppendingString:request.URL.absoluteString] parameters:request.parameters success:success failure:failure];
|
||||
}
|
||||
else if ([request.HTTPMethod isEqualToString:@"DELETE"]){
|
||||
} else if ([request.HTTPMethod isEqualToString:@"DELETE"]){
|
||||
[self.operationManager DELETE:[textSecureServerURL stringByAppendingString:request.URL.absoluteString] parameters:request.parameters success:success failure:failure];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#import "TSStorageManager+keyingMaterial.h"
|
||||
|
||||
#import "Cryptography.h"
|
||||
#import "AFSecurityOWSPolicy.h"
|
||||
|
||||
#define kWebSocketHeartBeat 30
|
||||
#define kWebSocketReconnectTry 5
|
||||
|
@ -101,12 +102,7 @@ NSString * const SocketConnectingNotification = @"SocketConnectingNotification";
|
|||
NSString* webSocketConnect = [textSecureWebSocketAPI stringByAppendingString:[[self sharedManager] webSocketAuthenticationString]];
|
||||
NSURL* webSocketConnectURL = [NSURL URLWithString:webSocketConnect];
|
||||
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:webSocketConnectURL];
|
||||
NSString* cerPath = [[NSBundle mainBundle] pathForResource:@"textsecure" ofType:@"cer"];
|
||||
NSData* certData = [[NSData alloc] initWithContentsOfFile:cerPath];
|
||||
CFDataRef certDataRef = (__bridge CFDataRef)certData;
|
||||
SecCertificateRef certRef = SecCertificateCreateWithData(NULL, certDataRef);
|
||||
id certificate = (__bridge id)certRef;
|
||||
[request setSR_SSLPinnedCertificates:@[ certificate ]];
|
||||
request.securityPolicy = [AFSecurityOWSPolicy OWS_PinningPolicy];
|
||||
|
||||
socket = [[SRWebSocket alloc] initWithURLRequest:request];
|
||||
socket.delegate = [self sharedManager];
|
||||
|
|
|
@ -6,40 +6,34 @@
|
|||
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
static NSString *const kHelveticaNeueThin = @"HelveticaNeue-Thin";
|
||||
static NSString *const kHelveticaNeueLight = @"HelveticaNeue-Light";
|
||||
static NSString *const kHelveticaNeueRegular = @"HelveticaNeue";
|
||||
static NSString *const kHelveticaNeueMedium = @"HelveticaNeue-Medium";
|
||||
static NSString *const kHelveticaNeueBold = @"HelveticaNeue-Bold";
|
||||
|
||||
#import "UIFont+OWS.h"
|
||||
|
||||
@implementation UIFont (OWS)
|
||||
|
||||
+ (UIFont*) ows_thinFontWithSize:(CGFloat)size
|
||||
{
|
||||
return [UIFont fontWithName:kHelveticaNeueThin size:size];
|
||||
return [UIFont systemFontOfSize:size weight:UIFontWeightThin];
|
||||
}
|
||||
|
||||
+ (UIFont*) ows_lightFontWithSize:(CGFloat)size
|
||||
{
|
||||
return [UIFont fontWithName:kHelveticaNeueLight size:size];
|
||||
return [UIFont systemFontOfSize:size weight:UIFontWeightLight];
|
||||
}
|
||||
|
||||
+ (UIFont*) ows_regularFontWithSize:(CGFloat)size
|
||||
{
|
||||
return [UIFont fontWithName:kHelveticaNeueRegular size:size];
|
||||
return [UIFont systemFontOfSize:size weight:UIFontWeightRegular];
|
||||
}
|
||||
|
||||
|
||||
+ (UIFont*) ows_mediumFontWithSize:(CGFloat)size
|
||||
{
|
||||
return [UIFont fontWithName:kHelveticaNeueMedium size:size];
|
||||
return [UIFont systemFontOfSize:size weight:UIFontWeightMedium];
|
||||
}
|
||||
|
||||
+ (UIFont*) ows_boldFontWithSize:(CGFloat)size
|
||||
{
|
||||
return [UIFont fontWithName:kHelveticaNeueBold size:size];
|
||||
return [UIFont boldSystemFontOfSize:size];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -30,15 +30,15 @@
|
|||
_challengeTextField.placeholder = NSLocalizedString(@"VERIFICATION_CHALLENGE_DEFAULT_TEXT", @"");
|
||||
[_challengeButton setTitle:NSLocalizedString(@"VERIFICATION_CHALLENGE_SUBMIT_CODE", @"")
|
||||
forState:UIControlStateNormal];
|
||||
|
||||
|
||||
[_sendCodeViaSMSAgainButton setTitle:NSLocalizedString(@"VERIFICATION_CHALLENGE_SUBMIT_AGAIN", @"")
|
||||
forState:UIControlStateNormal];
|
||||
[_sendCodeViaVoiceButton
|
||||
setTitle:[@" " stringByAppendingString:NSLocalizedString(@"VERIFICATION_CHALLENGE_SEND_VIAVOICE", @"")]
|
||||
forState:UIControlStateNormal];
|
||||
setTitle:[@" " stringByAppendingString:NSLocalizedString(@"VERIFICATION_CHALLENGE_SEND_VIAVOICE", @"")]
|
||||
forState:UIControlStateNormal];
|
||||
[_changeNumberButton
|
||||
setTitle:[@" " stringByAppendingString:NSLocalizedString(@"VERIFICATION_CHALLENGE_CHANGE_NUMBER", @"")]
|
||||
forState:UIControlStateNormal];
|
||||
setTitle:[@" " stringByAppendingString:NSLocalizedString(@"VERIFICATION_CHALLENGE_CHANGE_NUMBER", @"")]
|
||||
forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
|
@ -59,60 +59,74 @@
|
|||
{
|
||||
[self enableServerActions:NO];
|
||||
[_challengeTextField resignFirstResponder];
|
||||
|
||||
|
||||
[self registerWithSuccess:^{
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
[Environment.getCurrent.phoneDirectoryManager forceUpdate];
|
||||
[self.navigationController dismissViewControllerAnimated:YES completion:^{
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"REGISTER_CONTACTS_WELCOME", nil)
|
||||
message:NSLocalizedString(@"REGISTER_CONTACTS_BODY", nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"REGISTER_CONTACTS_CONTINUE", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[Environment.getCurrent.contactsManager doAfterEnvironmentInitSetup];
|
||||
}]];
|
||||
|
||||
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
}];
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
[Environment.getCurrent.phoneDirectoryManager forceUpdate];
|
||||
|
||||
[self.navigationController dismissViewControllerAnimated:YES completion:^{
|
||||
[self passedVerification];
|
||||
}];
|
||||
} failure:^(NSError *error) {
|
||||
[self showAlertForError:error];
|
||||
[self enableServerActions:YES];
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
[self showAlertForError:error];
|
||||
[self enableServerActions:YES];
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)passedVerification {
|
||||
if (ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusNotDetermined ||
|
||||
ABAddressBookGetAuthorizationStatus() == kABAuthorizationStatusRestricted) {
|
||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"REGISTER_CONTACTS_WELCOME", nil)
|
||||
message:NSLocalizedString(@"REGISTER_CONTACTS_BODY", nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[controller addAction:[UIAlertAction actionWithTitle:NSLocalizedString(@"REGISTER_CONTACTS_CONTINUE", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction *action) {
|
||||
[self setupContacts];
|
||||
}]];
|
||||
|
||||
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:controller animated:YES completion:nil];
|
||||
|
||||
} else {
|
||||
[self setupContacts];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupContacts {
|
||||
[[Environment getCurrent].contactsManager doAfterEnvironmentInitSetup];
|
||||
}
|
||||
|
||||
- (void)registerWithSuccess:(void (^)())success failure:(void (^)(NSError *))failure
|
||||
{
|
||||
[_submitCodeSpinner startAnimating];
|
||||
[[RPServerRequestsManager sharedInstance] performRequest:[RPAPICall verifyVerificationCode:_challengeTextField.text]
|
||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||
|
||||
[PushManager.sharedManager registrationAndRedPhoneTokenRequestWithSuccess:^(NSData *pushToken, NSData *voipToken, NSString *signupToken) {
|
||||
[TSAccountManager registerWithRedPhoneToken:signupToken
|
||||
pushToken:pushToken
|
||||
voipToken:voipToken
|
||||
success:^{
|
||||
success();
|
||||
}
|
||||
failure:^(NSError *error) {
|
||||
failure(error);
|
||||
}];
|
||||
} failure:^(NSError *error) {
|
||||
failure(error);
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
}];
|
||||
}
|
||||
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
NSHTTPURLResponse *badResponse = (NSHTTPURLResponse *)task.response;
|
||||
NSError *responseError = [self errorForResponse:badResponse];
|
||||
|
||||
failure(responseError);
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
|
||||
}];
|
||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||
|
||||
[PushManager.sharedManager registrationAndRedPhoneTokenRequestWithSuccess:^(NSData *pushToken, NSData *voipToken, NSString *signupToken) {
|
||||
[TSAccountManager registerWithRedPhoneToken:signupToken
|
||||
pushToken:pushToken
|
||||
voipToken:voipToken
|
||||
success:^{
|
||||
success();
|
||||
}
|
||||
failure:^(NSError *error) {
|
||||
failure(error);
|
||||
}];
|
||||
} failure:^(NSError *error) {
|
||||
failure(error);
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
}];
|
||||
}
|
||||
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
NSHTTPURLResponse *badResponse = (NSHTTPURLResponse *)task.response;
|
||||
NSError *responseError = [self errorForResponse:badResponse];
|
||||
|
||||
failure(responseError);
|
||||
[_submitCodeSpinner stopAnimating];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,14 +140,14 @@
|
|||
DDLogError(@"%@: Unable to display error because localizedDescription was not set: %@", self.class, error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
NSString *alertBody = nil;
|
||||
if (error.localizedFailureReason.length > 0) {
|
||||
alertBody = error.localizedFailureReason;
|
||||
} else if (error.localizedRecoverySuggestion.length > 0) {
|
||||
alertBody = error.localizedRecoverySuggestion;
|
||||
}
|
||||
|
||||
|
||||
SignalAlertView(error.localizedDescription, alertBody);
|
||||
}
|
||||
|
||||
|
@ -143,7 +157,7 @@
|
|||
NSString *description = NSLocalizedString(@"REGISTRATION_ERROR", @"");
|
||||
NSString *failureReason = nil;
|
||||
TSRegistrationFailure failureType;
|
||||
|
||||
|
||||
if (badResponse.statusCode == 401) {
|
||||
failureReason = REGISTER_CHALLENGE_ALERT_VIEW_BODY;
|
||||
failureType = kTSRegistrationFailureAuthentication;
|
||||
|
@ -152,14 +166,14 @@
|
|||
failureType = kTSRegistrationFailureRateLimit;
|
||||
} else {
|
||||
failureReason = [NSString
|
||||
stringWithFormat:@"%@ %lu", NSLocalizedString(@"SERVER_CODE", @""), (unsigned long)badResponse.statusCode];
|
||||
stringWithFormat:@"%@ %lu", NSLocalizedString(@"SERVER_CODE", @""), (unsigned long)badResponse.statusCode];
|
||||
failureType = kTSRegistrationFailureNetwork;
|
||||
}
|
||||
|
||||
|
||||
NSDictionary *userInfo =
|
||||
@{NSLocalizedDescriptionKey : description, NSLocalizedFailureReasonErrorKey : failureReason};
|
||||
@{NSLocalizedDescriptionKey : description, NSLocalizedFailureReasonErrorKey : failureReason};
|
||||
NSError *error = [NSError errorWithDomain:TSRegistrationErrorDomain code:failureType userInfo:userInfo];
|
||||
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
@ -167,57 +181,57 @@
|
|||
- (IBAction)sendCodeSMSAction:(id)sender
|
||||
{
|
||||
[self enableServerActions:NO];
|
||||
|
||||
|
||||
[_requestCodeAgainSpinner startAnimating];
|
||||
[[RPServerRequestsManager sharedInstance] performRequest:[RPAPICall requestVerificationCode]
|
||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||
[self enableServerActions:YES];
|
||||
[_requestCodeAgainSpinner stopAnimating];
|
||||
|
||||
}
|
||||
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
|
||||
DDLogError(@"Registration failed with information %@", error.description);
|
||||
|
||||
UIAlertView *registrationErrorAV = [[UIAlertView alloc] initWithTitle:REGISTER_ERROR_ALERT_VIEW_TITLE
|
||||
message:REGISTER_ERROR_ALERT_VIEW_BODY
|
||||
delegate:nil
|
||||
cancelButtonTitle:REGISTER_ERROR_ALERT_VIEW_DISMISS
|
||||
otherButtonTitles:nil, nil];
|
||||
|
||||
[registrationErrorAV show];
|
||||
|
||||
[self enableServerActions:YES];
|
||||
[_requestCodeAgainSpinner stopAnimating];
|
||||
}];
|
||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||
[self enableServerActions:YES];
|
||||
[_requestCodeAgainSpinner stopAnimating];
|
||||
|
||||
}
|
||||
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
|
||||
DDLogError(@"Registration failed with information %@", error.description);
|
||||
|
||||
UIAlertView *registrationErrorAV = [[UIAlertView alloc] initWithTitle:REGISTER_ERROR_ALERT_VIEW_TITLE
|
||||
message:REGISTER_ERROR_ALERT_VIEW_BODY
|
||||
delegate:nil
|
||||
cancelButtonTitle:REGISTER_ERROR_ALERT_VIEW_DISMISS
|
||||
otherButtonTitles:nil, nil];
|
||||
|
||||
[registrationErrorAV show];
|
||||
|
||||
[self enableServerActions:YES];
|
||||
[_requestCodeAgainSpinner stopAnimating];
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)sendCodeVoiceAction:(id)sender
|
||||
{
|
||||
[self enableServerActions:NO];
|
||||
|
||||
|
||||
[_requestCallSpinner startAnimating];
|
||||
[[RPServerRequestsManager sharedInstance] performRequest:[RPAPICall requestVerificationCodeWithVoice]
|
||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||
|
||||
[self enableServerActions:YES];
|
||||
[_requestCallSpinner stopAnimating];
|
||||
|
||||
}
|
||||
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
|
||||
DDLogError(@"Registration failed with information %@", error.description);
|
||||
|
||||
UIAlertView *registrationErrorAV = [[UIAlertView alloc] initWithTitle:REGISTER_ERROR_ALERT_VIEW_TITLE
|
||||
message:REGISTER_ERROR_ALERT_VIEW_BODY
|
||||
delegate:nil
|
||||
cancelButtonTitle:REGISTER_ERROR_ALERT_VIEW_DISMISS
|
||||
otherButtonTitles:nil, nil];
|
||||
|
||||
[registrationErrorAV show];
|
||||
[self enableServerActions:YES];
|
||||
[_requestCallSpinner stopAnimating];
|
||||
}];
|
||||
success:^(NSURLSessionDataTask *task, id responseObject) {
|
||||
|
||||
[self enableServerActions:YES];
|
||||
[_requestCallSpinner stopAnimating];
|
||||
|
||||
}
|
||||
failure:^(NSURLSessionDataTask *task, NSError *error) {
|
||||
|
||||
DDLogError(@"Registration failed with information %@", error.description);
|
||||
|
||||
UIAlertView *registrationErrorAV = [[UIAlertView alloc] initWithTitle:REGISTER_ERROR_ALERT_VIEW_TITLE
|
||||
message:REGISTER_ERROR_ALERT_VIEW_BODY
|
||||
delegate:nil
|
||||
cancelButtonTitle:REGISTER_ERROR_ALERT_VIEW_DISMISS
|
||||
otherButtonTitles:nil, nil];
|
||||
|
||||
[registrationErrorAV show];
|
||||
[self enableServerActions:YES];
|
||||
[_requestCallSpinner stopAnimating];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)enableServerActions:(BOOL)enabled
|
||||
|
@ -233,7 +247,7 @@
|
|||
- (void)initializeKeyboardHandlers
|
||||
{
|
||||
UITapGestureRecognizer *outsideTabRecognizer =
|
||||
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboardFromAppropriateSubView)];
|
||||
[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboardFromAppropriateSubView)];
|
||||
[self.view addGestureRecognizer:outsideTabRecognizer];
|
||||
}
|
||||
|
||||
|
@ -246,14 +260,14 @@
|
|||
{
|
||||
CGFloat screenHeight = [UIScreen mainScreen].bounds.size.height;
|
||||
CGFloat blueHeaderHeight;
|
||||
|
||||
|
||||
if (screenHeight < 667) {
|
||||
self.signalLogo.hidden = YES;
|
||||
blueHeaderHeight = screenHeight - 400;
|
||||
} else {
|
||||
blueHeaderHeight = screenHeight - 410;
|
||||
}
|
||||
|
||||
|
||||
_headerConstraint.constant = blueHeaderHeight;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,7 @@
|
|||
@property (nonatomic, strong) IBOutlet UIButton *rejectButton;
|
||||
@property (nonatomic, strong) IBOutlet UIButton *answerButton;
|
||||
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *connectingIndicatorImageView;
|
||||
@property (nonatomic, strong) IBOutlet UIImageView *callStateImageContainerView;
|
||||
@property IBOutlet UIView *containerView;
|
||||
|
||||
@property (nonatomic, readonly) CallState *callState;
|
||||
@property (nonatomic, readonly) Contact *potentiallyKnownContact;
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
#define CONNECTING_FLASH_DURATION 0.5f
|
||||
#define END_CALL_CLEANUP_DELAY (int)(3.1f * NSEC_PER_SEC)
|
||||
|
||||
static NSString *const SPINNER_CONNECTING_IMAGE_NAME = @"spinner_connecting";
|
||||
static NSString *const SPINNER_CONNECTING_FLASH_IMAGE_NAME = @"spinner_connecting_flash";
|
||||
static NSString *const SPINNER_RINGING_IMAGE_NAME = @"spinner_ringing";
|
||||
static NSString *const SPINNER_ERROR_FLASH_IMAGE_NAME = @"spinner_error";
|
||||
|
||||
static NSInteger connectingFlashCounter = 0;
|
||||
|
||||
|
||||
@interface InCallViewController () {
|
||||
CallAudioManager *_callAudioManager;
|
||||
|
@ -40,7 +33,7 @@ static NSInteger connectingFlashCounter = 0;
|
|||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
|
||||
[self showCallState];
|
||||
[self setPotentiallyKnownContact:_potentiallyKnownContact];
|
||||
[self localizeButtons];
|
||||
|
@ -58,7 +51,6 @@ static NSInteger connectingFlashCounter = 0;
|
|||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
[self startConnectingFlashAnimation];
|
||||
[UIDevice.currentDevice setProximityMonitoringEnabled:YES];
|
||||
}
|
||||
|
||||
|
@ -76,37 +68,8 @@ static NSInteger connectingFlashCounter = 0;
|
|||
[self handleIncomingDetails];
|
||||
}
|
||||
|
||||
- (void)startConnectingFlashAnimation {
|
||||
if(!_ringingAnimationTimer.isValid){
|
||||
_connectingFlashTimer = [NSTimer scheduledTimerWithTimeInterval:CONNECTING_FLASH_DURATION
|
||||
target:self
|
||||
selector:@selector(flashConnectingIndicator)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)flashConnectingIndicator {
|
||||
|
||||
NSString *newImageName;
|
||||
|
||||
if (connectingFlashCounter % 2 == 0) {
|
||||
newImageName = SPINNER_CONNECTING_IMAGE_NAME;
|
||||
} else {
|
||||
newImageName = SPINNER_CONNECTING_FLASH_IMAGE_NAME;
|
||||
}
|
||||
|
||||
[_connectingIndicatorImageView setImage:[UIImage imageNamed:newImageName]];
|
||||
connectingFlashCounter++;
|
||||
}
|
||||
|
||||
- (void)startRingingAnimation {
|
||||
[self stopConnectingFlashAnimation];
|
||||
_ringingAnimationTimer = [NSTimer scheduledTimerWithTimeInterval:RINGING_ROTATION_DURATION
|
||||
target:self
|
||||
selector:@selector(rotateConnectingIndicator)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
|
||||
if (!_incomingCallButtonsView.hidden) {
|
||||
_vibrateTimer = [NSTimer scheduledTimerWithTimeInterval:VIBRATE_TIMER_DURATION
|
||||
|
@ -123,19 +86,6 @@ static NSInteger connectingFlashCounter = 0;
|
|||
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
|
||||
}
|
||||
|
||||
- (void)rotateConnectingIndicator {
|
||||
[_connectingIndicatorImageView setImage:[UIImage imageNamed:SPINNER_RINGING_IMAGE_NAME]];
|
||||
[UIView animateWithDuration:RINGING_ROTATION_DURATION delay:0.0 options:UIViewAnimationOptionCurveLinear animations:^{
|
||||
_connectingIndicatorImageView.transform = CGAffineTransformRotate(_connectingIndicatorImageView.transform, (float)M_PI_2);
|
||||
} completion:nil];
|
||||
}
|
||||
|
||||
- (void)performCallInSessionAnimation {
|
||||
[UIView animateWithDuration:0.5f animations:^{
|
||||
[_callStateImageContainerView setFrame:CGRectMake(0, _callStateImageContainerView.frame.origin.y, _callStateImageContainerView.frame.size.width, _callStateImageContainerView.frame.size.height)];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)stopRingingAnimation {
|
||||
if (_ringingAnimationTimer) {
|
||||
[_ringingAnimationTimer invalidate];
|
||||
|
@ -154,7 +104,6 @@ static NSInteger connectingFlashCounter = 0;
|
|||
- (void)showConnectingError {
|
||||
[self stopRingingAnimation];
|
||||
[self stopConnectingFlashAnimation];
|
||||
[_connectingIndicatorImageView setImage:[UIImage imageNamed:SPINNER_ERROR_FLASH_IMAGE_NAME]];
|
||||
}
|
||||
|
||||
- (void)localizeButtons {
|
||||
|
@ -205,7 +154,6 @@ static NSInteger connectingFlashCounter = 0;
|
|||
_muteButton.hidden = NO;
|
||||
_speakerButton.hidden = NO;
|
||||
_authenicationStringLabel.text = sas;
|
||||
[self performCallInSessionAnimation];
|
||||
}];
|
||||
|
||||
[[_callState observableProgress] watchLatestValue:^(CallProgress* latestProgress) {
|
||||
|
|
|
@ -36,8 +36,9 @@ typedef enum : NSUInteger {
|
|||
@property (nonatomic, strong) IBOutlet UIImageView *archiveImageView;
|
||||
@property (nonatomic, assign) id<TableViewCellDelegate> delegate;
|
||||
|
||||
-(void)configureWithThread:(TSThread*)thread;
|
||||
-(void)configureForState:(CellState)state;
|
||||
-(void)animateDisappear;
|
||||
+ (instancetype)inboxTableViewCell;
|
||||
- (void)configureWithThread:(TSThread*)thread;
|
||||
- (void)configureForState:(CellState)state;
|
||||
- (void)animateDisappear;
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,19 +22,21 @@
|
|||
|
||||
@implementation InboxTableViewCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
self = [NSBundle.mainBundle loadNibNamed:NSStringFromClass(self.class)
|
||||
owner:self
|
||||
options:nil][0];
|
||||
+ (instancetype)inboxTableViewCell {
|
||||
InboxTableViewCell *cell = [NSBundle.mainBundle loadNibNamed:NSStringFromClass(self.class)
|
||||
owner:self
|
||||
options:nil][0];
|
||||
|
||||
if (self) {
|
||||
_scrollView.contentSize = CGSizeMake(CGRectGetWidth(_contentContainerView.bounds),
|
||||
CGRectGetHeight(_scrollView.frame));
|
||||
|
||||
_scrollView.contentOffset = CGPointMake(CGRectGetWidth(_archiveView.frame), 0);
|
||||
_archiveImageView.image = [_archiveImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
}
|
||||
return self;
|
||||
[cell initializeLayout];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)initializeLayout {
|
||||
_scrollView.contentSize = CGSizeMake(CGRectGetWidth(_contentContainerView.bounds),
|
||||
CGRectGetHeight(_scrollView.frame));
|
||||
|
||||
_scrollView.contentOffset = CGPointMake(CGRectGetWidth(_archiveView.frame), 0);
|
||||
_archiveImageView.image = [_archiveImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
|
||||
}
|
||||
|
||||
- (NSString *)reuseIdentifier {
|
||||
|
@ -51,7 +53,7 @@
|
|||
_nameLabel.text = NSLocalizedString(@"NEW_GROUP_DEFAULT_TITLE", @"");
|
||||
}
|
||||
if(_contactPictureView.image!=nil) {
|
||||
[UIUtil applyRoundedBorderToImageView:&_contactPictureView];
|
||||
[UIUtil applyRoundedBorderToImageView:&_contactPictureView];
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -77,7 +79,7 @@
|
|||
[UIUtil applyRoundedBorderToImageView:&_contactPictureView];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
self.separatorInset = UIEdgeInsetsMake(0,_contactPictureView.frame.size.width*1.5f, 0, 0);
|
||||
|
||||
if (thread.hasUnreadMessages) {
|
||||
|
@ -130,12 +132,12 @@
|
|||
value:[UIColor ows_darkGrayColor]
|
||||
range:NSMakeRange(0, timeString.length)];
|
||||
|
||||
|
||||
|
||||
|
||||
[attributedString addAttribute:NSFontAttributeName
|
||||
value:[UIFont ows_regularFontWithSize:TIME_LABEL_SIZE]
|
||||
range:NSMakeRange(0, timeString.length)];
|
||||
|
||||
|
||||
|
||||
return attributedString;
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef enum : NSUInteger {
|
|||
[[TSMessagesManager sharedManager] sendAttachment:UIImagePNGRepresentation(model.groupImage) contentType:@"image/png" inMessage:message thread:self.thread];
|
||||
}
|
||||
else {
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread success:nil failure:nil];
|
||||
}
|
||||
isGroupConversation = YES;
|
||||
}
|
||||
|
@ -572,7 +572,7 @@ typedef enum : NSUInteger {
|
|||
|
||||
TSOutgoingMessage *message = [[TSOutgoingMessage alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp] inThread:self.thread messageBody:text attachments:nil];
|
||||
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread success:nil failure:nil];
|
||||
[self finishSendingMessage];
|
||||
}
|
||||
}
|
||||
|
@ -1072,7 +1072,7 @@ typedef enum : NSUInteger {
|
|||
[message removeWithTransaction:transaction];
|
||||
}];
|
||||
}else {
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:self.thread success:nil failure:nil];
|
||||
[self finishSendingMessage];
|
||||
}
|
||||
}];
|
||||
|
@ -1603,7 +1603,7 @@ typedef enum : NSUInteger {
|
|||
TSGroupThread* gThread = (TSGroupThread*)_thread;
|
||||
TSOutgoingMessage *message = [[TSOutgoingMessage alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp] inThread:gThread messageBody:@"" attachments:[[NSMutableArray alloc] init]];
|
||||
message.groupMetaMessage = TSGroupMessageQuit;
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:gThread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:gThread success:nil failure:nil];
|
||||
[self.editingDatabaseConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
NSMutableArray *newGroupMemberIds = [NSMutableArray arrayWithArray:gThread.groupModel.groupMemberIds];
|
||||
[newGroupMemberIds removeObject:[SignalKeyingStorage.localNumber toE164]];
|
||||
|
@ -1630,7 +1630,7 @@ typedef enum : NSUInteger {
|
|||
[[TSMessagesManager sharedManager] sendAttachment:UIImagePNGRepresentation(newGroupModel.groupImage) contentType:@"image/png" inMessage:message thread:groupThread];
|
||||
}
|
||||
else {
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:groupThread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:groupThread success:nil failure:nil];
|
||||
}
|
||||
|
||||
self.thread = groupThread;
|
||||
|
|
|
@ -60,6 +60,8 @@ typedef enum {
|
|||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self.navigationItem setHidesBackButton:YES];
|
||||
|
||||
[self.navigationController.navigationBar setTranslucent:NO];
|
||||
|
||||
self.tableView.tableFooterView = [[UIView alloc]initWithFrame:CGRectZero];
|
||||
|
|
|
@ -24,4 +24,6 @@
|
|||
|
||||
@property (nonatomic, retain) CallState* latestCall;
|
||||
|
||||
- (NSNumber*)updateInboxCountLabel;
|
||||
|
||||
@end
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#import "InboxTableViewCell.h"
|
||||
|
||||
#import "ContactsManager.h"
|
||||
#import "Environment.h"
|
||||
#import "MessagesViewController.h"
|
||||
#import "SignalsViewController.h"
|
||||
#import "InCallViewController.h"
|
||||
|
@ -31,7 +30,6 @@
|
|||
|
||||
static NSString *const inboxTableViewCell = @"inBoxTableViewCell";
|
||||
static NSString *const kSegueIndentifier = @"showSegue";
|
||||
static NSString* const kCallSegue = @"2.0_6.0_Call_Segue";
|
||||
static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
||||
|
||||
@interface SignalsViewController ()
|
||||
|
@ -97,8 +95,8 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
return;
|
||||
}
|
||||
|
||||
[[self tableView] reloadData];
|
||||
[self updateInboxCountLabel];
|
||||
[[self tableView] reloadData];
|
||||
}
|
||||
|
||||
-(void)tableViewSetUp
|
||||
|
@ -123,8 +121,7 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
TSThread *thread = [self threadForIndexPath:indexPath];
|
||||
|
||||
if (!cell) {
|
||||
cell = [[InboxTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
|
||||
reuseIdentifier:inboxTableViewCell];
|
||||
cell = [InboxTableViewCell inboxTableViewCell];
|
||||
cell.delegate = self;
|
||||
}
|
||||
|
||||
|
@ -186,7 +183,7 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
if([thread isKindOfClass:[TSGroupThread class]]) {
|
||||
TSOutgoingMessage *message = [[TSOutgoingMessage alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp] inThread:thread messageBody:@"" attachments:[[NSMutableArray alloc] init]];
|
||||
message.groupMetaMessage = TSGroupMessageQuit;
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:thread];
|
||||
[[TSMessagesManager sharedManager] sendMessage:message inThread:thread success:nil failure:nil];
|
||||
}
|
||||
[self.editingDbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
[thread removeWithTransaction:transaction];
|
||||
|
@ -202,12 +199,11 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
BOOL viewingThreadsIn = self.viewingThreadsIn;
|
||||
[self.editingDbConnection readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
|
||||
viewingThreadsIn == kInboxState ? [thread archiveThreadWithTransaction:transaction] : [thread unarchiveThreadWithTransaction:transaction];
|
||||
|
||||
|
||||
}];
|
||||
[self checkIfEmptyView];
|
||||
}
|
||||
|
||||
|
||||
- (NSNumber*)updateInboxCountLabel {
|
||||
NSUInteger numberOfItems = [[TSMessagesManager sharedManager] unreadMessagesCount];
|
||||
NSNumber *badgeNumber = [NSNumber numberWithUnsignedInteger:numberOfItems];
|
||||
|
@ -219,6 +215,7 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
}
|
||||
|
||||
[_segmentedControl setTitle:unreadString forSegmentAtIndex:0];
|
||||
[_segmentedControl reloadInputViews];
|
||||
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:badgeNumber.integerValue];
|
||||
|
||||
return badgeNumber;
|
||||
|
@ -280,7 +277,7 @@ static NSString* const kShowSignupFlowSegue = @"showSignupFlow";
|
|||
self.threadMappings = [[YapDatabaseViewMappings alloc] initWithGroups:@[grouping]
|
||||
view:TSThreadDatabaseViewExtensionName];
|
||||
[self.threadMappings setIsReversed:YES forGroup:grouping];
|
||||
|
||||
|
||||
[self.uiDatabaseConnection asyncReadWithBlock:^(YapDatabaseReadTransaction *transaction){
|
||||
[self.threadMappings updateWithTransaction:transaction];
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.whispersystems.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue