2.0.0-beta.1
Pre-release
Pre-release
·
289 commits
to main
since this release
TRON
2.0 is supported on iOS 9.0, macOS 10.11 and higher due to Alamofire.framework required versions. Read [migration guide](/Docs/2.0 Migration Guide.md) for overview of API changes.
NOTE This release uses forked SwiftyJSON, and SwiftyJSON3
cocoapod, because original repo has not been updated to Swift 3. In future release we hope to use SwiftyJSON
cocoapod. Comment on SwiftyJSON repo.
API changes
ResponseParseable
was rewritten and renamed toParseable
. It now allows creating models without using a constructor. Therefore, it's now possibly to use really any kind of mapper and make factory-like response builders.- Success blocks on
APIRequest
are now optional and equal to nil by default. MultipartAPIRequest
now becomes a part of largerUploadAPIRequest
class.- Introduced new
DownloadAPIRequest
class, that receives part ofAPIRequest
functionality.
Renamings
- Swift 3 API design guidelines have been applied to all API.
perform(completion:)
method was renamed toperformCollectingTimeline(withCompletion:)
to better match method internal behaviourencoding
property onTRON
and requests has been renamed toparameterEncoding
and now has a different type -Alamofire.ParameterEncoding
Removals
responseBuilder
property onAPIRequest
was removed, as it's no longer used when parsing received response.JSONDecodable
extension onArray
is temporarily unavailable due to issues with Swift compiler.encodingStrategy
property on TRON was removed - please useparameterEncoding
instead.TRON.RESTencodingStrategy
andTRON.URLEncodingStrategy
were removed - please refer to Alamofire 4 migration guide for details.RequestType
enum was replaced byUploadRequestType
andDownloadRequestType
onDownloadAPIRequest
andUploadAPIRequest
classes.