From f3753abe5a39b15f567a7f7737b79fdcde52fe5e Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Thu, 5 Nov 2020 12:15:57 +1100 Subject: [PATCH] Create SessionUtilities framework --- Podfile | 4 + Podfile.lock | 2 +- Pods | 2 +- .../Array+Utilities.swift | 2 +- .../Dictionary+Utilities.swift | 2 +- .../HTTP.swift | 0 .../Utilities => SessionUtilities}/JSON.swift | 0 .../Logging.swift | 2 +- SessionUtilities/Meta/Info.plist | 22 ++ SessionUtilities/Meta/SessionUtilities.h | 4 + .../Promise+Retrying.swift | 2 +- Signal.xcodeproj/project.pbxproj | 272 +++++++++++++++++- 12 files changed, 302 insertions(+), 12 deletions(-) rename {SessionSnodeKit/Utilities => SessionUtilities}/Array+Utilities.swift (65%) rename {SessionSnodeKit/Utilities => SessionUtilities}/Dictionary+Utilities.swift (93%) rename {SessionSnodeKit => SessionUtilities}/HTTP.swift (100%) rename {SessionSnodeKit/Utilities => SessionUtilities}/JSON.swift (100%) rename {SessionSnodeKit/Utilities => SessionUtilities}/Logging.swift (60%) create mode 100644 SessionUtilities/Meta/Info.plist create mode 100644 SessionUtilities/Meta/SessionUtilities.h rename {SessionSnodeKit/Utilities => SessionUtilities}/Promise+Retrying.swift (74%) diff --git a/Podfile b/Podfile index feb466143..3651be0cf 100644 --- a/Podfile +++ b/Podfile @@ -111,6 +111,10 @@ target 'SessionSnodeKit' do pod 'PromiseKit', :inhibit_warnings => true end +target 'SessionUtilities' do + pod 'PromiseKit', :inhibit_warnings => true +end + post_install do |installer| enable_whole_module_optimization_for_cryptoswift(installer) enable_extension_support_for_purelayout(installer) diff --git a/Podfile.lock b/Podfile.lock index 1169e7a5d..d9228c849 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -339,6 +339,6 @@ SPEC CHECKSUMS: YYImage: 6db68da66f20d9f169ceb94dfb9947c3867b9665 ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb -PODFILE CHECKSUM: a046210e9d91429c33c0fa60f7ff0362c6994f5d +PODFILE CHECKSUM: e8671ed81c428a09caab11eefca532686e4a01b3 COCOAPODS: 1.10.0.rc.1 diff --git a/Pods b/Pods index 5ba5f8d5a..3d20a90a1 160000 --- a/Pods +++ b/Pods @@ -1 +1 @@ -Subproject commit 5ba5f8d5a001bbf4d925ef0f246bf402e03b097d +Subproject commit 3d20a90a166ee56a06ce02e6f1fbffb2f4965406 diff --git a/SessionSnodeKit/Utilities/Array+Utilities.swift b/SessionUtilities/Array+Utilities.swift similarity index 65% rename from SessionSnodeKit/Utilities/Array+Utilities.swift rename to SessionUtilities/Array+Utilities.swift index 0fd78ba49..6ac99240a 100644 --- a/SessionSnodeKit/Utilities/Array+Utilities.swift +++ b/SessionUtilities/Array+Utilities.swift @@ -1,5 +1,5 @@ -internal extension Array where Element : CustomStringConvertible { +public extension Array where Element : CustomStringConvertible { var prettifiedDescription: String { return "[ " + map { $0.description }.joined(separator: ", ") + " ]" diff --git a/SessionSnodeKit/Utilities/Dictionary+Utilities.swift b/SessionUtilities/Dictionary+Utilities.swift similarity index 93% rename from SessionSnodeKit/Utilities/Dictionary+Utilities.swift rename to SessionUtilities/Dictionary+Utilities.swift index 18c407b4d..f402736ac 100644 --- a/SessionSnodeKit/Utilities/Dictionary+Utilities.swift +++ b/SessionUtilities/Dictionary+Utilities.swift @@ -1,5 +1,5 @@ -internal extension Dictionary { +public extension Dictionary { var prettifiedDescription: String { return "[ " + map { key, value in diff --git a/SessionSnodeKit/HTTP.swift b/SessionUtilities/HTTP.swift similarity index 100% rename from SessionSnodeKit/HTTP.swift rename to SessionUtilities/HTTP.swift diff --git a/SessionSnodeKit/Utilities/JSON.swift b/SessionUtilities/JSON.swift similarity index 100% rename from SessionSnodeKit/Utilities/JSON.swift rename to SessionUtilities/JSON.swift diff --git a/SessionSnodeKit/Utilities/Logging.swift b/SessionUtilities/Logging.swift similarity index 60% rename from SessionSnodeKit/Utilities/Logging.swift rename to SessionUtilities/Logging.swift index 20d7d9d58..7cccb8a25 100644 --- a/SessionSnodeKit/Utilities/Logging.swift +++ b/SessionUtilities/Logging.swift @@ -1,5 +1,5 @@ -internal func SNLog(_ message: String) { +public func SNLog(_ message: String) { #if DEBUG print("[Session] \(message)") #endif diff --git a/SessionUtilities/Meta/Info.plist b/SessionUtilities/Meta/Info.plist new file mode 100644 index 000000000..9bcb24442 --- /dev/null +++ b/SessionUtilities/Meta/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/SessionUtilities/Meta/SessionUtilities.h b/SessionUtilities/Meta/SessionUtilities.h new file mode 100644 index 000000000..7fc2ab866 --- /dev/null +++ b/SessionUtilities/Meta/SessionUtilities.h @@ -0,0 +1,4 @@ +#import + +FOUNDATION_EXPORT double SessionUtilitiesVersionNumber; +FOUNDATION_EXPORT const unsigned char SessionUtilitiesVersionString[]; diff --git a/SessionSnodeKit/Utilities/Promise+Retrying.swift b/SessionUtilities/Promise+Retrying.swift similarity index 74% rename from SessionSnodeKit/Utilities/Promise+Retrying.swift rename to SessionUtilities/Promise+Retrying.swift index a386b23fd..acf707586 100644 --- a/SessionSnodeKit/Utilities/Promise+Retrying.swift +++ b/SessionUtilities/Promise+Retrying.swift @@ -1,7 +1,7 @@ import PromiseKit /// Retry the promise constructed in `body` up to `maxRetryCount` times. -internal func attempt(maxRetryCount: UInt, recoveringOn queue: DispatchQueue, body: @escaping () -> Promise) -> Promise { +public func attempt(maxRetryCount: UInt, recoveringOn queue: DispatchQueue, body: @escaping () -> Promise) -> Promise { var retryCount = 0 func attempt() -> Promise { return body().recover(on: queue) { error -> Promise in diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 912550e43..73afe1f61 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -469,6 +469,7 @@ 7BDCFC092421894900641C39 /* MessageFetcherJob.swift in Sources */ = {isa = PBXBuildFile; fileRef = 452ECA4C1E087E7200E2F016 /* MessageFetcherJob.swift */; }; 7BDCFC0B2421EB7600641C39 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = B6F509951AA53F760068F56A /* Localizable.strings */; }; 7BF3FF002505B8E400609570 /* PlaceholderIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BF3FEFF2505B8E400609570 /* PlaceholderIcon.swift */; }; + 9C9B845C8451114076E55902 /* Pods_SessionUtilities.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 686875887229AB29C07145BA /* Pods_SessionUtilities.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 */; }; @@ -621,6 +622,10 @@ C3C2A5E32553860B00C340D1 /* AESGCM.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C2A5D72553860B00C340D1 /* AESGCM.swift */; }; C3C2A5E42553860B00C340D1 /* Data+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C2A5D82553860B00C340D1 /* Data+Utilities.swift */; }; C3C2A5E52553860B00C340D1 /* JSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C2A5D92553860B00C340D1 /* JSON.swift */; }; + C3C2A67D255388CC00C340D1 /* SessionUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = C3C2A67B255388CC00C340D1 /* SessionUtilities.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C3C2A680255388CC00C340D1 /* SessionUtilities.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3C2A679255388CC00C340D1 /* SessionUtilities.framework */; }; + C3C2A681255388CC00C340D1 /* SessionUtilities.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C3C2A679255388CC00C340D1 /* SessionUtilities.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C3C2A6C62553896A00C340D1 /* SessionUtilities.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3C2A679255388CC00C340D1 /* SessionUtilities.framework */; }; C3C3CF8924D8EED300E1CCE7 /* TextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3C3CF8824D8EED300E1CCE7 /* TextView.swift */; }; C3D0972B2510499C00F6E3E4 /* BackgroundPoller.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D0972A2510499C00F6E3E4 /* BackgroundPoller.swift */; }; C3DAB3242480CB2B00725F25 /* SRCopyableLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3DAB3232480CB2A00725F25 /* SRCopyableLabel.swift */; }; @@ -709,6 +714,13 @@ remoteGlobalIDString = C3C2A59E255385C100C340D1; remoteInfo = SessionSnodeKit; }; + C3C2A67E255388CC00C340D1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D221A080169C9E5E00537ABF /* Project object */; + proxyType = 1; + remoteGlobalIDString = C3C2A678255388CC00C340D1; + remoteInfo = SessionUtilities; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -730,6 +742,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + C3C2A681255388CC00C340D1 /* SessionUtilities.framework in Embed Frameworks */, C3C2A5A7255385C100C340D1 /* SessionSnodeKit.framework in Embed Frameworks */, 4535189A1FC63DBF00210559 /* SignalMessaging.framework in Embed Frameworks */, ); @@ -746,6 +759,7 @@ 1CE3CD5C23334683BDD3D78C /* Pods-Signal.test.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Signal.test.xcconfig"; path = "Pods/Target Support Files/Pods-Signal/Pods-Signal.test.xcconfig"; sourceTree = ""; }; 2400888D239F30A600305217 /* SessionRestorationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionRestorationView.swift; sourceTree = ""; }; 264242150E87D10A357DB07B /* Pods_SignalMessaging.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalMessaging.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3303495F6651CE2F3CC9693B /* Pods-SessionUtilities.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SessionUtilities.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-SessionUtilities/Pods-SessionUtilities.app store release.xcconfig"; sourceTree = ""; }; 3403B95B20EA9526001A1F44 /* OWSContactShareButtonsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSContactShareButtonsView.m; sourceTree = ""; }; 3403B95C20EA9527001A1F44 /* OWSContactShareButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSContactShareButtonsView.h; sourceTree = ""; }; 34074F5F203D0CBD004596AE /* OWSSounds.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSSounds.m; sourceTree = ""; }; @@ -1275,6 +1289,7 @@ 4CFD151C22415AA400F2450F /* CallVideoHintView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CallVideoHintView.swift; sourceTree = ""; }; 4CFE6B6B21F92BA700006701 /* LegacyNotificationsAdaptee.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LegacyNotificationsAdaptee.swift; path = UserInterface/Notifications/LegacyNotificationsAdaptee.swift; sourceTree = ""; }; 4CFF4C0920F55BBA005DA313 /* MenuActionsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuActionsViewController.swift; sourceTree = ""; }; + 686875887229AB29C07145BA /* Pods_SessionUtilities.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SessionUtilities.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 69349DE607F5BA6036C9AC60 /* Pods-SignalShareExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalShareExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalShareExtension/Pods-SignalShareExtension.debug.xcconfig"; sourceTree = ""; }; 70377AAA1918450100CAF501 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; 748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1460,6 +1475,9 @@ C3C2A5D72553860B00C340D1 /* AESGCM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AESGCM.swift; sourceTree = ""; }; C3C2A5D82553860B00C340D1 /* Data+Utilities.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Utilities.swift"; sourceTree = ""; }; C3C2A5D92553860B00C340D1 /* JSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JSON.swift; sourceTree = ""; }; + C3C2A679255388CC00C340D1 /* SessionUtilities.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SessionUtilities.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C3C2A67B255388CC00C340D1 /* SessionUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SessionUtilities.h; sourceTree = ""; }; + C3C2A67C255388CC00C340D1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; C3C3CF8824D8EED300E1CCE7 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; C3D0972A2510499C00F6E3E4 /* BackgroundPoller.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundPoller.swift; sourceTree = ""; }; C3DAB3232480CB2A00725F25 /* SRCopyableLabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SRCopyableLabel.swift; sourceTree = ""; }; @@ -1484,6 +1502,7 @@ DE2DD605305BC6EFAD731723 /* Pods-Signal.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Signal.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Signal/Pods-Signal.debug.xcconfig"; sourceTree = ""; }; DF728B4B438716EAF95CEC18 /* Pods-Signal.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Signal.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-Signal/Pods-Signal.app store release.xcconfig"; sourceTree = ""; }; E1A0AD8B16E13FDD0071E604 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + E7E2FBF1546840C91B7E4879 /* Pods-SessionUtilities.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SessionUtilities.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SessionUtilities/Pods-SessionUtilities.debug.xcconfig"; sourceTree = ""; }; E85DB184824BA9DC302EC8B3 /* Pods-SignalTests.app store release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalTests.app store release.xcconfig"; path = "Pods/Target Support Files/Pods-SignalTests/Pods-SignalTests.app store release.xcconfig"; sourceTree = ""; }; EF764C331DB67CC5000D9A87 /* UIViewController+Permissions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+Permissions.h"; path = "util/UIViewController+Permissions.h"; sourceTree = ""; }; EF764C341DB67CC5000D9A87 /* UIViewController+Permissions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+Permissions.m"; path = "util/UIViewController+Permissions.m"; sourceTree = ""; }; @@ -1526,10 +1545,19 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + C3C2A6C62553896A00C340D1 /* SessionUtilities.framework in Frameworks */, 9EE44C6B4D4A069B86112387 /* Pods_SessionSnodeKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; + C3C2A676255388CC00C340D1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 9C9B845C8451114076E55902 /* Pods_SessionUtilities.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D221A086169C9E5E00537ABF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1556,6 +1584,7 @@ A11CD70D17FA230600A2D1B1 /* QuartzCore.framework in Frameworks */, A163E8AB16F3F6AA0094D68B /* Security.framework in Frameworks */, A1C32D5117A06544000A904E /* AddressBook.framework in Frameworks */, + C3C2A680255388CC00C340D1 /* SessionUtilities.framework in Frameworks */, A1C32D5017A06538000A904E /* AddressBookUI.framework in Frameworks */, D2AEACDC16C426DA00C364C0 /* CFNetwork.framework in Frameworks */, D2179CFE16BB0B480006F3AB /* SystemConfiguration.framework in Frameworks */, @@ -2568,6 +2597,8 @@ 18D19142FD6E60FD0A5D89F7 /* Pods-LokiPushNotificationService.app store release.xcconfig */, A6344D429FFAC3B44E6A06FA /* Pods-SessionSnodeKit.debug.xcconfig */, C022DD8E076866C6241610BF /* Pods-SessionSnodeKit.app store release.xcconfig */, + E7E2FBF1546840C91B7E4879 /* Pods-SessionUtilities.debug.xcconfig */, + 3303495F6651CE2F3CC9693B /* Pods-SessionUtilities.app store release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -2879,7 +2910,6 @@ children = ( C3C2A5B0255385C700C340D1 /* Meta */, C3C2A5B9255385ED00C340D1 /* Configuration.swift */, - C3C2A5BC255385EE00C340D1 /* HTTP.swift */, C3C2A5B6255385EC00C340D1 /* Message.swift */, C3C2A5BD255385EE00C340D1 /* Notification+Session.swift */, C3C2A5BA255385ED00C340D1 /* OnionRequestAPI.swift */, @@ -2905,14 +2935,9 @@ isa = PBXGroup; children = ( C3C2A5D72553860B00C340D1 /* AESGCM.swift */, - C3C2A5D12553860800C340D1 /* Array+Utilities.swift */, C3C2A5D82553860B00C340D1 /* Data+Utilities.swift */, - C3C2A5D52553860A00C340D1 /* Dictionary+Utilities.swift */, - C3C2A5D92553860B00C340D1 /* JSON.swift */, - C3C2A5CE2553860700C340D1 /* Logging.swift */, C3C2A5D32553860900C340D1 /* Promise+Delaying.swift */, C3C2A5CF2553860700C340D1 /* Promise+Hashing.swift */, - C3C2A5D62553860B00C340D1 /* Promise+Retrying.swift */, C3C2A5D02553860800C340D1 /* Promise+Threading.swift */, C3C2A5D22553860900C340D1 /* String+Utilities.swift */, C3C2A5D42553860A00C340D1 /* Threading.swift */, @@ -2920,6 +2945,29 @@ path = Utilities; sourceTree = ""; }; + C3C2A67A255388CC00C340D1 /* SessionUtilities */ = { + isa = PBXGroup; + children = ( + C3C2A68B255388D500C340D1 /* Meta */, + C3C2A5D12553860800C340D1 /* Array+Utilities.swift */, + C3C2A5D52553860A00C340D1 /* Dictionary+Utilities.swift */, + C3C2A5BC255385EE00C340D1 /* HTTP.swift */, + C3C2A5D92553860B00C340D1 /* JSON.swift */, + C3C2A5CE2553860700C340D1 /* Logging.swift */, + C3C2A5D62553860B00C340D1 /* Promise+Retrying.swift */, + ); + path = SessionUtilities; + sourceTree = ""; + }; + C3C2A68B255388D500C340D1 /* Meta */ = { + isa = PBXGroup; + children = ( + C3C2A67B255388CC00C340D1 /* SessionUtilities.h */, + C3C2A67C255388CC00C340D1 /* Info.plist */, + ); + path = Meta; + sourceTree = ""; + }; D221A07E169C9E5E00537ABF = { isa = PBXGroup; children = ( @@ -2928,6 +2976,7 @@ 453518931FC63DBF00210559 /* SignalMessaging */, 7BC01A3C241F40AB00BC7C55 /* LokiPushNotificationService */, C3C2A5A0255385C100C340D1 /* SessionSnodeKit */, + C3C2A67A255388CC00C340D1 /* SessionUtilities */, D221A08C169C9E5E00537ABF /* Frameworks */, D221A08A169C9E5E00537ABF /* Products */, 9404664EC513585B05DF1350 /* Pods */, @@ -2943,6 +2992,7 @@ 453518921FC63DBF00210559 /* SignalMessaging.framework */, 7BC01A3B241F40AB00BC7C55 /* LokiPushNotificationService.appex */, C3C2A59F255385C100C340D1 /* SessionSnodeKit.framework */, + C3C2A679255388CC00C340D1 /* SessionUtilities.framework */, ); name = Products; sourceTree = ""; @@ -2991,6 +3041,7 @@ 264242150E87D10A357DB07B /* Pods_SignalMessaging.framework */, 04912E453971FB16E5E78EC6 /* Pods_LokiPushNotificationService.framework */, 9559C3068280BA2383F547F7 /* Pods_SessionSnodeKit.framework */, + 686875887229AB29C07145BA /* Pods_SessionUtilities.framework */, ); name = Frameworks; sourceTree = ""; @@ -3116,6 +3167,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C3C2A674255388CC00C340D1 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + C3C2A67D255388CC00C340D1 /* SessionUtilities.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ @@ -3195,6 +3254,25 @@ productReference = C3C2A59F255385C100C340D1 /* SessionSnodeKit.framework */; productType = "com.apple.product-type.framework"; }; + C3C2A678255388CC00C340D1 /* SessionUtilities */ = { + isa = PBXNativeTarget; + buildConfigurationList = C3C2A684255388CC00C340D1 /* Build configuration list for PBXNativeTarget "SessionUtilities" */; + buildPhases = ( + 83DABC75697364620557C68B /* [CP] Check Pods Manifest.lock */, + C3C2A674255388CC00C340D1 /* Headers */, + C3C2A675255388CC00C340D1 /* Sources */, + C3C2A676255388CC00C340D1 /* Frameworks */, + C3C2A677255388CC00C340D1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SessionUtilities; + productName = SessionUtilities; + productReference = C3C2A679255388CC00C340D1 /* SessionUtilities.framework */; + productType = "com.apple.product-type.framework"; + }; D221A088169C9E5E00537ABF /* Signal */ = { isa = PBXNativeTarget; buildConfigurationList = D221A0BC169C9E5F00537ABF /* Build configuration list for PBXNativeTarget "Signal" */; @@ -3216,6 +3294,7 @@ 453518981FC63DBF00210559 /* PBXTargetDependency */, 7BC01A41241F40AB00BC7C55 /* PBXTargetDependency */, C3C2A5A5255385C100C340D1 /* PBXTargetDependency */, + C3C2A67F255388CC00C340D1 /* PBXTargetDependency */, ); name = Signal; productName = RedPhone; @@ -3293,6 +3372,11 @@ LastSwiftMigration = 1210; ProvisioningStyle = Automatic; }; + C3C2A678255388CC00C340D1 = { + CreatedOnToolsVersion = 12.1; + DevelopmentTeam = SUQ8J2PCT7; + ProvisioningStyle = Automatic; + }; D221A088169C9E5E00537ABF = { DevelopmentTeam = SUQ8J2PCT7; LastSwiftMigration = 1020; @@ -3363,6 +3447,7 @@ 453518911FC63DBF00210559 /* SignalMessaging */, 7BC01A3A241F40AB00BC7C55 /* LokiPushNotificationService */, C3C2A59E255385C100C340D1 /* SessionSnodeKit */, + C3C2A678255388CC00C340D1 /* SessionUtilities */, ); }; /* End PBXProject section */ @@ -3405,6 +3490,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C3C2A677255388CC00C340D1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D221A087169C9E5E00537ABF /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -3689,6 +3781,28 @@ 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; }; + 83DABC75697364620557C68B /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-SessionUtilities-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; + }; B19B891E99B1507CAC8AAD19 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -3990,6 +4104,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C3C2A675255388CC00C340D1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D221A085169C9E5E00537ABF /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -4321,6 +4442,11 @@ target = C3C2A59E255385C100C340D1 /* SessionSnodeKit */; targetProxy = C3C2A5A4255385C100C340D1 /* PBXContainerItemProxy */; }; + C3C2A67F255388CC00C340D1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C3C2A678255388CC00C340D1 /* SessionUtilities */; + targetProxy = C3C2A67E255388CC00C340D1 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -4844,6 +4970,131 @@ }; name = "App Store Release"; }; + C3C2A682255388CC00C340D1 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E7E2FBF1546840C91B7E4879 /* Pods-SessionUtilities.debug.xcconfig */; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = SUQ8J2PCT7; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + INFOPLIST_FILE = SessionUtilities/Meta/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.SessionUtilities"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + C3C2A683255388CC00C340D1 /* App Store Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3303495F6651CE2F3CC9693B /* Pods-SessionUtilities.app store release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = SUQ8J2PCT7; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = SessionUtilities/Meta/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.loki-project.SessionUtilities"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = "App Store Release"; + }; D221A0BA169C9E5F00537ABF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -5287,6 +5538,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "App Store Release"; }; + C3C2A684255388CC00C340D1 /* Build configuration list for PBXNativeTarget "SessionUtilities" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C3C2A682255388CC00C340D1 /* Debug */, + C3C2A683255388CC00C340D1 /* App Store Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "App Store Release"; + }; D221A083169C9E5E00537ABF /* Build configuration list for PBXProject "Signal" */ = { isa = XCConfigurationList; buildConfigurations = (