Skip to content

1.0.0-beta.1

Compare
Choose a tag to compare
@DenTelezhkin DenTelezhkin released this 15 May 11:23
· 333 commits to main since this release

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](/Docs/1.0 Migration Guide.md).

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:)