All Versions
43
Latest Version
Avg Release Cycle
70 days
Latest Release
205 days ago

Changelog History
Page 1

  • v5.0.0

    June 28, 2019

    ➕ Added

    • 👌 Support for per-request Interceptors.
    • 🏗 Three different behaviors for building URLs: .appendingPathComponent, .relativeToBaseURL and .custom. Those can be set in TRON initializer:

      let tron = TRON(baseURL: "https://www.example.com/", buildingURL: .relativeToBaseURL)

    Or you can change URLBuilder.Behavior on per-request basis, using the new DSL:

    let request: APIRequest\<Int,APIError\> = tron.swiftyJSON .request("status/200") .buildURL(.relativeToBaseURL)
    

    0️⃣ Default behavior for TRON is .appendingPathComponent.

    ✂ Removed

    • URLBuildable protocol. Please use different behaviors for URLBuilder instead.
  • v5.0.0-rc.1

    September 06, 2019

    ➕ Added

    • 👍 Better debug prints for NetworkLoggerPlugin when decoding using Codable protocol.
    • 🔧 configure(_:) method for BaseRequest DSL to allow configuring request with several changes at once.

    💥 Breaking

    • 🔌 Plugin API that previously was called with Alamofire.Data/DownloadResponse<Model, Error> is now called with Alamofire.Data/DownloadResponse<Model, AFError> due to Alamofire changes to error handling.
    • performCollectingTimeline(withCompletion:) method is now called also with AFError instead of Error.
  • v5.0.0-beta.5

    June 28, 2019

    ➕ Added

    • 👌 Support for per-request Interceptors.
    • 🏗 Three different behaviors for building URLs: .appendingPathComponent, .relativeToBaseURL and .custom. Those can be set in TRON initializer:
    let tron = TRON(baseURL: "https://www.example.com/", buildingURL: .relativeToBaseURL)
    

    Or you can change URLBuilder.Behavior on per-request basis, using the new DSL:

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

    0️⃣ Default behavior for TRON is .appendingPathComponent.

    ✂ Removed

    • URLBuildable protocol. Please use different behaviors for URLBuilder instead.
  • v5.0.0-beta.4

    June 16, 2019

    ➕ Added

    • 👌 Support for Swift Package Manager in Xcode 11
    • 🆕 New convenient DSL, that allows to convert this code:
    func deleteSession() -> APIRequest<Empty, UnknownError> {
        let request : APIRequest<Empty, UnknownError> = tron.codable.request("session")
        request.method = .delete
        return request
    }
    

    into:

    func deleteSession() -> APIRequest<Empty, UnknownError> {
        return tron.codable.request("session").delete()
    }
    

    📄 Read more about other DSL improvements in 5.0 Migration Guide

    🔄 Changed

    • URLBuilder now resolves URL's using URL(string:relativeTo:) method, thus allowing more flexible url creation.
  • v5.0.0-beta.3

    May 17, 2019

    ➕ Added

    • Ability to traverse json to any level when using SwiftyJSONDecodable.

    🔄 Changed

    • 👌 Improved response serializer behavior for cases where requests were stubbed using URLProtocol.
    • TRON 5 requires RxSwift 5 and SwiftyJSON 5
    • 0️⃣ Core is now a default subspec for CocoaPods installation method. To use SwiftyJSON, add following to Podfile:
    pod 'TRON/SwiftyJSON'
    
  • v5.0.0-beta.2

    April 06, 2019

    🔄 Changed

    • ErrorSerializable protocol changed to have non-optional initializer and to not accept serializedObject. It no longer can be used for additional object validation, but behavior should be more predictable and straightforward - ErrorSerializable should only be created if somebody (URL loading system, Alamofire or Model serialization) actually reported error.
    • codable is now a lazy stored property instead of computed property.
    • CodableSerializer API has been made open to allow easy customization in subclasses.
    • 🔧 NetworkLoggerPlugin now has a constructor that allows to easily configure it's behavior.

    💥 Breaking

    • Properties that worked with Alamofire.SessionManager have been renamed to session to be in line with Alamofire renaming of SessionManager to Session.

    ✂ Removed

    • 0️⃣ TRON.defaultAlamofireManager() method. TRON initializer now uses Alamofire.Session.default as a replacement.
    • TRON.processingQueue property
  • v5.0.0-beta.1

    March 12, 2019

    TRON now requires:

    • Xcode 10
    • Swift 4 and higher
    • iOS/tvOS 10 and higher
    • watchOS 3 and higher
    • 🍎 macOS 10.12 and higher

    ➕ Added

    • 📚 Complete documentation
    • TRONDataResponseSerializer and TRONDownloadResponseSerializer structs to encapsulate serialization of responses using closure.
    • ✅ All test suite now uses StubbingURLProtocol to stop tests from sending network requests. Closes #21.
    • ➕ Additional JSONDecodable conformances have been added for arithmetic types such as Int8...Int64, UInt8...64.

    ✂ Removed

    • EmptyResponse type was replaced with Alamofire.Empty struct to not interfere with Alamofire.EmptyResponse protocol.
    • TRON.stubbingShouldBeSuccessful property since now each stub directly defines it's behavior instead of global setting
    • Conditional conformance of Array to JSONDecodable
    • Convenience download methods on CodableSerializer and JSONDecodableSerializer
    • AuthorizationRequirement enum. Please use Alamofire.RequestAdapter and Session.adapter property to adapt request, when additional headers are needed.
    • HeaderBuildable protocol and HeaderBuilder types. Please use BaseRequest.headers property of type Alamofire.HTTPHeaders directly.
    • ErrorHandlingDataResponseSerializerProtocol and ErrorHandlingDownloadResponseSerializer protocol. Now, ErrorModel on all requests conforms to ErrorSerializable protocol, that contains initializer that allows to create it directly.
    • 📜 CodableDownloadParser and JSONDecodableDownloadParser, replacement class DownloadSerializer has been introduced, it allows to create a data model by implementing DownloadResponseSerializerProtocol
    • UploadAPIRequest.performMultipart method, because multipart upload is no longer a special case in Alamofire 5, please use UploadAPIRequest.perform instead.

    💥 Breaking

    • 0️⃣ headers property of BaseRequest now contains HTTPHeaders type instead of [String: String]. Please note that along with HeaderBuilder removal TRON no longer sends 'Accept':'application/json' header by default.
    • APIError is changed to be able to accept SerializedObject and is now a class with nullable initializer. Also, DownloadAPIError type has been introduced for download errors, that do not have Data in them, but have fileURL instead.
    • 🔌 Plugin methods that previously accepted APIError<ErrorModel> now accept ErrorModel directly. Added didSuccessfullyParseDownloadResponse and didReceiveDownloadResponse methods.
    • 📜 All concrete implementations of DataResponseSerializerProtocol such as CodableParser and JSONDecodableParser now have only one generic argument - Model and are only parsing model type.
    • 🚚 JSONDecodableParser and CodableParser now have only one generic argument - Model, since ErrorModel is now moved to ErrorSerializable protocol, that does not depend on any particular serializer.
    • 🔌 APIStub has been rewritten from scratch to allow injecting only results of network request(URLRequest, HTTPURLResponse, Data, Error and fileURL) as opposed to actual Model and errorModel as well as definition of successful/unsuccessful requests. APIStub now is been attached to Alamofire.Request when stubbing for this particular request has been enabled. Rewrite also allows plugin callbacks to be called more consistently for both stubbed and unstubbed cases.
    • 🔀 rxMultipartResult method on UploadRequest method was removed since UploadRequest for multipart requests in Alamofire 5 is now synchronous and now does not require special handling. You can now call rxResult replacement method instead.
  • v4.2.2

    April 08, 2019
    • Swift 4.2 version is now specified in podspec for users of CocoaPods 1.6.x.

    🚀 This is the last release that supports Xcode 9 and Swift 3.

  • v4.2.1

    May 03, 2018

    🛠 Fixed

    • 🔌 UploadAPIRequest now calls didReceiveDataResponse plugin methods when sending multipart-form requests.
  • v4.2.0

    April 12, 2018
    • 👍 Implemented JSONDecodable support for Arrays, whose Element is JSONDecodable. Requires Swift 4.1 to work.