diff --git a/ios/BT/ExposureManager.swift b/ios/BT/ExposureManager.swift index eb0cf265a..024d19601 100644 --- a/ios/BT/ExposureManager.swift +++ b/ios/BT/ExposureManager.swift @@ -488,19 +488,19 @@ final class ExposureManager: NSObject { // Abort because daily file capacity is exceeded return [] } - let indexFileString = try await(self.fetchIndexFile()) + let indexFileString = try awaitPromise(self.fetchIndexFile()) let remoteURLs = indexFileString.gaenFilePaths let targetUrls = self.urlPathsToProcess(remoteURLs, apiVersion: .V1) lastProcessedUrlPath = targetUrls.last ?? .default processedFileCount = targetUrls.count - let downloadedKeyArchives = try await(self.downloadKeyArchives(targetUrls: targetUrls)) - unpackedArchiveURLs = try await(self.unpackKeyArchives(packages: downloadedKeyArchives)) - let exposureConfiguration = try await(self.getExposureConfigurationV1()) - let exposureSummary = try await(self.callDetectExposures(configuration: exposureConfiguration.asENExposureConfiguration, + let downloadedKeyArchives = try awaitPromise(self.downloadKeyArchives(targetUrls: targetUrls)) + unpackedArchiveURLs = try awaitPromise(self.unpackKeyArchives(packages: downloadedKeyArchives)) + let exposureConfiguration = try awaitPromise(self.getExposureConfigurationV1()) + let exposureSummary = try awaitPromise(self.callDetectExposures(configuration: exposureConfiguration.asENExposureConfiguration, diagnosisKeyURLs: unpackedArchiveURLs)) var newExposures: [Exposure] = [] if let summary = exposureSummary, summary.isAboveScoreThreshold(with: exposureConfiguration) { - newExposures = try await(self.getExposureInfoAndNotifyUser(summary: summary)) + newExposures = try awaitPromise(self.getExposureInfoAndNotifyUser(summary: summary)) } return newExposures }.then { result in @@ -539,15 +539,15 @@ final class ExposureManager: NSObject { throw ExposureError.default("Detection Already in Progress") } self.isDetectingExposures = true - let indexFileString = try await(self.fetchIndexFile()) + let indexFileString = try awaitPromise(self.fetchIndexFile()) let remoteURLs = indexFileString.gaenFilePaths let targetUrls = self.urlPathsToProcess(remoteURLs, apiVersion: .V2) lastProcessedUrlPath = targetUrls.last ?? .default processedFileCount = targetUrls.count - let downloadedKeyArchives = try await(self.downloadKeyArchives(targetUrls: targetUrls)) - unpackedArchiveURLs = try await(self.unpackKeyArchives(packages: downloadedKeyArchives)) - let exposureConfiguraton = try await(self.getExposureConfigurationV2()) - let exposureSummary = try await(self.callDetectExposures(configuration: exposureConfiguraton.asENExposureConfiguration, + let downloadedKeyArchives = try awaitPromise(self.downloadKeyArchives(targetUrls: targetUrls)) + unpackedArchiveURLs = try awaitPromise(self.unpackKeyArchives(packages: downloadedKeyArchives)) + let exposureConfiguraton = try awaitPromise(self.getExposureConfigurationV2()) + let exposureSummary = try awaitPromise(self.callDetectExposures(configuration: exposureConfiguraton.asENExposureConfiguration, diagnosisKeyURLs: unpackedArchiveURLs)) var newExposures: [Exposure] = [] if let summary = exposureSummary { diff --git a/ios/COVIDSafePathsTests/ExposureManagerUnitTests.swift b/ios/COVIDSafePathsTests/ExposureManagerUnitTests.swift index f23362553..bfdf096c8 100644 --- a/ios/COVIDSafePathsTests/ExposureManagerUnitTests.swift +++ b/ios/COVIDSafePathsTests/ExposureManagerUnitTests.swift @@ -584,7 +584,7 @@ class ExposureManagerUnitTests: XCTestCase { let expectation = self.expectation(description: "it falls back to the placeholder exposure configuration") let exposureManager = defaultExposureManager(enAPIVersion: .v1, forceDownloadConfigurationError: true) do { - let config = try await(exposureManager.getExposureConfigurationV1()) + let config = try awaitPromise(exposureManager.getExposureConfigurationV1()) XCTAssertEqual(config, ExposureConfigurationV1.placeholder) expectation.fulfill() } catch { @@ -601,7 +601,7 @@ class ExposureManagerUnitTests: XCTestCase { let expectation = self.expectation(description: "it falls back to the placeholder exposure configuration") let exposureManager = defaultExposureManager(enAPIVersion: .v2, forceDownloadConfigurationError: true) do { - let config = try await(exposureManager.getExposureConfigurationV2()) + let config = try awaitPromise(exposureManager.getExposureConfigurationV2()) XCTAssertEqual(config, DailySummariesConfiguration.placeholder) expectation.fulfill() } catch { diff --git a/ios/COVIDSafePathsTests/V2UnitTests.swift b/ios/COVIDSafePathsTests/V2UnitTests.swift index 482fe088d..df52cffaa 100644 --- a/ios/COVIDSafePathsTests/V2UnitTests.swift +++ b/ios/COVIDSafePathsTests/V2UnitTests.swift @@ -123,7 +123,7 @@ class V2UnitTests: XCTestCase { let exposureManager = defaultExposureManager(enAPIVersion: .v2, forceDownloadConfigurationError: true) do { - let config = try await(exposureManager.getExposureConfigurationV2()) + let config = try awaitPromise(exposureManager.getExposureConfigurationV2()) XCTAssertEqual(config, DailySummariesConfiguration.placeholder) } catch { XCTFail() diff --git a/ios/Podfile b/ios/Podfile index e13f19b56..e97cfec21 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -20,6 +20,13 @@ def shared_pods use_flipper!('Flipper' => '0.86.0', 'Flipper-Folly' => '2.5.3') post_install do |installer| flipper_post_install(installer) + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0 + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0' + end + end + end end end diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 4a87248df..bfdddfa84 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -79,9 +79,9 @@ PODS: - OpenSSL-Universal (1.1.180) - Permission-Notifications (2.2.2): - RNPermissions - - PromisesObjC (1.2.12) - - PromisesSwift (1.2.12): - - PromisesObjC (= 1.2.12) + - PromisesObjC (2.0.0) + - PromisesSwift (2.0.0): + - PromisesObjC (= 2.0.0) - RCT-Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion