Alamofire is an HTTP networking library written in Swift that provides elegant abstractions for making network requests. The library is built on top of Apple's URLSession framework and offers a chainable request and response API that allows developers to write powerful networking code in just a few lines. The primary language is Swift, and it is classified as a networking library focused on HTTP requests, REST API interactions, JSON parsing, response handling, session management, authentication, and data serialization.
The library supports multiple installation methods including CocoaPods, Carthage, Swift Package Manager, and manual integration. It requires Swift 6.0 and Xcode 16.0 as minimum versions, with support for iOS 10.0 and above, macOS 10.12 and above, tvOS 10.0 and above, and watchOS 3.0 and above. The library also builds on Linux, Windows, and Android through Swift Package Manager, though these platforms are unsupported due to missing features and issues in the underlying swift-corelibs-foundation.
Core features include chainable request and response methods, Swift Concurrency support back to iOS 13, macOS 10.15, tvOS 13, and watchOS 6, and Combine framework integration. The library handles URL and JSON parameter encoding, supports uploading files, data, streams, and multipart form data, and provides downloading capabilities using requests or resume data. It includes authentication support with URLCredential, HTTP response validation, upload and download progress closures, cURL command output generation, dynamic request adaptation and retry mechanisms, TLS certificate and public key pinning, and network reachability monitoring. The library also provides comprehensive unit and integration test coverage and complete documentation.
The Alamofire Software Foundation maintains component libraries to extend the core networking functionality. AlamofireImage provides image response serializers, UIImage and UIImageView extensions, custom image filters, an auto-purging in-memory cache, and a priority-based image downloading system. AlamofireNetworkActivityIndicator controls the visibility of the network activity indicator on iOS and supports configurable delay timers to mitigate flicker.
The library includes migration guides for versions 2.0 through 5.0, reflecting its evolution over time. Advanced usage documentation covers session management, session delegates, request routing, request adaptation and retry mechanisms, custom response handlers, Swift Concurrency integration, Combine support, security features including certificate pinning, and network reachability. The documentation distinguishes between basic usage for common networking tasks and advanced usage for complex scenarios requiring fine-grained control over session behavior and request lifecycle management.