Skip to content

Commit a65a9f0

Browse files
authored
Merge pull request #201 from DP-3T/feature/update-version
Updates version
2 parents c9f2db9 + b11f65f commit a65a9f0

File tree

7 files changed

+14
-11
lines changed

7 files changed

+14
-11
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog for DP3T-SDK iOS
22

3+
## Version 1.1.1 (13.08.2020)
4+
- DP3TNetworkingError.HTTPFailureResponse includes raw data
5+
36
## Version 1.1.0 (17.07.2020)
47
- adds background refresh task to improve background time
58
- retrieves keys in background on iOS > 13.6

DP3TSDK.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Pod::Spec.new do |spec|
33

44
spec.name = "DP3TSDK"
5-
spec.version = ENV['LIB_VERSION'] || '1.1.0'
5+
spec.version = ENV['LIB_VERSION'] || '1.1.1'
66
spec.summary = "Open protocol for COVID-19 proximity tracing using Bluetooth Low Energy on mobile devices"
77

88
spec.description = <<-DESC

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ DP3T-SDK is available through [Cocoapods](https://cocoapods.org/)
7474

7575
```ruby
7676

77-
pod 'DP3TSDK', => '1.1.0'
77+
pod 'DP3TSDK', => '1.1.1'
7878

7979
```
8080

Sources/DP3TSDK/DP3TError.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public enum DP3TNetworkingError: Error {
4545
/// The response is not an HTTP response
4646
case notHTTPResponse
4747
/// An unexpected HTTP error state was returned
48-
case HTTPFailureResponse(status: Int)
48+
case HTTPFailureResponse(status: Int, data: Data?)
4949
/// Response body was not expected to be empty
5050
case noDataReturned
5151
/// The returned body could not be parsed. The data might be in the wrong format or corrupted
@@ -77,7 +77,7 @@ public enum DP3TNetworkingError: Error {
7777
return 600
7878
case .timeInconsistency:
7979
return 700
80-
case let .HTTPFailureResponse(status: status):
80+
case let .HTTPFailureResponse(status: status, data: _):
8181
// Combines the HTTP Status error with the error
8282
return 8000 + status
8383
case .jwtSignatureError(code: let code, debugDescription: _):

Sources/DP3TSDK/DP3TTracing.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private var instance: DP3TSDK!
2828
/// DP3TTracing
2929
public enum DP3TTracing {
3030
/// The current version of the SDK
31-
public static let frameworkVersion: String = "1.1.0"
31+
public static let frameworkVersion: String = "1.1.1"
3232

3333
/// sets global parameter values which are used throughout the sdk
3434
public static var parameters: DP3TParameters {

Sources/DP3TSDK/Networking/ExposeeServiceClient.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
146146
completion(.success(.init(data: nil, publishedUntil: publishedUntil)))
147147
return
148148
default:
149-
completion(.failure(.HTTPFailureResponse(status: httpStatus)))
149+
completion(.failure(.HTTPFailureResponse(status: httpStatus, data: data)))
150150
return
151151
}
152152

@@ -200,7 +200,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
200200
}
201201
request.httpBody = payload
202202

203-
let task = urlSession.dataTask(with: request, completionHandler: { _, response, error in
203+
let task = urlSession.dataTask(with: request, completionHandler: { data, response, error in
204204
guard error == nil else {
205205
completion(.failure(.networkSessionError(error: error!)))
206206
return
@@ -212,7 +212,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
212212

213213
let statusCode = httpResponse.statusCode
214214
guard statusCode == 200 else {
215-
completion(.failure(.HTTPFailureResponse(status: statusCode)))
215+
completion(.failure(.HTTPFailureResponse(status: statusCode, data: data)))
216216
return
217217
}
218218

@@ -246,7 +246,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
246246
}
247247
request.httpBody = payload
248248

249-
let task = urlSession.dataTask(with: request, completionHandler: { _, response, error in
249+
let task = urlSession.dataTask(with: request, completionHandler: { data, response, error in
250250
guard error == nil else {
251251
completion(.failure(.networkSessionError(error: error!)))
252252
return
@@ -258,7 +258,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
258258

259259
let statusCode = httpResponse.statusCode
260260
guard statusCode == 200 else {
261-
completion(.failure(.HTTPFailureResponse(status: statusCode)))
261+
completion(.failure(.HTTPFailureResponse(status: statusCode, data: data)))
262262
return
263263
}
264264

Tests/DP3TSDKTests/KnownCasesSynchronizerTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ final class KnownCasesSynchronizerTests: XCTestCase {
292292
let matcher = MockMatcher()
293293
let service = MockService()
294294
let defaults = MockDefaults()
295-
service.error = .HTTPFailureResponse(status: 400)
295+
service.error = .HTTPFailureResponse(status: 400, data: nil)
296296
service.errorAfter = 5
297297
let sync = KnownCasesSynchronizer(matcher: matcher,
298298
service: service,

0 commit comments

Comments
 (0)