From 6dffc2386e0304d954735f247ea7d20347faf4dd Mon Sep 17 00:00:00 2001 From: Stefan Mitterrutzner Date: Thu, 27 Aug 2020 10:26:21 +0200 Subject: [PATCH 1/2] ensures that backgroundtask keeps running until outstandingPublishOperation is finished --- Sources/DP3TSDK/DP3TSDK.swift | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Sources/DP3TSDK/DP3TSDK.swift b/Sources/DP3TSDK/DP3TSDK.swift index 27c46e73..8511608c 100644 --- a/Sources/DP3TSDK/DP3TSDK.swift +++ b/Sources/DP3TSDK/DP3TSDK.swift @@ -186,19 +186,20 @@ class DP3TSDK { OperationQueue().addOperation(outstandingPublishOperation) let sync = { + var storedResult: SyncResult? + // Skip sync when tracing is not active if self.state.trackingState != .active { self.log.error("Skip sync when tracking is not active") - callback?(.skipped) - return + storedResult = .skipped + } else { + group.enter() + self.synchronizer.sync { result in + storedResult = result + group.leave() + } } - group.enter() - var storedResult: SyncResult? - self.synchronizer.sync { result in - storedResult = result - group.leave() - } group.notify(queue: .main) { [weak self] in guard let self = self else { return } switch storedResult! { From f10e2c5e9a7446f021138cca32a77aa09b3043c2 Mon Sep 17 00:00:00 2001 From: Stefan Mitterrutzner Date: Mon, 31 Aug 2020 11:46:10 +0200 Subject: [PATCH 2/2] 1.2.1 version --- CHANGELOG.md | 3 +++ DP3TSDK.podspec | 2 +- README.md | 2 +- Sources/DP3TSDK/DP3TTracing.swift | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a05496ec..d15de85d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog for DP3T-SDK iOS +## Version 1.2.1 (31.08.2020) +- ensures that backgroundtask keeps running until outstandingPublishOperation is finished + ## Version 1.2.0 (26.08.2020) - resolves keychain issue with iOS 14 - adds iOS 14 info.plist entries for calibration app diff --git a/DP3TSDK.podspec b/DP3TSDK.podspec index f637164c..aef9b6fb 100644 --- a/DP3TSDK.podspec +++ b/DP3TSDK.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |spec| spec.name = "DP3TSDK" - spec.version = ENV['LIB_VERSION'] || '1.2.0' + spec.version = ENV['LIB_VERSION'] || '1.2.1' spec.summary = "Open protocol for COVID-19 proximity tracing using Bluetooth Low Energy on mobile devices" spec.description = <<-DESC diff --git a/README.md b/README.md index 6d8b18ec..9209b67e 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ DP3T-SDK is available through [Cocoapods](https://cocoapods.org/) ```ruby - pod 'DP3TSDK', => '1.2.0' + pod 'DP3TSDK', => '1.2.1' ``` diff --git a/Sources/DP3TSDK/DP3TTracing.swift b/Sources/DP3TSDK/DP3TTracing.swift index d3b7dc09..dc2248f8 100644 --- a/Sources/DP3TSDK/DP3TTracing.swift +++ b/Sources/DP3TSDK/DP3TTracing.swift @@ -28,7 +28,7 @@ private var instance: DP3TSDK! /// DP3TTracing public enum DP3TTracing { /// The current version of the SDK - public static let frameworkVersion: String = "1.2.0" + public static let frameworkVersion: String = "1.2.1" /// sets global parameter values which are used throughout the sdk public static var parameters: DP3TParameters {