Releases: MLSDev/TRON
Releases · MLSDev/TRON
5.5.0-beta.1
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:)
anddownload(_:to:resumingFrom:)
methods that createDownloadAPIRequest
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
Changed
- Improve Combine extensions to work better with stubs, that return synchronously.
Fixed
- Swift 5.4 warnings
5.4.0
Changed
- RxSwift dependency bumped to 6.0 and higher
5.3.0
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
Added
- Combine support on supported platforms through
publisher()
method onAPIRequest
,UploadAPIRequest
,DownloadAPIRequest
. APIError.isCancelled
property, that tells, whether request, that errored, was cancelled by sender.
Changed
Alamofire.ParameterEncoding
,JSONEncoding
andURLEncoding
are now exposed through TRON API and don't require importing Alamofire to use.
Deprecated
NetworkActivityPlugin
is deprecated on iOS 13 and higher, becauseUIApplication.isNetworkActivityIndicatorVisible
property it has been switching is deprecated on iOS 13 and higher.
5.1.0
Changed
- Several
Alamofire
types that are exposed through TRON API's are now implicitly exported to allow using them without needing to writeimport Alamofire
. SeeExports.swift
file for a list of them.
5.0.3
Added
FileURLPassthroughResponseSerializer
, which can be used as a response serializer forDownloadAPIRequest
when you are only interested in URL of downloaded file.
Fixed
NetworkLoggerPlugin
now correctly skips cancelled requests
5.0.2
- Added
DownloadAPIRequest.perform(withSuccess:failure:)
method, similar toAPIRequest
andUploadAPIRequest
methods.
5.0.1
BaseRequest.headers
now default toHTTPHeaders.default
to allow sending Alamofire default headers such as "Accept-Language", "Accept-Encoding", "User-Agent".
5.0.0
Releasing version 5.0.0.