Alamofire Versions Save

Elegant HTTP Networking in Swift

5.0.0-rc.2

4 years ago

Released on 2019-09-08. All issues associated with this milestone can be found using this filter. Note: Alamofire 5 is now API stable.

Fixed

  • Single remaining use of Error instead of generic Failure constraint in DataResponse API.

5.0.0-rc.1

4 years ago

Released on 2019-09-04. All issues associated with this milestone can be found using this filter. Note: Alamofire 5 is now API stable.

Added

  • cancelAllRequests method on Session to cancel all in flight requests.
  • Ability to inject FileManager instance into UploadRequest.
  • DataPreprocessor protocol and implementations, allowing the preprocessing of data before serialization.
  • Internal URLRequest validation and error. GET requests with body data will now produce an error.
  • Generic Failure constraint to DataResponse and DownloadResponse, making them DataResponse<Success, Failure: Error> and DownloadResponse<Success, Failure: Error>.
  • Precondition to ensure Session can't be used with background URLSessionConfigurations. Alamofire will explicitly support such functionality at some point in the future.
  • SwiftFormat configuration and updated styling.
  • AFDataResponse<Success> and AFDownloadResponse<Success> typealiases to help deal with the doubly generic responses.

Updated

  • All internal Result usage to use the fully qualified type instead of AFResult.
  • DataRequest and DownloadRequest functional API, renaming flatMap to tryMap.
  • HTTPMethod to be a struct rather than an enum.
  • All errors produced by Alamofire to be AFError by default. All responses will now start with an AFError Failure type.
  • NetworkReachabilityManager to simplify and modernize its API.
  • Usage.md documentation to be fully up-to-date with Alamofire 5.
  • Bundle identifiers to include the platform name, fixing ITMS-90806.

Fixed

  • Thread-safety issue with serialization queue usage.

4.9.0

4 years ago

Released on 2019-09-03. All issues associated with this milestone can be found using this filter.

Added

  • API to cancel DownloadRequests without producing resume data.

Updated

  • Bundle identifiers to include the platform name, fixing ITMS-90806.

Fixed

  • NetworkReachabilityManager behavior regression from 4.8.1.
  • Memory leak when using validate().

5.0.0-beta.7

4 years ago

Released on 2019-07-29. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

Added

  • URLEncodedFormEncoder.DataEncoding and URLEncodedFormEncoder.KeyEncoding to customize the encoding of Data and CodingKeys in URLEncodedFormEncoder.
  • Asynchronous cURLDescription method to produce cURL commands for Requests which are in the process of creating their initial URLRequest.

Updated

  • All inline API documentation.
  • Handling of response serializers appended after a Request has completed. This no longer produces an error but will instead trigger the normal Request lifetime methods.

Fixed

  • Empty parameters being encoded as an empty String instead of nil by URLEncodedFormEncoder.
  • Handling of os_unfair_lock to prevent rare crash.

5.0.0-beta.6

5 years ago

Released on 2019-04-23. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

Updated

  • ServerTrustEvaluation logic by simplifying public key equality checks for SecKey types.
  • Request.State access to lock access and task updates using internal locking API.

Fixed

  • Issues in DownloadRequest where some events were being duplicated and some were missing.
  • Issue with AppStore submissions where the pre-release version in the bundle short versions string was being rejected when built with Carthage or as a submodule.
  • Issue where response serializer completions were not called when appended to a completed Request.

5.0.0-beta.5

5 years ago

Released on 2019-04-12. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

Added

  • Request.didResumeTaskNotification, Request.didSuspendTaskNotification, Request.didCancelTaskNotification, and Request.didCompleteTaskNotification notifications.
  • Separate URLSessionTask lifetime events to EventMonitor.

Updated

  • SessionStateProvider to no longer be public and renamed the file it lives in.
  • MultipartUpload to no longer be public.
  • Request, DataRequest, UploadRequest, and DownloadRequest to longer be open, as Alamofire does not support subclassing these types.
  • Names of the notifications posted by Request to include Notification.
  • httpHeaders extensions on URLRequest, HTTPURLResponse, and URLSessionConfiguration to be headers instead.

Fixed

  • Issue in Request where calling cancel() inside a response serializer would result in the serializer running again.
  • Issue in Session where the delegate precondition would be triggered when running with a swizzled URLSessionDelegate.
  • Compiler error in the example app.
  • Issues Request where certain lifetime events could be triggered more than once by repeatedly calling resume(), suspend(), or cancel().
  • Framework version string to be compatible with TestFlight and AppStore releases.

5.0.0-beta.4

5 years ago

Released on 2019-03-29. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

Added

  • The AlamofireExtended protocol and used it to namespace all public extensions.
  • The ability to retry requests after encountering response serialization errors.

Updated

  • The switch and DispatchQueue logic throughout codebase to simplify usage patterns.
  • The MultipartFormData data APIs by condensing them using optional parameters.
  • The upload APIs for MultipartFormData to support custom boundaries.
  • The Xcode project, source code, SPM package, and podspec to support Swift 5 only.
  • The Alamofire Result type to be a new AFResult typealias on the new Swift.Result type in Swift 5 and removed all public extensions.

Fixed

  • Issue in RequestInterceptor closures where callback arguments were not marked as @escaping.
  • Issue in response serializers where emptyResponseAllowed logic was not working as expected.

4.8.2

5 years ago

Released on 2019-03-27. All issues associated with this milestone can be found using this filter.

Fixed

  • Compatability with SPM from Xcode 10.2.

Updated

  • Project for compatability with Xcode 10.2.
  • MultipartFormData to have a mutable boundary.

5.0.0-beta.3

5 years ago

Released on 2019-01-07. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

Added

  • The EmptyResponse protocol, to allow any type to provides values to stand in for an empty response.
  • Request and response bodies to Request's debugDescription.

Updated

  • Package.swift for Swift 5 support, moving Swift 4.2 support to [email protected].
  • Use of Array to Range in Request's default acceptableResponseCodes.
  • RetryPolicy to allow subclasses to override retry(_:, for: Session, dueTo:, completion:).
  • Alamofire's didResume notification to didFinish, which is now called when a Request finished, not when tasks resume.

Fixed

  • Requests not finishing when their controlling Session is deinitd or invalidated.
  • Memory leak when using validate() due to reference cycle from implicit self capture when using an @autoclosure.
  • Crash when using requestDidParseAnyResponse when using ClosureEventMonitor.
  • RetryPolicy to properly conform to RequestInterceptor.
  • Typos in documentation.

5.0.0-beta.2

5 years ago

Released on 2019-01-07. All issues associated with this milestone can be found using this filter. Note: Alamofire will not be following semantic versioning during the beta process. There may be breaking changes until 5.0.0 is released.

Added

  • Support for controlling redirect behavior per Session and per Request using the RedirectHandler protocol.
  • Support for controlling cached response behavior per Session and per Request using the CachedResponseHandler protocol.
  • Support for controlling retry behavior per Session and per Request using the RequestInterceptor protocol.
  • The Adapter, Retrier, and Interceptor types to provide fine grained control of retry behavior.
  • Support for exponential backoff retry policies through the new RetryPolicy and ConnectionLostRetryPolicy types.

Updated

  • The RequestRetrier protocol to take a RetryResult in the completion closure allowing custom retry errors to be thrown.
  • The Hashable implementation on Request to use new hash(into:) API.