Skip to content

Commit

Permalink
Merge pull request #201 from DP-3T/feature/update-version
Browse files Browse the repository at this point in the history
Updates version
  • Loading branch information
stmitt authored Aug 13, 2020
2 parents c9f2db9 + b11f65f commit a65a9f0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for DP3T-SDK iOS

## Version 1.1.1 (13.08.2020)
- DP3TNetworkingError.HTTPFailureResponse includes raw data

## Version 1.1.0 (17.07.2020)
- adds background refresh task to improve background time
- retrieves keys in background on iOS > 13.6
Expand Down
2 changes: 1 addition & 1 deletion DP3TSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Pod::Spec.new do |spec|

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

spec.description = <<-DESC
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ DP3T-SDK is available through [Cocoapods](https://cocoapods.org/)

```ruby

pod 'DP3TSDK', => '1.1.0'
pod 'DP3TSDK', => '1.1.1'

```

Expand Down
4 changes: 2 additions & 2 deletions Sources/DP3TSDK/DP3TError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public enum DP3TNetworkingError: Error {
/// The response is not an HTTP response
case notHTTPResponse
/// An unexpected HTTP error state was returned
case HTTPFailureResponse(status: Int)
case HTTPFailureResponse(status: Int, data: Data?)
/// Response body was not expected to be empty
case noDataReturned
/// The returned body could not be parsed. The data might be in the wrong format or corrupted
Expand Down Expand Up @@ -77,7 +77,7 @@ public enum DP3TNetworkingError: Error {
return 600
case .timeInconsistency:
return 700
case let .HTTPFailureResponse(status: status):
case let .HTTPFailureResponse(status: status, data: _):
// Combines the HTTP Status error with the error
return 8000 + status
case .jwtSignatureError(code: let code, debugDescription: _):
Expand Down
2 changes: 1 addition & 1 deletion Sources/DP3TSDK/DP3TTracing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private var instance: DP3TSDK!
/// DP3TTracing
public enum DP3TTracing {
/// The current version of the SDK
public static let frameworkVersion: String = "1.1.0"
public static let frameworkVersion: String = "1.1.1"

/// sets global parameter values which are used throughout the sdk
public static var parameters: DP3TParameters {
Expand Down
10 changes: 5 additions & 5 deletions Sources/DP3TSDK/Networking/ExposeeServiceClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
completion(.success(.init(data: nil, publishedUntil: publishedUntil)))
return
default:
completion(.failure(.HTTPFailureResponse(status: httpStatus)))
completion(.failure(.HTTPFailureResponse(status: httpStatus, data: data)))
return
}

Expand Down Expand Up @@ -200,7 +200,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
}
request.httpBody = payload

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

let statusCode = httpResponse.statusCode
guard statusCode == 200 else {
completion(.failure(.HTTPFailureResponse(status: statusCode)))
completion(.failure(.HTTPFailureResponse(status: statusCode, data: data)))
return
}

Expand Down Expand Up @@ -246,7 +246,7 @@ class ExposeeServiceClient: ExposeeServiceClientProtocol {
}
request.httpBody = payload

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

let statusCode = httpResponse.statusCode
guard statusCode == 200 else {
completion(.failure(.HTTPFailureResponse(status: statusCode)))
completion(.failure(.HTTPFailureResponse(status: statusCode, data: data)))
return
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/DP3TSDKTests/KnownCasesSynchronizerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ final class KnownCasesSynchronizerTests: XCTestCase {
let matcher = MockMatcher()
let service = MockService()
let defaults = MockDefaults()
service.error = .HTTPFailureResponse(status: 400)
service.error = .HTTPFailureResponse(status: 400, data: nil)
service.errorAfter = 5
let sync = KnownCasesSynchronizer(matcher: matcher,
service: service,
Expand Down

0 comments on commit a65a9f0

Please sign in to comment.