AFNetworking

A delightful networking framework for iOS, macOS, watchOS, and tvOS.

Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402Star full 4f7b624809470f25b6493d5a7b30d9b9cb905931146e785d67c86ef0c205a402 (1 ratings)
Rated 5.0 out of 5
Subscribe to updates I use AFNetworking


Statistics on AFNetworking

Number of watchers on Github 30775
Number of open issues 271
Average time to close an issue 13 days
Main language Objective-C
Average time to merge a PR 5 days
Open pull requests 140+
Closed pull requests 54+
Last commit 9 months ago
Repo Created over 7 years ago
Repo Last Updated 8 months ago
Size 5.28 MB
Homepage http://afnetworki...
Organization / Authorafnetworking
Latest Release3.2.0
Contributors254
Page Updated
Do you use AFNetworking? Leave a review!
View open issues (271)
View AFNetworking activity
View TODOs for AFNetworking (2)
View on github
Latest Open Source Launches
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating AFNetworking for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

AFNetworking

Build Status codecov.io CocoaPods Compatible Carthage Compatible Platform Twitter

AFNetworking is a delightful networking library for iOS, macOS, watchOS, and tvOS. It's built on top of the Foundation URL Loading System, extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use.

Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac.

Choose AFNetworking for your next project, or migrate over your existing projectsyou'll be happy you did!

How To Get Started

Communication

  • If you need help, use Stack Overflow. (Tag 'afnetworking')
  • If you'd like to ask a general question, use Stack Overflow.
  • If you found a bug, and can provide steps to reliably reproduce it, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

AFNetworking supports multiple methods for installing the library in a project.

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like AFNetworking in your projects. See the Getting Started guide for more information. You can install it with the following command:

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build AFNetworking 3.0.0+.

Podfile

To integrate AFNetworking into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

target 'TargetName' do
pod 'AFNetworking', '~> 3.0'
end

Then, run the following command:

$ pod install

Installation with Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate AFNetworking into your Xcode project using Carthage, specify it in your Cartfile:

github "AFNetworking/AFNetworking" ~> 3.0

Run carthage to build the framework and drag the built AFNetworking.framework into your Xcode project.

Requirements

AFNetworking Version Minimum iOS Target Minimum macOS Target Minimum watchOS Target Minimum tvOS Target Notes
3.x iOS 7 OS X 10.9 watchOS 2.0 tvOS 9.0 Xcode 7+ is required. NSURLConnectionOperation support has been removed.
2.6 -> 2.6.3 iOS 7 OS X 10.9 watchOS 2.0 n/a Xcode 7+ is required.
2.0 -> 2.5.4 iOS 6 OS X 10.8 n/a n/a Xcode 5+ is required. NSURLSession subspec requires iOS 7 or OS X 10.9.
1.x iOS 5 Mac OS X 10.7 n/a n/a
0.10.x iOS 4 Mac OS X 10.6 n/a n/a

(macOS projects must support 64-bit with modern Cocoa runtime).

Programming in Swift? Try Alamofire for a more conventional set of APIs.

Architecture

NSURLSession

  • AFURLSessionManager
  • AFHTTPSessionManager

Serialization

  • <AFURLRequestSerialization>
    • AFHTTPRequestSerializer
    • AFJSONRequestSerializer
    • AFPropertyListRequestSerializer
  • <AFURLResponseSerialization>
    • AFHTTPResponseSerializer
    • AFJSONResponseSerializer
    • AFXMLParserResponseSerializer
    • AFXMLDocumentResponseSerializer (macOS)
    • AFPropertyListResponseSerializer
    • AFImageResponseSerializer
    • AFCompoundResponseSerializer

Additional Functionality

  • AFSecurityPolicy
  • AFNetworkReachabilityManager

Usage

AFURLSessionManager

AFURLSessionManager creates and manages an NSURLSession object based on a specified NSURLSessionConfiguration object, which conforms to <NSURLSessionTaskDelegate>, <NSURLSessionDataDelegate>, <NSURLSessionDownloadDelegate>, and <NSURLSessionDelegate>.

Creating a Download Task

NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];

NSURL *URL = [NSURL URLWithString:@"http://example.com/download.zip"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];

NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) {
    NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil];
    return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]];
} completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) {
    NSLog(@"File downloaded to: %@", filePath);
}];
[downloadTask resume];

Creating an Upload Task

NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];

NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];

NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"];
NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithRequest:request fromFile:filePath progress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
    if (error) {
        NSLog(@"Error: %@", error);
    } else {
        NSLog(@"Success: %@ %@", response, responseObject);
    }
}];
[uploadTask resume];

Creating an Upload Task for a Multi-Part Request, with Progress

NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
        [formData appendPartWithFileURL:[NSURL fileURLWithPath:@"file://path/to/image.jpg"] name:@"file" fileName:@"filename.jpg" mimeType:@"image/jpeg" error:nil];
    } error:nil];

AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];

NSURLSessionUploadTask *uploadTask;
uploadTask = [manager
              uploadTaskWithStreamedRequest:request
              progress:^(NSProgress * _Nonnull uploadProgress) {
                  // This is not called back on the main queue.
                  // You are responsible for dispatching to the main queue for UI updates
                  dispatch_async(dispatch_get_main_queue(), ^{
                      //Update the progress view
                      [progressView setProgress:uploadProgress.fractionCompleted];
                  });
              }
              completionHandler:^(NSURLResponse * _Nonnull response, id  _Nullable responseObject, NSError * _Nullable error) {
                  if (error) {
                      NSLog(@"Error: %@", error);
                  } else {
                      NSLog(@"%@ %@", response, responseObject);
                  }
              }];

[uploadTask resume];

Creating a Data Task

NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration];

NSURL *URL = [NSURL URLWithString:@"http://httpbin.org/get"];
NSURLRequest *request = [NSURLRequest requestWithURL:URL];

NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
    if (error) {
        NSLog(@"Error: %@", error);
    } else {
        NSLog(@"%@ %@", response, responseObject);
    }
}];
[dataTask resume];

Request Serialization

Request serializers create requests from URL strings, encoding parameters as either a query string or HTTP body.

NSString *URLString = @"http://example.com";
NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]};

Query String Parameter Encoding

[[AFHTTPRequestSerializer serializer] requestWithMethod:@"GET" URLString:URLString parameters:parameters error:nil];
GET http://example.com?foo=bar&baz[]=1&baz[]=2&baz[]=3

URL Form Parameter Encoding

[[AFHTTPRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters error:nil];
POST http://example.com/
Content-Type: application/x-www-form-urlencoded

foo=bar&baz[]=1&baz[]=2&baz[]=3

JSON Parameter Encoding

[[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters error:nil];
POST http://example.com/
Content-Type: application/json

{"foo": "bar", "baz": [1,2,3]}

Network Reachability Manager

AFNetworkReachabilityManager monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.

  • Do not use Reachability to determine if the original request should be sent.
    • You should try to send it.
  • You can use Reachability to determine when a request should be automatically retried.
    • Although it may still fail, a Reachability notification that the connectivity is available is a good time to retry something.
  • Network reachability is a useful tool for determining why a request might have failed.
    • After a network request has failed, telling the user they're offline is better than giving them a more technical but accurate error, such as request timed out.

See also WWDC 2012 session 706, Networking Best Practices..

Shared Network Reachability

[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
    NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status));
}];

[[AFNetworkReachabilityManager sharedManager] startMonitoring];

Security Policy

AFSecurityPolicy evaluates server trust against pinned X.509 certificates and public keys over secure connections.

Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.

Allowing Invalid SSL Certificates

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production

Unit Tests

AFNetworking includes a suite of unit tests within the Tests subdirectory. These tests can be run simply be executed the test action on the platform framework you would like to test.

Credits

AFNetworking is owned and maintained by the Alamofire Software Foundation.

AFNetworking was originally created by Scott Raymond and Mattt Thompson in the development of Gowalla for iPhone.

AFNetworking's logo was designed by Alan Defibaugh.

And most of all, thanks to AFNetworking's growing list of contributors.

Security Disclosure

If you believe you have identified a security vulnerability with AFNetworking, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker.

License

AFNetworking is released under the MIT license. See LICENSE for details.

AFNetworking open issues Ask a question     (View All Issues)
  • about 2 years App crashes at [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)] function
  • about 2 years Why this networking framework can't support the request of synchronous?
  • about 2 years The operation couldn’t be completed. (NSURLErrorDomain error -1004.)
  • about 2 years Images are not removed from disk after clearing cache
  • about 2 years Add support for NSURLSessionTaskMetrics?
  • about 2 years Do not save downloaded file upon failure response
  • about 2 years you are great!!
  • about 2 years about response json value
  • about 2 years response: cache the post response
  • about 2 years An instance of class __NSCFBackgroundDownloadTask was deallocated while KVO still registered with it
  • about 2 years Request: disclose release plans
  • about 2 years Huge memory leaks in AFJSONObjectByRemovingKeysWithNullValues method.
  • about 2 years AFHTTPSessionManager.requestSerializer set HTTPHeaderField is invalid
  • about 2 years why my request do not return error when no net state.
  • about 2 years 'Invalid type in JSON write (_SwiftValue)
  • about 2 years Error Domain=NSURLErrorDomain Code=-1009
  • about 2 years pod install issues help
  • about 2 years Implementing custom framework-"Undefined symbols for architecture x86_64:"
  • about 2 years user Cellular request failed
  • about 2 years MultipleForm Request Concurrency
  • about 2 years how to clear cache in AFNetworking 3.0 ?
  • about 2 years operationQueue property is misleading and should not be exposed public
  • about 2 years EXC_BAD_ACCESS in not main thread
  • about 2 years afnetworking reachability ios 10 simulator
  • about 2 years In order to validate a domain name for self signed certificates, you MUST use pinning
  • about 2 years CRASH - dispatch_async in AFURLSessionManager.m
  • about 2 years Reference to 'AFSSLPinningModeCertificate' is ambiguous
  • about 2 years Cookies are always empty in WatchOS 3
  • about 2 years Crash on AFHTTPRequestSerializer
  • about 2 years __NSCFBackgroundDownloadTask was deallocated while key value observers were still registered with it. Current observation info:
AFNetworking open pull requests (View All Pulls)
  • Fix spelling
  • Fixed image memory calculation
  • Resolved compiler warnings
  • Fixed issue where UIButton image downloading called wrong cancel method
  • Correct serizalization of NSArray of NSDictionary
  • Implemented image downloading progress on UIImageView+AFNetworking
  • Adding new appendPartWithFormData method with Content-Type parameter in AFMultipartFormData
  • Add image download progress on UIImageView+AFNetworking category
  • Tighten the description of the progress parameter
  • Fixed status code 204/205 handling
  • AFURLSessionManager Background upload Tests
  • Using thread safe NSFileManager objects instead of shared instance
  • Let app devs use taskDescription by using associated objects internally
  • Changed Accept-Language header to start with the locale with country code (with more tests)
  • Implemented Public Key Hash Pinning
  • Fix carthage support 2.x
  • Update documentation to match method names
  • AFImageResponseSerializer tests
  • Added synchronous methods to AFHTTPSessionManager
  • fixed crash sometimes
  • Improve AFAutoPurgingImageCache performance.
  • Use `NSKeyValueChangeNewKey` in change dictionary.
  • Master
  • Prevent AFImageDownloader crashing when passing invalid NSURLRequest (#3343)
  • Fix - Image Cache Tests
  • Fix for iOS 7 background upload tasks not updating progress
  • [WIP] Add Playground examples for iOS
  • Pinning failure better error
  • AF created file when http server return 404
  • Master
  • etag
  • Short-circuit unnecessary calls to SecTrustEvaluate() in pinning mode
  • Add simple GET and POST examples to readme
  • Feature Request: Support GIFs
  • extract the user agent generation from the requestSerialization init.
  • Reachability tests
  • #3503 Version defines
  • documenting the workaround to uploadTaskWithRequest:fromFile: bug
  • Change compile-time check to runtime check.
  • Added iPV6 support for ReachabilityManager in 2.x
  • Use dispatch queue for reachability callbacks
  • Fixed nullability errors
  • Update AFNetworkReachabilityManager.m
  • Update iOS Example
  • Fix for crashes due to dangerous NSMutableDictionary access in AFHTTPRequestSerialiser
  • Master
  • move [self didChangeValueForKey:@"currentState"]; into if scope
  • Fixed issue where response serializers did not inherit super class copying
  • Update Post.h
  • Fix crash around customizing NSURLCache size.
  • Validate server trust asynchronously
  • require app extension api only on watchOS
  • Remove KVO of progress in favor of using the NSURLSession delegate APIs
  • 添加了一个新功能
  • Fixed an issue where registering a UIProgessView to a task that was a…
  • Use copy for NSString NSDictionary NSSet NSArray properties.
  • Check return value before doing anything with error.
  • Fixed issue where NS_UNAVAILABLE is not reported
  • Master
  • change ipv6 condition in ReachabilityManager
  • Removing NULL objects within an Array
  • change bool value usage
  • update
  • Fix reachability tests
  • Removed ambiguous array creation in AFSecurityPolicy
  • Check data validation if nil not only length before parse response Object from NSJSONSerialization
  • Use `strongSelf` local variable
  • Add XMLParser/XMLDocument serializer tests
  • Search for default pinned certificates in the main bundle
  • Clarify documentation for supported encodings in AFJSONResponseSerializer
  • Feature Request: Support GIFs
  • Master
  • Added startRequestsImmediately to AFHTTPSessionManager
  • Merge pull request #1 from AFNetworking/master
  • Correct nullability
  • Fixed the bug of AFNetworkReachabilityManager default init do not have a current network status.
  • Support git feature.
  • Unwrap license text
  • delete it for support DNS
  • 去掉总量数据推断
  • Fixed a warning when linking from an app extension
  • Add sender object when posting AFNetworkingReachabilityDidChangeNotification
  • AFNetworking: fix warnings.
  • Fix imageRequestCancel bug.
  • just a test
  • Redirect response should return nullable NSURLRequest
  • is
  • test
  • none
  • Create benfranklin
  • test qu
  • UIImageView and UIButton setImageWithURL: internally uses requestSerializer
  • wgj Patch 4
  • test_test
  • remove duplicated setting of responseSerializer & refresh ssl certificate chain for security test case
  • Fix CHANGELOG formatting
  • test
  • Fix wrong delegate method in `AFURLSessionManager` annotation
  • Add support for "image/jp2" mime type
  • Add - Custom HTTPHeaderField remove method.
  • Fix objects array serialization
  • AFURLRequestSerialization: use dispatch_barrier_sync for header changes
  • fix AssociatedObject bug
  • AFJSONObjectByRemovingKeysWithNullValues use less memory
  • Xcode upgrade check
  • Add iOS 10 metrics to task complete notification
  • AFNetworking
  • Resolve memory leaks
  • The copy should be strong.
  • Fix urlquery
  • UIImageView+AFNetworking: Prevent stuck state for malformed urlRequest
  • Fix analyzer warning for upload task creation
  • Support for setting headers per request when using AFHTTPSessionManager.
  • fix #1825 bug. Because you call ``` [super encodeWithCoder:coder]; ``…
  • This might call some memory leaks
  • use Objective-C 2.0 subscripting
  • Fixed CLANG_ENABLE_CODE_COVERAGE flag so release can be made
  • [Thread Race] removeObjectForKey: in NSDictionary.
  • fix the bug of isReachable method is ineffective, by x5.
  • fix the bug of isReachable method is ineffective
  • Modifies AFJSONObjectByRemovingKeysWithNullValues to remove NSArray null objects
  • Exposes C function prototype
  • Allow extension api only
  • Fixed one issue which is:
  • fix memory leak issue
  • Adding tvOS User Agent
  • Change dataTaskWithHTTPMethod visibility to public
  • Add - Custom HTTPHeaderField remove method.
  • fix space used in Objective-C method (coding style)
  • Task created in a session that has been invalidate
  • Add Alamofire’s security policy test suite (including certificates) to AFNetworking’s
  • Update AFURLResponseSerialization.m
  • fixed memory leak on NSURLSession ("load" method in _AFURLSessionTask…
  • Fix AFURLSessionManager security weakness
  • fixed a bug when URLString like "https://www.google.com?"
  • Merge pull request #1 from AFNetworking/master
  • make it better!
  • 测试
  • Remove conflicting nullable specifier on init
  • Remove conflicting nullable specifier on init
AFNetworking questions on Stackoverflow (View All Questions)
  • AFNetworking 3.0 setImageWithURLRequest download progress
  • AFNetworking cancel post request
  • AFNetworking 3.0 status code
  • Appending image in collectionView using AFNetworking
  • Make a progress bar for get the response with AFNetworking 3.0
  • Request failed: how to set content-type: application/json using AFNetworking 3.0
  • Pods install not installing all files in AFNetworking on existing project
  • AFNetworking with UIWebView issue
  • AFNetworking Json post image
  • AFNetworking 3.x multipart form upload
  • AFNetworking 3.0 multipart request
  • AFNetworking batch requests - canceling when first one fails
  • Request failed: unacceptable content-type: text/html using AFNetworking 2.0
  • What does registerHTTPOperationClass in AFNetworking actually do?
  • Set HTTP Body to AFNetworking instead of using native request
  • Swift AFNetworking POST error
  • Domain=NSCocoaErrorDomain Code=3840 error in afnetworking 2.0
  • Cocoa Error 3840 on AFNetworking
  • dyld: Library not loaded: @rpath/AFNetworking.framework/AFNetworking
  • Using AFNetworking for Web Service data retrieval
  • Uploading image to server reached damaged using AFNetworking
  • How can I get the correct JSON text in AFNetworking in swift
  • AFNetworking without cocoa pods
  • AFNetworking - How to make POST request
  • Unit test for AFNetworking Post request
  • AFNetworking migration from 1.x to 3.x
  • SocketRocket and AFNetworking cookie sync
  • How to intercept the response of AFNetworking request in Objective-C?
  • AFNetworking accept content type error: {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}
  • Why AFNetworking taking too much time(86sec) to upload image(2mb)
AFNetworking list of languages used
AFNetworking latest release notes
3.2.0 3.2.0

Released on Friday, December 15, 2017. All issues associated with this milestone can be found using this filter.

Added

  • Config AFImageDownloader NSURLCache and ask AFImageRequestCache implementer if an image should be cached
    • Implemented by wjehenddher in #4010.
  • Add XMLParser/XMLDocument serializer tests
    • Implemented by skyline75489 in #3753.
  • Enable custom httpbin URL with HTTPBIN_BASE_URL environment variable
    • Implemented by 0xced in #3748.
  • AFHTTPSessionManager now throws exception if SSL pinning mode is set for non https sessions
    • Implemented by 0xced in #3687.

Updated

  • Update security policy test certificates
    • Implemented by SlaunchaMan in #4103.
  • Allow return value of HTTP redirection block to be NULL
    • Implemented by TheDom in #3975.
  • Clarify documentation for supported encodings in AFJSONResponseSerializer
    • Implemented by skyline75489 in #3750.
  • Handle Error Pointers according to Cocoa Convention
    • Implemented by tclementdev in #3653.
  • Updates AFHTTPSessionManager documentation to reflect v3.x change
    • Implemented by ecaselles in #3476.
  • Improved code base to generate fewer warnings when using stricter compiler settings
    • Implemented by 0xced in 3431.

Changed

  • Change Mac OS X and OS X references to macOS
    • Implemented by SlaunchaMan in #4104.

Fixed

  • Fixed crash around customizing NSURLCache size for < iOS 8.2
    • Implemented by kcharwood in #3735.
  • Fixed issue where UIWebView extension did not preserve all of the request information
    • Implemented by skyline75489 in #3733.
  • Fixed bug with webview delegate callback
    • Implemented by kcharwood in #3727.
  • Fixed crash when passing invalid JSON to request serialization
    • Implemented by 0xced in #3719.
  • Fixed potential KVO crasher for URL Session Task delegates
    • Implemented by 0xced in #3718.
  • Removed ambiguous array creation in AFSecurityPolicy
    • Implemented by sgl0v in #3679.
  • Fixed issue where NS_UNAVAILABLE is not reported for AFNetworkReachabilityManager
    • Implemented by Microbee23 in #3649.
  • Require app extension api only on watchOS
    • Implemented by ethansinjin in #3612.
  • Remove KVO of progress in favor of using the NSURLSession delegate APIs
    • Implemented by coreyfloyd in #3607.
  • Fixed an issue where registering a UIProgessView to a task that was causing a crash
    • Implemented by Starscream27 in #3604.
  • Moved [self didChangeValueForKey:@"currentState"] into correct scope
    • Implemented by chenxin0123 in #3565.
  • Fixed issue where response serializers did not inherit super class copying
    • Implemented by kcharwood in #3559.
  • Fixed crashes due to race conditions with NSMutableDictionary access in AFHTTPRequestSerializer
    • Implemented by alexbird in #3526.
  • Updated dash character to improve markdown parsing for license
    • Implemented by gemmakbarlow in #3488.

Removed

  • Deprecate the unused stringEncoding property of AFHTTPResponseSerializer
    • Implemented by 0xced in #3751.
  • Removed unused AFTaskStateChangedContext
    • Implemented by yulingtianxia in #3432.
3.1.0 3.1.0

Released on Thursday, March 31, 2016. All issues associated with this milestone can be found using this filter.

Added

  • Improved AFImageResponseSerializer test coverage
    • Implemented by quellish in #3367.
  • Exposed AFQueryStringFromParameters and AFPercentEscapedStringFromString for public use.
    • Implemented by Kevin Harwood in #3160.

Updated

  • Updated Test Suite to run on Xcode 7.3
    • Implemented by Kevin Harwood in #3418.
  • Added white space to URLs in code comment to allow Xcode to properly parse them
    • Implemented by Draveness in #3384.
  • Updated documentation to match method names and correct compiler warnings
    • Implemented by Hakon Hanesand in #3369.
  • Use NSKeyValueChangeNewKey constant in change dictionary rather than hardcoded string.
    • Implemented by Wenbin Zhang in #3360.
  • Resolved compiler warnings for documentation errors
    • Implemented by Ricardo Santos in #3336.

Changed

  • Reverted NSURLSessionAuthChallengeDisposition to NSURLSessionAuthChallengeCancelAuthenticationChallenge for SSL Pinning
    • Implemented by Kevin Harwood in #3417.

Fixed

  • Removed trailing question mark in query string if parameters are empty
    • Implemented by Kevin Harwood in #3386.
  • Fixed crash if bad URL was passed into the image downloader
    • Implemented by Christian Wen and Kevin Harwood in #3385.
  • Fixed image memory calculation
    • Implemented by in #3344.
  • Fixed issue where UIButton image downloading called wrong cancel method
    • Implemented by duanhong in #3332.
  • Fixed image downloading cancellation race condition
    • Implemented by Kevin Harwood in #3325.
  • Fixed static analyzer warnings on AFNetworkReachabilityManager
    • Implemented by Jeff Kelley in #3315.
  • Fixed issue where download progress would not be reported in iOS 7
    • Implemented by zwm in #3294.
  • Fixed status code 204/205 handling
    • Implemented by Kevin Harwood in #3292.
  • Fixed crash when passing nil/null for progress in UIWebView extension
    • Implemented by Kevin Harwood in #3289.

Removed

  • Removed workaround for NSJSONSerialization bug that was fixed in iOS 7
    • Implemented by Cedric Luthi in #3253.
3.0.4 3.0.4

Released on Friday, December 18, 2015. All issues associated with this milestone can be found using this filter.

Fixed

  • Fixed issue where AFNSURLSessionTaskDidResumeNotification was removed twice
    • Implemented by Kevin Harwood in #3236.
Other projects in Objective-C