Skip to content

Releases: MLSDev/TRON

4.1.0

28 Dec 15:58
Compare
Choose a tag to compare
  • Deprecate TRON level headerBuilder in favor of Alamofire.requestAdapter.
  • Loosen CodableParser generic constraints to be able to work with Decodable protocol instead of Codable.

4.0.0

15 Nov 13:51
Compare
Choose a tag to compare
  • Compiled with Xcode 9.1 / Swift 4.0.2

4.0.0-beta.2

29 Sep 19:10
Compare
Choose a tag to compare
  • RxSwift dependency is bumped up to 4.0.0-beta.0, SwiftyJSON dependency is bumped to 4.0.0-alpha.1
  • Binary release is compiled with Xcode 9.0 Swift 4 compiler.
  • Added ability to customize JSONSerialization.ReadingOptions for JSONDecodableSerializer. Unlike previous releases, no options are specified by default(Previously SwiftyJSON used allowFragments option).

To have old behavior that allows fragmented json, use:

let request = tron.swiftyJSON(readingOptions: .allowFragments).request("path")
  • Added ability to customize JSONDecoder for CodableSerializer for both model parsing and error parsing.
  • CodableParser and JSONDecodableParser are now classes, that are subclassible.

4.0.0-beta.1

10 Sep 18:29
Compare
Choose a tag to compare

This is major release, containing breaking API changes, please read TRON 4.0 Migration Guide

  • Implemented support for Codable protocol.
  • APIError now takes it's localizedDescription from underlying errorModel if that model is LocalizedError, and from error.localizedDescription if not.

Breaking changes

  • SwiftyJSONDecodable methods are now prefixed with .swiftyJSON, like so:
// old
let request = tron.request("path")
// new
let request = tron.swiftyJSON.request("path")

3.1.1

04 Sep 16:05
Compare
Choose a tag to compare
  • Makes NetworkActivityPlugin always use API from the main thread(thanks, @mgurreta)!

3.1.0

02 Sep 18:18
Compare
Choose a tag to compare
  • Preliminary support for Swift 3.2 and Swift 4(Xcode 9 beta 6).

3.0.3

31 May 17:20
Compare
Choose a tag to compare
  • Prevent upload requests from being sent using performMultipart method if they are not of .multipartFormData type and vice versa, add specific assertions and error messages.
  • Added isMultipartRequest property on UploadRequestType.

3.0.2

28 May 16:43
Compare
Choose a tag to compare
  • Improved SPM integration and CI scripts
  • Added validationClosure properties on APIRequest, DownloadAPIRequest and UploadAPIRequest that allow customizing validation behaviour. Default behaviour, as before, is calling validate() method on Request.

3.0.1

22 Feb 15:40
Compare
Choose a tag to compare
  • Constructors on APIRequest, UploadAPIRequest, APIStub are made public to allow overriding in subclasses.

3.0.0

18 Feb 18:04
Compare
Choose a tag to compare

Breaking changes

  • dispatchQueue property was removed from Plugin protocol. All Plugin events are now called synchronously to allow write access to objects, expecially requests. If Plugin requires any specific dispatch queue to run on, it must implement this logic itself.

Bugfixes

  • APIStub will now print error to console, if it failed to build model from file.
  • NetworkLoggerPlugin will no longer double escape characters, when printing successful request cURL to console.