Skip to content

Releases: MLSDev/TRON

5.5.0-beta.1

18 Jul 15:57
24434ce
Compare
Choose a tag to compare

Introducing support for Swift Concurrency

let request: APIRequest<Int,APIError> = tron.codable
    .request("status/200")

let result = try await request.sender().value

Swift Concurrency methods require Swift 5.5 / Xcode 13.2 / iOS 13 / tvOS 13 / macOS 10.15 / watchOS 6.

Read more usage examples in README.

Added

  • download(_:to:) and download(_:to:resumingFrom:) methods that create DownloadAPIRequest with <URL, ErrorModel> generic constraints to simplify requests creation, where you need only URL from resulting operation.
  • Structured Concurrency support for Swift 5.5 and higher: RequestSender, DownloadRequestSender types.

Fixed

  • Issue, that could lead to sending network request with api stubs enabled, but Session.startRequestsImmediately property was set to false.

Breaking

  • New deployment targets: iOS 11 / tvOS 11 / macOS 10.13 / watchOS 4 / Xcode 13. OS deployment targets now match minimum deployment targets, supported by Xcode 14.

5.4.1

28 May 08:41
Compare
Choose a tag to compare

Changed

  • Improve Combine extensions to work better with stubs, that return synchronously.

Fixed

  • Swift 5.4 warnings

5.4.0

04 Jan 15:49
Compare
Choose a tag to compare

Changed

  • RxSwift dependency bumped to 6.0 and higher

5.3.0

22 Oct 12:58
Compare
Choose a tag to compare

Added

  • Ability to modify URLRequests before it's adapted and sent:
tron.codable
    .request("status")
    .modifyRequest { $0.httpShouldHandleCookies = false }

This feature uses Alamofire.RequestModifier closure, that can also be set without DSL on request instance directly:

let request : APIRequest<Post,Empty> = tron.codable.request("posts")
request.requestModifier = { urlRequest in
    urlRequest.httpShouldHandleCookies = false
}

5.2.0

11 Aug 11:28
Compare
Choose a tag to compare

Added

  • Combine support on supported platforms through publisher() method on APIRequest, UploadAPIRequest, DownloadAPIRequest.
  • APIError.isCancelled property, that tells, whether request, that errored, was cancelled by sender.

Changed

  • Alamofire.ParameterEncoding, JSONEncoding and URLEncoding are now exposed through TRON API and don't require importing Alamofire to use.

Deprecated

  • NetworkActivityPlugin is deprecated on iOS 13 and higher, because UIApplication.isNetworkActivityIndicatorVisible property it has been switching is deprecated on iOS 13 and higher.

5.1.0

04 May 10:15
Compare
Choose a tag to compare

Changed

  • Several Alamofire types that are exposed through TRON API's are now implicitly exported to allow using them without needing to write import Alamofire. See Exports.swift file for a list of them.

5.0.3

06 Apr 08:27
Compare
Choose a tag to compare

Added

  • FileURLPassthroughResponseSerializer, which can be used as a response serializer for DownloadAPIRequest when you are only interested in URL of downloaded file.

Fixed

  • NetworkLoggerPlugin now correctly skips cancelled requests

5.0.2

19 Mar 09:00
Compare
Choose a tag to compare
  • Added DownloadAPIRequest.perform(withSuccess:failure:) method, similar to APIRequest and UploadAPIRequest methods.

5.0.1

10 Mar 15:24
Compare
Choose a tag to compare
  • BaseRequest.headers now default to HTTPHeaders.default to allow sending Alamofire default headers such as "Accept-Language", "Accept-Encoding", "User-Agent".

5.0.0

17 Feb 09:35
Compare
Choose a tag to compare
Releasing version 5.0.0.