All Versions
49
Latest Version
Avg Release Cycle
60 days
Latest Release
960 days ago

Changelog History
Page 5

  • v1.0.0-beta.1 Changes

    ๐Ÿš€ TRON 1.0 is a major release with a lot of new features and breaking changes. To find out more about philosophy of those and how to adapt to new API's, read TRON 1.0 Migration Guide

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿšš RequestToken protocol removed, perform request methods now return Alamofire.Request? to allow customization. When request is stubbed, nil is returned.
    • ๐Ÿšš tron.multipartRequest(path:) removed, use tron.uploadMultipart(path:formData:) method instead
    • MultipartAPIRequest performWithSuccess(_:failure:progress:cancellableCallback:) method is replaced by performMultipart(success:failure:encodingMemoryThreshold:encodingCompletion:)
    • MultipartAPIRequest no longer subclasses APIRequest - they both now subclass BaseRequest.
    • ๐Ÿšš appendMultipartData(_:name:filename:mimeType:) on MultipartAPIRequest is removed. Please use Alamofire.Manager.MultipartFormData built-in methods to append multipart data
    • RxSwift extension on MultipartAPIRequest reworked to return single Observable
    • EventDispatcher class and corresponding TRON.dispatcher, APIRequest.dispatcher property are replaced by TRON and APIRequest properties - processingQueue and resultDeliveryQueue, which are used to determine on which queue should processing be performed and on which queue results should be delivered.
    • ๐Ÿšš Progress and ProgressClosure typealiases have been removed

    โž• Added

    • upload(path:file:) - upload from file
    • upload(path:data:) - upload data
    • upload(path:stream:) - upload from stream
    • download(path:destination:) - download file to destination
    • download(path:destination:resumingFromData:) - download file to destination, resuming from data
    • uploadMultipart(path:formData:) - multipart form data upload
    • perform(completion:) method, that accepts Alamofire.Response -> Void block.

    ๐Ÿ—„ Deprecations

    • ๐Ÿ—„ APIRequest performWithSuccess(_:failure:) method is deprecated, new name - perform(success:failure:)
  • v0.4.3 Changes

    ๐Ÿ›  Fixed

    • ๐Ÿ‘ Allow MultipartAPIRequest to use any StringLiteralConvertible value in parameters (for example Int, or Bool e.t.c).
  • v0.4.2 Changes

    ๐Ÿ›  Fixed

    • Prevent APIRequest from being deallocated if rxResult Observable is passed elsewhere without keeping strong reference to APIRequest itself.
  • v0.4.1 Changes

    ๐Ÿ›  Fixed

    • ๐Ÿ”Œ Plugins are now correctly notified with "willSendRequest(_:)" method call for multipart requests.
  • v0.4.0 Changes

    ๐Ÿ’ฅ Breaking

    • ๐Ÿš€ Update to Swift 2.2. This release is not backwards compatible with Swift 2.1.
    • ๐Ÿ”Œ NetworkActivityPlugin now accepts UIApplication in it's initializer to be able to compile in application extensions environments.
    • ๐Ÿ— NetworkActivityPlugin supports only single instance of TRON. If you have multiple TRONs in your application, consider building another plugin, that uses static variables to track number of requests, similar to old NetworkActivityPlugin from 5639b960e968586d1e24a7adcc6a3420e8648d49.

    โž• Added

    • โž• Added EmptyResponse class that can be used for requests with empty body. For example:
    let request : APIRequest<EmptyResponse, MyError> = tron.request("empty/response")
    
    • RxSwift extensions for APIRequest and MultipartAPIRequest, usage:
    let request : APIRequest<Foo, MyError> = tron.request("foo")
    _ = request.rxResult.subscribeNext { result in
        print(result)
    }
    
    let multipartRequest = MultipartAPIRequest<Foo,MyError> = tron.multipartRequest("foo")
    
    let (progress, result) = multipartRequest.rxUpload()
    
    _ = progress.subscribeNext { progress in
        print(progress.bytesSent,progress.totalBytesWritten,progress.totalBytesExpectedToWrite)
    }
    
    _ = result.subscribeNext { result in
        print("Received result: \(result)")
    }
    
  • v0.3.0 Changes

    Completion blocks are now handled by new EventDispatcher class, which is responsible for running completion blocks on predefined GCD-queue.

    Default behaviour - all parsing is made on QOS_CLASS_USER_INITIATED queue, success and failure blocks are called on main queue.

    You can specify processingQueue, successDeliveryQueue and failureDeliveryQueue on dispatcher property of TRON. After request creation you can modify queues using dispatcher property on APIRequest, or even replace EventDispatcher with a custom one.

  • v0.2.1 Changes

    โž• Added public initializer for NetworkActivityPlugin

  • v0.2.0 Changes

    โž• Add support for any custom mapper to be used with TRON. Defaulting to SwiftyJSON.

    Examples:

    Argo, ObjectMapper

    Limitations

    ๐Ÿ“œ ResponseParseable and JSONDecodable are now Self-requirement protocols with all their limitations. Apart from that, there are some other limitations as well:

    Subclasses

    ๐Ÿ“œ Subclassing ResponseParseable requires explicit typealias in subclassed model:

    class Ancestor: JSONDecodable {
        required init(json: JSON) {
    
        }
    }
    
    class Sibling: Ancestor {
        typealias ModelType = Sibling
    }
    

    Discussion in mailing Swift mailing lists

    Multiple custom mappers

    ๐Ÿ“œ Current architecture does not support having more than one mapper in your project, because Swift is unable to differentiate between two ResponseParseable extensions on different types.

    Arrays and CollectionTypes

    ๐Ÿ“œ Currently, there's no way to extend CollectionType or Array with JSONDecodable or ResponseParseable protocol, so creating request with ModelType of array(APIRequest<[Foo],Bar>) is not possible.

    Blocking radars: https://www.openradar.me/23433955 https://www.openradar.me/23196859

  • v0.1.0 Changes

    ๐ŸŽ‰ Initial OSS release, yaaaay!