Make SignalMessaging work with SignalUtilitiesKit

This commit is contained in:
nielsandriesse 2020-11-11 11:50:01 +11:00
parent c475f895e8
commit ae635dbd36
590 changed files with 287 additions and 86438 deletions

30
Podfile
View File

@ -10,20 +10,6 @@ def shared_pods
# OWS Pods
###
pod 'SessionCoreKit', git: 'https://github.com/loki-project/session-ios-core-kit.git', testspecs: ["Tests"] # Fork of SignalCoreKit
# pod 'SignalCoreKit', path: '../SignalCoreKit', testspecs: ["Tests"]
pod 'SessionAxolotlKit', git: 'https://github.com/loki-project/session-ios-protocol-kit.git', branch: 'master', testspecs: ["Tests"] # Fork of AxolotlKit
# pod 'AxolotlKit', path: '../SignalProtocolKit', testspecs: ["Tests"]
pod 'SessionCurve25519Kit', git: 'https://github.com/loki-project/session-ios-curve-25519-kit', testspecs: ["Tests"] # Fork of Curve25519Kit
# pod 'Curve25519Kit', path: '../Curve25519Kit', testspecs: ["Tests"]
pod 'SessionMetadataKit', git: 'https://github.com/loki-project/session-ios-metadata-kit', testspecs: ["Tests"] # Fork of SignalMetadataKit
# pod 'SignalMetadataKit', path: '../SignalMetadataKit', testspecs: ["Tests"]
pod 'SessionServiceKit', path: '.', testspecs: ["Tests"]
# Project does not compile with PromiseKit 6.7.1
# see: https://github.com/mxcl/PromiseKit/issues/990
pod 'PromiseKit', "6.5.3"
@ -71,10 +57,6 @@ target 'Signal' do
pod 'FeedKit', '~> 8.1', :inhibit_warnings => true
pod 'NVActivityIndicatorView', '~> 4.7', :inhibit_warnings => true
pod 'Sodium', '~> 0.8.0', :inhibit_warnings => true
target 'SignalTests' do
inherit! :search_paths
end
end
target 'SignalShareExtension' do
@ -94,8 +76,16 @@ target 'LokiPushNotificationService' do
end
target 'SignalMessaging' do
project 'Signal'
shared_pods
pod 'AFNetworking', inhibit_warnings: true
pod 'CocoaLumberjack', :inhibit_warnings => true
pod 'CryptoSwift', :inhibit_warnings => true
pod 'Curve25519Kit', :inhibit_warnings => true
pod 'libPhoneNumber-iOS', :inhibit_warnings => true
pod 'Mantle', git: 'https://github.com/signalapp/Mantle', branch: 'signal-master', :inhibit_warnings => true
pod 'PromiseKit', :inhibit_warnings => true
pod 'PureLayout', '~> 3.1.4', :inhibit_warnings => true
pod 'YapDatabase/SQLCipher', :git => 'https://github.com/signalapp/YapDatabase.git', branch: 'signal-release', :inhibit_warnings => true
pod 'YYImage', git: 'https://github.com/signalapp/YYImage', :inhibit_warnings => true
end
target 'SignalUtilitiesKit' do

View File

@ -41,83 +41,6 @@ PODS:
- PureLayout (3.1.6)
- Reachability (3.2)
- SAMKeychain (1.5.3)
- SessionAxolotlKit (1.0.7):
- CocoaLumberjack
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit (~> 2.1.2)
- SessionHKDFKit (~> 0.0.5)
- SwiftProtobuf (~> 1.5.0)
- SessionAxolotlKit/Tests (1.0.7):
- CocoaLumberjack
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit (~> 2.1.2)
- SessionHKDFKit (~> 0.0.5)
- SwiftProtobuf (~> 1.5.0)
- SessionCoreKit (1.0.0):
- CocoaLumberjack
- GRKOpenSSLFramework
- SessionCoreKit/Tests (1.0.0):
- CocoaLumberjack
- GRKOpenSSLFramework
- SessionCurve25519Kit (2.1.3):
- CocoaLumberjack
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit/Tests (2.1.3):
- CocoaLumberjack
- SessionCoreKit (~> 1.0.0)
- SessionHKDFKit (0.0.5):
- CocoaLumberjack
- SessionCoreKit
- SessionMetadataKit (1.0.9):
- CocoaLumberjack
- CryptoSwift (~> 1.3)
- SessionAxolotlKit (~> 1.0.7)
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit (~> 2.1.2)
- SessionHKDFKit (~> 0.0.5)
- SwiftProtobuf (~> 1.5.0)
- SessionMetadataKit/Tests (1.0.9):
- CocoaLumberjack
- CryptoSwift (~> 1.3)
- SessionAxolotlKit (~> 1.0.7)
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit (~> 2.1.2)
- SessionHKDFKit (~> 0.0.5)
- SwiftProtobuf (~> 1.5.0)
- SessionServiceKit (1.0.0):
- AFNetworking
- CocoaLumberjack
- CryptoSwift (~> 1.3)
- GRKOpenSSLFramework
- libPhoneNumber-iOS
- Mantle
- PromiseKit (~> 6.0)
- Reachability
- SAMKeychain
- SessionAxolotlKit (~> 1.0.7)
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit (~> 2.1.3)
- SessionMetadataKit (~> 1.0.9)
- Starscream
- SwiftProtobuf (~> 1.5.0)
- YapDatabase/SQLCipher
- SessionServiceKit/Tests (1.0.0):
- AFNetworking
- CocoaLumberjack
- CryptoSwift (~> 1.3)
- GRKOpenSSLFramework
- libPhoneNumber-iOS
- Mantle
- PromiseKit (~> 6.0)
- Reachability
- SAMKeychain
- SessionAxolotlKit (~> 1.0.7)
- SessionCoreKit (~> 1.0.0)
- SessionCurve25519Kit (~> 2.1.3)
- SessionMetadataKit (~> 1.0.9)
- Starscream
- SwiftProtobuf (~> 1.5.0)
- YapDatabase/SQLCipher
- Sodium (0.8.0)
- SQLCipher (4.4.0):
- SQLCipher/standard (= 4.4.0)
@ -214,16 +137,6 @@ DEPENDENCIES:
- PureLayout (~> 3.1.4)
- Reachability
- SAMKeychain
- SessionAxolotlKit (from `https://github.com/loki-project/session-ios-protocol-kit.git`, branch `master`)
- SessionAxolotlKit/Tests (from `https://github.com/loki-project/session-ios-protocol-kit.git`, branch `master`)
- SessionCoreKit (from `https://github.com/loki-project/session-ios-core-kit.git`)
- SessionCoreKit/Tests (from `https://github.com/loki-project/session-ios-core-kit.git`)
- SessionCurve25519Kit (from `https://github.com/loki-project/session-ios-curve-25519-kit`)
- SessionCurve25519Kit/Tests (from `https://github.com/loki-project/session-ios-curve-25519-kit`)
- SessionMetadataKit (from `https://github.com/loki-project/session-ios-metadata-kit`)
- SessionMetadataKit/Tests (from `https://github.com/loki-project/session-ios-metadata-kit`)
- SessionServiceKit (from `.`)
- SessionServiceKit/Tests (from `.`)
- Sodium (~> 0.8.0)
- SQLCipher (>= 4.0.1)
- SSZipArchive
@ -248,7 +161,6 @@ SPEC REPOS:
- PureLayout
- Reachability
- SAMKeychain
- SessionHKDFKit
- Sodium
- SQLCipher
- SSZipArchive
@ -259,17 +171,6 @@ EXTERNAL SOURCES:
Mantle:
:branch: signal-master
:git: https://github.com/signalapp/Mantle
SessionAxolotlKit:
:branch: master
:git: https://github.com/loki-project/session-ios-protocol-kit.git
SessionCoreKit:
:git: https://github.com/loki-project/session-ios-core-kit.git
SessionCurve25519Kit:
:git: https://github.com/loki-project/session-ios-curve-25519-kit
SessionMetadataKit:
:git: https://github.com/loki-project/session-ios-metadata-kit
SessionServiceKit:
:path: "."
Starscream:
:branch: signal-release
:git: https://github.com/signalapp/Starscream.git
@ -283,18 +184,6 @@ CHECKOUT OPTIONS:
Mantle:
:commit: b72c2d1e6132501db906de2cffa8ded7803c54f4
:git: https://github.com/signalapp/Mantle
SessionAxolotlKit:
:commit: be92fccb6152ee02c8c2658cb3c2e21201f119d1
:git: https://github.com/loki-project/session-ios-protocol-kit.git
SessionCoreKit:
:commit: 0d66c90657b62cb66ecd2767c57408a951650f23
:git: https://github.com/loki-project/session-ios-core-kit.git
SessionCurve25519Kit:
:commit: c3bc075d1e1c8339eebe2af184869de1a007d855
:git: https://github.com/loki-project/session-ios-curve-25519-kit
SessionMetadataKit:
:commit: df787d84bb8adb23c10df669296dee8d7988e410
:git: https://github.com/loki-project/session-ios-metadata-kit
Starscream:
:commit: b09ea163c3cb305152c65b299cb024610f52e735
:git: https://github.com/signalapp/Starscream.git
@ -320,12 +209,6 @@ SPEC CHECKSUMS:
PureLayout: bd3c4ec3a3819ad387c99ebb72c6b129c3ed4d2d
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
SessionAxolotlKit: f3558573a3cb52ebb921572f2f3b683da5eddad9
SessionCoreKit: 778a3f6e3da788b43497734166646025b6392e88
SessionCurve25519Kit: 9bb9afe199e4bc23578a4b15932ad2c57bd047b1
SessionHKDFKit: b0f4e669411703ab925aba07491c5611564d1419
SessionMetadataKit: d37afdc47d20c7046faa139a92e68fa99f76c95b
SessionServiceKit: b12afb3975b33a9579802111f948838861d914bb
Sodium: 63c0ca312a932e6da481689537d4b35568841bdc
SQLCipher: e434ed542b24f38ea7b36468a13f9765e1b5c072
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9
@ -335,6 +218,6 @@ SPEC CHECKSUMS:
YYImage: 6db68da66f20d9f169ceb94dfb9947c3867b9665
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
PODFILE CHECKSUM: d78dc9a752cd3ce8f01fa327b8518dff3f5236d5
PODFILE CHECKSUM: 99d57680804c51117e98de7f4d4c243750ed26e1
COCOAPODS: 1.10.0.rc.1

2
Pods

@ -1 +1 @@
Subproject commit e28da414f77b9cba508c92e90b16b815847cde7e
Subproject commit 323754e2fbc3d87c87538814d3695755818164ac

View File

@ -1,61 +0,0 @@
#
# Be sure to run `pod lib lint SignalServiceKit.podspec' to ensure this is a
# valid spec before submitting.
#
# Any lines starting with a # are optional, but their use is encouraged
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = "SessionServiceKit"
s.version = "1.0.0"
s.summary = "A Swift/Objective-C library for communicating with the Session messaging service."
s.description = <<-DESC
A Swift/Objective-C library for communicating with the Session messaging service.
DESC
s.homepage = "https://github.com/loki-project/session-ios"
s.license = 'GPLv3'
s.author = { "Niels Andriesse" => "niels@loki.network" }
s.source = { :git => "https://github.com/loki-project/session-ios.git", :tag => s.version.to_s }
s.social_media_url = 'https://getsession.org/'
s.platform = :ios, '10.0'
#s.ios.deployment_target = '9.0'
#s.osx.deployment_target = '10.9'
s.requires_arc = true
s.source_files = 'SignalServiceKit/src/**/*.{h,m,mm,swift}'
# We want to use modules to avoid clobbering CocoaLumberjack macros defined
# by other OWS modules which *also* import CocoaLumberjack. But because we
# also use Objective-C++, modules are disabled unless we explicitly enable
# them
s.compiler_flags = "-fcxx-modules"
s.prefix_header_file = 'SignalServiceKit/src/TSPrefix.h'
s.xcconfig = { 'OTHER_CFLAGS' => '$(inherited) -DSQLITE_HAS_CODEC' }
s.resources = ["SignalServiceKit/Resources/Certificates/*", "SignalServiceKit/src/Loki/Mnemonic/*.txt"]
s.dependency 'SessionCurve25519Kit', '~> 2.1.3'
s.dependency 'CocoaLumberjack'
s.dependency 'CryptoSwift', '~> 1.3'
s.dependency 'AFNetworking'
s.dependency 'SessionAxolotlKit', '~> 1.0.7'
s.dependency 'Mantle'
s.dependency 'YapDatabase/SQLCipher'
s.dependency 'Starscream'
s.dependency 'libPhoneNumber-iOS'
s.dependency 'GRKOpenSSLFramework'
s.dependency 'SAMKeychain'
s.dependency 'Reachability'
s.dependency 'SwiftProtobuf', '~> 1.5.0'
s.dependency 'SessionCoreKit', '~> 1.0.0'
s.dependency 'SessionMetadataKit', '~> 1.0.9'
s.dependency 'PromiseKit', '~> 6.0'
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'SignalServiceKit/tests/**/*.{h,m,swift}'
end
end

View File

@ -27,7 +27,6 @@
340872D622397E6800CB25B0 /* AttachmentCaptionToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340872D522397E6800CB25B0 /* AttachmentCaptionToolbar.swift */; };
340872D822397F4600CB25B0 /* AttachmentCaptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340872D722397F4500CB25B0 /* AttachmentCaptionViewController.swift */; };
340872DA22397FEB00CB25B0 /* AttachmentTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 340872D922397FEB00CB25B0 /* AttachmentTextView.swift */; };
340B02BA1FA0D6C700F9CFEC /* ConversationViewItemTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 340B02B91FA0D6C700F9CFEC /* ConversationViewItemTest.m */; };
340FC8A9204DAC8D007AEB0F /* NotificationSettingsOptionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 340FC87B204DAC8C007AEB0F /* NotificationSettingsOptionsViewController.m */; };
340FC8AA204DAC8D007AEB0F /* NotificationSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 340FC87C204DAC8C007AEB0F /* NotificationSettingsViewController.m */; };
340FC8AB204DAC8D007AEB0F /* DomainFrontingCountryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 340FC87D204DAC8C007AEB0F /* DomainFrontingCountryViewController.m */; };
@ -50,7 +49,6 @@
34129B8621EF877A005457A8 /* LinkPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34129B8521EF8779005457A8 /* LinkPreviewView.swift */; };
341341EF2187467A00192D59 /* ConversationViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 341341EE2187467900192D59 /* ConversationViewModel.m */; };
341F2C0F1F2B8AE700D07D6B /* DebugUIMisc.m in Sources */ = {isa = PBXBuildFile; fileRef = 341F2C0E1F2B8AE700D07D6B /* DebugUIMisc.m */; };
3421981C21061D2E00C57195 /* ByteParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3421981B21061D2E00C57195 /* ByteParserTest.swift */; };
34277A5E20751BDC006049F2 /* OWSQuotedMessageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34277A5C20751BDC006049F2 /* OWSQuotedMessageView.m */; };
3427C64320F500E000EEC730 /* OWSMessageTimerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3427C64220F500DF00EEC730 /* OWSMessageTimerView.m */; };
342950822124C9750000B063 /* OWSTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 3429507E2124C9740000B063 /* OWSTextField.m */; };
@ -134,13 +132,9 @@
3478506B1FD9B78A007B8332 /* NoopCallMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347850671FD9B78A007B8332 /* NoopCallMessageHandler.swift */; };
347850711FDAEB17007B8332 /* OWSUserProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = 3478506F1FDAEB16007B8332 /* OWSUserProfile.m */; };
347850721FDAEB17007B8332 /* OWSUserProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 347850701FDAEB16007B8332 /* OWSUserProfile.h */; settings = {ATTRIBUTES = (Public, ); }; };
34843B2421432293004DED45 /* SignalBaseTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34843B2221432292004DED45 /* SignalBaseTest.m */; };
34843B26214327C9004DED45 /* OWSOrphanDataCleanerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34843B25214327C9004DED45 /* OWSOrphanDataCleanerTest.m */; };
34843B2C214FE296004DED45 /* MockEnvironment.m in Sources */ = {isa = PBXBuildFile; fileRef = 34843B2A214FE295004DED45 /* MockEnvironment.m */; };
348570A820F67575004FF32B /* OWSMessageHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 348570A620F67574004FF32B /* OWSMessageHeaderView.m */; };
3488F9362191CC4000E524CC /* ConversationMediaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3488F9352191CC4000E524CC /* ConversationMediaView.swift */; };
348BB25D20A0C5530047AEC2 /* ContactShareViewHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 348BB25C20A0C5530047AEC2 /* ContactShareViewHelper.swift */; };
3491D9A121022DB7001EF5A1 /* CDSSigningCertificateTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3491D9A021022DB7001EF5A1 /* CDSSigningCertificateTest.m */; };
3496744D2076768700080B5F /* OWSMessageBubbleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3496744C2076768700080B5F /* OWSMessageBubbleView.m */; };
3496744F2076ACD000080B5F /* LongTextViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3496744E2076ACCE00080B5F /* LongTextViewController.swift */; };
3496955C219B605E00DCFE74 /* ImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34969559219B605E00DCFE74 /* ImagePickerController.swift */; };
@ -226,8 +220,6 @@
34BBC85A220C7ADA00857249 /* ImageEditorTextItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BBC855220C7ADA00857249 /* ImageEditorTextItem.swift */; };
34BBC85B220C7ADA00857249 /* OrderedDictionary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BBC856220C7ADA00857249 /* OrderedDictionary.swift */; };
34BBC85D220D19D600857249 /* ImageEditorPanGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BBC85C220D19D600857249 /* ImageEditorPanGestureRecognizer.swift */; };
34BBC861220E883300857249 /* ImageEditorModelTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BBC85F220E883200857249 /* ImageEditorModelTest.swift */; };
34BBC862220E883300857249 /* ImageEditorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BBC860220E883200857249 /* ImageEditorTest.swift */; };
34BECE2B1F74C12700D7438D /* DebugUIStress.m in Sources */ = {isa = PBXBuildFile; fileRef = 34BECE2A1F74C12700D7438D /* DebugUIStress.m */; };
34BECE2E1F7ABCE000D7438D /* GifPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BECE2D1F7ABCE000D7438D /* GifPickerViewController.swift */; };
34BECE301F7ABCF800D7438D /* GifPickerLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34BECE2F1F7ABCF800D7438D /* GifPickerLayout.swift */; };
@ -241,10 +233,6 @@
34C3C7932040B0DD0000134C /* OWSAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C3C7912040B0DC0000134C /* OWSAudioPlayer.m */; };
34C4E2572118957600BEA353 /* OWSWebRTCDataProtos.pb.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34C4E2552118957600BEA353 /* OWSWebRTCDataProtos.pb.swift */; };
34C4E2582118957600BEA353 /* WebRTCProto.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34C4E2562118957600BEA353 /* WebRTCProto.swift */; };
34C6B0A91FA0E46F00D35993 /* test-gif.gif in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A51FA0E46F00D35993 /* test-gif.gif */; };
34C6B0AB1FA0E46F00D35993 /* test-mp3.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A71FA0E46F00D35993 /* test-mp3.mp3 */; };
34C6B0AC1FA0E46F00D35993 /* test-mp4.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A81FA0E46F00D35993 /* test-mp4.mp4 */; };
34C6B0AE1FA0E4AA00D35993 /* test-jpg.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0AD1FA0E4AA00D35993 /* test-jpg.jpg */; };
34CA631B2097806F00E526A0 /* OWSContactShareView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34CA631A2097806E00E526A0 /* OWSContactShareView.m */; };
34CF0787203E6B78005C4D61 /* busy_tone_ansi.caf in Resources */ = {isa = PBXBuildFile; fileRef = 34CF0783203E6B77005C4D61 /* busy_tone_ansi.caf */; };
34CF0788203E6B78005C4D61 /* ringback_tone_ansi.caf in Resources */ = {isa = PBXBuildFile; fileRef = 34CF0784203E6B77005C4D61 /* ringback_tone_ansi.caf */; };
@ -274,7 +262,6 @@
34D920E720E179C200D51158 /* OWSMessageFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34D920E620E179C200D51158 /* OWSMessageFooterView.m */; };
34D99C931F2937CC00D284D6 /* OWSAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D99C911F2937CC00D284D6 /* OWSAnalytics.swift */; };
34D99CE4217509C2000AFB39 /* AppEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D99CE3217509C1000AFB39 /* AppEnvironment.swift */; };
34DB0BED2011548B007B313F /* OWSDatabaseConverterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34DB0BEC2011548B007B313F /* OWSDatabaseConverterTest.m */; };
34DBF003206BD5A500025978 /* OWSMessageTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34DBEFFF206BD5A400025978 /* OWSMessageTextView.m */; };
34DBF004206BD5A500025978 /* OWSBubbleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34DBF001206BD5A500025978 /* OWSBubbleView.m */; };
34DBF007206C3CB200025978 /* OWSBubbleShapeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34DBF006206C3CB200025978 /* OWSBubbleShapeView.m */; };
@ -283,7 +270,6 @@
34E3EF0D1EFC235B007F6822 /* DebugUIDiskUsage.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E3EF0C1EFC235B007F6822 /* DebugUIDiskUsage.m */; };
34E3EF101EFC2684007F6822 /* DebugUIPage.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E3EF0F1EFC2684007F6822 /* DebugUIPage.m */; };
34E88D262098C5AE00A608F4 /* ContactViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34E88D252098C5AE00A608F4 /* ContactViewController.swift */; };
34E8A8D12085238A00B272B1 /* ProtoParsingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 34E8A8D02085238900B272B1 /* ProtoParsingTest.m */; };
34EA69402194933900702471 /* MediaDownloadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EA693F2194933900702471 /* MediaDownloadView.swift */; };
34EA69422194DE8000702471 /* MediaUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34EA69412194DE7F00702471 /* MediaUploadView.swift */; };
34F308A21ECB469700BB7697 /* OWSBezierPathView.m in Sources */ = {isa = PBXBuildFile; fileRef = 34F308A11ECB469700BB7697 /* OWSBezierPathView.m */; };
@ -329,7 +315,6 @@
452B999020A34B6B006F2F9E /* AddContactShareToExistingContactViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452B998F20A34B6B006F2F9E /* AddContactShareToExistingContactViewController.swift */; };
452C468F1E427E200087B011 /* OutboundCallInitiator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452C468E1E427E200087B011 /* OutboundCallInitiator.swift */; };
452C7CA72037628B003D51A5 /* Weak.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F170D51E315310003FC1F2 /* Weak.swift */; };
452D1AF12081059C00A67F7F /* StringAdditionsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452D1AF02081059C00A67F7F /* StringAdditionsTest.swift */; };
452EC6DF205E9E30000E787C /* MediaGalleryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452EC6DE205E9E30000E787C /* MediaGalleryViewController.swift */; };
452EC6E1205FF5DC000E787C /* Bench.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452EC6E0205FF5DC000E787C /* Bench.swift */; };
452ECA4D1E087E7200E2F016 /* MessageFetcherJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452ECA4C1E087E7200E2F016 /* MessageFetcherJob.swift */; };
@ -340,22 +325,16 @@
453518991FC63DBF00210559 /* SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 453518921FC63DBF00210559 /* SignalMessaging.framework */; };
4535189A1FC63DBF00210559 /* SignalMessaging.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 453518921FC63DBF00210559 /* SignalMessaging.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
453518A21FC63E2900210559 /* SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 453518921FC63DBF00210559 /* SignalMessaging.framework */; };
45360B901F9527DA00FA666C /* SearcherTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45360B8F1F9527DA00FA666C /* SearcherTest.swift */; };
45360B911F952AA900FA666C /* MarqueeLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45E5A6981F61E6DD001E4A8A /* MarqueeLabel.swift */; };
4539B5861F79348F007141FF /* PushRegistrationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4539B5851F79348F007141FF /* PushRegistrationManager.swift */; };
4541B71D209D3B7A0008608F /* ContactShareViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4541B71A209D2DAE0008608F /* ContactShareViewModel.swift */; };
4542DF54208D40AC007B4E76 /* LoadingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4542DF53208D40AC007B4E76 /* LoadingViewController.swift */; };
454A84042059C787008B8C75 /* MediaTileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 454A84032059C787008B8C75 /* MediaTileViewController.swift */; };
454A965A1FD6017E008D2A0E /* SignalAttachment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D913491F62D4A500722898 /* SignalAttachment.swift */; };
454EBAB41F2BE14C00ACE0BB /* OWSAnalytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34D99C911F2937CC00D284D6 /* OWSAnalytics.swift */; };
4551DB5A205C562300C8AE75 /* Collection+OWS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4551DB59205C562300C8AE75 /* Collection+OWS.swift */; };
4556FA681F54AA9500AF40DD /* DebugUIProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4556FA671F54AA9500AF40DD /* DebugUIProfile.swift */; };
455A16DD1F1FEA0000F86704 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 455A16DB1F1FEA0000F86704 /* Metal.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
455A16DE1F1FEA0000F86704 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 455A16DC1F1FEA0000F86704 /* MetalKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
455AC69E1F4F8B0300134004 /* ImageCacheTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 455AC69D1F4F8B0300134004 /* ImageCacheTest.swift */; };
45638BDC1F3DD0D400128435 /* DebugUICalling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45638BDB1F3DD0D400128435 /* DebugUICalling.swift */; };
45666F581D9B2880008FE134 /* OWSScrubbingLogFormatterTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 45666F571D9B2880008FE134 /* OWSScrubbingLogFormatterTest.m */; };
456F6E2F1E261D1000FD2210 /* PeerConnectionClientTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 456F6E2E1E261D1000FD2210 /* PeerConnectionClientTest.swift */; };
4574A5D61DD6704700C6B692 /* CallService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4574A5D51DD6704700C6B692 /* CallService.swift */; };
4579431E1E7C8CE9008ED0C0 /* Pastelog.m in Sources */ = {isa = PBXBuildFile; fileRef = 4579431D1E7C8CE9008ED0C0 /* Pastelog.m */; };
45794E861E00620000066731 /* CallUIAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45794E851E00620000066731 /* CallUIAdapter.swift */; };
@ -365,7 +344,6 @@
4585C4681ED8F8D200896AEA /* SafetyNumberConfirmationAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4585C4671ED8F8D200896AEA /* SafetyNumberConfirmationAlert.swift */; };
458DE9D61DEE3FD00071BB03 /* PeerConnectionClient.swift in Sources */ = {isa = PBXBuildFile; fileRef = 458DE9D51DEE3FD00071BB03 /* PeerConnectionClient.swift */; };
458E38371D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38361D668EBF0094BD24 /* OWSDeviceProvisioningURLParser.m */; };
458E383A1D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 458E38391D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m */; };
459311FC1D75C948008DD4F0 /* OWSDeviceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 459311FB1D75C948008DD4F0 /* OWSDeviceTableViewCell.m */; };
459B775C207BA46C0071D0AB /* OWSQuotedReplyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 459B775A207BA3A80071D0AB /* OWSQuotedReplyModel.m */; };
459B775D207BA4810071D0AB /* OWSQuotedReplyModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 459B7759207BA3A80071D0AB /* OWSQuotedReplyModel.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -411,7 +389,6 @@
45DDA6242090CEB500DE97F8 /* ConversationHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45DDA6232090CEB500DE97F8 /* ConversationHeaderView.swift */; };
45DF5DF21DDB843F00C936C7 /* CompareSafetyNumbersActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45DF5DF11DDB843F00C936C7 /* CompareSafetyNumbersActivity.swift */; };
45E5A6991F61E6DE001E4A8A /* MarqueeLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45E5A6981F61E6DD001E4A8A /* MarqueeLabel.swift */; };
45E7A6A81E71CA7E00D44FB5 /* DisplayableTextFilterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45E7A6A61E71CA7E00D44FB5 /* DisplayableTextFilterTest.swift */; };
45F170BB1E2FC5D3003FC1F2 /* CallAudioService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F170BA1E2FC5D3003FC1F2 /* CallAudioService.swift */; };
45F32C222057297A00A300D5 /* MediaDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 45B9EE9B200E91FB005D2F2D /* MediaDetailViewController.m */; };
45F32C232057297A00A300D5 /* MediaPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F32C1D205718B000A300D5 /* MediaPageViewController.swift */; };
@ -424,7 +401,6 @@
45FBC5D11DF8592E00E9B410 /* SignalCall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FBC5D01DF8592E00E9B410 /* SignalCall.swift */; };
4AC4EA13C8A444455DAB351F /* Pods_SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 264242150E87D10A357DB07B /* Pods_SignalMessaging.framework */; };
4C04392A220A9EC800BAEA63 /* VoiceNoteLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C043929220A9EC800BAEA63 /* VoiceNoteLock.swift */; };
4C04F58421C860C50090D0BB /* MantlePerfTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C04F58321C860C50090D0BB /* MantlePerfTest.swift */; };
4C090A1B210FD9C7001FD7F9 /* HapticFeedback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C090A1A210FD9C7001FD7F9 /* HapticFeedback.swift */; };
4C13C9F620E57BA30089A98B /* ColorPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C13C9F520E57BA30089A98B /* ColorPickerViewController.swift */; };
4C1885D2218F8E1C00B67051 /* PhotoGridViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C1885D1218F8E1C00B67051 /* PhotoGridViewCell.swift */; };
@ -435,8 +411,6 @@
4C2F454F214C00E1004871FF /* AvatarTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C2F454E214C00E1004871FF /* AvatarTableViewCell.swift */; };
4C3E245C21F29FCE000AE092 /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA5F792211E1F06008C2708 /* Toast.swift */; };
4C3E245D21F2B395000AE092 /* DirectionalPanGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4523149F1F7E9E18003A428C /* DirectionalPanGestureRecognizer.swift */; };
4C3EF7FD2107DDEE0007EBF7 /* ParamParserTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EF7FC2107DDEE0007EBF7 /* ParamParserTest.swift */; };
4C3EF802210918740007EBF7 /* SSKProtoEnvelopeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3EF801210918740007EBF7 /* SSKProtoEnvelopeTest.swift */; };
4C4AE6A1224AF35700D4AF6F /* SendMediaNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4AE69F224AF21900D4AF6F /* SendMediaNavigationController.swift */; };
4C4AEC4520EC343B0020E72B /* DismissableTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4AEC4420EC343B0020E72B /* DismissableTextField.swift */; };
4C586926224FAB83003FD070 /* AVAudioSession+OWS.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C586925224FAB83003FD070 /* AVAudioSession+OWS.m */; };
@ -473,14 +447,8 @@
7BF3FF002505B8E400609570 /* PlaceholderIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF3FEFF2505B8E400609570 /* PlaceholderIcon.swift */; };
945AA2B82B621254F69FA9E8 /* Pods_SessionUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9117261809D69B3D7C26B8F1 /* Pods_SessionUtilitiesKit.framework */; };
9EE44C6B4D4A069B86112387 /* Pods_SessionSnodeKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9559C3068280BA2383F547F7 /* Pods_SessionSnodeKit.framework */; };
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 */; };
A163E8AB16F3F6AA0094D68B /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A163E8AA16F3F6A90094D68B /* Security.framework */; };
A194D3B917A08CD1004BD3A9 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4D17A0652C000A904E /* AddressBook.framework */; };
A194D3BA17A08CD5004BD3A9 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4F17A06537000A904E /* AddressBookUI.framework */; };
A1A018521805C5E800A052A6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A11CD70C17FA230600A2D1B1 /* QuartzCore.framework */; };
A1A018531805C60D00A052A6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A091169C9E5E00537ABF /* CoreGraphics.framework */; };
A1C32D5017A06538000A904E /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4F17A06537000A904E /* AddressBookUI.framework */; };
A1C32D5117A06544000A904E /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1C32D4D17A0652C000A904E /* AddressBook.framework */; };
A33A4BA9D050805FE156E3ED /* Pods_SessionProtocolKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2183DCA28E0620BC73FCC554 /* Pods_SessionProtocolKit.framework */; };
@ -498,7 +466,6 @@
B10C9B611A7049EC00ECA2BF /* play_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B10C9B5D1A7049EC00ECA2BF /* play_icon.png */; };
B10C9B621A7049EC00ECA2BF /* play_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B10C9B5E1A7049EC00ECA2BF /* play_icon@2x.png */; };
B3E0C9C6F1633B1ABCE5AD0B /* Pods_SignalUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53D547348A367C8A14D37FC0 /* Pods_SignalUtilitiesKit.framework */; };
B60EDE041A05A01700D73516 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B60EDE031A05A01700D73516 /* AudioToolbox.framework */; };
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 */; };
@ -506,12 +473,8 @@
B633C5C41A1D190B0059AC12 /* mute_on@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B633C5421A1D190B0059AC12 /* mute_on@2x.png */; };
B633C5CE1A1D190B0059AC12 /* quit@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B633C54C1A1D190B0059AC12 /* quit@2x.png */; };
B633C5D21A1D190B0059AC12 /* savephoto@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B633C5501A1D190B0059AC12 /* savephoto@2x.png */; };
B660F6D41C29868000687D6E /* whisperFake.cer in Resources */ = {isa = PBXBuildFile; fileRef = B660F69F1C29868000687D6E /* whisperFake.cer */; };
B660F6DB1C29868000687D6E /* FunctionalUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B660F6AD1C29868000687D6E /* FunctionalUtilTest.m */; };
B660F6E01C29868000687D6E /* UtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B660F6B41C29868000687D6E /* UtilTest.m */; };
B66DBF4A19D5BBC8006EA940 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B66DBF4919D5BBC8006EA940 /* Images.xcassets */; };
B67EBF5D19194AC60084CCFD /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = B67EBF5C19194AC60084CCFD /* Settings.bundle */; };
B69CD25119773E79005CE69A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B69CD25019773E79005CE69A /* XCTest.framework */; };
B6B226971BE4B7D200860F4D /* ContactsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6B226961BE4B7D200860F4D /* ContactsUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
B6F509971AA53F760068F56A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; };
B6FE7EB71ADD62FA00A6D22F /* PushKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6FE7EB61ADD62FA00A6D22F /* PushKit.framework */; };
@ -742,7 +705,7 @@
C33FDCA7255A582000E217F9 /* SSKMessageSenderJobRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDAED255A580500E217F9 /* SSKMessageSenderJobRecord.h */; settings = {ATTRIBUTES = (Public, ); }; };
C33FDCA8255A582000E217F9 /* OWSFingerprintBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDAEE255A580500E217F9 /* OWSFingerprintBuilder.m */; };
C33FDCA9255A582000E217F9 /* NSData+Image.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDAEF255A580500E217F9 /* NSData+Image.m */; };
C33FDCAA255A582000E217F9 /* ContactsUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDAF0255A580500E217F9 /* ContactsUpdater.h */; };
C33FDCAA255A582000E217F9 /* ContactsUpdater.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDAF0255A580500E217F9 /* ContactsUpdater.h */; settings = {ATTRIBUTES = (Public, ); }; };
C33FDCAB255A582000E217F9 /* OWSThumbnailService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDAF1255A580500E217F9 /* OWSThumbnailService.swift */; };
C33FDCAC255A582000E217F9 /* ProxiedContentDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDAF2255A580500E217F9 /* ProxiedContentDownloader.swift */; };
C33FDCAD255A582000E217F9 /* OWSPrimaryStorage+SessionStore.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDAF3255A580500E217F9 /* OWSPrimaryStorage+SessionStore.m */; };
@ -891,7 +854,7 @@
C33FDD45255A582000E217F9 /* Storage+SessionManagement.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDB8B255A581200E217F9 /* Storage+SessionManagement.swift */; };
C33FDD46255A582000E217F9 /* TSInvalidIdentityKeyErrorMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDB8C255A581200E217F9 /* TSInvalidIdentityKeyErrorMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };
C33FDD47255A582000E217F9 /* DeviceLinkingSessionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDB8D255A581200E217F9 /* DeviceLinkingSessionDelegate.swift */; };
C33FDD48255A582000E217F9 /* OWSContact+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDB8E255A581200E217F9 /* OWSContact+Private.h */; };
C33FDD48255A582000E217F9 /* OWSContact+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDB8E255A581200E217F9 /* OWSContact+Private.h */; settings = {ATTRIBUTES = (Public, ); }; };
C33FDD49255A582000E217F9 /* ParamParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDB8F255A581200E217F9 /* ParamParser.swift */; };
C33FDD4A255A582000E217F9 /* OWSMessageDecrypter.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDB90255A581200E217F9 /* OWSMessageDecrypter.m */; };
C33FDD4B255A582000E217F9 /* ProtoUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDB91255A581200E217F9 /* ProtoUtils.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -973,7 +936,7 @@
C33FDD9E255A582000E217F9 /* OWSOutgoingSyncMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDBE4255A581A00E217F9 /* OWSOutgoingSyncMessage.h */; settings = {ATTRIBUTES = (Public, ); }; };
C33FDD9F255A582000E217F9 /* OWSDevicesService.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDBE5255A581A00E217F9 /* OWSDevicesService.m */; };
C33FDDA0255A582000E217F9 /* OWSOutgoingNullMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDBE6255A581A00E217F9 /* OWSOutgoingNullMessage.m */; };
C33FDDA1255A582000E217F9 /* NSTimer+OWS.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDBE7255A581A00E217F9 /* NSTimer+OWS.h */; };
C33FDDA1255A582000E217F9 /* NSTimer+OWS.h in Headers */ = {isa = PBXBuildFile; fileRef = C33FDBE7255A581A00E217F9 /* NSTimer+OWS.h */; settings = {ATTRIBUTES = (Public, ); }; };
C33FDDA2255A582000E217F9 /* Storage+OnionRequests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDBE8255A581A00E217F9 /* Storage+OnionRequests.swift */; };
C33FDDA3255A582000E217F9 /* TSInteraction.m in Sources */ = {isa = PBXBuildFile; fileRef = C33FDBE9255A581A00E217F9 /* TSInteraction.m */; };
C33FDDA4255A582000E217F9 /* SessionRequestMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C33FDBEA255A581A00E217F9 /* SessionRequestMessage.swift */; };
@ -1064,6 +1027,10 @@
C36B8707243C50C60049991D /* SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 453518921FC63DBF00210559 /* SignalMessaging.framework */; };
C38EEF0A255B49A8007E1867 /* SSKProtoEnvelope+Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38EEF09255B49A8007E1867 /* SSKProtoEnvelope+Conversion.swift */; };
C38EEFD6255B5BA2007E1867 /* OldSnodeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C38EEFD5255B5BA2007E1867 /* OldSnodeAPI.swift */; };
C38EF00C255B61CC007E1867 /* SignalUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C33FD9AB255A548A00E217F9 /* SignalUtilitiesKit.framework */; };
C38EF00D255B61D3007E1867 /* SignalUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C33FD9AB255A548A00E217F9 /* SignalUtilitiesKit.framework */; };
C38EF00E255B61DC007E1867 /* SignalUtilitiesKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C33FD9AB255A548A00E217F9 /* SignalUtilitiesKit.framework */; };
C38EF1A4255B67A2007E1867 /* SessionProtocolKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3C2A8622553B41A00C340D1 /* SessionProtocolKit.framework */; };
C396DAEF2518408B00FF6DC5 /* ParsingState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C396DAE82518408900FF6DC5 /* ParsingState.swift */; };
C396DAF02518408B00FF6DC5 /* String+Lines.swift in Sources */ = {isa = PBXBuildFile; fileRef = C396DAE92518408A00FF6DC5 /* String+Lines.swift */; };
C396DAF12518408B00FF6DC5 /* EnumeratedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C396DAEA2518408A00FF6DC5 /* EnumeratedView.swift */; };
@ -1246,22 +1213,14 @@
C3DFFAC823E970080058DAF8 /* OpenGroupSuggestionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DFFAC723E970080058DAF8 /* OpenGroupSuggestionSheet.swift */; };
C3E5C2FA251DBABB0040DFFC /* EditClosedGroupVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E5C2F9251DBABB0040DFFC /* EditClosedGroupVC.swift */; };
C3E7134F251C867C009649BB /* Sodium+Conversion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3E7134E251C867C009649BB /* Sodium+Conversion.swift */; };
CC875800737563D6891B741D /* Pods_SignalTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */; };
D202868116DBE0E7009068E9 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AEACDB16C426DA00C364C0 /* CFNetwork.framework */; };
D202868216DBE0F4009068E9 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */; };
D202868316DBE0FC009068E9 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */; };
D202868416DBE108009068E9 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1FDCBEE16DAA6C300868894 /* AVFoundation.framework */; };
D2179CFC16BB0B3A0006F3AB /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFB16BB0B3A0006F3AB /* CoreTelephony.framework */; };
D2179CFE16BB0B480006F3AB /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2179CFD16BB0B480006F3AB /* SystemConfiguration.framework */; };
D221A08E169C9E5E00537ABF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A08D169C9E5E00537ABF /* UIKit.framework */; };
D221A090169C9E5E00537ABF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A08F169C9E5E00537ABF /* Foundation.framework */; };
D221A09A169C9E5E00537ABF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D221A099169C9E5E00537ABF /* main.m */; };
D221A0AD169C9E5F00537ABF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A08D169C9E5E00537ABF /* UIKit.framework */; };
D221A0AE169C9E5F00537ABF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D221A08F169C9E5E00537ABF /* Foundation.framework */; };
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 */; };
E1368CBE18A1C36B00109378 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B9EB5ABC1884C002007CBB57 /* MessageUI.framework */; };
EF764C351DB67CC5000D9A87 /* UIViewController+Permissions.m in Sources */ = {isa = PBXBuildFile; fileRef = EF764C341DB67CC5000D9A87 /* UIViewController+Permissions.m */; };
FC3BD9881A30A790005B96BB /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FC3BD9871A30A790005B96BB /* Social.framework */; };
FC5CDF391A3393DD00B47253 /* error_white@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FC5CDF371A3393DD00B47253 /* error_white@2x.png */; };
@ -1278,13 +1237,6 @@
remoteGlobalIDString = 453518911FC63DBF00210559;
remoteInfo = SignalMessaging;
};
3478506D1FD9CFF4007B8332 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
proxyType = 1;
remoteGlobalIDString = 453518911FC63DBF00210559;
remoteInfo = SignalMessaging;
};
453518701FC635DD00210559 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
@ -1306,13 +1258,6 @@
remoteGlobalIDString = 7BC01A3A241F40AB00BC7C55;
remoteInfo = LokiPushNotificationService;
};
B6AFCEBA19A93DA60098CFCB /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
proxyType = 1;
remoteGlobalIDString = D221A088169C9E5E00537ABF;
remoteInfo = Signal;
};
C331FF202558F9D300070591 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D221A080169C9E5E00537ABF /* Project object */;
@ -2757,7 +2702,6 @@
D221A095169C9E5E00537ABF /* Signal-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Signal-Info.plist"; sourceTree = "<group>"; };
D221A099169C9E5E00537ABF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
D221A09B169C9E5E00537ABF /* Signal-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Signal-Prefix.pch"; sourceTree = "<group>"; };
D221A0AA169C9E5F00537ABF /* SignalTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SignalTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
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; };
@ -2783,6 +2727,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C38EF00E255B61DC007E1867 /* SignalUtilitiesKit.framework in Frameworks */,
C3402FE52559036600EA6424 /* SessionUIKit.framework in Frameworks */,
453518A21FC63E2900210559 /* SignalMessaging.framework in Frameworks */,
2AE2882E4C2B96BFFF9EE27C /* Pods_SignalShareExtension.framework in Frameworks */,
@ -2793,6 +2738,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C38EF1A4255B67A2007E1867 /* SessionProtocolKit.framework in Frameworks */,
C38EF00D255B61D3007E1867 /* SignalUtilitiesKit.framework in Frameworks */,
C331003D255900F200070591 /* SessionUIKit.framework in Frameworks */,
4AC4EA13C8A444455DAB351F /* Pods_SignalMessaging.framework in Frameworks */,
);
@ -2802,6 +2749,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C38EF00C255B61CC007E1867 /* SignalUtilitiesKit.framework in Frameworks */,
C36B8707243C50C60049991D /* SignalMessaging.framework in Frameworks */,
390650A6D345BFE01E006DB0 /* Pods_LokiPushNotificationService.framework in Frameworks */,
);
@ -2867,6 +2815,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C33FD9B2255A548A00E217F9 /* SignalUtilitiesKit.framework in Frameworks */,
4CC1ECF9211A47CE00CC13BE /* StoreKit.framework in Frameworks */,
455A16DD1F1FEA0000F86704 /* Metal.framework in Frameworks */,
455A16DE1F1FEA0000F86704 /* MetalKit.framework in Frameworks */,
@ -2893,7 +2842,6 @@
C331FF222558F9D300070591 /* SessionUIKit.framework in Frameworks */,
D2179CFE16BB0B480006F3AB /* SystemConfiguration.framework in Frameworks */,
D2179CFC16BB0B3A0006F3AB /* CoreTelephony.framework in Frameworks */,
C33FD9B2255A548A00E217F9 /* SignalUtilitiesKit.framework in Frameworks */,
D221A08E169C9E5E00537ABF /* UIKit.framework in Frameworks */,
D221A090169C9E5E00537ABF /* Foundation.framework in Frameworks */,
D221A0E8169DFFC500537ABF /* AVFoundation.framework in Frameworks */,
@ -2902,29 +2850,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D221A0A6169C9E5F00537ABF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B60EDE041A05A01700D73516 /* AudioToolbox.framework in Frameworks */,
B69CD25119773E79005CE69A /* XCTest.framework in Frameworks */,
E1368CBE18A1C36B00109378 /* MessageUI.framework in Frameworks */,
A10FDF79184FB4BB007FF963 /* MediaPlayer.framework in Frameworks */,
A1A018531805C60D00A052A6 /* CoreGraphics.framework in Frameworks */,
A1A018521805C5E800A052A6 /* QuartzCore.framework in Frameworks */,
A123C14916F902EE000AE905 /* Security.framework in Frameworks */,
A194D3BA17A08CD5004BD3A9 /* AddressBookUI.framework in Frameworks */,
A194D3B917A08CD1004BD3A9 /* AddressBook.framework in Frameworks */,
D202868416DBE108009068E9 /* AVFoundation.framework in Frameworks */,
D202868316DBE0FC009068E9 /* CoreTelephony.framework in Frameworks */,
D202868216DBE0F4009068E9 /* SystemConfiguration.framework in Frameworks */,
D202868116DBE0E7009068E9 /* CFNetwork.framework in Frameworks */,
D221A0AD169C9E5F00537ABF /* UIKit.framework in Frameworks */,
D221A0AE169C9E5F00537ABF /* Foundation.framework in Frameworks */,
CC875800737563D6891B741D /* Pods_SignalTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@ -5159,7 +5084,6 @@
isa = PBXGroup;
children = (
D221A089169C9E5E00537ABF /* Session.app */,
D221A0AA169C9E5F00537ABF /* SignalTests.xctest */,
453518681FC635DD00210559 /* SignalShareExtension.appex */,
453518921FC63DBF00210559 /* SignalMessaging.framework */,
7BC01A3B241F40AB00BC7C55 /* LokiPushNotificationService.appex */,
@ -5807,28 +5731,6 @@
productReference = D221A089169C9E5E00537ABF /* Session.app */;
productType = "com.apple.product-type.application";
};
D221A0A9169C9E5F00537ABF /* SignalTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = D221A0BF169C9E5F00537ABF /* Build configuration list for PBXNativeTarget "SignalTests" */;
buildPhases = (
6565655F4068F9E5CDC5687F /* [CP] Check Pods Manifest.lock */,
D221A0A5169C9E5F00537ABF /* Sources */,
D221A0A6169C9E5F00537ABF /* Frameworks */,
D221A0A7169C9E5F00537ABF /* Resources */,
B4E9B04E862FB64FC9A8F79B /* [CP] Embed Pods Frameworks */,
451DE9FB1DC18D4500810E42 /* [Carthage] Copy Frameworks */,
);
buildRules = (
);
dependencies = (
3478506E1FD9CFF4007B8332 /* PBXTargetDependency */,
B6AFCEBB19A93DA60098CFCB /* PBXTargetDependency */,
);
name = SignalTests;
productName = RedPhoneTests;
productReference = D221A0AA169C9E5F00537ABF /* SignalTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -5938,12 +5840,6 @@
};
};
};
D221A0A9169C9E5F00537ABF = {
DevelopmentTeam = 8SQ45X653X;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
TestTargetID = D221A088169C9E5E00537ABF;
};
};
};
buildConfigurationList = D221A083169C9E5E00537ABF /* Build configuration list for PBXProject "Signal" */;
@ -5972,7 +5868,6 @@
projectRoot = "";
targets = (
D221A088169C9E5E00537ABF /* Signal */,
D221A0A9169C9E5F00537ABF /* SignalTests */,
453518671FC635DD00210559 /* SignalShareExtension */,
453518911FC63DBF00210559 /* SignalMessaging */,
7BC01A3A241F40AB00BC7C55 /* LokiPushNotificationService */,
@ -6137,18 +6032,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D221A0A7169C9E5F00537ABF /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
34C6B0AE1FA0E4AA00D35993 /* test-jpg.jpg in Resources */,
B660F6D41C29868000687D6E /* whisperFake.cer in Resources */,
34C6B0A91FA0E46F00D35993 /* test-gif.gif in Resources */,
34C6B0AC1FA0E46F00D35993 /* test-mp4.mp4 in Resources */,
34C6B0AB1FA0E46F00D35993 /* test-mp3.mp3 in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
@ -6239,21 +6122,6 @@
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
451DE9FB1DC18D4500810E42 /* [Carthage] Copy Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"$(SRCROOT)/ThirdParty/WebRTC/Build/WebRTC.framework",
);
name = "[Carthage] Copy Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/usr/local/bin/carthage copy-frameworks\n";
};
4B4609DACEC6E462A2394D2F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -6287,30 +6155,24 @@
"${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework",
"${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework",
"${BUILT_PRODUCTS_DIR}/FeedKit/FeedKit.framework",
"${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/NVActivityIndicatorView/NVActivityIndicatorView.framework",
"${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework",
"${BUILT_PRODUCTS_DIR}/PureLayout/PureLayout.framework",
"${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
"${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework",
"${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework",
"${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework",
"${BUILT_PRODUCTS_DIR}/SessionAxolotlKit/SessionAxolotlKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionCoreKit/SessionCoreKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionCurve25519Kit/SessionCurve25519Kit.framework",
"${BUILT_PRODUCTS_DIR}/SessionHKDFKit/SessionHKDFKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionMetadataKit/SessionMetadataKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionServiceKit/SessionServiceKit.framework",
"${BUILT_PRODUCTS_DIR}/Sodium/Sodium.framework",
"${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework",
"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
"${BUILT_PRODUCTS_DIR}/YYImage/YYImage.framework",
"${BUILT_PRODUCTS_DIR}/YapDatabase/YapDatabase.framework",
"${BUILT_PRODUCTS_DIR}/ZXingObjC/ZXingObjC.framework",
"${BUILT_PRODUCTS_DIR}/libPhoneNumber-iOS/libPhoneNumber_iOS.framework",
"${BUILT_PRODUCTS_DIR}/Curve25519Kit/Curve25519Kit.framework",
"${BUILT_PRODUCTS_DIR}/libPhoneNumber-iOS/libPhoneNumber_iOS.framework",
"${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework",
"${BUILT_PRODUCTS_DIR}/HKDFKit/HKDFKit.framework",
"${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework",
"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
@ -6318,30 +6180,24 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FeedKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NVActivityIndicatorView.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PureLayout.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionAxolotlKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionCoreKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionCurve25519Kit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionHKDFKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionMetadataKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionServiceKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Sodium.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YapDatabase.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXingObjC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libPhoneNumber_iOS.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Curve25519Kit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libPhoneNumber_iOS.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HKDFKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@ -6370,24 +6226,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
6565655F4068F9E5CDC5687F /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-SignalTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
7E2D14F857C70F98DED3B8E9 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -6454,66 +6292,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
B4E9B04E862FB64FC9A8F79B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-SignalTests/Pods-SignalTests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
"${BUILT_PRODUCTS_DIR}/CocoaLumberjack/CocoaLumberjack.framework",
"${BUILT_PRODUCTS_DIR}/CryptoSwift/CryptoSwift.framework",
"${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework",
"${BUILT_PRODUCTS_DIR}/PureLayout/PureLayout.framework",
"${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework",
"${BUILT_PRODUCTS_DIR}/SAMKeychain/SAMKeychain.framework",
"${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework",
"${BUILT_PRODUCTS_DIR}/SessionAxolotlKit/SessionAxolotlKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionCoreKit/SessionCoreKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionCurve25519Kit/SessionCurve25519Kit.framework",
"${BUILT_PRODUCTS_DIR}/SessionHKDFKit/SessionHKDFKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionMetadataKit/SessionMetadataKit.framework",
"${BUILT_PRODUCTS_DIR}/SessionServiceKit/SessionServiceKit.framework",
"${BUILT_PRODUCTS_DIR}/Starscream/Starscream.framework",
"${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework",
"${BUILT_PRODUCTS_DIR}/YYImage/YYImage.framework",
"${BUILT_PRODUCTS_DIR}/YapDatabase/YapDatabase.framework",
"${BUILT_PRODUCTS_DIR}/ZXingObjC/ZXingObjC.framework",
"${BUILT_PRODUCTS_DIR}/libPhoneNumber-iOS/libPhoneNumber_iOS.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaLumberjack.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CryptoSwift.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PureLayout.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SAMKeychain.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionAxolotlKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionCoreKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionCurve25519Kit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionHKDFKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionMetadataKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SessionServiceKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Starscream.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YapDatabase.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXingObjC.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libPhoneNumber_iOS.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SignalTests/Pods-SignalTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E185AC3DC0F55CFE87DEC852 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -7426,37 +7204,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
D221A0A5169C9E5F00537ABF /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
456F6E2F1E261D1000FD2210 /* PeerConnectionClientTest.swift in Sources */,
3491D9A121022DB7001EF5A1 /* CDSSigningCertificateTest.m in Sources */,
34BBC861220E883300857249 /* ImageEditorModelTest.swift in Sources */,
340B02BA1FA0D6C700F9CFEC /* ConversationViewItemTest.m in Sources */,
458E383A1D6699FA0094BD24 /* OWSDeviceProvisioningURLParserTest.m in Sources */,
3421981C21061D2E00C57195 /* ByteParserTest.swift in Sources */,
34843B26214327C9004DED45 /* OWSOrphanDataCleanerTest.m in Sources */,
4C04F58421C860C50090D0BB /* MantlePerfTest.swift in Sources */,
45360B901F9527DA00FA666C /* SearcherTest.swift in Sources */,
34BBC862220E883300857249 /* ImageEditorTest.swift in Sources */,
34DB0BED2011548B007B313F /* OWSDatabaseConverterTest.m in Sources */,
34843B2C214FE296004DED45 /* MockEnvironment.m in Sources */,
45360B911F952AA900FA666C /* MarqueeLabel.swift in Sources */,
454EBAB41F2BE14C00ACE0BB /* OWSAnalytics.swift in Sources */,
45666F581D9B2880008FE134 /* OWSScrubbingLogFormatterTest.m in Sources */,
B660F6E01C29868000687D6E /* UtilTest.m in Sources */,
4C3EF7FD2107DDEE0007EBF7 /* ParamParserTest.swift in Sources */,
B660F6DB1C29868000687D6E /* FunctionalUtilTest.m in Sources */,
45E7A6A81E71CA7E00D44FB5 /* DisplayableTextFilterTest.swift in Sources */,
34843B2421432293004DED45 /* SignalBaseTest.m in Sources */,
4C3EF802210918740007EBF7 /* SSKProtoEnvelopeTest.swift in Sources */,
452D1AF12081059C00A67F7F /* StringAdditionsTest.swift in Sources */,
455AC69E1F4F8B0300134004 /* ImageCacheTest.swift in Sources */,
34E8A8D12085238A00B272B1 /* ProtoParsingTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
@ -7465,11 +7212,6 @@
target = 453518911FC63DBF00210559 /* SignalMessaging */;
targetProxy = 34480B391FD0950000BC14EF /* PBXContainerItemProxy */;
};
3478506E1FD9CFF4007B8332 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 453518911FC63DBF00210559 /* SignalMessaging */;
targetProxy = 3478506D1FD9CFF4007B8332 /* PBXContainerItemProxy */;
};
453518711FC635DD00210559 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 453518671FC635DD00210559 /* SignalShareExtension */;
@ -7485,11 +7227,6 @@
target = 7BC01A3A241F40AB00BC7C55 /* LokiPushNotificationService */;
targetProxy = 7BC01A40241F40AB00BC7C55 /* PBXContainerItemProxy */;
};
B6AFCEBB19A93DA60098CFCB /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = D221A088169C9E5E00537ABF /* Signal */;
targetProxy = B6AFCEBA19A93DA60098CFCB /* PBXContainerItemProxy */;
};
C331FF212558F9D300070591 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = C331FF1A2558F9D300070591 /* SessionUIKit */;
@ -8083,7 +7820,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
INFOPLIST_FILE = SignalUtilitiesKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
@ -8156,7 +7893,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
INFOPLIST_FILE = SignalUtilitiesKit/Meta/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 14.1;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
@ -8984,123 +8721,6 @@
};
name = "App Store Release";
};
D221A0C0169C9E5F00537ABF /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = AD2AB1207E8888E4262D781B /* Pods-SignalTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Session.app/Session";
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8SQ45X653X;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
);
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Signal/Signal-Prefix.pch";
GCC_VERSION = "";
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
HEADER_SEARCH_PATHS = (
"${PODS_HEADERS_SEARCH_PATHS}",
"$(inherited)",
"\"${SRCROOT}/Signal/lib/speex/include\"",
"\"${SRCROOT}/Signal/lib/ogg/include\"",
"\"${SRCROOT}/Signal/lib/debug/include\"",
"\"$(SRCROOT)/libtommath\"",
"\"$(SRCROOT)/libtomcrypt/headers\"",
"\"$(SRCROOT)/spandsp/spandsp/spandsp\"",
"\"$(SRCROOT)/Libraries\"/**",
"\"$(TARGET_TEMP_DIR)/../$(PROJECT_NAME).build/DerivedSources\"",
);
INFOPLIST_FILE = "Signal/test/Supporting Files/SignalTests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
);
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
"$(inherited)",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = SignalTests;
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "Signal/test/SignalTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUNDLE_LOADER)";
VALID_ARCHS = "arm64 armv7s armv7 i386 x86_64";
};
name = Debug;
};
D221A0C1169C9E5F00537ABF /* App Store Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E85DB184824BA9DC302EC8B3 /* Pods-SignalTests.app store release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Session.app/Session";
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 8SQ45X653X;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
);
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Signal/Signal-Prefix.pch";
GCC_VERSION = "";
GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
HEADER_SEARCH_PATHS = (
"${PODS_HEADERS_SEARCH_PATHS}",
"$(inherited)",
"\"${SRCROOT}/Signal/lib/speex/include\"",
"\"${SRCROOT}/Signal/lib/ogg/include\"",
"\"${SRCROOT}/Signal/lib/debug/include\"",
"\"$(SRCROOT)/libtommath\"",
"\"$(SRCROOT)/libtomcrypt/headers\"",
"\"$(SRCROOT)/Libraries\"/**",
"\"$(TARGET_TEMP_DIR)/../$(PROJECT_NAME).build/DerivedSources\"",
);
INFOPLIST_FILE = "Signal/test/Supporting Files/SignalTests-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SRCROOT)",
);
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
"$(inherited)",
);
PRODUCT_BUNDLE_IDENTIFIER = "org.whispersystems.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = SignalTests;
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "Signal/test/SignalTests-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUNDLE_LOADER)";
VALID_ARCHS = "arm64 armv7s armv7 i386 x86_64";
};
name = "App Store Release";
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -9203,15 +8823,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "App Store Release";
};
D221A0BF169C9E5F00537ABF /* Build configuration list for PBXNativeTarget "SignalTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
D221A0C0169C9E5F00537ABF /* Debug */,
D221A0C1169C9E5F00537ABF /* App Store Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = "App Store Release";
};
/* End XCConfigurationList section */
};
rootObject = D221A080169C9E5E00537ABF /* Project object */;

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/TSInteraction.h>
#import <SignalUtilitiesKit/TSInteraction.h>
@class YapDatabaseReadWriteTransaction;

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/TSInteraction.h>
#import <SignalUtilitiesKit/TSInteraction.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -15,8 +15,6 @@
static const NSUInteger ddLogLevel = DDLogLevelInfo;
#endif
#import <SessionCoreKit/OWSAsserts.h>
#import <SessionCoreKit/NSObject+OWS.h>
#import <SessionServiceKit/OWSAnalytics.h>
#import <SessionServiceKit/SSKAsserts.h>
#import <SessionProtocolKit/SessionProtocolKit.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit.h>
#endif

View File

@ -57,4 +57,4 @@ FOUNDATION_EXPORT const unsigned char SignalMessagingVersionString[];
#import <SignalMessaging/UIViewController+OWS.h>
#import <SignalMessaging/VersionMigrations.h>
#import <SignalMessaging/ViewControllerUtils.h>
#import <SessionServiceKit/UIImage+OWS.h>
#import <SignalUtilitiesKit/UIImage+OWS.h>

View File

@ -3,7 +3,7 @@
//
import Foundation
import SessionServiceKit
@objc
public protocol ContactShareApprovalViewControllerDelegate: class {

View File

@ -3,7 +3,6 @@
//
import Foundation
import SessionServiceKit
@objc
public protocol ContactNameFieldViewDelegate: class {

View File

@ -5,7 +5,7 @@
import Foundation
import MediaPlayer
import YYImage
import SessionServiceKit
import SessionUIKit
@objc

View File

@ -4,7 +4,7 @@
import Foundation
import MediaPlayer
import SessionServiceKit
// A modal view that be used during blocking interactions (e.g. waiting on response from
// service or on the completion of a long-running local operation).

View File

@ -6,7 +6,7 @@
#import "BlockListUIUtils.h"
#import "ContactsViewHelper.h"
#import <SignalMessaging/OWSContactsManager.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SignalUtilitiesKit/SignalAccount.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -13,11 +13,11 @@
#import <SignalMessaging/UIFont+OWS.h>
#import <SignalMessaging/UIUtil.h>
#import <SignalMessaging/UIView+OWS.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/ContactsUpdater.h>
#import <SessionServiceKit/PhoneNumberUtil.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/ContactsUpdater.h>
#import <SignalUtilitiesKit/PhoneNumberUtil.h>
#import <SignalUtilitiesKit/SignalAccount.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -16,12 +16,12 @@
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/PhoneNumber.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/TSContactThread.h>
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/PhoneNumber.h>
#import <SignalUtilitiesKit/SignalAccount.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/TSContactThread.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <YapDatabase/YapDatabase.h>
#import <SessionUIKit/SessionUIKit.h>

View File

@ -10,10 +10,10 @@
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/OWSError.h>
#import <SessionServiceKit/OWSMessageSender.h>
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/OWSError.h>
#import <SignalUtilitiesKit/OWSMessageSender.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SessionUIKit/SessionUIKit.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -6,8 +6,8 @@
#import "PhoneNumber.h"
#import <AVFoundation/AVFoundation.h>
#import <SignalMessaging/Environment.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/PhoneNumberUtil.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/PhoneNumberUtil.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/TSQuotedMessage.h>
#import <SignalUtilitiesKit/TSQuotedMessage.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -5,16 +5,16 @@
#import "OWSQuotedReplyModel.h"
#import "ConversationViewItem.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/MIMETypeUtil.h>
#import <SessionServiceKit/OWSMessageSender.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/TSAttachmentPointer.h>
#import <SessionServiceKit/TSAttachmentStream.h>
#import <SessionServiceKit/TSIncomingMessage.h>
#import <SessionServiceKit/TSMessage.h>
#import <SessionServiceKit/TSOutgoingMessage.h>
#import <SessionServiceKit/TSQuotedMessage.h>
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/MIMETypeUtil.h>
#import <SignalUtilitiesKit/OWSMessageSender.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/TSAttachmentPointer.h>
#import <SignalUtilitiesKit/TSAttachmentStream.h>
#import <SignalUtilitiesKit/TSIncomingMessage.h>
#import <SignalUtilitiesKit/TSMessage.h>
#import <SignalUtilitiesKit/TSOutgoingMessage.h>
#import <SignalUtilitiesKit/TSQuotedMessage.h>
#import <SignalUtilitiesKit/TSThread.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -8,11 +8,11 @@
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SessionServiceKit/TSContactThread.h>
#import <SessionServiceKit/TSGroupThread.h>
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/SignalAccount.h>
#import <SignalUtilitiesKit/TSContactThread.h>
#import <SignalUtilitiesKit/TSGroupThread.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SessionUIKit/SessionUIKit.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -8,7 +8,7 @@
#import "UIColor+OWS.h"
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
#import <SessionServiceKit/SignalAccount.h>
#import <SignalUtilitiesKit/SignalAccount.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -7,13 +7,13 @@
#import "UIUtil.h"
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/Contact.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/OWSBlockingManager.h>
#import <SessionServiceKit/PhoneNumber.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/Contact.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/OWSBlockingManager.h>
#import <SignalUtilitiesKit/PhoneNumber.h>
#import <SignalUtilitiesKit/SignalAccount.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
@import ContactsUI;

View File

@ -3,7 +3,7 @@
//
import Foundation
import SessionServiceKit
@objc
public class OWSFlatButton: UIView {

View File

@ -3,12 +3,12 @@
//
#import "ThreadViewHelper.h"
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/TSDatabaseView.h>
#import <SessionServiceKit/TSThread.h>
#import <SessionServiceKit/TSContactThread.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/TSDatabaseView.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SignalUtilitiesKit/TSContactThread.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
#import <YapDatabase/YapDatabase.h>
#import <YapDatabase/YapDatabaseViewChange.h>
#import <YapDatabase/YapDatabaseViewConnection.h>

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -5,7 +5,7 @@
#import "OWSConversationColor.h"
#import "Theme.h"
#import "UIColor+OWS.h"
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/TSThread.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -5,9 +5,9 @@
#import "Theme.h"
#import "UIColor+OWS.h"
#import "UIUtil.h"
#import <SessionServiceKit/NSNotificationCenter+OWS.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/YapDatabaseConnection+OWS.h>
#import <SignalUtilitiesKit/NSNotificationCenter+OWS.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/YapDatabaseConnection+OWS.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionUIKit/SessionUIKit.h>

View File

@ -4,9 +4,9 @@
#import "AttachmentSharing.h"
#import "UIUtil.h"
#import <SessionCoreKit/Threading.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/TSAttachmentStream.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/TSAttachmentStream.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -4,7 +4,7 @@
import Foundation
import MobileCoreServices
import SessionServiceKit
import PromiseKit
import AVFoundation

View File

@ -4,7 +4,7 @@
#import "NSAttributedString+OWS.h"
#import "UIView+OWS.h"
#import <SessionServiceKit/AppContext.h>
#import <SignalUtilitiesKit/AppContext.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -4,7 +4,7 @@
#import "UIColor+OWS.h"
#import "OWSMath.h"
#import <SessionCoreKit/Cryptography.h>
#import <SessionProtocolKit/Cryptography.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -3,7 +3,6 @@
//
#import "UIFont+OWS.h"
#import <SessionCoreKit/iOSVersions.h>
NS_ASSUME_NONNULL_BEGIN
@ -123,9 +122,7 @@ NS_ASSUME_NONNULL_BEGIN
UIFontTextStyleCaption1 : @(18.0),
UIFontTextStyleCaption2 : @(17.0),
} mutableCopy];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
map[UIFontTextStyleLargeTitle] = @(40.0);
}
map[UIFontTextStyleLargeTitle] = @(40.0);
maxPointSizeMap = map;
});
@ -144,11 +141,7 @@ NS_ASSUME_NONNULL_BEGIN
+ (UIFont *)ows_dynamicTypeLargeTitle1ClampedFont
{
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
return [UIFont preferredFontForTextStyleClamped:UIFontTextStyleLargeTitle];
} else {
return [UIFont preferredFontForTextStyleClamped:UIFontTextStyleTitle1];
}
return [UIFont preferredFontForTextStyleClamped:UIFontTextStyleLargeTitle];
}
+ (UIFont *)ows_dynamicTypeTitle1ClampedFont

View File

@ -3,7 +3,7 @@
//
#import <PureLayout/PureLayout.h>
#import <SessionServiceKit/OWSMath.h>
#import <SignalUtilitiesKit/OWSMath.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -4,9 +4,8 @@
#import "UIView+OWS.h"
#import "OWSMath.h"
#import <SessionCoreKit/iOSVersions.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/AppContext.h>
#import <SignalUtilitiesKit/AppContext.h>
NS_ASSUME_NONNULL_BEGIN
@ -551,15 +550,6 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
- (BOOL)applyScrollViewInsetsFix
{
// Fix a bug that only affects iOS 11.0.x and 11.1.x.
// The symptom is a fix weird animation that happens when using the interactive pop gesture.
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0) && !SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 2)) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpartial-availability"
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
#pragma clang diagnostic pop
return YES;
}
return NO;
}

View File

@ -7,9 +7,8 @@
#import "UIUtil.h"
#import "UIView+OWS.h"
#import "UIViewController+OWS.h"
#import <SessionCoreKit/iOSVersions.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/AppContext.h>
#import <SignalUtilitiesKit/AppContext.h>
NS_ASSUME_NONNULL_BEGIN
@ -106,21 +105,19 @@ NS_ASSUME_NONNULL_BEGIN
= CGRectMake(0, 0, backImage.size.width + kExtraRightPadding, backImage.size.height + kExtraHeightPadding);
backButton.frame = buttonFrame;
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 1)) {
// In iOS 11.1 beta, the hot area of custom bar button items is _only_
// the bounds of the custom view, making them very hard to hit.
//
// TODO: Remove this hack if the bug is fixed in iOS 11.1 by the time
// it goes to production (or in a later release),
// since it has two negative side effects: 1) the layout of the
// back button isn't consistent with the iOS default back buttons
// 2) we can't add the unread count badge to the back button
// with this hack.
return [[UIBarButtonItem alloc] initWithImage:backImage
style:UIBarButtonItemStylePlain
target:target
action:selector];
}
// In iOS 11.1 beta, the hot area of custom bar button items is _only_
// the bounds of the custom view, making them very hard to hit.
//
// TODO: Remove this hack if the bug is fixed in iOS 11.1 by the time
// it goes to production (or in a later release),
// since it has two negative side effects: 1) the layout of the
// back button isn't consistent with the iOS default back buttons
// 2) we can't add the unread count badge to the back button
// with this hack.
return [[UIBarButtonItem alloc] initWithImage:backImage
style:UIBarButtonItemStylePlain
target:target
action:selector];
UIBarButtonItem *backItem =
[[UIBarButtonItem alloc] initWithCustomView:backButton

View File

@ -2,8 +2,8 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/Contact.h>
#import <SessionServiceKit/ContactsManagerProtocol.h>
#import <SignalUtilitiesKit/Contact.h>
#import <SignalUtilitiesKit/ContactsManagerProtocol.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -9,18 +9,18 @@
#import "OWSProfileManager.h"
#import "OWSUserProfile.h"
#import "ViewControllerUtils.h"
#import <SessionCoreKit/NSDate+OWS.h>
#import <SessionCoreKit/iOSVersions.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SignalMessaging/UIColor+OWS.h>
#import <SignalMessaging/UIFont+OWS.h>
#import <SessionServiceKit/ContactsUpdater.h>
#import <SessionServiceKit/NSNotificationCenter+OWS.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/OWSError.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/PhoneNumber.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SignalUtilitiesKit/ContactsUpdater.h>
#import <SignalUtilitiesKit/NSNotificationCenter+OWS.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/OWSError.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/PhoneNumber.h>
#import <SignalUtilitiesKit/SignalAccount.h>
@import Contacts;
@ -224,15 +224,7 @@ NSString *const OWSContactsManagerKeyNextFullIntersectionDate = @"OWSContactsMan
updatedContacts:(NSArray<Contact *> *)contacts
isUserRequested:(BOOL)isUserRequested
{
BOOL shouldClearStaleCache;
// On iOS 11.2, only clear the contacts cache if the fetch was initiated by the user.
// iOS 11.2 rarely returns partial fetches and we use the cache to prevent contacts from
// periodically disappearing from the UI.
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 2) && !SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 3)) {
shouldClearStaleCache = isUserRequested;
} else {
shouldClearStaleCache = YES;
}
BOOL shouldClearStaleCache = YES;
[self updateWithContacts:contacts isUserRequested:isUserRequested shouldClearStaleCache:shouldClearStaleCache];
}

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/OWSSyncManagerProtocol.h>
#import <SignalUtilitiesKit/OWSSyncManagerProtocol.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -9,22 +9,22 @@
#import "OWSProfileManager.h"
#import "OWSReadReceiptManager.h"
#import <PromiseKit/AnyPromise.h>
#import <SessionServiceKit/AppReadiness.h>
#import <SessionServiceKit/DataSource.h>
#import <SessionServiceKit/MIMETypeUtil.h>
#import <SessionServiceKit/OWSMessageSender.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/OWSSyncConfigurationMessage.h>
#import <SessionServiceKit/OWSSyncContactsMessage.h>
#import <SessionServiceKit/OWSSyncGroupsMessage.h>
#import <SessionServiceKit/LKSyncOpenGroupsMessage.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/YapDatabaseConnection+OWS.h>
#import <SessionServiceKit/TSContactThread.h>
#import <SessionServiceKit/TSGroupThread.h>
#import <SignalUtilitiesKit/AppReadiness.h>
#import <SignalUtilitiesKit/DataSource.h>
#import <SignalUtilitiesKit/MIMETypeUtil.h>
#import <SignalUtilitiesKit/OWSMessageSender.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/OWSSyncConfigurationMessage.h>
#import <SignalUtilitiesKit/OWSSyncContactsMessage.h>
#import <SignalUtilitiesKit/OWSSyncGroupsMessage.h>
#import <SignalUtilitiesKit/LKSyncOpenGroupsMessage.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/SignalAccount.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/YapDatabaseConnection+OWS.h>
#import <SignalUtilitiesKit/TSContactThread.h>
#import <SignalUtilitiesKit/TSGroupThread.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -5,7 +5,7 @@
import Foundation
import Contacts
import ContactsUI
import SessionServiceKit
enum Result<T, ErrorType> {
case success(T)

View File

@ -5,27 +5,26 @@
#import "AppSetup.h"
#import "Environment.h"
#import "VersionMigrations.h"
#import <SessionAxolotlKit/SessionCipher.h>
#import <SignalMessaging/OWSDatabaseMigration.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/ContactDiscoveryService.h>
#import <SessionServiceKit/OWS2FAManager.h>
#import <SessionServiceKit/OWSAttachmentDownloads.h>
#import <SessionServiceKit/OWSBackgroundTask.h>
#import <SessionServiceKit/OWSBatchMessageProcessor.h>
#import <SessionServiceKit/OWSBlockingManager.h>
#import <SessionServiceKit/OWSDisappearingMessagesJob.h>
#import <SessionServiceKit/OWSIdentityManager.h>
#import <SessionServiceKit/OWSMessageDecrypter.h>
#import <SessionServiceKit/OWSMessageManager.h>
#import <SessionServiceKit/OWSMessageReceiver.h>
#import <SessionServiceKit/OWSOutgoingReceiptManager.h>
#import <SessionServiceKit/OWSReadReceiptManager.h>
#import <SessionServiceKit/OWSStorage.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SessionServiceKit/TSSocketManager.h>
#import <SignalUtilitiesKit/ContactDiscoveryService.h>
#import <SignalUtilitiesKit/OWS2FAManager.h>
#import <SignalUtilitiesKit/OWSAttachmentDownloads.h>
#import <SignalUtilitiesKit/OWSBackgroundTask.h>
#import <SignalUtilitiesKit/OWSBatchMessageProcessor.h>
#import <SignalUtilitiesKit/OWSBlockingManager.h>
#import <SignalUtilitiesKit/OWSDisappearingMessagesJob.h>
#import <SignalUtilitiesKit/OWSIdentityManager.h>
#import <SignalUtilitiesKit/OWSMessageDecrypter.h>
#import <SignalUtilitiesKit/OWSMessageManager.h>
#import <SignalUtilitiesKit/OWSMessageReceiver.h>
#import <SignalUtilitiesKit/OWSOutgoingReceiptManager.h>
#import <SignalUtilitiesKit/OWSReadReceiptManager.h>
#import <SignalUtilitiesKit/OWSStorage.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
#import <SignalUtilitiesKit/TSSocketManager.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -2,7 +2,7 @@
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
@class OWSAudioSession;
@class OWSContactsManager;

View File

@ -4,8 +4,8 @@
#import "Environment.h"
#import "OWSPreferences.h"
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
static Environment *sharedEnvironment = nil;

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import SessionServiceKit
@objc
public class NoopCallMessageHandler: NSObject, OWSCallMessageHandler {

View File

@ -6,10 +6,10 @@
#import "Environment.h"
#import "OWSAudioPlayer.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/OWSFileSystem.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/TSThread.h>
#import <SessionServiceKit/YapDatabaseConnection+OWS.h>
#import <SignalUtilitiesKit/OWSFileSystem.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SignalUtilitiesKit/YapDatabaseConnection+OWS.h>
#import <YapDatabase/YapDatabase.h>
NSString *const kOWSSoundsStorageNotificationCollection = @"kOWSSoundsStorageNotificationCollection";

View File

@ -3,9 +3,9 @@
//
#import "SignalKeyingStorage.h"
#import <SessionCoreKit/Randomness.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/YapDatabaseConnection+OWS.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/YapDatabaseConnection+OWS.h>
#import <Curve25519Kit/Randomness.h>
#define SignalKeyingCollection @"SignalKeyingCollection"

View File

@ -7,15 +7,15 @@
#import "OWSDatabaseMigrationRunner.h"
#import "SignalKeyingStorage.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/AppVersion.h>
#import <SessionServiceKit/NSUserDefaults+OWS.h>
#import <SessionServiceKit/OWSPrimaryStorage+Loki.h>
#import <SessionServiceKit/OWSRequestFactory.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/TSNetworkManager.h>
#import <SessionServiceKit/TSThread.h>
#import <SessionServiceKit/TSGroupThread.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/AppVersion.h>
#import <SignalUtilitiesKit/NSUserDefaults+OWS.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage+Loki.h>
#import <SignalUtilitiesKit/OWSRequestFactory.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/TSNetworkManager.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SignalUtilitiesKit/TSGroupThread.h>
#import <YapDatabase/YapDatabase.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/TSYapDatabaseObject.h>
#import <SignalUtilitiesKit/TSYapDatabaseObject.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -3,9 +3,9 @@
//
#import "OWSDatabaseMigration.h"
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -5,7 +5,7 @@
#import "OWSDatabaseMigrationRunner.h"
#import "OWSDatabaseMigration.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/AppContext.h>
#import <SignalUtilitiesKit/AppContext.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -5,7 +5,7 @@
#import "OWSResaveCollectionDBMigration.h"
#import <YapDatabase/YapDatabaseConnection.h>
#import <YapDatabase/YapDatabaseTransaction.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/ProfileManagerProtocol.h>
#import <SignalUtilitiesKit/ProfileManagerProtocol.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -6,32 +6,32 @@
#import "Environment.h"
#import "OWSUserProfile.h"
#import <PromiseKit/AnyPromise.h>
#import <SessionCoreKit/Cryptography.h>
#import <SessionCoreKit/NSData+OWS.h>
#import <SessionCoreKit/NSDate+OWS.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/AppReadiness.h>
#import <SessionServiceKit/MIMETypeUtil.h>
#import <SessionServiceKit/NSData+Image.h>
#import <SessionServiceKit/NSNotificationCenter+OWS.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/OWSBlockingManager.h>
#import <SessionServiceKit/OWSFileSystem.h>
#import <SessionServiceKit/OWSMessageSender.h>
#import <SessionServiceKit/OWSPrimaryStorage+Loki.h>
#import <SessionServiceKit/OWSProfileKeyMessage.h>
#import <SessionServiceKit/OWSRequestBuilder.h>
#import <SessionServiceKit/OWSSignalService.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/TSGroupThread.h>
#import <SessionServiceKit/TSNetworkManager.h>
#import <SessionServiceKit/TSThread.h>
#import <SessionServiceKit/TSYapDatabaseObject.h>
#import <SessionServiceKit/UIImage+OWS.h>
#import <SessionServiceKit/YapDatabaseConnection+OWS.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/AppReadiness.h>
#import <SignalUtilitiesKit/MIMETypeUtil.h>
#import <SignalUtilitiesKit/NSData+Image.h>
#import <SignalUtilitiesKit/NSNotificationCenter+OWS.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/OWSBlockingManager.h>
#import <SignalUtilitiesKit/OWSFileSystem.h>
#import <SignalUtilitiesKit/OWSMessageSender.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage+Loki.h>
#import <SignalUtilitiesKit/OWSProfileKeyMessage.h>
#import <SignalUtilitiesKit/OWSRequestBuilder.h>
#import <SignalUtilitiesKit/OWSSignalService.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/TSGroupThread.h>
#import <SignalUtilitiesKit/TSNetworkManager.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SignalUtilitiesKit/TSYapDatabaseObject.h>
#import <SignalUtilitiesKit/UIImage+OWS.h>
#import <SignalUtilitiesKit/YapDatabaseConnection+OWS.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
NS_ASSUME_NONNULL_BEGIN
@ -430,7 +430,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
NSData *encryptedAvatarData = [self encryptProfileData:avatarData profileKey:newProfileKey];
OWSAssertDebug(encryptedAvatarData.length > 0);
[[LKFileServerAPI uploadProfilePicture:encryptedAvatarData]
[[SNFileServerAPI uploadProfilePicture:encryptedAvatarData]
.thenOn(dispatch_get_main_queue(), ^(NSString *downloadURL) {
[self.localUserProfile updateWithProfileKey:newProfileKey dbConnection:self.dbConnection completion:^{
successBlock(downloadURL);
@ -468,12 +468,12 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
[SSKEnvironment.shared.primaryStorage.dbReadConnection readWithBlock:^(YapDatabaseReadTransaction *transaction) {
publicChats = [LKDatabaseUtilities getAllPublicChats:transaction];
}];
NSSet *servers = [NSSet setWithArray:[publicChats.allValues map:^NSString *(LKPublicChat *publicChat) { return publicChat.server; }]];
NSSet *servers = [NSSet setWithArray:[publicChats.allValues map:^NSString *(SNOpenGroup *publicChat) { return publicChat.server; }]];
for (NSString *server in servers) {
[[LKPublicChatAPI setDisplayName:localProfileName on:server] retainUntilComplete];
[[LKPublicChatAPI setProfilePictureURL:avatarURL usingProfileKey:self.localProfileKey.keyData on:server] retainUntilComplete];
[[SNOpenGroupAPI setDisplayName:localProfileName on:server] retainUntilComplete];
[[SNOpenGroupAPI setProfilePictureURL:avatarURL usingProfileKey:self.localProfileKey.keyData on:server] retainUntilComplete];
}
successBlock();
@ -1158,7 +1158,7 @@ typedef void (^ProfileManagerFailureBlock)(NSError *error);
OWSLogVerbose(@"downloading profile avatar: %@", userProfile.uniqueId);
NSString *profilePictureURL = userProfile.avatarUrlPath;
[[LKFileServerAPI downloadAttachmentFrom:profilePictureURL].then(^(NSData *data) {
[[SNFileServerAPI downloadAttachmentFrom:profilePictureURL].then(^(NSData *data) {
@synchronized(self.currentAvatarDownloads)
{
[self.currentAvatarDownloads removeObject:userProfile.recipientId];

View File

@ -2,7 +2,7 @@
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <SessionServiceKit/TSYapDatabaseObject.h>
#import <SignalUtilitiesKit/TSYapDatabaseObject.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -4,16 +4,16 @@
#import "OWSUserProfile.h"
#import <PromiseKit/AnyPromise.h>
#import <SessionCoreKit/Cryptography.h>
#import <SessionCoreKit/NSData+OWS.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/NSNotificationCenter+OWS.h>
#import <SessionServiceKit/NSString+SSK.h>
#import <SessionServiceKit/OWSFileSystem.h>
#import <SessionServiceKit/OWSPrimaryStorage.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/NSNotificationCenter+OWS.h>
#import <SignalUtilitiesKit/NSString+SSK.h>
#import <SignalUtilitiesKit/OWSFileSystem.h>
#import <SignalUtilitiesKit/OWSPrimaryStorage.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <YapDatabase/YapDatabaseConnection.h>
#import <YapDatabase/YapDatabaseTransaction.h>

View File

@ -4,8 +4,6 @@
import Foundation
import PromiseKit
import SessionServiceKit
import SessionMetadataKit
@objc
public class ProfileFetcherJob: NSObject {

View File

@ -6,11 +6,11 @@
#import "OWSContactsManager.h"
#import "PhoneNumber.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/Contact.h>
#import <SessionServiceKit/OWSBlockingManager.h>
#import <SessionServiceKit/SignalAccount.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/TSGroupThread.h>
#import <SignalUtilitiesKit/Contact.h>
#import <SignalUtilitiesKit/OWSBlockingManager.h>
#import <SignalUtilitiesKit/SignalAccount.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/TSGroupThread.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -4,9 +4,9 @@
#import "DebugLogger.h"
#import "OWSScrubbingLogFormatter.h"
#import <SessionCoreKit/NSDate+OWS.h>
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/OWSFileSystem.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/OWSFileSystem.h>
#pragma mark Logging - Production logging wants us to write some logs to a file in case we need it for debugging.
#import <CocoaLumberjack/DDTTYLogger.h>

View File

@ -3,7 +3,7 @@
//
import Foundation
import SessionServiceKit
// This entity has responsibility for blocking the device from sleeping if
// certain behaviors (e.g. recording or playing voice messages) are in progress.

View File

@ -3,7 +3,7 @@
//
import Foundation
import SessionServiceKit
public typealias MessageSortKey = UInt64
public struct ConversationSortKey: Comparable {

View File

@ -6,7 +6,6 @@
#import "TSAttachmentStream.h"
#import <AVFoundation/AVFoundation.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/NSTimer+OWS.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -3,7 +3,7 @@
//
#import "OWSAvatarBuilder.h"
#import <SessionServiceKit/TSThread.h>
#import <SignalUtilitiesKit/TSThread.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -10,7 +10,7 @@
#import "UIColor+OWS.h"
#import "UIFont+OWS.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -7,8 +7,8 @@
#import "TSGroupThread.h"
#import "UIColor+OWS.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionCoreKit/NSData+OWS.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -3,15 +3,15 @@
//
#import "OWSPreferences.h"
#import <SessionServiceKit/AppContext.h>
#import <SessionServiceKit/NSNotificationCenter+OWS.h>
#import <SessionServiceKit/NSUserDefaults+OWS.h>
#import <SessionServiceKit/OWSSyncManagerProtocol.h>
#import <SessionServiceKit/SSKEnvironment.h>
#import <SessionServiceKit/TSStorageHeaders.h>
#import <SessionServiceKit/YapDatabaseConnection+OWS.h>
#import <SessionServiceKit/YapDatabaseTransaction+OWS.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalUtilitiesKit/NSNotificationCenter+OWS.h>
#import <SignalUtilitiesKit/NSUserDefaults+OWS.h>
#import <SignalUtilitiesKit/OWSSyncManagerProtocol.h>
#import <SignalUtilitiesKit/SSKEnvironment.h>
#import <SignalUtilitiesKit/TSStorageHeaders.h>
#import <SignalUtilitiesKit/YapDatabaseConnection+OWS.h>
#import <SignalUtilitiesKit/YapDatabaseTransaction+OWS.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -8,25 +8,23 @@
#import "OWSQuotedReplyModel.h"
#import "OWSUnreadIndicator.h"
#import "TSUnreadIndicatorInteraction.h"
#import <SessionCoreKit/NSDate+OWS.h>
#import <SessionCoreKit/SessionCoreKit-Swift.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionServiceKit/OWSAddToContactsOfferMessage.h>
#import <SessionServiceKit/OWSAddToProfileWhitelistOfferMessage.h>
#import <SessionServiceKit/OWSBlockingManager.h>
#import <SessionServiceKit/OWSDisappearingMessagesConfiguration.h>
#import <SessionServiceKit/OWSMessageSender.h>
#import <SessionServiceKit/OWSUnknownContactBlockOfferMessage.h>
#import <SessionServiceKit/TSAccountManager.h>
#import <SessionServiceKit/TSCall.h>
#import <SessionServiceKit/TSContactThread.h>
#import <SessionServiceKit/TSDatabaseView.h>
#import <SessionServiceKit/TSIncomingMessage.h>
#import <SessionServiceKit/TSInvalidIdentityKeyErrorMessage.h>
#import <SessionServiceKit/TSOutgoingMessage.h>
#import <SessionServiceKit/TSThread.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <SignalUtilitiesKit/OWSAddToContactsOfferMessage.h>
#import <SignalUtilitiesKit/OWSAddToProfileWhitelistOfferMessage.h>
#import <SignalUtilitiesKit/OWSBlockingManager.h>
#import <SignalUtilitiesKit/OWSDisappearingMessagesConfiguration.h>
#import <SignalUtilitiesKit/OWSMessageSender.h>
#import <SignalUtilitiesKit/OWSUnknownContactBlockOfferMessage.h>
#import <SignalUtilitiesKit/TSAccountManager.h>
#import <SignalUtilitiesKit/TSCall.h>
#import <SignalUtilitiesKit/TSContactThread.h>
#import <SignalUtilitiesKit/TSDatabaseView.h>
#import <SignalUtilitiesKit/TSIncomingMessage.h>
#import <SignalUtilitiesKit/TSInvalidIdentityKeyErrorMessage.h>
#import <SignalUtilitiesKit/TSOutgoingMessage.h>
#import <SignalUtilitiesKit/TSThread.h>
#import <SignalUtilitiesKit/SignalUtilitiesKit-Swift.h>
NS_ASSUME_NONNULL_BEGIN

View File

@ -4,8 +4,8 @@
#import "UIColor+OWS.h"
#import "UIFont+OWS.h"
#import <SessionServiceKit/MIMETypeUtil.h>
#import <SessionServiceKit/UIImage+OWS.h>
#import <SignalUtilitiesKit/MIMETypeUtil.h>
#import <SignalUtilitiesKit/UIImage+OWS.h>
#define ACCESSIBILITY_IDENTIFIER_WITH_NAME(_root_view, _variable_name) \
([NSString stringWithFormat:@"%@.%@", _root_view.class, _variable_name])

View File

@ -5,7 +5,7 @@
#import "UIUtil.h"
#import "Theme.h"
#import "UIColor+OWS.h"
#import <SessionServiceKit/AppContext.h>
#import <SignalUtilitiesKit/AppContext.h>
#import <SignalMessaging/SignalMessaging-Swift.h>
#import <SessionUIKit/SessionUIKit.h>

View File

@ -1,15 +0,0 @@
---
BasedOnStyle: WebKit
AllowShortFunctionsOnASingleLine: false
BinPackArguments: false
BinPackParameters: false
ColumnLimit: 120
IndentCaseLabels: true
MaxEmptyLinesToKeep: 2
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
TabWidth: 8
UseTab: Never
...

View File

@ -1,30 +0,0 @@
# Xcode
#
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
xcshareddata
Pods/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
#Pods/

View File

@ -1,17 +0,0 @@
language: objective-c
osx_image: xcode8.3
env:
-EARLY_START_SIMULATOR=1 # early starting simulator reduces false negatives due to test timeouts
before_install:
- brew update
- bundle
- bundle exec pod repo update --silent
after_failure:
- sleep 10 # This prevents the occasional output truncation that happens when piping to xcpretty.
script: make scan_test

View File

@ -1,621 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

View File

@ -1,373 +0,0 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import subprocess
import datetime
import argparse
import commands
import re
# This script is used to extract analytics event names from the codebase,
# and convert them to constants in OWSAnalyticsEvents.
git_repo_path = os.path.abspath(subprocess.check_output(['git', 'rev-parse', '--show-toplevel']).strip())
def splitall(path):
allparts = []
while 1:
parts = os.path.split(path)
if parts[0] == path: # sentinel for absolute paths
allparts.insert(0, parts[0])
break
elif parts[1] == path: # sentinel for relative paths
allparts.insert(0, parts[1])
break
else:
path = parts[0]
allparts.insert(0, parts[1])
return allparts
def objc_name_for_event_name(event_name):
while True:
index = event_name.find('_')
if index < 0:
break
if index >= len(event_name) - 1:
break
nextChar = event_name[index + 1]
event_name = event_name[:index] + nextChar.upper() + event_name[index + 2:]
return event_name
event_names = []
def process(filepath, c_macros, swift_macros):
short_filepath = filepath[len(git_repo_path):]
if short_filepath.startswith(os.sep):
short_filepath = short_filepath[len(os.sep):]
filename = os.path.basename(filepath)
if filename.startswith('.'):
return
if filename == 'OWSAnalytics.h':
return
file_ext = os.path.splitext(filename)[1]
is_swift = file_ext in ('.swift')
if is_swift:
macros = swift_macros
else:
macros = c_macros
# print short_filepath, is_swift
with open(filepath, 'rt') as f:
text = f.read()
replacement_map = {}
position = 0
has_printed_filename = False
while True:
best_match = None
best_macro = None
for macro in macros:
pattern = r'''%s\(([^,\)]+)[,\)]''' % macro
# print '\t pattern', pattern
matcher = re.compile(pattern)
# matcher = re.compile(r'#define (OWSProd)')
match = matcher.search(text, pos=position)
if match:
event_name = match.group(1).strip()
# Ignore swift func definitions
if is_swift and ':' in event_name:
continue
# print '\t', 'event_name', event_name
if not best_match:
pass
elif best_match.start(1) > match.start(1):
pass
else:
continue
best_match = match
best_macro = macro
# TODO:
if not best_match:
break
position = best_match.end(1)
if not has_printed_filename:
has_printed_filename = True
print short_filepath
raw_event_name = best_match.group(1).strip()
if is_swift:
pattern = r'^"(.+)"$'
else:
pattern = r'^@"(.+)"$'
# print 'pattern:', pattern
matcher = re.compile(pattern)
# matcher = re.compile(r'#define (OWSProd)')
match = matcher.search(raw_event_name)
if match:
event_name = match.group(1).strip()
else:
print '\t', 'Ignoring event: _%s_' % raw_event_name
continue
event_names.append(event_name)
print '\t', 'event_name', event_name
if is_swift:
before = '"%s"' % event_name
after = 'OWSAnalyticsEvents.%s()' % objc_name_for_event_name(event_name)
else:
before = '@"%s"' % event_name
after = '[OWSAnalyticsEvents %s]' % objc_name_for_event_name(event_name)
replacement_map[before] = after
# macros.append(macro)
# break
# print 'replacement_map', replacement_map
for before in replacement_map:
after = replacement_map[before]
text = text.replace(before, after)
# if original_text == text:
# return
print 'Updating:', short_filepath
with open(filepath, 'wt') as f:
f.write(text)
def should_ignore_path(path):
ignore_paths = [
os.path.join(git_repo_path, '.git')
]
for ignore_path in ignore_paths:
if path.startswith(ignore_path):
return True
for component in splitall(path):
if component.startswith('.'):
return True
if component.endswith('.framework'):
return True
if component in ('Pods', 'ThirdParty', 'Carthage',):
return True
return False
def process_if_appropriate(filepath, c_macros, swift_macros):
filename = os.path.basename(filepath)
if filename.startswith('.'):
return
file_ext = os.path.splitext(filename)[1]
if file_ext not in ('.h', '.hpp', '.cpp', '.m', '.mm', '.pch', '.swift'):
return
if should_ignore_path(filepath):
return
process(filepath, c_macros, swift_macros)
def extract_macros(filepath):
filename = os.path.basename(filepath)
file_ext = os.path.splitext(filename)[1]
is_swift = file_ext in ('.swift')
macros = []
with open(filepath, 'rt') as f:
text = f.read()
lines = text.split('\n')
for line in lines:
# Match lines of this form:
# #define OWSProdCritical(__eventName) ...
if is_swift:
matcher = re.compile(r'func (OWSProd[^\(]+)\(.+[,\)]')
else:
matcher = re.compile(r'#define (OWSProd[^\(]+)\(.+[,\)]')
# matcher = re.compile(r'#define (OWSProd)')
match = matcher.search(line)
if match:
macro = match.group(1).strip()
# print 'macro', macro
macros.append(macro)
return macros
def update_event_names(header_file_path, source_file_path):
# global event_names
# event_names = sorted(set(event_names))
code_generation_marker = '#pragma mark - Code Generation Marker'
# Source
filepath = source_file_path
with open(filepath, 'rt') as f:
text = f.read()
code_generation_start = text.find(code_generation_marker)
code_generation_end = text.rfind(code_generation_marker)
if code_generation_start < 0:
print 'Could not find marker in file:', file
sys.exit(1)
if code_generation_end < 0 or code_generation_end == code_generation_start:
print 'Could not find marker in file:', file
sys.exit(1)
event_name_map = {}
print
print 'Parsing old generated code'
print
old_generated = text[code_generation_start + len(code_generation_marker):code_generation_end]
# print 'old_generated', old_generated
for split in old_generated.split('+'):
split = split.strip()
# print 'split:', split
if not split:
continue
# Example:
#(NSString *)call_service_call_already_set
#{
# return @"call_service_call_already_set";
#}
pattern = r'\(NSString \*\)([^\s\r\n\t]+)[\s\r\n\t]'
matcher = re.compile(pattern)
match = matcher.search(split)
if not match:
print 'Could not parse:', split
print 'In file:', filepath
sys.exit(1)
method_name = match.group(1).strip()
print 'method_name:', method_name
pattern = r'return @"(.+)";'
matcher = re.compile(pattern)
match = matcher.search(split)
if not match:
print 'Could not parse:', split
print 'In file:', filepath
sys.exit(1)
event_name = match.group(1).strip()
print 'event_name:', event_name
event_name_map[event_name] = method_name
print
all_event_names = sorted(set(event_name_map.keys() + event_names))
print 'all_event_names', all_event_names
generated = code_generation_marker
for event_name in all_event_names:
# Example:
# + (NSString *)call_service_call_already_set;
if event_name in event_name_map:
objc_name = event_name_map[event_name]
else:
objc_name = objc_name_for_event_name(event_name)
text_for_event = '''+ (NSString *)%s
{
return @"%s";
}''' % (objc_name, event_name)
generated = generated + '\n\n' + text_for_event
generated = generated + '\n\n' + code_generation_marker
print 'generated', generated
new_text = text[:code_generation_start] + generated + text[code_generation_end + len(code_generation_marker):]
print 'text', new_text
with open(filepath, 'wt') as f:
f.write(new_text)
# Header
filepath = header_file_path
with open(filepath, 'rt') as f:
text = f.read()
code_generation_start = text.find(code_generation_marker)
code_generation_end = text.rfind(code_generation_marker)
if code_generation_start < 0:
print 'Could not find marker in file:', file
sys.exit(1)
if code_generation_end < 0 or code_generation_end == code_generation_start:
print 'Could not find marker in file:', file
sys.exit(1)
generated = code_generation_marker
for event_name in all_event_names:
# Example:
# + (NSString *)call_service_call_already_set;
objc_name = objc_name_for_event_name(event_name)
text_for_event = '+ (NSString *)%s;' % (objc_name,)
generated = generated + '\n\n' + text_for_event
generated = generated + '\n\n' + code_generation_marker
print 'generated', generated
new_text = text[:code_generation_start] + generated + text[code_generation_end + len(code_generation_marker):]
print 'text', new_text
with open(filepath, 'wt') as f:
f.write(new_text)
if __name__ == "__main__":
# print 'git_repo_path', git_repo_path
macros_header_file_path = os.path.join(git_repo_path, 'SignalServiceKit', 'src', 'Util', 'OWSAnalytics.h')
if not os.path.exists(macros_header_file_path):
print 'Macros header does not exist:', macros_header_file_path
sys.exit(1)
c_macros = extract_macros(macros_header_file_path)
print 'c_macros:', c_macros
macros_header_file_path = os.path.join(git_repo_path, 'Signal', 'src', 'util', 'OWSAnalytics.swift')
if not os.path.exists(macros_header_file_path):
print 'Macros header does not exist:', macros_header_file_path
sys.exit(1)
swift_macros = extract_macros(macros_header_file_path)
print 'swift_macros:', swift_macros
event_names_header_file_path = os.path.join(git_repo_path, 'SignalServiceKit', 'src', 'Util', 'OWSAnalyticsEvents.h')
if not os.path.exists(event_names_header_file_path):
print 'event_names_header_file_path does not exist:', event_names_header_file_path
sys.exit(1)
event_names_source_file_path = os.path.join(git_repo_path, 'SignalServiceKit', 'src', 'Util', 'OWSAnalyticsEvents.m')
if not os.path.exists(event_names_source_file_path):
print 'event_names_source_file_path does not exist:', event_names_source_file_path
sys.exit(1)
for rootdir, dirnames, filenames in os.walk(git_repo_path):
for filename in filenames:
file_path = os.path.abspath(os.path.join(rootdir, filename))
process_if_appropriate(file_path, c_macros, swift_macros)
print
print 'event_names', sorted(set(event_names))
update_event_names(event_names_header_file_path, event_names_source_file_path)

View File

@ -1,24 +0,0 @@
// iOS - since we use a modern proto-compiler, we must specify
// the legacy proto format.
syntax = "proto2";
// iOS - package name determines class prefix
package FingerprintProtos;
option java_package = "org.whispersystems.libsignal.fingerprint";
option java_outer_classname = "FingerprintProtos";
message LogicalFingerprint {
// @required
optional bytes identityData = 1;
// optional bytes identifier = 2;
}
message LogicalFingerprints {
// @required
optional uint32 version = 1;
// @required
optional LogicalFingerprint localFingerprint = 2;
// @required
optional LogicalFingerprint remoteFingerprint = 3;
}

View File

@ -1,38 +0,0 @@
# See README.md in this dir for prerequisite setup.
PROTOC=protoc \
--proto_path='./'
WRAPPER_SCRIPT=../../Scripts/ProtoWrappers.py \
--proto-dir='./' --verbose
all: signal_service_protos provisioning_protos fingerprint_protos websocket_protos signal_ios_protos
signal_service_protos: SignalService.proto
$(PROTOC) --swift_out=../src/Protos/Generated \
SignalService.proto
$(WRAPPER_SCRIPT) --dst-dir=../src/Protos/Generated \
--wrapper-prefix=SSKProto --proto-prefix=SignalServiceProtos --proto-file=SignalService.proto
provisioning_protos: Provisioning.proto
$(PROTOC) --swift_out=../src/Protos/Generated \
Provisioning.proto
$(WRAPPER_SCRIPT) --dst-dir=../src/Protos/Generated \
--wrapper-prefix=ProvisioningProto --proto-prefix=ProvisioningProtos --proto-file=Provisioning.proto
fingerprint_protos: Fingerprint.proto
$(PROTOC) --swift_out=../src/Protos/Generated \
Fingerprint.proto
$(WRAPPER_SCRIPT) --dst-dir=../src/Protos/Generated \
--wrapper-prefix=FingerprintProto --proto-prefix=FingerprintProtos --proto-file=Fingerprint.proto
websocket_protos: WebSocketResources.proto
$(PROTOC) --swift_out=../src/Protos/Generated \
WebSocketResources.proto
$(WRAPPER_SCRIPT) --dst-dir=../src/Protos/Generated \
--wrapper-prefix=WebSocketProto --proto-prefix=WebSocketProtos --proto-file=WebSocketResources.proto
signal_ios_protos: SignalIOS.proto
$(PROTOC) --swift_out=../src/Protos/Generated \
SignalIOS.proto
$(WRAPPER_SCRIPT) --dst-dir=../src/Protos/Generated \
--wrapper-prefix=SignalIOSProto --proto-prefix=IOSProtos --proto-file=SignalIOS.proto

View File

@ -1,38 +0,0 @@
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
// iOS - since we use a modern proto-compiler, we must specify
// the legacy proto format.
syntax = "proto2";
package ProvisioningProtos;
option java_package = "org.whispersystems.signalservice.internal.push";
option java_outer_classname = "ProvisioningProtos";
message ProvisionEnvelope {
// @required
optional bytes publicKey = 1;
// @required
optional bytes body = 2; // Encrypted ProvisionMessage
}
message ProvisionMessage {
// @required
optional bytes identityKeyPublic = 1;
// @required
optional bytes identityKeyPrivate = 2;
// @required
optional string number = 3;
// @required
optional string provisioningCode = 4;
// @required
optional string userAgent = 5;
// @required
optional bytes profileKey = 6;
// @required
optional bool readReceipts = 7;
}

View File

@ -1,22 +0,0 @@
# SignalServiceKit Protobufs
These protobuf definitions are copied from Session-Android, but modified
to match some iOS conventions.
## Prequisites
Install Apple's `swift-protobuf` (*not* the similarly named `protobuf-swift`)
brew install swift-protobuf
This should install an up to date protobuf package as a dependency. Note that
since we use the legacy proto2 format, we need to specify this in our .proto
files.
syntax = "proto2";
## Building Protobuf
cd SignalServiceKit/protobuf
make

View File

@ -1,45 +0,0 @@
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
// iOS - since we use a modern proto-compiler, we must specify
// the legacy proto format.
syntax = "proto2";
// iOS - package name determines class prefix
package IOSProtos;
message BackupSnapshot {
message BackupEntity {
enum Type {
UNKNOWN = 0;
MIGRATION = 1;
THREAD = 2;
INTERACTION = 3;
ATTACHMENT = 4;
MISC = 5;
}
// @required
optional Type type = 1;
// @required
optional bytes entityData = 2;
// @required
optional string collection = 3;
// @required
optional string key = 4;
}
repeated BackupEntity entity = 1;
}
message DeviceName {
// @required
optional bytes ephemeralPublic = 1;
// @required
optional bytes syntheticIv = 2;
// @required
optional bytes ciphertext = 3;
}

View File

@ -1,475 +0,0 @@
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
// iOS - since we use a modern proto-compiler, we must specify
// the legacy proto format.
syntax = "proto2";
// iOS - package name determines class prefix
package SignalServiceProtos;
option java_package = "org.whispersystems.signalservice.internal.push";
option java_outer_classname = "SignalServiceProtos";
message Envelope {
enum Type {
UNKNOWN = 0;
CIPHERTEXT = 1;
KEY_EXCHANGE = 2;
PREKEY_BUNDLE = 3;
RECEIPT = 5;
UNIDENTIFIED_SENDER = 6;
CLOSED_GROUP_CIPHERTEXT = 7; // Loki
FALLBACK_MESSAGE = 101; // Loki: Encrypted using the fallback session cipher. Contains a pre key bundle if it's a session request.
}
// @required
optional Type type = 1;
optional string source = 2;
optional uint32 sourceDevice = 7;
optional string relay = 3;
// @required
optional uint64 timestamp = 5;
optional bytes legacyMessage = 6; // Contains an encrypted DataMessage
optional bytes content = 8; // Contains an encrypted Content
// We may eventually want to make this required.
optional string serverGuid = 9;
// We may eventually want to make this required.
optional uint64 serverTimestamp = 10;
}
message TypingMessage {
enum Action {
STARTED = 0;
STOPPED = 1;
}
// @required
optional uint64 timestamp = 1;
// @required
optional Action action = 2;
optional bytes groupId = 3;
}
message Content {
optional DataMessage dataMessage = 1;
optional SyncMessage syncMessage = 2;
optional CallMessage callMessage = 3;
optional NullMessage nullMessage = 4;
optional ReceiptMessage receiptMessage = 5;
optional TypingMessage typingMessage = 6;
optional PrekeyBundleMessage prekeyBundleMessage = 101; // Loki
optional LokiDeviceLinkMessage lokiDeviceLinkMessage = 103; // Loki
}
message PrekeyBundleMessage { // Loki
optional bytes identityKey = 1;
optional uint32 deviceID = 2;
optional uint32 prekeyID = 3;
optional uint32 signedKeyID = 4;
optional bytes prekey = 5;
optional bytes signedKey = 6;
optional bytes signature = 7;
}
message LokiDeviceLinkMessage { // Loki
optional string masterPublicKey = 1;
optional string slavePublicKey = 2;
optional bytes slaveSignature = 3;
optional bytes masterSignature = 4;
}
message CallMessage {
message Offer {
// @required
optional uint64 id = 1;
// Signal-iOS renamed the description field to avoid
// conflicts with [NSObject description].
// @required
optional string sessionDescription = 2;
}
message Answer {
// @required
optional uint64 id = 1;
// Signal-iOS renamed the description field to avoid
// conflicts with [NSObject description].
// @required
optional string sessionDescription = 2;
}
message IceUpdate {
// @required
optional uint64 id = 1;
// @required
optional string sdpMid = 2;
// @required
optional uint32 sdpMLineIndex = 3;
// @required
optional string sdp = 4;
}
message Busy {
// @required
optional uint64 id = 1;
}
message Hangup {
// @required
optional uint64 id = 1;
}
optional Offer offer = 1;
optional Answer answer = 2;
repeated IceUpdate iceUpdate = 3;
optional Hangup hangup = 4;
optional Busy busy = 5;
// Signal-iOS sends profile key with call messages
// for earlier discovery
optional bytes profileKey = 6;
}
message ClosedGroupCiphertextMessageWrapper {
// @required
optional bytes ciphertext = 1;
// @required
optional bytes ephemeralPublicKey = 2;
}
message DataMessage {
enum Flags {
END_SESSION = 1;
EXPIRATION_TIMER_UPDATE = 2;
PROFILE_KEY_UPDATE = 4;
UNLINK_DEVICE = 128;
}
message Quote {
message QuotedAttachment {
enum Flags {
VOICE_MESSAGE = 1;
}
optional string contentType = 1;
optional string fileName = 2;
optional AttachmentPointer thumbnail = 3;
optional uint32 flags = 4;
}
// @required
optional uint64 id = 1;
// @required
optional string author = 2;
optional string text = 3;
repeated QuotedAttachment attachments = 4;
}
message Contact {
message Name {
optional string givenName = 1;
optional string familyName = 2;
optional string prefix = 3;
optional string suffix = 4;
optional string middleName = 5;
optional string displayName = 6;
}
message Phone {
enum Type {
HOME = 1;
MOBILE = 2;
WORK = 3;
CUSTOM = 4;
}
optional string value = 1;
optional Type type = 2;
optional string label = 3;
}
message Email {
enum Type {
HOME = 1;
MOBILE = 2;
WORK = 3;
CUSTOM = 4;
}
optional string value = 1;
optional Type type = 2;
optional string label = 3;
}
message PostalAddress {
enum Type {
HOME = 1;
WORK = 2;
CUSTOM = 3;
}
optional Type type = 1;
optional string label = 2;
optional string street = 3;
optional string pobox = 4;
optional string neighborhood = 5;
optional string city = 6;
optional string region = 7;
optional string postcode = 8;
optional string country = 9;
}
message Avatar {
optional AttachmentPointer avatar = 1;
optional bool isProfile = 2;
}
optional Name name = 1;
repeated Phone number = 3;
repeated Email email = 4;
repeated PostalAddress address = 5;
optional Avatar avatar = 6;
optional string organization = 7;
}
message Preview {
// @required
optional string url = 1;
optional string title = 2;
optional AttachmentPointer image = 3;
}
message LokiProfile { // Loki
optional string displayName = 1;
optional string profilePicture = 2;
}
message ClosedGroupUpdate { // Loki
enum Type {
NEW = 0; // groupPublicKey, name, groupPrivateKey, senderKeys, members, admins
INFO = 1; // groupPublicKey, name, senderKeys, members, admins
SENDER_KEY_REQUEST = 2; // groupPublicKey
SENDER_KEY = 3; // groupPublicKey, senderKeys
}
message SenderKey {
// @required
optional bytes chainKey = 1;
// @required
optional uint32 keyIndex = 2;
// @required
optional bytes publicKey = 3;
}
optional string name = 1;
// @required
optional bytes groupPublicKey = 2;
optional bytes groupPrivateKey = 3;
repeated SenderKey senderKeys = 4;
repeated bytes members = 5;
repeated bytes admins = 6;
// @required
optional Type type = 7;
}
optional string body = 1;
repeated AttachmentPointer attachments = 2;
optional GroupContext group = 3;
optional uint32 flags = 4;
optional uint32 expireTimer = 5;
optional bytes profileKey = 6;
optional uint64 timestamp = 7;
optional Quote quote = 8;
repeated Contact contact = 9;
repeated Preview preview = 10;
optional LokiProfile profile = 101; // Loki: The current user's profile
optional ClosedGroupUpdate closedGroupUpdate = 103; // Loki
optional PublicChatInfo publicChatInfo = 999; // Loki: Internal public chat info
}
message NullMessage {
optional bytes padding = 1;
}
message ReceiptMessage {
enum Type {
DELIVERY = 0;
READ = 1;
}
// @required
optional Type type = 1;
repeated uint64 timestamp = 2;
}
message Verified {
enum State {
DEFAULT = 0;
VERIFIED = 1;
UNVERIFIED = 2;
}
// @required
optional string destination = 1;
optional bytes identityKey = 2;
optional State state = 3;
optional bytes nullMessage = 4;
}
message SyncMessage {
message Sent {
message UnidentifiedDeliveryStatus {
optional string destination = 1;
optional bool unidentified = 2;
}
optional string destination = 1;
optional uint64 timestamp = 2;
optional DataMessage message = 3;
optional uint64 expirationStartTimestamp = 4;
repeated UnidentifiedDeliveryStatus unidentifiedStatus = 5;
optional bool isRecipientUpdate = 6 [default = false];
}
message Contacts {
optional AttachmentPointer blob = 1;
// Signal-iOS renamed this property.
optional bool isComplete = 2 [default = false];
optional bytes data = 101; // Loki
}
message Groups {
optional AttachmentPointer blob = 1;
optional bytes data = 101; // Loki
}
message OpenGroupDetails { // Loki
// @required
optional string url = 1;
// @required
optional uint64 channelID = 2;
}
message Blocked {
repeated string numbers = 1;
repeated bytes groupIds = 2;
}
message Request {
enum Type {
UNKNOWN = 0;
CONTACTS = 1;
GROUPS = 2;
BLOCKED = 3;
CONFIGURATION = 4;
}
// @required
optional Type type = 1;
}
message Read {
// @required
optional string sender = 1;
// @required
optional uint64 timestamp = 2;
}
message Configuration {
optional bool readReceipts = 1;
optional bool unidentifiedDeliveryIndicators = 2;
optional bool typingIndicators = 3;
optional bool linkPreviews = 4;
}
optional Sent sent = 1;
optional Contacts contacts = 2;
optional Groups groups = 3;
optional Request request = 4;
repeated Read read = 5;
optional Blocked blocked = 6;
optional Verified verified = 7;
optional Configuration configuration = 9;
optional bytes padding = 8;
repeated OpenGroupDetails openGroups = 100;
}
message AttachmentPointer {
enum Flags {
VOICE_MESSAGE = 1;
}
// @required
optional fixed64 id = 1;
optional string contentType = 2;
optional bytes key = 3;
optional uint32 size = 4;
optional bytes thumbnail = 5;
optional bytes digest = 6;
optional string fileName = 7;
optional uint32 flags = 8;
optional uint32 width = 9;
optional uint32 height = 10;
optional string caption = 11;
optional string url = 101; // Loki
}
message GroupContext {
enum Type {
UNKNOWN = 0;
UPDATE = 1;
DELIVER = 2;
QUIT = 3;
REQUEST_INFO = 4;
}
// @required
optional bytes id = 1;
// @required
optional Type type = 2;
optional string name = 3;
repeated string members = 4;
optional AttachmentPointer avatar = 5;
repeated string admins = 6; // Loki
}
message ContactDetails {
message Avatar {
optional string contentType = 1;
optional uint32 length = 2;
}
// @required
optional string number = 1;
optional string name = 2;
optional Avatar avatar = 3;
optional string color = 4;
optional Verified verified = 5;
optional bytes profileKey = 6;
optional bool blocked = 7;
optional uint32 expireTimer = 8;
optional string nickname = 101; // Loki
}
message GroupDetails {
message Avatar {
optional string contentType = 1;
optional uint32 length = 2;
}
// @required
optional bytes id = 1;
optional string name = 2;
repeated string members = 3;
optional Avatar avatar = 4;
optional bool active = 5 [default = true];
optional uint32 expireTimer = 6;
optional string color = 7;
optional bool blocked = 8;
repeated string admins = 9; // Loki
}
// Internal - DO NOT SEND
message PublicChatInfo {
optional uint64 serverID = 1;
}

View File

@ -1,49 +0,0 @@
/**
* Copyright (C) 2014-2016 Open Whisper Systems
*
* Licensed according to the LICENSE file in this repository.
*/
// iOS - since we use a modern proto-compiler, we must specify
// the legacy proto format.
syntax = "proto2";
// iOS - package name determines class prefix
package WebSocketProtos;
option java_package = "org.whispersystems.signalservice.internal.websocket";
option java_outer_classname = "WebSocketProtos";
message WebSocketRequestMessage {
// @required
optional string verb = 1;
// @required
optional string path = 2;
optional bytes body = 3;
repeated string headers = 5;
// @required
optional uint64 requestId = 4;
}
message WebSocketResponseMessage {
// @required
optional uint64 requestId = 1;
// @required
optional uint32 status = 2;
optional string message = 3;
repeated string headers = 5;
optional bytes body = 4;
}
message WebSocketMessage {
enum Type {
UNKNOWN = 0;
REQUEST = 1;
RESPONSE = 2;
}
// @required
optional Type type = 1;
optional WebSocketRequestMessage request = 2;
optional WebSocketResponseMessage response = 3;
}

View File

@ -1,34 +0,0 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import Foundation
import PromiseKit
// TODO define actual type, and validate length
public typealias IdentityKey = Data
/// based on libsignal-service-java's AccountManager class
@objc(SSKAccountServiceClient)
public class AccountServiceClient: NSObject {
static var shared = AccountServiceClient()
private let serviceClient: SignalServiceClient
override init() {
self.serviceClient = SignalServiceRestClient()
}
public func getPreKeysCount() -> Promise<Int> {
return serviceClient.getAvailablePreKeys()
}
public func setPreKeys(identityKey: IdentityKey, signedPreKeyRecord: SignedPreKeyRecord, preKeyRecords: [PreKeyRecord]) -> Promise<Void> {
return serviceClient.registerPreKeys(identityKey: identityKey, signedPreKeyRecord: signedPreKeyRecord, preKeyRecords: preKeyRecords)
}
public func setSignedPreKey(_ signedPreKey: SignedPreKeyRecord) -> Promise<Void> {
return serviceClient.setCurrentSignedPreKey(signedPreKey)
}
}

View File

@ -1,57 +0,0 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import Foundation
import PromiseKit
@objc(SSKCreatePreKeysOperation)
public class CreatePreKeysOperation: OWSOperation {
private var accountServiceClient: AccountServiceClient {
return AccountServiceClient.shared
}
private var primaryStorage: OWSPrimaryStorage {
return OWSPrimaryStorage.shared()
}
private var identityKeyManager: OWSIdentityManager {
return OWSIdentityManager.shared()
}
public override func run() {
Logger.debug("")
if identityKeyManager.identityKeyPair() == nil {
identityKeyManager.generateNewIdentityKeyPair()
}
SessionManagementProtocol.createPreKeys()
reportSuccess()
/* Loki: Original code
* ================
let identityKey: Data = self.identityKeyManager.identityKeyPair()!.publicKey
let signedPreKeyRecord: SignedPreKeyRecord = self.primaryStorage.generateRandomSignedRecord()
let preKeyRecords: [PreKeyRecord] = self.primaryStorage.generatePreKeyRecords()
self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
self.primaryStorage.storePreKeyRecords(preKeyRecords)
firstly {
self.accountServiceClient.setPreKeys(identityKey: identityKey, signedPreKeyRecord: signedPreKeyRecord, preKeyRecords: preKeyRecords)
}.done {
signedPreKeyRecord.markAsAcceptedByService()
self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
self.primaryStorage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
Logger.debug("done")
self.reportSuccess()
}.catch { error in
self.reportError(error)
}.retainUntilComplete()
* ================
*/
}
}

View File

@ -1,105 +0,0 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import Foundation
import PromiseKit
// We generate 100 one-time prekeys at a time. We should replenish
// whenever ~2/3 of them have been consumed.
let kEphemeralPreKeysMinimumCount: UInt = 35
@objc(SSKRefreshPreKeysOperation)
public class RefreshPreKeysOperation: OWSOperation {
private var tsAccountManager: TSAccountManager {
return TSAccountManager.sharedInstance()
}
private var accountServiceClient: AccountServiceClient {
return AccountServiceClient.shared
}
private var primaryStorage: OWSPrimaryStorage {
return OWSPrimaryStorage.shared()
}
private var identityKeyManager: OWSIdentityManager {
return OWSIdentityManager.shared()
}
public override func run() {
Logger.debug("")
guard tsAccountManager.isRegistered() else {
Logger.debug("Skipping pre key refresh; user isn't registered.")
return
}
// Loki: Doing this on the global queue to match Signal
DispatchQueue.global().async {
SessionManagementProtocol.refreshSignedPreKey()
self.reportSuccess()
}
/* Loki: Original code
* ================
firstly {
self.accountServiceClient.getPreKeysCount()
}.then(on: DispatchQueue.global()) { preKeysCount -> Promise<Void> in
Logger.debug("preKeysCount: \(preKeysCount)")
guard preKeysCount < kEphemeralPreKeysMinimumCount || self.primaryStorage.currentSignedPrekeyId() == nil else {
Logger.debug("Available keys sufficient: \(preKeysCount)")
return Promise.value(())
}
let identityKey: Data = self.identityKeyManager.identityKeyPair()!.publicKey
let signedPreKeyRecord: SignedPreKeyRecord = self.primaryStorage.generateRandomSignedRecord()
let preKeyRecords: [PreKeyRecord] = self.primaryStorage.generatePreKeyRecords()
self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
self.primaryStorage.storePreKeyRecords(preKeyRecords)
return firstly {
self.accountServiceClient.setPreKeys(identityKey: identityKey, signedPreKeyRecord: signedPreKeyRecord, preKeyRecords: preKeyRecords)
}.done {
signedPreKeyRecord.markAsAcceptedByService()
self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
self.primaryStorage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
TSPreKeyManager.clearPreKeyUpdateFailureCount()
TSPreKeyManager.clearSignedPreKeyRecords()
}
}.done {
Logger.debug("done")
self.reportSuccess()
}.catch { error in
self.reportError(error)
}.retainUntilComplete()
* ================
*/
}
public override func didSucceed() {
TSPreKeyManager.refreshPreKeysDidSucceed()
}
override public func didFail(error: Error) {
switch error {
case let networkManagerError as NetworkManagerError:
guard !networkManagerError.isNetworkError else {
Logger.debug("Don't report SPK rotation failure w/ network error")
return
}
guard networkManagerError.statusCode >= 400 && networkManagerError.statusCode <= 599 else {
Logger.debug("Don't report SPK rotation failure w/ non application error")
return
}
TSPreKeyManager.incrementPreKeyUpdateFailureCount()
default:
Logger.debug("Don't report SPK rotation failure w/ non NetworkManager error: \(error)")
}
}
}

View File

@ -1,79 +0,0 @@
//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
import Foundation
import PromiseKit
@objc(SSKRotateSignedPreKeyOperation)
public class RotateSignedPreKeyOperation: OWSOperation {
private var tsAccountManager: TSAccountManager {
return TSAccountManager.sharedInstance()
}
private var accountServiceClient: AccountServiceClient {
return AccountServiceClient.shared
}
private var primaryStorage: OWSPrimaryStorage {
return OWSPrimaryStorage.shared()
}
public override func run() {
Logger.debug("")
guard tsAccountManager.isRegistered() else {
Logger.debug("skipping - not registered")
return
}
// Loki: Doing this on the global queue to match Signal
DispatchQueue.global().async {
SessionManagementProtocol.rotateSignedPreKey()
self.reportSuccess()
}
/* Loki: Original code
* ================
let signedPreKeyRecord: SignedPreKeyRecord = self.primaryStorage.generateRandomSignedRecord()
self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
firstly {
return self.accountServiceClient.setSignedPreKey(signedPreKeyRecord)
}.done(on: DispatchQueue.global()) {
Logger.info("Successfully uploaded signed PreKey")
signedPreKeyRecord.markAsAcceptedByService()
self.primaryStorage.storeSignedPreKey(signedPreKeyRecord.id, signedPreKeyRecord: signedPreKeyRecord)
self.primaryStorage.setCurrentSignedPrekeyId(signedPreKeyRecord.id)
TSPreKeyManager.clearPreKeyUpdateFailureCount()
TSPreKeyManager.clearSignedPreKeyRecords()
Logger.debug("done")
self.reportSuccess()
}.catch { error in
self.reportError(error)
}.retainUntilComplete()
* ================
*/
}
override public func didFail(error: Error) {
switch error {
case let networkManagerError as NetworkManagerError:
guard !networkManagerError.isNetworkError else {
Logger.debug("don't report SPK rotation failure w/ network error")
return
}
guard networkManagerError.statusCode >= 400 && networkManagerError.statusCode <= 599 else {
Logger.debug("don't report SPK rotation failure w/ non application error")
return
}
TSPreKeyManager.incrementPreKeyUpdateFailureCount()
default:
Logger.debug("don't report SPK rotation failure w/ non NetworkManager error: \(error)")
}
}
}

View File

@ -1,171 +0,0 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "TSConstants.h"
NS_ASSUME_NONNULL_BEGIN
extern NSString *const TSRegistrationErrorDomain;
extern NSString *const TSRegistrationErrorUserInfoHTTPStatus;
extern NSString *const RegistrationStateDidChangeNotification;
extern NSString *const kNSNotificationName_LocalNumberDidChange;
@class AnyPromise;
@class OWSPrimaryStorage;
@class TSNetworkManager;
@class YapDatabaseReadTransaction;
@class YapDatabaseReadWriteTransaction;
typedef NS_ENUM(NSUInteger, OWSRegistrationState) {
OWSRegistrationState_Unregistered,
OWSRegistrationState_PendingBackupRestore,
OWSRegistrationState_Registered,
OWSRegistrationState_Deregistered,
OWSRegistrationState_Reregistering,
};
@interface TSAccountManager : NSObject
@property (nonatomic, nullable) NSString *phoneNumberAwaitingVerification;
#pragma mark - Initializers
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)initWithPrimaryStorage:(OWSPrimaryStorage *)primaryStorage NS_DESIGNATED_INITIALIZER;
+ (instancetype)sharedInstance;
- (OWSRegistrationState)registrationState;
/**
* Returns if a user is registered or not
*
* @return registered or not
*/
- (BOOL)isRegistered;
- (BOOL)isRegisteredAndReady;
/**
* Returns current phone number for this device, which may not yet have been registered.
*
* @return E164 formatted phone number
*/
+ (nullable NSString *)localNumber;
- (nullable NSString *)localNumber;
// A variant of localNumber that never opens a "sneaky" transaction.
- (nullable NSString *)storedOrCachedLocalNumber:(YapDatabaseReadTransaction *)transaction;
/**
* Symmetric key that's used to encrypt message payloads from the server,
*
* @return signaling key
*/
+ (nullable NSString *)signalingKey;
- (nullable NSString *)signalingKey;
/**
* The server auth token allows the Signal client to connect to the Signal server
*
* @return server authentication token
*/
+ (nullable NSString *)serverAuthToken;
- (nullable NSString *)serverAuthToken;
/**
* The registration ID is unique to an installation of TextSecure, it allows to know if the app was reinstalled
*
* @return registrationID;
*/
+ (uint32_t)getOrGenerateRegistrationId:(YapDatabaseReadWriteTransaction *)transaction;
- (uint32_t)getOrGenerateRegistrationId;
- (uint32_t)getOrGenerateRegistrationId:(YapDatabaseReadWriteTransaction *)transaction;
#pragma mark - Register with phone number
- (void)registerWithPhoneNumber:(NSString *)phoneNumber
captchaToken:(nullable NSString *)captchaToken
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock
smsVerification:(BOOL)isSMS;
- (void)rerequestSMSWithCaptchaToken:(nullable NSString *)captchaToken
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock;
- (void)rerequestVoiceWithCaptchaToken:(nullable NSString *)captchaToken
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock;
- (void)verifyAccountWithCode:(NSString *)verificationCode
pin:(nullable NSString *)pin
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock;
// Called once registration is complete - meaning the following have succeeded:
// - obtained signal server credentials
// - uploaded pre-keys
// - uploaded push tokens
- (void)didRegister;
#if TARGET_OS_IPHONE
/**
* Register's the device's push notification token with the server
*
* @param pushToken Apple's Push Token
*/
- (void)registerForPushNotificationsWithPushToken:(NSString *)pushToken
voipToken:(NSString *)voipToken
isForcedUpdate:(BOOL)isForcedUpdate
success:(void (^)(void))successHandler
failure:(void (^)(NSError *error))failureHandler
NS_SWIFT_NAME(registerForPushNotifications(pushToken:voipToken:isForcedUpdate:success:failure:));
#endif
+ (void)unregisterTextSecureWithSuccess:(void (^)(void))success failure:(void (^)(NSError *error))failureBlock;
#pragma mark - De-Registration
// De-registration reflects whether or not the "last known contact"
// with the service was:
//
// * A 403 from the service, indicating de-registration.
// * A successful auth'd request _or_ websocket connection indicating
// valid registration.
- (BOOL)isDeregistered;
- (void)setIsDeregistered:(BOOL)isDeregistered;
- (BOOL)hasPendingBackupRestoreDecision;
- (void)setHasPendingBackupRestoreDecision:(BOOL)value;
#pragma mark - Re-registration
// Re-registration is the process of re-registering _with the same phone number_.
// Returns YES on success.
- (BOOL)resetForReregistration;
- (nullable NSString *)reregisterationPhoneNumber;
- (BOOL)isReregistering;
#pragma mark - Manual Message Fetch
- (BOOL)isManualMessageFetchEnabled;
- (AnyPromise *)setIsManualMessageFetchEnabled:(BOOL)value __attribute__((warn_unused_result));
#ifdef DEBUG
- (void)registerForTestsWithLocalNumber:(NSString *)localNumber;
#endif
- (AnyPromise *)updateAccountAttributes __attribute__((warn_unused_result));
// This should only be used during the registration process.
- (AnyPromise *)performUpdateAccountAttributes __attribute__((warn_unused_result));
@end
NS_ASSUME_NONNULL_END

View File

@ -1,776 +0,0 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "TSAccountManager.h"
#import "AppContext.h"
#import "AppReadiness.h"
#import "NSNotificationCenter+OWS.h"
#import "NSURLSessionDataTask+StatusCode.h"
#import "OWSError.h"
#import "OWSPrimaryStorage+SessionStore.h"
#import "OWSRequestFactory.h"
#import "ProfileManagerProtocol.h"
#import "SSKEnvironment.h"
#import "TSNetworkManager.h"
#import "TSPreKeyManager.h"
#import "YapDatabaseConnection+OWS.h"
#import "YapDatabaseTransaction+OWS.h"
#import <PromiseKit/AnyPromise.h>
#import <Reachability/Reachability.h>
#import <SessionCoreKit/NSData+OWS.h>
#import <SessionCoreKit/Randomness.h>
#import <SessionServiceKit/SessionServiceKit-Swift.h>
#import <YapDatabase/YapDatabase.h>
NS_ASSUME_NONNULL_BEGIN
NSString *const TSRegistrationErrorDomain = @"TSRegistrationErrorDomain";
NSString *const TSRegistrationErrorUserInfoHTTPStatus = @"TSHTTPStatus";
NSString *const RegistrationStateDidChangeNotification = @"RegistrationStateDidChangeNotification";
NSString *const kNSNotificationName_LocalNumberDidChange = @"kNSNotificationName_LocalNumberDidChange";
NSString *const TSAccountManager_RegisteredNumberKey = @"TSStorageRegisteredNumberKey";
NSString *const TSAccountManager_IsDeregisteredKey = @"TSAccountManager_IsDeregisteredKey";
NSString *const TSAccountManager_ReregisteringPhoneNumberKey = @"TSAccountManager_ReregisteringPhoneNumberKey";
NSString *const TSAccountManager_LocalRegistrationIdKey = @"TSStorageLocalRegistrationId";
NSString *const TSAccountManager_HasPendingRestoreDecisionKey = @"TSAccountManager_HasPendingRestoreDecisionKey";
NSString *const TSAccountManager_UserAccountCollection = @"TSStorageUserAccountCollection";
NSString *const TSAccountManager_ServerAuthToken = @"TSStorageServerAuthToken";
NSString *const TSAccountManager_ServerSignalingKey = @"TSStorageServerSignalingKey";
NSString *const TSAccountManager_ManualMessageFetchKey = @"TSAccountManager_ManualMessageFetchKey";
NSString *const TSAccountManager_NeedsAccountAttributesUpdateKey = @"TSAccountManager_NeedsAccountAttributesUpdateKey";
@interface TSAccountManager ()
@property (atomic, readonly) BOOL isRegistered;
@property (nonatomic, nullable) NSString *cachedLocalNumber;
@property (nonatomic, readonly) YapDatabaseConnection *dbConnection;
@property (nonatomic, nullable) NSNumber *cachedIsDeregistered;
@property (nonatomic) Reachability *reachability;
@end
#pragma mark -
@implementation TSAccountManager
@synthesize isRegistered = _isRegistered;
- (instancetype)initWithPrimaryStorage:(OWSPrimaryStorage *)primaryStorage
{
self = [super init];
if (!self) {
return self;
}
_dbConnection = [primaryStorage newDatabaseConnection];
self.reachability = [Reachability reachabilityForInternetConnection];
OWSSingletonAssert();
if (!CurrentAppContext().isMainApp) {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(yapDatabaseModifiedExternally:)
name:YapDatabaseModifiedExternallyNotification
object:nil];
}
[AppReadiness runNowOrWhenAppDidBecomeReady:^{
[[self updateAccountAttributesIfNecessary] retainUntilComplete];
}];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reachabilityChanged)
name:kReachabilityChangedNotification
object:nil];
return self;
}
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
+ (instancetype)sharedInstance
{
OWSAssertDebug(SSKEnvironment.shared.tsAccountManager);
return SSKEnvironment.shared.tsAccountManager;
}
#pragma mark - Dependencies
- (TSNetworkManager *)networkManager
{
OWSAssertDebug(SSKEnvironment.shared.networkManager);
return SSKEnvironment.shared.networkManager;
}
- (id<ProfileManagerProtocol>)profileManager {
OWSAssertDebug(SSKEnvironment.shared.profileManager);
return SSKEnvironment.shared.profileManager;
}
#pragma mark -
- (void)setPhoneNumberAwaitingVerification:(NSString *_Nullable)phoneNumberAwaitingVerification
{
_phoneNumberAwaitingVerification = phoneNumberAwaitingVerification;
[[NSNotificationCenter defaultCenter] postNotificationNameAsync:kNSNotificationName_LocalNumberDidChange
object:nil
userInfo:nil];
}
- (OWSRegistrationState)registrationState
{
if (!self.isRegistered) {
return OWSRegistrationState_Unregistered;
} else if (self.isDeregistered) {
if (self.isReregistering) {
return OWSRegistrationState_Reregistering;
} else {
return OWSRegistrationState_Deregistered;
}
} else if (self.isDeregistered) {
return OWSRegistrationState_PendingBackupRestore;
} else {
return OWSRegistrationState_Registered;
}
}
- (BOOL)isRegistered
{
@synchronized (self) {
if (_isRegistered) {
return YES;
} else {
// Cache this once it's true since it's called alot, involves a dbLookup, and once set - it doesn't change.
_isRegistered = [self storedLocalNumber] != nil;
}
return _isRegistered;
}
}
- (BOOL)isRegisteredAndReady
{
return self.registrationState == OWSRegistrationState_Registered;
}
- (void)didRegister
{
OWSLogInfo(@"didRegister");
NSString *phoneNumber = self.phoneNumberAwaitingVerification;
if (!phoneNumber) {
OWSFail(@"phoneNumber was unexpectedly nil");
}
[self storeLocalNumber:phoneNumber];
// Warm these cached values.
[self isRegistered];
[self localNumber];
[self isDeregistered];
[self postRegistrationStateDidChangeNotification];
}
+ (nullable NSString *)localNumber
{
return [[self sharedInstance] localNumber];
}
- (nullable NSString *)localNumber
{
NSString *awaitingVerif = self.phoneNumberAwaitingVerification;
if (awaitingVerif) {
return awaitingVerif;
}
// Cache this since we access this a lot, and once set it will not change.
@synchronized(self)
{
if (self.cachedLocalNumber == nil) {
self.cachedLocalNumber = self.storedLocalNumber;
}
}
return self.cachedLocalNumber;
}
- (nullable NSString *)storedLocalNumber
{
@synchronized (self) {
return [self.dbConnection stringForKey:TSAccountManager_RegisteredNumberKey
inCollection:TSAccountManager_UserAccountCollection];
}
}
- (nullable NSString *)storedOrCachedLocalNumber:(YapDatabaseReadTransaction *)transaction
{
@synchronized(self) {
if (self.cachedLocalNumber) {
return self.cachedLocalNumber;
}
}
return [transaction stringForKey:TSAccountManager_RegisteredNumberKey
inCollection:TSAccountManager_UserAccountCollection];
}
- (void)storeLocalNumber:(NSString *)localNumber
{
@synchronized (self) {
[self.dbConnection setObject:localNumber
forKey:TSAccountManager_RegisteredNumberKey
inCollection:TSAccountManager_UserAccountCollection];
[self.dbConnection removeObjectForKey:TSAccountManager_ReregisteringPhoneNumberKey
inCollection:TSAccountManager_UserAccountCollection];
self.phoneNumberAwaitingVerification = nil;
self.cachedLocalNumber = localNumber;
}
}
+ (uint32_t)getOrGenerateRegistrationId:(YapDatabaseReadWriteTransaction *)transaction
{
return [[self sharedInstance] getOrGenerateRegistrationId:transaction];
}
- (uint32_t)getOrGenerateRegistrationId
{
__block uint32_t result;
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *_Nonnull transaction) {
result = [self getOrGenerateRegistrationId:transaction];
}];
return result;
}
- (uint32_t)getOrGenerateRegistrationId:(YapDatabaseReadWriteTransaction *)transaction
{
// Unlike other methods in this class, there's no need for a `@synchronized` block
// here, since we're already in a write transaction, and all writes occur on a serial queue.
//
// Since other code in this class which uses @synchronized(self) also needs to open write
// transaction, using @synchronized(self) here, inside of a WriteTransaction risks deadlock.
uint32_t registrationID = [[transaction objectForKey:TSAccountManager_LocalRegistrationIdKey
inCollection:TSAccountManager_UserAccountCollection] unsignedIntValue];
if (registrationID == 0) {
registrationID = (uint32_t)arc4random_uniform(16380) + 1;
OWSLogWarn(@"Generated a new registrationID: %u", registrationID);
[transaction setObject:[NSNumber numberWithUnsignedInteger:registrationID]
forKey:TSAccountManager_LocalRegistrationIdKey
inCollection:TSAccountManager_UserAccountCollection];
}
return registrationID;
}
- (void)registerForPushNotificationsWithPushToken:(NSString *)pushToken
voipToken:(NSString *)voipToken
isForcedUpdate:(BOOL)isForcedUpdate
success:(void (^)(void))successHandler
failure:(void (^)(NSError *))failureHandler
{
[self registerForPushNotificationsWithPushToken:pushToken
voipToken:voipToken
isForcedUpdate:isForcedUpdate
success:successHandler
failure:failureHandler
remainingRetries:3];
}
- (void)registerForPushNotificationsWithPushToken:(NSString *)pushToken
voipToken:(NSString *)voipToken
isForcedUpdate:(BOOL)isForcedUpdate
success:(void (^)(void))successHandler
failure:(void (^)(NSError *))failureHandler
remainingRetries:(int)remainingRetries
{
BOOL isUsingFullAPNs = [NSUserDefaults.standardUserDefaults boolForKey:@"isUsingFullAPNs"];
NSData *pushTokenAsData = [NSData dataFromHexString:pushToken];
AnyPromise *promise = isUsingFullAPNs ? [LKPushNotificationManager registerWithToken:pushTokenAsData hexEncodedPublicKey:self.localNumber isForcedUpdate:isForcedUpdate]
: [LKPushNotificationManager unregisterWithToken:pushTokenAsData isForcedUpdate:isForcedUpdate];
promise
.then(^() {
successHandler();
})
.catch(^(NSError *error) {
if (remainingRetries > 0) {
[self registerForPushNotificationsWithPushToken:pushToken voipToken:voipToken isForcedUpdate:isForcedUpdate success:successHandler failure:failureHandler
remainingRetries:remainingRetries - 1];
} else {
if (!IsNSErrorNetworkFailure(error)) {
OWSProdError([OWSAnalyticsEvents accountsErrorRegisterPushTokensFailed]);
}
failureHandler(error);
}
});
}
- (void)registerWithPhoneNumber:(NSString *)phoneNumber
captchaToken:(nullable NSString *)captchaToken
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock
smsVerification:(BOOL)isSMS
{
if ([self isRegistered]) {
failureBlock([NSError errorWithDomain:@"tsaccountmanager.verify" code:4000 userInfo:nil]);
return;
}
// The country code of TSAccountManager.phoneNumberAwaitingVerification is used to
// determine whether or not to use domain fronting, so it needs to be set _before_
// we make our verification code request.
self.phoneNumberAwaitingVerification = phoneNumber;
TSRequest *request =
[OWSRequestFactory requestVerificationCodeRequestWithPhoneNumber:phoneNumber
captchaToken:captchaToken
transport:(isSMS ? TSVerificationTransportSMS
: TSVerificationTransportVoice)];
[[TSNetworkManager sharedManager] makeRequest:request
success:^(NSURLSessionDataTask *task, id responseObject) {
OWSLogInfo(@"Successfully requested verification code request for number: %@ method:%@",
phoneNumber,
isSMS ? @"SMS" : @"Voice");
successBlock();
}
failure:^(NSURLSessionDataTask *task, NSError *error) {
if (!IsNSErrorNetworkFailure(error)) {
OWSProdError([OWSAnalyticsEvents accountsErrorVerificationCodeRequestFailed]);
}
OWSLogError(@"Failed to request verification code request with error:%@", error);
failureBlock(error);
}];
}
- (void)rerequestSMSWithCaptchaToken:(nullable NSString *)captchaToken
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock
{
// TODO: Can we remove phoneNumberAwaitingVerification?
NSString *number = self.phoneNumberAwaitingVerification;
OWSAssertDebug(number);
[self registerWithPhoneNumber:number
captchaToken:captchaToken
success:successBlock
failure:failureBlock
smsVerification:YES];
}
- (void)rerequestVoiceWithCaptchaToken:(nullable NSString *)captchaToken
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock
{
NSString *number = self.phoneNumberAwaitingVerification;
OWSAssertDebug(number);
[self registerWithPhoneNumber:number
captchaToken:captchaToken
success:successBlock
failure:failureBlock
smsVerification:NO];
}
- (void)verifyAccountWithCode:(NSString *)verificationCode
pin:(nullable NSString *)pin
success:(void (^)(void))successBlock
failure:(void (^)(NSError *error))failureBlock
{
NSString *authToken = [[self class] generateNewAccountAuthenticationToken];
NSString *phoneNumber = self.phoneNumberAwaitingVerification;
OWSAssertDebug(authToken);
OWSAssertDebug(phoneNumber);
TSRequest *request = [OWSRequestFactory verifyCodeRequestWithVerificationCode:verificationCode
forNumber:phoneNumber
pin:pin
authKey:authToken];
[self.networkManager makeRequest:request
success:^(NSURLSessionDataTask *task, id responseObject) {
NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response;
long statuscode = response.statusCode;
switch (statuscode) {
case 200:
case 204: {
OWSLogInfo(@"Verification code accepted.");
[self storeServerAuthToken:authToken];
[[[SignalServiceRestClient new] updateAccountAttributesObjC]
.thenInBackground(^{
return [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) {
[TSPreKeyManager
createPreKeysWithSuccess:^{
resolve(@(1));
}
failure:^(NSError *error) {
resolve(error);
}];
}];
})
.then(^{
[self.profileManager fetchLocalUsersProfile];
})
.then(^{
successBlock();
})
.catchInBackground(^(NSError *error) {
OWSLogError(@"Error: %@", error);
failureBlock(error);
}) retainUntilComplete];
break;
}
default: {
OWSLogError(@"Unexpected status while verifying code: %ld", statuscode);
NSError *error = OWSErrorMakeUnableToProcessServerResponseError();
failureBlock(error);
break;
}
}
}
failure:^(NSURLSessionDataTask *task, NSError *error) {
if (!IsNSErrorNetworkFailure(error)) {
OWSProdError([OWSAnalyticsEvents accountsErrorVerifyAccountRequestFailed]);
}
OWSAssertDebug([error.domain isEqualToString:TSNetworkManagerErrorDomain]);
OWSLogWarn(@"Error verifying code: %@", error.debugDescription);
switch (error.code) {
case 403: {
NSError *userError = OWSErrorWithCodeDescription(OWSErrorCodeUserError,
NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_CODE_DESCRIPTION",
"Error message indicating that registration failed due to a missing or incorrect "
"verification code."));
failureBlock(userError);
break;
}
case 413: {
// In the case of the "rate limiting" error, we want to show the
// "recovery suggestion", not the error's "description."
NSError *userError
= OWSErrorWithCodeDescription(OWSErrorCodeUserError, error.localizedRecoverySuggestion);
failureBlock(userError);
break;
}
case 423: {
NSString *localizedMessage = NSLocalizedString(@"REGISTRATION_VERIFICATION_FAILED_WRONG_PIN",
"Error message indicating that registration failed due to a missing or incorrect 2FA PIN.");
OWSLogError(@"2FA PIN required: %ld", (long)error.code);
NSError *error
= OWSErrorWithCodeDescription(OWSErrorCodeRegistrationMissing2FAPIN, localizedMessage);
failureBlock(error);
break;
}
default: {
OWSLogError(@"verifying code failed with unknown error: %@", error);
failureBlock(error);
break;
}
}
}];
}
#pragma mark Server keying material
+ (NSString *)generateNewAccountAuthenticationToken {
NSData *authToken = [Randomness generateRandomBytes:16];
NSString *authTokenPrint = [[NSData dataWithData:authToken] hexadecimalString];
return authTokenPrint;
}
+ (nullable NSString *)signalingKey
{
return [[self sharedInstance] signalingKey];
}
- (nullable NSString *)signalingKey
{
return [self.dbConnection stringForKey:TSAccountManager_ServerSignalingKey
inCollection:TSAccountManager_UserAccountCollection];
}
+ (nullable NSString *)serverAuthToken
{
return [[self sharedInstance] serverAuthToken];
}
- (nullable NSString *)serverAuthToken
{
return [self.dbConnection stringForKey:TSAccountManager_ServerAuthToken
inCollection:TSAccountManager_UserAccountCollection];
}
- (void)storeServerAuthToken:(NSString *)authToken
{
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[transaction setObject:authToken
forKey:TSAccountManager_ServerAuthToken
inCollection:TSAccountManager_UserAccountCollection];
}];
}
+ (void)unregisterTextSecureWithSuccess:(void (^)(void))success failure:(void (^)(NSError *error))failureBlock
{
TSRequest *request = [OWSRequestFactory unregisterAccountRequest];
[[TSNetworkManager sharedManager] makeRequest:request
success:^(NSURLSessionDataTask *task, id responseObject) {
OWSLogInfo(@"Successfully unregistered");
success();
// This is called from `[AppSettingsViewController proceedToUnregistration]` whose
// success handler calls `[Environment resetAppData]`.
// This method, after calling that success handler, fires
// `RegistrationStateDidChangeNotification` which is only safe to fire after
// the data store is reset.
[self.sharedInstance postRegistrationStateDidChangeNotification];
}
failure:^(NSURLSessionDataTask *task, NSError *error) {
if (!IsNSErrorNetworkFailure(error)) {
OWSProdError([OWSAnalyticsEvents accountsErrorUnregisterAccountRequestFailed]);
}
OWSLogError(@"Failed to unregister with error: %@", error);
failureBlock(error);
}];
}
- (void)yapDatabaseModifiedExternally:(NSNotification *)notification
{
OWSAssertIsOnMainThread();
OWSLogVerbose(@"");
// Any database write by the main app might reflect a deregistration,
// so clear the cached "is registered" state. This will significantly
// erode the value of this cache in the SAE.
@synchronized(self)
{
_isRegistered = NO;
}
}
#pragma mark - De-Registration
- (BOOL)isDeregistered
{
// Cache this since we access this a lot, and once set it will not change.
@synchronized(self) {
if (self.cachedIsDeregistered == nil) {
self.cachedIsDeregistered = @([self.dbConnection boolForKey:TSAccountManager_IsDeregisteredKey
inCollection:TSAccountManager_UserAccountCollection
defaultValue:NO]);
}
OWSAssertDebug(self.cachedIsDeregistered);
return self.cachedIsDeregistered.boolValue;
}
}
- (void)setIsDeregistered:(BOOL)isDeregistered
{
@synchronized(self) {
if (self.cachedIsDeregistered && self.cachedIsDeregistered.boolValue == isDeregistered) {
return;
}
OWSLogWarn(@"isDeregistered: %d", isDeregistered);
self.cachedIsDeregistered = @(isDeregistered);
}
[LKStorage writeWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[transaction setObject:@(isDeregistered)
forKey:TSAccountManager_IsDeregisteredKey
inCollection:TSAccountManager_UserAccountCollection];
}];
[self postRegistrationStateDidChangeNotification];
}
#pragma mark - Re-registration
- (BOOL)resetForReregistration
{
@synchronized(self) {
NSString *_Nullable localNumber = self.localNumber;
if (!localNumber) {
OWSFailDebug(@"can't re-register without valid local number.");
return NO;
}
_isRegistered = NO;
_cachedLocalNumber = nil;
_phoneNumberAwaitingVerification = nil;
_cachedIsDeregistered = nil;
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
[transaction removeAllObjectsInCollection:TSAccountManager_UserAccountCollection];
[[OWSPrimaryStorage sharedManager] resetSessionStore:transaction];
[transaction setObject:localNumber
forKey:TSAccountManager_ReregisteringPhoneNumberKey
inCollection:TSAccountManager_UserAccountCollection];
}];
[self postRegistrationStateDidChangeNotification];
return YES;
}
}
- (nullable NSString *)reregisterationPhoneNumber
{
OWSAssertDebug([self isReregistering]);
NSString *_Nullable result = [self.dbConnection stringForKey:TSAccountManager_ReregisteringPhoneNumberKey
inCollection:TSAccountManager_UserAccountCollection];
OWSAssertDebug(result);
return result;
}
- (BOOL)isReregistering
{
return nil !=
[self.dbConnection stringForKey:TSAccountManager_ReregisteringPhoneNumberKey
inCollection:TSAccountManager_UserAccountCollection];
}
- (BOOL)hasPendingBackupRestoreDecision
{
return [self.dbConnection boolForKey:TSAccountManager_HasPendingRestoreDecisionKey
inCollection:TSAccountManager_UserAccountCollection
defaultValue:NO];
}
- (void)setHasPendingBackupRestoreDecision:(BOOL)value
{
OWSLogInfo(@"%d", value);
[self.dbConnection setBool:value
forKey:TSAccountManager_HasPendingRestoreDecisionKey
inCollection:TSAccountManager_UserAccountCollection];
[self postRegistrationStateDidChangeNotification];
}
- (BOOL)isManualMessageFetchEnabled
{
return [self.dbConnection boolForKey:TSAccountManager_ManualMessageFetchKey
inCollection:TSAccountManager_UserAccountCollection
defaultValue:NO];
}
- (AnyPromise *)setIsManualMessageFetchEnabled:(BOOL)value {
[self.dbConnection setBool:value
forKey:TSAccountManager_ManualMessageFetchKey
inCollection:TSAccountManager_UserAccountCollection];
// Try to update the account attributes to reflect this change.
return [self updateAccountAttributes];
}
- (void)registerForTestsWithLocalNumber:(NSString *)localNumber
{
OWSAssertDebug(localNumber.length > 0);
[self storeLocalNumber:localNumber];
}
#pragma mark - Account Attributes
- (AnyPromise *)updateAccountAttributes {
// Enqueue a "account attribute update", recording the "request time".
[self.dbConnection setObject:[NSDate new]
forKey:TSAccountManager_NeedsAccountAttributesUpdateKey
inCollection:TSAccountManager_UserAccountCollection];
return [self updateAccountAttributesIfNecessary];
}
- (AnyPromise *)updateAccountAttributesIfNecessary {
if (!self.isRegistered) {
return [AnyPromise promiseWithValue:@(1)];
}
return [AnyPromise promiseWithValue:@(1)];
NSDate *_Nullable updateRequestDate =
[self.dbConnection objectForKey:TSAccountManager_NeedsAccountAttributesUpdateKey
inCollection:TSAccountManager_UserAccountCollection];
if (!updateRequestDate) {
return [AnyPromise promiseWithValue:@(1)];
}
AnyPromise *promise = [self performUpdateAccountAttributes];
promise = promise.then(^(id value) {
[LKStorage writeSyncWithBlock:^(YapDatabaseReadWriteTransaction *transaction) {
// Clear the update request unless a new update has been requested
// while this update was in flight.
NSDate *_Nullable latestUpdateRequestDate =
[transaction objectForKey:TSAccountManager_NeedsAccountAttributesUpdateKey
inCollection:TSAccountManager_UserAccountCollection];
if (latestUpdateRequestDate && [latestUpdateRequestDate isEqual:updateRequestDate]) {
[transaction removeObjectForKey:TSAccountManager_NeedsAccountAttributesUpdateKey
inCollection:TSAccountManager_UserAccountCollection];
}
}];
});
return promise;
}
- (AnyPromise *)performUpdateAccountAttributes
{
AnyPromise *promise = [[SignalServiceRestClient new] updateAccountAttributesObjC];
promise = promise.then(^(id value) {
// Fetch the local profile, as we may have changed its
// account attributes. Specifically, we need to determine
// if all devices for our account now support UD for sync
// messages.
[self.profileManager fetchLocalUsersProfile];
});
[promise retainUntilComplete];
return promise;
}
- (void)reachabilityChanged {
OWSAssertIsOnMainThread();
[AppReadiness runNowOrWhenAppDidBecomeReady:^{
[[self updateAccountAttributesIfNecessary] retainUntilComplete];
}];
}
#pragma mark - Notifications
- (void)postRegistrationStateDidChangeNotification
{
OWSAssertIsOnMainThread();
[[NSNotificationCenter defaultCenter] postNotificationNameAsync:RegistrationStateDidChangeNotification
object:nil
userInfo:nil];
}
@end
NS_ASSUME_NONNULL_END

View File

@ -1,36 +0,0 @@
//
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
//
#import "TSAccountManager.h"
NS_ASSUME_NONNULL_BEGIN
@interface TSPreKeyManager : NSObject
#pragma mark - State Tracking
+ (BOOL)isAppLockedDueToPreKeyUpdateFailures;
+ (void)incrementPreKeyUpdateFailureCount;
+ (void)clearPreKeyUpdateFailureCount;
+ (void)clearSignedPreKeyRecords;
// This should only be called from the TSPreKeyManager.operationQueue
+ (void)refreshPreKeysDidSucceed;
#pragma mark - Check/Request Initiation
+ (void)rotateSignedPreKeyWithSuccess:(void (^)(void))successHandler failure:(void (^)(NSError *error))failureHandler;
+ (void)createPreKeysWithSuccess:(void (^)(void))successHandler failure:(void (^)(NSError *error))failureHandler;
+ (void)checkPreKeys;
+ (void)checkPreKeysIfNecessary;
@end
NS_ASSUME_NONNULL_END

Some files were not shown because too many files have changed in this diff Show More