Browse Source

Merge branch 'master' into master

Jeff Kelley 7 years ago
parent
commit
7b48feb383
79 changed files with 1639 additions and 253 deletions
  1. 20 10
      .travis.yml
  2. 3 3
      AFNetworking.podspec
  3. 79 27
      AFNetworking.xcodeproj/project.pbxproj
  4. 3 3
      AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme
  5. 9 9
      AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme
  6. 4 4
      AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme
  7. 1 1
      AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme
  8. 43 0
      AFNetworking/AFCompatibilityMacros.h
  9. 130 4
      AFNetworking/AFHTTPSessionManager.h
  10. 95 20
      AFNetworking/AFHTTPSessionManager.m
  11. 6 3
      AFNetworking/AFNetworkReachabilityManager.h
  12. 4 1
      AFNetworking/AFNetworkReachabilityManager.m
  13. 5 0
      AFNetworking/AFURLRequestSerialization.m
  14. 8 1
      AFNetworking/AFURLResponseSerialization.h
  15. 4 2
      AFNetworking/AFURLResponseSerialization.m
  16. 15 1
      AFNetworking/AFURLSessionManager.h
  17. 87 19
      AFNetworking/AFURLSessionManager.m
  18. 90 0
      CHANGELOG.md
  19. 93 27
      Example/AFNetworking Example.xcodeproj/project.pbxproj
  20. 11 1
      Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme
  21. 13 3
      Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme
  22. 21 11
      Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme
  23. 11 1
      Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme
  24. 1 1
      Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme
  25. 62 32
      Example/Assets.xcassets/AppIcon.appiconset/Contents.json
  26. 0 0
      Example/macOS Example/AppDelegate.h
  27. 0 0
      Example/macOS Example/AppDelegate.m
  28. 0 0
      Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json
  29. 0 0
      Example/macOS Example/Info.plist
  30. 16 15
      Example/macOS Example/MainMenu.xib
  31. 0 0
      Example/macOS Example/main.m
  32. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
  33. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
  34. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
  35. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json
  36. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json
  37. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json
  38. 7 1
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json
  39. 16 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json
  40. 4 0
      Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json
  41. 7 0
      Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json
  42. 1 0
      Framework/AFNetworking.h
  43. 3 3
      Framework/Info.plist
  44. 5 5
      README.md
  45. BIN
      Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer
  46. BIN
      Tests/Resources/HTTPBin.org/httpbinorg_08132017.cer
  47. BIN
      Tests/Resources/HTTPBin.org/httpbinorg_10102018.cer
  48. 8 0
      Tests/Tests/AFAutoPurgingImageCacheTests.m
  49. 4 4
      Tests/Tests/AFCompoundResponseSerializerTests.m
  50. 3 1
      Tests/Tests/AFHTTPRequestSerializationTests.m
  51. 220 4
      Tests/Tests/AFHTTPSessionManagerTests.m
  52. 132 0
      Tests/Tests/AFImageDownloaderTests.m
  53. 2 1
      Tests/Tests/AFJSONSerializationTests.m
  54. 5 0
      Tests/Tests/AFNetworkActivityManagerTests.m
  55. 15 0
      Tests/Tests/AFNetworkReachabilityManagerTests.m
  56. 2 2
      Tests/Tests/AFSecurityPolicyTests.m
  57. 24 0
      Tests/Tests/AFUIImageViewTests.m
  58. 41 2
      Tests/Tests/AFURLSessionManagerTests.m
  59. 101 0
      Tests/Tests/AFXMLDocumentResponseSerializerTests.m
  60. 89 0
      Tests/Tests/AFXMLParserResponseSerializerTests.m
  61. 11 0
      UIKit+AFNetworking/AFAutoPurgingImageCache.h
  62. 7 3
      UIKit+AFNetworking/AFAutoPurgingImageCache.m
  63. 14 0
      UIKit+AFNetworking/AFImageDownloader.h
  64. 25 11
      UIKit+AFNetworking/AFImageDownloader.m
  65. 1 1
      UIKit+AFNetworking/UIImage+AFNetworking.h
  66. 7 4
      UIKit+AFNetworking/UIImageView+AFNetworking.m
  67. 1 1
      UIKit+AFNetworking/UIWebView+AFNetworking.m
  68. 2 2
      fastlane/.env
  69. 4 4
      fastlane/.env.default
  70. 2 2
      fastlane/.env.ios10_xcode8
  71. 3 0
      fastlane/.env.ios11_xcode9
  72. 3 0
      fastlane/.env.ios11_xcode91
  73. 3 0
      fastlane/.env.ios11_xcode92
  74. 3 0
      fastlane/.env.ios11_xcode93
  75. 3 0
      fastlane/.env.ios11_xcode94
  76. 0 0
      fastlane/.env.ios8_xcode7
  77. 0 0
      fastlane/.env.ios9_xcode7
  78. 2 2
      fastlane/.env.tvos11_xcode9
  79. 1 1
      fastlane/Fastfile

+ 20 - 10
.travis.yml

@@ -1,5 +1,5 @@
 language: objective-c
 language: objective-c
-osx_image: xcode7.1
+osx_image: xcode9.4
 sudo: false
 sudo: false
 env:
 env:
   global:
   global:
@@ -9,21 +9,31 @@ env:
   - FASTLANE_LANE=ci_commit
   - FASTLANE_LANE=ci_commit
 matrix:
 matrix:
   include:
   include:
-    - osx_image: xcode8
+    - osx_image: xcode9.4
       env: FASTLANE_LANE=code_coverage FASTLANE_ENV=default
       env: FASTLANE_LANE=code_coverage FASTLANE_ENV=default
-    - osx_image: xcode8
-      env: FASTLANE_ENV=ios10_xcode8
-    - osx_image: xcode8
-      env: FASTLANE_ENV=tvos10_xcode8
-    - osx_image: xcode8
+    - osx_image: xcode9.4
+      env: FASTLANE_ENV=ios11_xcode94
+    - osx_image: xcode9.4
+      env: FASTLANE_ENV=tvos11_xcode9
+    - osx_image: xcode9.4
       env: FASTLANE_ENV=osx
       env: FASTLANE_ENV=osx
+    - osx_image: xcode9.3
+      env: FASTLANE_ENV=ios11_xcode93
+    - osx_image: xcode9.2
+      env: FASTLANE_ENV=ios11_xcode92
+    - osx_image: xcode9.1
+      env: FASTLANE_ENV=ios11_xcode91
+    - osx_image: xcode9
+      env: FASTLANE_ENV=ios11_xcode9
+    - osx_image: xcode8.3
+      env: FASTLANE_ENV=ios10_xcode8
     - osx_image: xcode7.3
     - osx_image: xcode7.3
-      env: FASTLANE_ENV=ios93_xcode73
+      env: FASTLANE_ENV=ios9_xcode7
     - osx_image: xcode7.3
     - osx_image: xcode7.3
-      env: FASTLANE_ENV=ios81_xcode73
+      env: FASTLANE_ENV=ios8_xcode7
 before_install:
 before_install:
   # Force bundler 1.12.5 because version 1.13 has issues, see https://github.com/fastlane/fastlane/issues/6065#issuecomment-246044617
   # Force bundler 1.12.5 because version 1.13 has issues, see https://github.com/fastlane/fastlane/issues/6065#issuecomment-246044617
-  - gem uninstall bundler -v '>1.12.5' --force || echo "bundler >1.12.5 is not installed"
+  - gem uninstall bundler -v '>1.12.5' --force --executables || echo "bundler >1.12.5 is not installed"
   - gem install bundler -v 1.12.5 --no-rdoc --no-ri --no-document --quiet
   - gem install bundler -v 1.12.5 --no-rdoc --no-ri --no-document --quiet
   - gem install fastlane --no-rdoc --no-ri --no-document --quiet
   - gem install fastlane --no-rdoc --no-ri --no-document --quiet
   - gem install cocoapods --no-rdoc --no-ri --no-document --quiet
   - gem install cocoapods --no-rdoc --no-ri --no-document --quiet

+ 3 - 3
AFNetworking.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
 Pod::Spec.new do |s|
   s.name     = 'AFNetworking'
   s.name     = 'AFNetworking'
-  s.version  = '3.1.0'
+  s.version  = '3.2.1'
   s.license  = 'MIT'
   s.license  = 'MIT'
   s.summary  = 'A delightful iOS and OS X networking framework.'
   s.summary  = 'A delightful iOS and OS X networking framework.'
   s.homepage = 'https://github.com/AFNetworking/AFNetworking'
   s.homepage = 'https://github.com/AFNetworking/AFNetworking'
@@ -64,8 +64,8 @@ EOS
     ss.tvos.dependency 'AFNetworking/Reachability'
     ss.tvos.dependency 'AFNetworking/Reachability'
     ss.dependency 'AFNetworking/Security'
     ss.dependency 'AFNetworking/Security'
 
 
-    ss.source_files = 'AFNetworking/AF{URL,HTTP}SessionManager.{h,m}'
-    ss.public_header_files = 'AFNetworking/AF{URL,HTTP}SessionManager.h'
+    ss.source_files = 'AFNetworking/AF{URL,HTTP}SessionManager.{h,m}', 'AFNetworking/AFCompatibilityMacros.h'
+    ss.public_header_files = 'AFNetworking/AF{URL,HTTP}SessionManager.h', 'AFNetworking/AFCompatibilityMacros.h'
   end
   end
 
 
   s.subspec 'UIKit' do |ss|
   s.subspec 'UIKit' do |ss|

+ 79 - 27
AFNetworking.xcodeproj/project.pbxproj

@@ -3,7 +3,7 @@
 	archiveVersion = 1;
 	archiveVersion = 1;
 	classes = {
 	classes = {
 	};
 	};
-	objectVersion = 46;
+	objectVersion = 47;
 	objects = {
 	objects = {
 
 
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
@@ -12,13 +12,17 @@
 		1BF9F9621C87843300F1F35A /* AFImageResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */; };
 		1BF9F9621C87843300F1F35A /* AFImageResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */; };
 		1F6F7DF71F17051000C979D0 /* DST Root CA X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */; };
 		1F6F7DF71F17051000C979D0 /* DST Root CA X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */; };
 		1F6F7DF81F17051000C979D0 /* Let's Encrypt Authority X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */; };
 		1F6F7DF81F17051000C979D0 /* Let's Encrypt Authority X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */; };
-		1F6F7DF91F17051000C979D0 /* httpbinorg_08132017.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF41F1703A100C979D0 /* httpbinorg_08132017.cer */; };
 		1F6F7DFA1F17051000C979D0 /* DST Root CA X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */; };
 		1F6F7DFA1F17051000C979D0 /* DST Root CA X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */; };
 		1F6F7DFB1F17051000C979D0 /* Let's Encrypt Authority X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */; };
 		1F6F7DFB1F17051000C979D0 /* Let's Encrypt Authority X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */; };
-		1F6F7DFC1F17051000C979D0 /* httpbinorg_08132017.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF41F1703A100C979D0 /* httpbinorg_08132017.cer */; };
 		1F6F7DFD1F17051100C979D0 /* DST Root CA X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */; };
 		1F6F7DFD1F17051100C979D0 /* DST Root CA X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */; };
 		1F6F7DFE1F17051100C979D0 /* Let's Encrypt Authority X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */; };
 		1F6F7DFE1F17051100C979D0 /* Let's Encrypt Authority X3.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */; };
-		1F6F7DFF1F17051100C979D0 /* httpbinorg_08132017.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F6F7DF41F1703A100C979D0 /* httpbinorg_08132017.cer */; };
+		1F73A747211B6C0C00AFCFA5 /* httpbinorg_10102018.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F73A746211B6C0C00AFCFA5 /* httpbinorg_10102018.cer */; };
+		1F73A748211B6C0C00AFCFA5 /* httpbinorg_10102018.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F73A746211B6C0C00AFCFA5 /* httpbinorg_10102018.cer */; };
+		1F73A749211B6C0C00AFCFA5 /* httpbinorg_10102018.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F73A746211B6C0C00AFCFA5 /* httpbinorg_10102018.cer */; };
+		1F96D2A4203649560085FC3F /* AFCompatibilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F96D2A5203649570085FC3F /* AFCompatibilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F96D2A6203649570085FC3F /* AFCompatibilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
+		1F96D2A7203649580085FC3F /* AFCompatibilityMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		2960BAC31C1B2F1A00BA02F0 /* AFUIButtonTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */; };
 		2960BAC31C1B2F1A00BA02F0 /* AFUIButtonTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */; };
 		297824A31BC2D69A0041C395 /* adn_0.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A01BC2D69A0041C395 /* adn_0.cer */; };
 		297824A31BC2D69A0041C395 /* adn_0.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A01BC2D69A0041C395 /* adn_0.cer */; };
 		297824A41BC2D69A0041C395 /* adn_0.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A01BC2D69A0041C395 /* adn_0.cer */; };
 		297824A41BC2D69A0041C395 /* adn_0.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A01BC2D69A0041C395 /* adn_0.cer */; };
@@ -173,6 +177,10 @@
 		29D96E991BCC406B00F571A5 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522931BBF13C700859F49 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		29D96E991BCC406B00F571A5 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522931BBF13C700859F49 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		29D96E9A1BCC406B00F571A5 /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522961BBF13C700859F49 /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		29D96E9A1BCC406B00F571A5 /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522961BBF13C700859F49 /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; };
 		29F5EF031C47E64F008B976A /* AFUIWebViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F5EF021C47E64F008B976A /* AFUIWebViewTests.m */; };
 		29F5EF031C47E64F008B976A /* AFUIWebViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 29F5EF021C47E64F008B976A /* AFUIWebViewTests.m */; };
+		2D4563901DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */; };
+		2D4563911DB117A200AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */; };
+		2D4563921DB117A200AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */; };
+		2D4563941DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D4563931DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m */; };
 		5F4323BB1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */; };
 		5F4323BB1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */; };
 		5F4323BC1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */; };
 		5F4323BC1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */; };
 		5F4323BD1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */; };
 		5F4323BD1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */; };
@@ -225,9 +233,10 @@
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
 		1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageResponseSerializerTests.m; sourceTree = "<group>"; };
 		1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageResponseSerializerTests.m; sourceTree = "<group>"; };
-		1F6F7DF41F1703A100C979D0 /* httpbinorg_08132017.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = httpbinorg_08132017.cer; sourceTree = "<group>"; };
+		1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AFCompatibilityMacros.h; sourceTree = "<group>"; };
 		1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Let's Encrypt Authority X3.cer"; sourceTree = "<group>"; };
 		1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Let's Encrypt Authority X3.cer"; sourceTree = "<group>"; };
 		1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "DST Root CA X3.cer"; sourceTree = "<group>"; };
 		1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "DST Root CA X3.cer"; sourceTree = "<group>"; };
+		1F73A746211B6C0C00AFCFA5 /* httpbinorg_10102018.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = httpbinorg_10102018.cer; sourceTree = "<group>"; };
 		2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFUIButtonTests.m; sourceTree = "<group>"; };
 		2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFUIButtonTests.m; sourceTree = "<group>"; };
 		297824A01BC2D69A0041C395 /* adn_0.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_0.cer; path = ADNNetServerTrustChain/adn_0.cer; sourceTree = "<group>"; };
 		297824A01BC2D69A0041C395 /* adn_0.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_0.cer; path = ADNNetServerTrustChain/adn_0.cer; sourceTree = "<group>"; };
 		297824A11BC2D69A0041C395 /* adn_1.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_1.cer; path = ADNNetServerTrustChain/adn_1.cer; sourceTree = "<group>"; };
 		297824A11BC2D69A0041C395 /* adn_1.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_1.cer; path = ADNNetServerTrustChain/adn_1.cer; sourceTree = "<group>"; };
@@ -235,7 +244,7 @@
 		2987B0A51BC408A200179A4C /* AFNetworking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AFNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		2987B0A51BC408A200179A4C /* AFNetworking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AFNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 		2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 		298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 		298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
-		298D7C4A1BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking Mac OS X Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
+		298D7C4A1BC2C7B200FD3B3E /* AFNetworking macOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking macOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
 		298D7C771BC2C88F00FD3B3E /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
 		298D7C771BC2C88F00FD3B3E /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
 		298D7C791BC2C88F00FD3B3E /* AltName.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = AltName.cer; sourceTree = "<group>"; };
 		298D7C791BC2C88F00FD3B3E /* AltName.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = AltName.cer; sourceTree = "<group>"; };
 		298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = foobar.com.cer; sourceTree = "<group>"; };
 		298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = foobar.com.cer; sourceTree = "<group>"; };
@@ -297,6 +306,8 @@
 		2995229B1BBF13C700859F49 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIWebView+AFNetworking.m"; sourceTree = "<group>"; };
 		2995229B1BBF13C700859F49 /* UIWebView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIWebView+AFNetworking.m"; sourceTree = "<group>"; };
 		29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFCompoundResponseSerializerTests.m; sourceTree = "<group>"; };
 		29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFCompoundResponseSerializerTests.m; sourceTree = "<group>"; };
 		29F5EF021C47E64F008B976A /* AFUIWebViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFUIWebViewTests.m; sourceTree = "<group>"; };
 		29F5EF021C47E64F008B976A /* AFUIWebViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFUIWebViewTests.m; sourceTree = "<group>"; };
+		2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLParserResponseSerializerTests.m; sourceTree = "<group>"; };
+		2D4563931DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLDocumentResponseSerializerTests.m; sourceTree = "<group>"; };
 		5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = Equifax_Secure_Certificate_Authority_Root.cer; sourceTree = "<group>"; };
 		5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = Equifax_Secure_Certificate_Authority_Root.cer; sourceTree = "<group>"; };
 		5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "GeoTrust_Global_CA-cross.cer"; sourceTree = "<group>"; };
 		5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "GeoTrust_Global_CA-cross.cer"; sourceTree = "<group>"; };
 		5F4323B51BF63741003B8749 /* google.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = google.com.cer; sourceTree = "<group>"; };
 		5F4323B51BF63741003B8749 /* google.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = google.com.cer; sourceTree = "<group>"; };
@@ -401,7 +412,7 @@
 				298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */,
 				298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */,
 				1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */,
 				1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */,
 				1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */,
 				1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */,
-				1F6F7DF41F1703A100C979D0 /* httpbinorg_08132017.cer */,
+				1F73A746211B6C0C00AFCFA5 /* httpbinorg_10102018.cer */,
 			);
 			);
 			path = HTTPBin.org;
 			path = HTTPBin.org;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -434,6 +445,8 @@
 				298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */,
 				298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */,
 				298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */,
 				298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */,
 				298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */,
 				298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */,
+				2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */,
+				2D4563931DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m */,
 				298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */,
 				298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */,
 				E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */,
 				E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */,
 				29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */,
 				29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */,
@@ -481,7 +494,7 @@
 				299522651BBF129200859F49 /* AFNetworking.framework */,
 				299522651BBF129200859F49 /* AFNetworking.framework */,
 				299522771BBF136400859F49 /* AFNetworking.framework */,
 				299522771BBF136400859F49 /* AFNetworking.framework */,
 				298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */,
 				298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */,
-				298D7C4A1BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests.xctest */,
+				298D7C4A1BC2C7B200FD3B3E /* AFNetworking macOS Tests.xctest */,
 				2987B0A51BC408A200179A4C /* AFNetworking.framework */,
 				2987B0A51BC408A200179A4C /* AFNetworking.framework */,
 				2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */,
 				2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */,
 			);
 			);
@@ -501,6 +514,7 @@
 		299522451BBF125A00859F49 /* AFNetworking */ = {
 		299522451BBF125A00859F49 /* AFNetworking */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */,
 				299522461BBF125A00859F49 /* AFHTTPSessionManager.h */,
 				299522461BBF125A00859F49 /* AFHTTPSessionManager.h */,
 				299522471BBF125A00859F49 /* AFHTTPSessionManager.m */,
 				299522471BBF125A00859F49 /* AFHTTPSessionManager.m */,
 				299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */,
 				299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */,
@@ -573,6 +587,7 @@
 				29D96E8D1BCC3D7D00F571A5 /* AFURLSessionManager.h in Headers */,
 				29D96E8D1BCC3D7D00F571A5 /* AFURLSessionManager.h in Headers */,
 				29D96E941BCC406B00F571A5 /* AFAutoPurgingImageCache.h in Headers */,
 				29D96E941BCC406B00F571A5 /* AFAutoPurgingImageCache.h in Headers */,
 				29D96E951BCC406B00F571A5 /* AFImageDownloader.h in Headers */,
 				29D96E951BCC406B00F571A5 /* AFImageDownloader.h in Headers */,
+				1F96D2A7203649580085FC3F /* AFCompatibilityMacros.h in Headers */,
 				29D96E961BCC406B00F571A5 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
 				29D96E961BCC406B00F571A5 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
 				29D96E971BCC406B00F571A5 /* UIButton+AFNetworking.h in Headers */,
 				29D96E971BCC406B00F571A5 /* UIButton+AFNetworking.h in Headers */,
 				29D96E981BCC406B00F571A5 /* UIImage+AFNetworking.h in Headers */,
 				29D96E981BCC406B00F571A5 /* UIImage+AFNetworking.h in Headers */,
@@ -597,6 +612,7 @@
 				2995225E1BBF125A00859F49 /* AFURLSessionManager.h in Headers */,
 				2995225E1BBF125A00859F49 /* AFURLSessionManager.h in Headers */,
 				2995225C1BBF125A00859F49 /* AFURLResponseSerialization.h in Headers */,
 				2995225C1BBF125A00859F49 /* AFURLResponseSerialization.h in Headers */,
 				299522A21BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
 				299522A21BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
+				1F96D2A4203649560085FC3F /* AFCompatibilityMacros.h in Headers */,
 				2995223D1BBF104D00859F49 /* AFNetworking.h in Headers */,
 				2995223D1BBF104D00859F49 /* AFNetworking.h in Headers */,
 				299522B01BBF13C700859F49 /* UIWebView+AFNetworking.h in Headers */,
 				299522B01BBF13C700859F49 /* UIWebView+AFNetworking.h in Headers */,
 				299522AC1BBF13C700859F49 /* UIProgressView+AFNetworking.h in Headers */,
 				299522AC1BBF13C700859F49 /* UIProgressView+AFNetworking.h in Headers */,
@@ -612,6 +628,7 @@
 			files = (
 			files = (
 				29D96E7A1BCC3D6000F571A5 /* AFHTTPSessionManager.h in Headers */,
 				29D96E7A1BCC3D6000F571A5 /* AFHTTPSessionManager.h in Headers */,
 				29D96E7C1BCC3D6000F571A5 /* AFSecurityPolicy.h in Headers */,
 				29D96E7C1BCC3D6000F571A5 /* AFSecurityPolicy.h in Headers */,
+				1F96D2A5203649570085FC3F /* AFCompatibilityMacros.h in Headers */,
 				29D96E7D1BCC3D6000F571A5 /* AFURLRequestSerialization.h in Headers */,
 				29D96E7D1BCC3D6000F571A5 /* AFURLRequestSerialization.h in Headers */,
 				29D96E7E1BCC3D6000F571A5 /* AFURLResponseSerialization.h in Headers */,
 				29D96E7E1BCC3D6000F571A5 /* AFURLResponseSerialization.h in Headers */,
 				29D96E7F1BCC3D6000F571A5 /* AFURLSessionManager.h in Headers */,
 				29D96E7F1BCC3D6000F571A5 /* AFURLSessionManager.h in Headers */,
@@ -626,6 +643,7 @@
 				29D96E811BCC3D7200F571A5 /* AFHTTPSessionManager.h in Headers */,
 				29D96E811BCC3D7200F571A5 /* AFHTTPSessionManager.h in Headers */,
 				29D96E821BCC3D7200F571A5 /* AFNetworkReachabilityManager.h in Headers */,
 				29D96E821BCC3D7200F571A5 /* AFNetworkReachabilityManager.h in Headers */,
 				29D96E831BCC3D7200F571A5 /* AFSecurityPolicy.h in Headers */,
 				29D96E831BCC3D7200F571A5 /* AFSecurityPolicy.h in Headers */,
+				1F96D2A6203649570085FC3F /* AFCompatibilityMacros.h in Headers */,
 				29D96E841BCC3D7200F571A5 /* AFURLRequestSerialization.h in Headers */,
 				29D96E841BCC3D7200F571A5 /* AFURLRequestSerialization.h in Headers */,
 				29D96E851BCC3D7200F571A5 /* AFURLResponseSerialization.h in Headers */,
 				29D96E851BCC3D7200F571A5 /* AFURLResponseSerialization.h in Headers */,
 				29D96E861BCC3D7200F571A5 /* AFURLSessionManager.h in Headers */,
 				29D96E861BCC3D7200F571A5 /* AFURLSessionManager.h in Headers */,
@@ -690,9 +708,9 @@
 			productReference = 298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */;
 			productReference = 298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
 		};
-		298D7C491BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests */ = {
+		298D7C491BC2C7B200FD3B3E /* AFNetworking macOS Tests */ = {
 			isa = PBXNativeTarget;
 			isa = PBXNativeTarget;
-			buildConfigurationList = 298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking Mac OS X Tests" */;
+			buildConfigurationList = 298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking macOS Tests" */;
 			buildPhases = (
 			buildPhases = (
 				298D7C461BC2C7B200FD3B3E /* Sources */,
 				298D7C461BC2C7B200FD3B3E /* Sources */,
 				298D7C471BC2C7B200FD3B3E /* Frameworks */,
 				298D7C471BC2C7B200FD3B3E /* Frameworks */,
@@ -703,9 +721,9 @@
 			dependencies = (
 			dependencies = (
 				298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */,
 				298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */,
 			);
 			);
-			name = "AFNetworking Mac OS X Tests";
+			name = "AFNetworking macOS Tests";
 			productName = "AFNetworking Mac OS X Tests";
 			productName = "AFNetworking Mac OS X Tests";
-			productReference = 298D7C4A1BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests.xctest */;
+			productReference = 298D7C4A1BC2C7B200FD3B3E /* AFNetworking macOS Tests.xctest */;
 			productType = "com.apple.product-type.bundle.unit-test";
 			productType = "com.apple.product-type.bundle.unit-test";
 		};
 		};
 		299522381BBF104D00859F49 /* AFNetworking iOS */ = {
 		299522381BBF104D00859F49 /* AFNetworking iOS */ = {
@@ -744,9 +762,9 @@
 			productReference = 299522651BBF129200859F49 /* AFNetworking.framework */;
 			productReference = 299522651BBF129200859F49 /* AFNetworking.framework */;
 			productType = "com.apple.product-type.framework";
 			productType = "com.apple.product-type.framework";
 		};
 		};
-		299522761BBF136400859F49 /* AFNetworking OS X */ = {
+		299522761BBF136400859F49 /* AFNetworking macOS */ = {
 			isa = PBXNativeTarget;
 			isa = PBXNativeTarget;
-			buildConfigurationList = 2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking OS X" */;
+			buildConfigurationList = 2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking macOS" */;
 			buildPhases = (
 			buildPhases = (
 				299522721BBF136400859F49 /* Sources */,
 				299522721BBF136400859F49 /* Sources */,
 				299522731BBF136400859F49 /* Frameworks */,
 				299522731BBF136400859F49 /* Frameworks */,
@@ -757,7 +775,7 @@
 			);
 			);
 			dependencies = (
 			dependencies = (
 			);
 			);
-			name = "AFNetworking OS X";
+			name = "AFNetworking macOS";
 			productName = "AFNetworking OS X";
 			productName = "AFNetworking OS X";
 			productReference = 299522771BBF136400859F49 /* AFNetworking.framework */;
 			productReference = 299522771BBF136400859F49 /* AFNetworking.framework */;
 			productType = "com.apple.product-type.framework";
 			productType = "com.apple.product-type.framework";
@@ -768,7 +786,7 @@
 		299522301BBF104D00859F49 /* Project object */ = {
 		299522301BBF104D00859F49 /* Project object */ = {
 			isa = PBXProject;
 			isa = PBXProject;
 			attributes = {
 			attributes = {
-				LastUpgradeCheck = 0800;
+				LastUpgradeCheck = 0930;
 				ORGANIZATIONNAME = AFNetworking;
 				ORGANIZATIONNAME = AFNetworking;
 				TargetAttributes = {
 				TargetAttributes = {
 					2987B0A41BC408A200179A4C = {
 					2987B0A41BC408A200179A4C = {
@@ -797,7 +815,7 @@
 				};
 				};
 			};
 			};
 			buildConfigurationList = 299522331BBF104D00859F49 /* Build configuration list for PBXProject "AFNetworking" */;
 			buildConfigurationList = 299522331BBF104D00859F49 /* Build configuration list for PBXProject "AFNetworking" */;
-			compatibilityVersion = "Xcode 3.2";
+			compatibilityVersion = "Xcode 6.3";
 			developmentRegion = English;
 			developmentRegion = English;
 			hasScannedForEncodings = 0;
 			hasScannedForEncodings = 0;
 			knownRegions = (
 			knownRegions = (
@@ -810,10 +828,10 @@
 			targets = (
 			targets = (
 				299522381BBF104D00859F49 /* AFNetworking iOS */,
 				299522381BBF104D00859F49 /* AFNetworking iOS */,
 				299522641BBF129200859F49 /* AFNetworking watchOS */,
 				299522641BBF129200859F49 /* AFNetworking watchOS */,
-				299522761BBF136400859F49 /* AFNetworking OS X */,
+				299522761BBF136400859F49 /* AFNetworking macOS */,
 				2987B0A41BC408A200179A4C /* AFNetworking tvOS */,
 				2987B0A41BC408A200179A4C /* AFNetworking tvOS */,
 				298D7C3A1BC2C79500FD3B3E /* AFNetworking iOS Tests */,
 				298D7C3A1BC2C79500FD3B3E /* AFNetworking iOS Tests */,
-				298D7C491BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests */,
+				298D7C491BC2C7B200FD3B3E /* AFNetworking macOS Tests */,
 				2987B0AD1BC408A200179A4C /* AFNetworking tvOS Tests */,
 				2987B0AD1BC408A200179A4C /* AFNetworking tvOS Tests */,
 			);
 			);
 		};
 		};
@@ -835,7 +853,6 @@
 				2987B0D61BC40AEC00179A4C /* ADNNetServerTrustChain in Resources */,
 				2987B0D61BC40AEC00179A4C /* ADNNetServerTrustChain in Resources */,
 				2987B0DF1BC40AFB00179A4C /* NoDomains.cer in Resources */,
 				2987B0DF1BC40AFB00179A4C /* NoDomains.cer in Resources */,
 				2987B0D41BC40AE900179A4C /* adn_1.cer in Resources */,
 				2987B0D41BC40AE900179A4C /* adn_1.cer in Resources */,
-				1F6F7DFF1F17051100C979D0 /* httpbinorg_08132017.cer in Resources */,
 				2987B0DD1BC40AFB00179A4C /* AltName.cer in Resources */,
 				2987B0DD1BC40AFB00179A4C /* AltName.cer in Resources */,
 				2987B0D71BC40AF000179A4C /* HTTPBinOrgServerTrustChain in Resources */,
 				2987B0D71BC40AF000179A4C /* HTTPBinOrgServerTrustChain in Resources */,
 				2987B0D31BC40AE900179A4C /* adn_0.cer in Resources */,
 				2987B0D31BC40AE900179A4C /* adn_0.cer in Resources */,
@@ -847,6 +864,7 @@
 				5F4323BD1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */,
 				5F4323BD1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */,
 				5F4323DF1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */,
 				5F4323DF1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */,
 				5F4323C01BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */,
 				5F4323C01BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */,
+				1F73A749211B6C0C00AFCFA5 /* httpbinorg_10102018.cer in Resources */,
 				1F6F7DFD1F17051100C979D0 /* DST Root CA X3.cer in Resources */,
 				1F6F7DFD1F17051100C979D0 /* DST Root CA X3.cer in Resources */,
 				5F4323CF1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */,
 				5F4323CF1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */,
 				5F4323C31BF63741003B8749 /* google.com.cer in Resources */,
 				5F4323C31BF63741003B8749 /* google.com.cer in Resources */,
@@ -861,7 +879,6 @@
 				298D7CBA1BC2CA9800FD3B3E /* logo.png in Resources */,
 				298D7CBA1BC2CA9800FD3B3E /* logo.png in Resources */,
 				297824A31BC2D69A0041C395 /* adn_0.cer in Resources */,
 				297824A31BC2D69A0041C395 /* adn_0.cer in Resources */,
 				298D7CE31BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */,
 				298D7CE31BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */,
-				1F6F7DF91F17051000C979D0 /* httpbinorg_08132017.cer in Resources */,
 				297824A71BC2D69A0041C395 /* adn_2.cer in Resources */,
 				297824A71BC2D69A0041C395 /* adn_2.cer in Resources */,
 				297824A51BC2D69A0041C395 /* adn_1.cer in Resources */,
 				297824A51BC2D69A0041C395 /* adn_1.cer in Resources */,
 				298D7CC01BC2CA9D00FD3B3E /* NoDomains.cer in Resources */,
 				298D7CC01BC2CA9D00FD3B3E /* NoDomains.cer in Resources */,
@@ -873,6 +890,7 @@
 				5F4323BB1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */,
 				5F4323BB1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */,
 				5F4323DD1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */,
 				5F4323DD1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */,
 				5F4323BE1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */,
 				5F4323BE1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */,
+				1F73A747211B6C0C00AFCFA5 /* httpbinorg_10102018.cer in Resources */,
 				1F6F7DF71F17051000C979D0 /* DST Root CA X3.cer in Resources */,
 				1F6F7DF71F17051000C979D0 /* DST Root CA X3.cer in Resources */,
 				5F4323CD1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */,
 				5F4323CD1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */,
 				5F4323C11BF63741003B8749 /* google.com.cer in Resources */,
 				5F4323C11BF63741003B8749 /* google.com.cer in Resources */,
@@ -887,7 +905,6 @@
 				298D7CB91BC2CA9800FD3B3E /* logo.png in Resources */,
 				298D7CB91BC2CA9800FD3B3E /* logo.png in Resources */,
 				297824A41BC2D69A0041C395 /* adn_0.cer in Resources */,
 				297824A41BC2D69A0041C395 /* adn_0.cer in Resources */,
 				298D7CE41BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */,
 				298D7CE41BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */,
-				1F6F7DFC1F17051000C979D0 /* httpbinorg_08132017.cer in Resources */,
 				297824A81BC2D69A0041C395 /* adn_2.cer in Resources */,
 				297824A81BC2D69A0041C395 /* adn_2.cer in Resources */,
 				297824A61BC2D69A0041C395 /* adn_1.cer in Resources */,
 				297824A61BC2D69A0041C395 /* adn_1.cer in Resources */,
 				298D7CBD1BC2CA9C00FD3B3E /* NoDomains.cer in Resources */,
 				298D7CBD1BC2CA9C00FD3B3E /* NoDomains.cer in Resources */,
@@ -899,6 +916,7 @@
 				5F4323BC1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */,
 				5F4323BC1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */,
 				5F4323CE1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */,
 				5F4323CE1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */,
 				5F4323DE1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */,
 				5F4323DE1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */,
+				1F73A748211B6C0C00AFCFA5 /* httpbinorg_10102018.cer in Resources */,
 				1F6F7DFA1F17051000C979D0 /* DST Root CA X3.cer in Resources */,
 				1F6F7DFA1F17051000C979D0 /* DST Root CA X3.cer in Resources */,
 				5F4323BF1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */,
 				5F4323BF1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */,
 				5F4323C21BF63741003B8749 /* google.com.cer in Resources */,
 				5F4323C21BF63741003B8749 /* google.com.cer in Resources */,
@@ -967,6 +985,7 @@
 				2987B0CF1BC40A7600179A4C /* AFPropertyListResponseSerializerTests.m in Sources */,
 				2987B0CF1BC40A7600179A4C /* AFPropertyListResponseSerializerTests.m in Sources */,
 				2987B0D21BC40AD800179A4C /* AFTestCase.m in Sources */,
 				2987B0D21BC40AD800179A4C /* AFTestCase.m in Sources */,
 				2987B0CD1BC40A7600179A4C /* AFJSONSerializationTests.m in Sources */,
 				2987B0CD1BC40A7600179A4C /* AFJSONSerializationTests.m in Sources */,
+				2D4563921DB117A200AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */,
 				E91164671DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */,
 				E91164671DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -992,6 +1011,7 @@
 				298D7C981BC2CA2500FD3B3E /* AFURLSessionManagerTests.m in Sources */,
 				298D7C981BC2CA2500FD3B3E /* AFURLSessionManagerTests.m in Sources */,
 				297824AC1BC2DB450041C395 /* AFImageDownloaderTests.m in Sources */,
 				297824AC1BC2DB450041C395 /* AFImageDownloaderTests.m in Sources */,
 				29F5EF031C47E64F008B976A /* AFUIWebViewTests.m in Sources */,
 				29F5EF031C47E64F008B976A /* AFUIWebViewTests.m in Sources */,
+				2D4563901DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */,
 				298D7CD51BC2CAEC00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */,
 				298D7CD51BC2CAEC00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */,
 				298D7CD71BC2CAEF00FD3B3E /* AFJSONSerializationTests.m in Sources */,
 				298D7CD71BC2CAEF00FD3B3E /* AFJSONSerializationTests.m in Sources */,
 				298D7CDB1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */,
 				298D7CDB1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */,
@@ -1010,8 +1030,10 @@
 				1BF9F9611C87843200F1F35A /* AFImageResponseSerializerTests.m in Sources */,
 				1BF9F9611C87843200F1F35A /* AFImageResponseSerializerTests.m in Sources */,
 				298D7C971BC2C94500FD3B3E /* AFTestCase.m in Sources */,
 				298D7C971BC2C94500FD3B3E /* AFTestCase.m in Sources */,
 				298D7CD81BC2CAF000FD3B3E /* AFJSONSerializationTests.m in Sources */,
 				298D7CD81BC2CAF000FD3B3E /* AFJSONSerializationTests.m in Sources */,
+				2D4563941DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m in Sources */,
 				298D7CDC1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */,
 				298D7CDC1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */,
 				298D7CD61BC2CAED00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */,
 				298D7CD61BC2CAED00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */,
+				2D4563911DB117A200AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */,
 				298D7CDA1BC2CAF300FD3B3E /* AFNetworkReachabilityManagerTests.m in Sources */,
 				298D7CDA1BC2CAF300FD3B3E /* AFNetworkReachabilityManagerTests.m in Sources */,
 				298D7C991BC2CA2600FD3B3E /* AFURLSessionManagerTests.m in Sources */,
 				298D7C991BC2CA2600FD3B3E /* AFURLSessionManagerTests.m in Sources */,
 			);
 			);
@@ -1079,7 +1101,7 @@
 		};
 		};
 		298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */ = {
 		298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			isa = PBXTargetDependency;
-			target = 299522761BBF136400859F49 /* AFNetworking OS X */;
+			target = 299522761BBF136400859F49 /* AFNetworking macOS */;
 			targetProxy = 298D7C501BC2C7B200FD3B3E /* PBXContainerItemProxy */;
 			targetProxy = 298D7C501BC2C7B200FD3B3E /* PBXContainerItemProxy */;
 		};
 		};
 /* End PBXTargetDependency section */
 /* End PBXTargetDependency section */
@@ -1088,7 +1110,9 @@
 		2987B0B61BC408A200179A4C /* Debug */ = {
 		2987B0B61BC408A200179A4C /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = marker;
 				BITCODE_GENERATION_MODE = marker;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1111,7 +1135,9 @@
 		2987B0B71BC408A200179A4C /* Release */ = {
 		2987B0B71BC408A200179A4C /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = bitcode;
 				BITCODE_GENERATION_MODE = bitcode;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1134,6 +1160,7 @@
 		2987B0B81BC408A200179A4C /* Debug */ = {
 		2987B0B81BC408A200179A4C /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CODE_SIGN_IDENTITY = "";
 				CODE_SIGN_IDENTITY = "";
 				DEVELOPMENT_TEAM = "";
 				DEVELOPMENT_TEAM = "";
 				INFOPLIST_FILE = ./Tests/Info.plist;
 				INFOPLIST_FILE = ./Tests/Info.plist;
@@ -1148,6 +1175,7 @@
 		2987B0B91BC408A200179A4C /* Release */ = {
 		2987B0B91BC408A200179A4C /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CODE_SIGN_IDENTITY = "";
 				CODE_SIGN_IDENTITY = "";
 				DEVELOPMENT_TEAM = "";
 				DEVELOPMENT_TEAM = "";
 				INFOPLIST_FILE = ./Tests/Info.plist;
 				INFOPLIST_FILE = ./Tests/Info.plist;
@@ -1162,6 +1190,7 @@
 		298D7C431BC2C79500FD3B3E /* Debug */ = {
 		298D7C431BC2C79500FD3B3E /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CODE_SIGN_IDENTITY = "";
 				CODE_SIGN_IDENTITY = "";
 				DEVELOPMENT_TEAM = "";
 				DEVELOPMENT_TEAM = "";
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@@ -1176,6 +1205,7 @@
 		298D7C441BC2C79500FD3B3E /* Release */ = {
 		298D7C441BC2C79500FD3B3E /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CODE_SIGN_IDENTITY = "";
 				CODE_SIGN_IDENTITY = "";
 				DEVELOPMENT_TEAM = "";
 				DEVELOPMENT_TEAM = "";
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@@ -1190,6 +1220,7 @@
 		298D7C531BC2C7B200FD3B3E /* Debug */ = {
 		298D7C531BC2C7B200FD3B3E /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				COMBINE_HIDPI_IMAGES = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@@ -1205,6 +1236,7 @@
 		298D7C541BC2C7B200FD3B3E /* Release */ = {
 		298D7C541BC2C7B200FD3B3E /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				COMBINE_HIDPI_IMAGES = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
 				GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@@ -1227,7 +1259,9 @@
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_WARN_ASSIGN_ENUM = YES;
 				CLANG_WARN_ASSIGN_ENUM = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1237,10 +1271,14 @@
 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
 				CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
 				CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
 				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 				CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
 				CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
 				CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
@@ -1302,7 +1340,9 @@
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_WARN_ASSIGN_ENUM = YES;
 				CLANG_WARN_ASSIGN_ENUM = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1312,10 +1352,14 @@
 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
 				CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INFINITE_RECURSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
 				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
 				CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
 				CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
 				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
 				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
 				CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
 				CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN_UNREACHABLE_CODE = YES;
 				CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
 				CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
@@ -1364,7 +1408,9 @@
 		299522421BBF104D00859F49 /* Debug */ = {
 		299522421BBF104D00859F49 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = marker;
 				BITCODE_GENERATION_MODE = marker;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
@@ -1373,7 +1419,6 @@
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				INFOPLIST_FILE = ./Framework/Info.plist;
 				INFOPLIST_FILE = ./Framework/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking;
 				PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking;
 				PRODUCT_NAME = AFNetworking;
 				PRODUCT_NAME = AFNetworking;
@@ -1386,7 +1431,9 @@
 		299522431BBF104D00859F49 /* Release */ = {
 		299522431BBF104D00859F49 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = bitcode;
 				BITCODE_GENERATION_MODE = bitcode;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
@@ -1395,7 +1442,6 @@
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				DYLIB_INSTALL_NAME_BASE = "@rpath";
 				INFOPLIST_FILE = ./Framework/Info.plist;
 				INFOPLIST_FILE = ./Framework/Info.plist;
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
 				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
 				PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking;
 				PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking;
 				PRODUCT_NAME = AFNetworking;
 				PRODUCT_NAME = AFNetworking;
@@ -1410,6 +1456,7 @@
 			buildSettings = {
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = marker;
 				BITCODE_GENERATION_MODE = marker;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1433,6 +1480,7 @@
 			buildSettings = {
 			buildSettings = {
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = bitcode;
 				BITCODE_GENERATION_MODE = bitcode;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1454,7 +1502,9 @@
 		2995227D1BBF136400859F49 /* Debug */ = {
 		2995227D1BBF136400859F49 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = marker;
 				BITCODE_GENERATION_MODE = marker;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				COMBINE_HIDPI_IMAGES = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
@@ -1479,7 +1529,9 @@
 		2995227E1BBF136400859F49 /* Release */ = {
 		2995227E1BBF136400859F49 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				APPLICATION_EXTENSION_API_ONLY = YES;
 				BITCODE_GENERATION_MODE = bitcode;
 				BITCODE_GENERATION_MODE = bitcode;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
 				COMBINE_HIDPI_IMAGES = YES;
 				COMBINE_HIDPI_IMAGES = YES;
 				DEFINES_MODULE = YES;
 				DEFINES_MODULE = YES;
@@ -1531,7 +1583,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 			defaultConfigurationName = Release;
 		};
 		};
-		298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking Mac OS X Tests" */ = {
+		298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking macOS Tests" */ = {
 			isa = XCConfigurationList;
 			isa = XCConfigurationList;
 			buildConfigurations = (
 			buildConfigurations = (
 				298D7C531BC2C7B200FD3B3E /* Debug */,
 				298D7C531BC2C7B200FD3B3E /* Debug */,
@@ -1567,7 +1619,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 			defaultConfigurationName = Release;
 		};
 		};
-		2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking OS X" */ = {
+		2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking macOS" */ = {
 			isa = XCConfigurationList;
 			isa = XCConfigurationList;
 			buildConfigurations = (
 			buildConfigurations = (
 				2995227D1BBF136400859F49 /* Debug */,
 				2995227D1BBF136400859F49 /* Debug */,

+ 3 - 3
AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"
@@ -40,9 +40,9 @@
       buildConfiguration = "Debug"
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "NO"
+      enableAddressSanitizer = "YES"
       codeCoverageEnabled = "YES"
       codeCoverageEnabled = "YES"
-      enableAddressSanitizer = "YES">
+      shouldUseLaunchSchemeArgsEnv = "NO">
       <Testables>
       <Testables>
          <TestableReference
          <TestableReference
             skipped = "NO">
             skipped = "NO">

+ 9 - 9
AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking OS X.xcscheme → AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"
@@ -16,7 +16,7 @@
                BuildableIdentifier = "primary"
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "299522761BBF136400859F49"
                BlueprintIdentifier = "299522761BBF136400859F49"
                BuildableName = "AFNetworking.framework"
                BuildableName = "AFNetworking.framework"
-               BlueprintName = "AFNetworking OS X"
+               BlueprintName = "AFNetworking macOS"
                ReferencedContainer = "container:AFNetworking.xcodeproj">
                ReferencedContainer = "container:AFNetworking.xcodeproj">
             </BuildableReference>
             </BuildableReference>
          </BuildActionEntry>
          </BuildActionEntry>
@@ -26,16 +26,16 @@
       buildConfiguration = "Debug"
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "NO"
-      codeCoverageEnabled = "YES">
+      codeCoverageEnabled = "YES"
+      shouldUseLaunchSchemeArgsEnv = "NO">
       <Testables>
       <Testables>
          <TestableReference
          <TestableReference
             skipped = "NO">
             skipped = "NO">
             <BuildableReference
             <BuildableReference
                BuildableIdentifier = "primary"
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "298D7C491BC2C7B200FD3B3E"
                BlueprintIdentifier = "298D7C491BC2C7B200FD3B3E"
-               BuildableName = "AFNetworking Mac OS X Tests.xctest"
-               BlueprintName = "AFNetworking Mac OS X Tests"
+               BuildableName = "AFNetworking macOS Tests.xctest"
+               BlueprintName = "AFNetworking macOS Tests"
                ReferencedContainer = "container:AFNetworking.xcodeproj">
                ReferencedContainer = "container:AFNetworking.xcodeproj">
             </BuildableReference>
             </BuildableReference>
             <SkippedTests>
             <SkippedTests>
@@ -50,7 +50,7 @@
             BuildableIdentifier = "primary"
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "299522761BBF136400859F49"
             BlueprintIdentifier = "299522761BBF136400859F49"
             BuildableName = "AFNetworking.framework"
             BuildableName = "AFNetworking.framework"
-            BlueprintName = "AFNetworking OS X"
+            BlueprintName = "AFNetworking macOS"
             ReferencedContainer = "container:AFNetworking.xcodeproj">
             ReferencedContainer = "container:AFNetworking.xcodeproj">
          </BuildableReference>
          </BuildableReference>
       </MacroExpansion>
       </MacroExpansion>
@@ -79,7 +79,7 @@
             BuildableIdentifier = "primary"
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "299522761BBF136400859F49"
             BlueprintIdentifier = "299522761BBF136400859F49"
             BuildableName = "AFNetworking.framework"
             BuildableName = "AFNetworking.framework"
-            BlueprintName = "AFNetworking OS X"
+            BlueprintName = "AFNetworking macOS"
             ReferencedContainer = "container:AFNetworking.xcodeproj">
             ReferencedContainer = "container:AFNetworking.xcodeproj">
          </BuildableReference>
          </BuildableReference>
       </MacroExpansion>
       </MacroExpansion>
@@ -97,7 +97,7 @@
             BuildableIdentifier = "primary"
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "299522761BBF136400859F49"
             BlueprintIdentifier = "299522761BBF136400859F49"
             BuildableName = "AFNetworking.framework"
             BuildableName = "AFNetworking.framework"
-            BlueprintName = "AFNetworking OS X"
+            BlueprintName = "AFNetworking macOS"
             ReferencedContainer = "container:AFNetworking.xcodeproj">
             ReferencedContainer = "container:AFNetworking.xcodeproj">
          </BuildableReference>
          </BuildableReference>
       </MacroExpansion>
       </MacroExpansion>

+ 4 - 4
AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"
@@ -26,8 +26,8 @@
       buildConfiguration = "Debug"
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "NO"
-      enableAddressSanitizer = "YES">
+      enableAddressSanitizer = "YES"
+      shouldUseLaunchSchemeArgsEnv = "NO">
       <Testables>
       <Testables>
          <TestableReference
          <TestableReference
             skipped = "NO">
             skipped = "NO">
@@ -78,11 +78,11 @@
       buildConfiguration = "Debug"
       buildConfiguration = "Debug"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      enableThreadSanitizer = "YES"
       launchStyle = "0"
       launchStyle = "0"
       useCustomWorkingDirectory = "NO"
       useCustomWorkingDirectory = "NO"
       ignoresPersistentStateOnLaunch = "NO"
       ignoresPersistentStateOnLaunch = "NO"
       debugDocumentVersioning = "YES"
       debugDocumentVersioning = "YES"
-      enableThreadSanitizer = "YES"
       stopOnEveryThreadSanitizerIssue = "YES"
       stopOnEveryThreadSanitizerIssue = "YES"
       debugServiceExtension = "internal"
       debugServiceExtension = "internal"
       allowLocationSimulation = "YES">
       allowLocationSimulation = "YES">

+ 1 - 1
AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"

+ 43 - 0
AFNetworking/AFCompatibilityMacros.h

@@ -0,0 +1,43 @@
+// AFCompatibilityMacros.h
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#ifndef AFCompatibilityMacros_h
+#define AFCompatibilityMacros_h
+
+#ifdef API_UNAVAILABLE
+    #define AF_API_UNAVAILABLE(x) API_UNAVAILABLE(x)
+#else
+    #define AF_API_UNAVAILABLE(x)
+#endif // API_UNAVAILABLE
+
+#if __has_warning("-Wunguarded-availability-new")
+    #define AF_CAN_USE_AT_AVAILABLE 1
+#else
+    #define AF_CAN_USE_AT_AVAILABLE 0
+#endif
+
+#if ((__IPHONE_OS_VERSION_MAX_ALLOWED && __IPHONE_OS_VERSION_MAX_ALLOWED < 100000) || (__MAC_OS_VERSION_MAX_ALLOWED && __MAC_OS_VERSION_MAX_ALLOWED < 101200) ||(__WATCH_OS_MAX_VERSION_ALLOWED && __WATCH_OS_MAX_VERSION_ALLOWED < 30000) ||(__TV_OS_MAX_VERSION_ALLOWED && __TV_OS_MAX_VERSION_ALLOWED < 100000))
+    #define AF_CAN_INCLUDE_SESSION_TASK_METRICS 0
+#else
+    #define AF_CAN_INCLUDE_SESSION_TASK_METRICS 1
+#endif
+
+#endif /* AFCompatibilityMacros_h */

+ 130 - 4
AFNetworking/AFHTTPSessionManager.h

@@ -167,6 +167,25 @@ NS_ASSUME_NONNULL_BEGIN
  */
  */
 - (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
                             parameters:(nullable id)parameters
                             parameters:(nullable id)parameters
+                              progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
+                               success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                               failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `GET` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
+                            parameters:(nullable id)parameters
+                               headers:(nullable NSDictionary <NSString *, NSString *> *)headers
                               progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
                               progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
@@ -184,7 +203,24 @@ NS_ASSUME_NONNULL_BEGIN
 - (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
                     parameters:(nullable id)parameters
                     parameters:(nullable id)parameters
                        success:(nullable void (^)(NSURLSessionDataTask *task))success
                        success:(nullable void (^)(NSURLSessionDataTask *task))success
-                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+                       failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
+                             parameters:(nullable id)parameters
+                                headers:(nullable NSDictionary <NSString *, NSString *> *)headers
+                                success:(nullable void (^)(NSURLSessionDataTask *task))success
+                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
 
 
 /**
 /**
  Creates and runs an `NSURLSessionDataTask` with a `POST` request.
  Creates and runs an `NSURLSessionDataTask` with a `POST` request.
@@ -214,6 +250,25 @@ NS_ASSUME_NONNULL_BEGIN
  */
  */
 - (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
                              parameters:(nullable id)parameters
                              parameters:(nullable id)parameters
+                               progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
+                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `POST` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                             parameters:(nullable id)parameters
+                                headers:(nullable NSDictionary <NSString *, NSString *> *)headers
                                progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                                progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                                 success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                 success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                 failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
                                 failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
@@ -249,6 +304,26 @@ NS_ASSUME_NONNULL_BEGIN
  */
  */
 - (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
                              parameters:(nullable id)parameters
                              parameters:(nullable id)parameters
+              constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
+                               progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
+                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+/**
+ Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
+ @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                             parameters:(nullable id)parameters
+                                headers:(nullable NSDictionary <NSString *, NSString *> *)headers
               constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
               constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
                                progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                                progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
                                 success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                                 success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
@@ -267,7 +342,24 @@ NS_ASSUME_NONNULL_BEGIN
 - (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
                    parameters:(nullable id)parameters
                    parameters:(nullable id)parameters
                       success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                       success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
-                      failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+                      failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `PUT` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
+                            parameters:(nullable id)parameters
+                               headers:(nullable NSDictionary <NSString *, NSString *> *)headers
+                               success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                               failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
 
 
 /**
 /**
  Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
  Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
@@ -282,7 +374,24 @@ NS_ASSUME_NONNULL_BEGIN
 - (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
                      parameters:(nullable id)parameters
                      parameters:(nullable id)parameters
                         success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                         success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
-                        failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+                        failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
+                              parameters:(nullable id)parameters
+                                 headers:(nullable NSDictionary <NSString *, NSString *> *)headers
+                                 success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                 failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
 
 
 /**
 /**
  Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
  Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
@@ -297,7 +406,24 @@ NS_ASSUME_NONNULL_BEGIN
 - (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
 - (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
                       parameters:(nullable id)parameters
                       parameters:(nullable id)parameters
                          success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
                          success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
-                         failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
+                         failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
+
+/**
+ Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
+ 
+ @param URLString The URL string used to create the request URL.
+ @param parameters The parameters to be encoded according to the client request serializer.
+ @param headers The headers appended to the default headers for this request.
+ @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
+ @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
+ 
+ @see -dataTaskWithRequest:completionHandler:
+ */
+- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
+                               parameters:(nullable id)parameters
+                                  headers:(nullable NSDictionary <NSString *, NSString *> *)headers
+                                  success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                  failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
 
 
 @end
 @end
 
 

+ 95 - 20
AFNetworking/AFHTTPSessionManager.m

@@ -123,7 +123,7 @@
                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
 {
 {
 
 
-    return [self GET:URLString parameters:parameters progress:nil success:success failure:failure];
+    return [self GET:URLString parameters:parameters headers:nil progress:nil success:success failure:failure];
 }
 }
 
 
 - (NSURLSessionDataTask *)GET:(NSString *)URLString
 - (NSURLSessionDataTask *)GET:(NSString *)URLString
@@ -133,16 +133,28 @@
                       failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
                       failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
 {
 {
 
 
+    return [self GET:URLString parameters:parameters headers:nil progress:downloadProgress success:success failure:failure];
+}
+
+- (NSURLSessionDataTask *)GET:(NSString *)URLString
+                   parameters:(id)parameters
+                      headers:(nullable NSDictionary <NSString *, NSString *> *)headers
+                     progress:(void (^)(NSProgress * _Nonnull))downloadProgress
+                      success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
+                      failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
+{
+    
     NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET"
     NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET"
                                                         URLString:URLString
                                                         URLString:URLString
                                                        parameters:parameters
                                                        parameters:parameters
+                                                          headers:headers
                                                    uploadProgress:nil
                                                    uploadProgress:nil
                                                  downloadProgress:downloadProgress
                                                  downloadProgress:downloadProgress
                                                           success:success
                                                           success:success
                                                           failure:failure];
                                                           failure:failure];
-
+    
     [dataTask resume];
     [dataTask resume];
-
+    
     return dataTask;
     return dataTask;
 }
 }
 
 
@@ -151,14 +163,23 @@
                        success:(void (^)(NSURLSessionDataTask *task))success
                        success:(void (^)(NSURLSessionDataTask *task))success
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
 {
 {
-    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) {
+    return [self HEAD:URLString parameters:parameters headers:nil success:success failure:failure];
+}
+
+- (NSURLSessionDataTask *)HEAD:(NSString *)URLString
+                    parameters:(id)parameters
+                       headers:(NSDictionary<NSString *,NSString *> *)headers
+                       success:(void (^)(NSURLSessionDataTask * _Nonnull))success
+                       failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) {
         if (success) {
         if (success) {
             success(task);
             success(task);
         }
         }
     } failure:failure];
     } failure:failure];
-
+    
     [dataTask resume];
     [dataTask resume];
-
+    
     return dataTask;
     return dataTask;
 }
 }
 
 
@@ -167,7 +188,7 @@
                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
 {
 {
-    return [self POST:URLString parameters:parameters progress:nil success:success failure:failure];
+    return [self POST:URLString parameters:parameters headers:nil progress:nil success:success failure:failure];
 }
 }
 
 
 - (NSURLSessionDataTask *)POST:(NSString *)URLString
 - (NSURLSessionDataTask *)POST:(NSString *)URLString
@@ -176,10 +197,20 @@
                        success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
                        success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
                        failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
                        failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
 {
 {
-    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure];
+    return [self POST:URLString parameters:parameters headers:nil progress:uploadProgress success:success failure:failure];
+}
 
 
+- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
+                             parameters:(nullable id)parameters
+                                headers:(nullable NSDictionary <NSString *, NSString *> *)headers
+                               progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
+                                success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
+                                failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters headers:headers uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure];
+    
     [dataTask resume];
     [dataTask resume];
-
+    
     return dataTask;
     return dataTask;
 }
 }
 
 
@@ -189,7 +220,7 @@
                        success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
                        success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
                        failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
                        failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
 {
 {
-    return [self POST:URLString parameters:parameters constructingBodyWithBlock:block progress:nil success:success failure:failure];
+    return [self POST:URLString parameters:parameters headers:nil constructingBodyWithBlock:block progress:nil success:success failure:failure];
 }
 }
 
 
 - (NSURLSessionDataTask *)POST:(NSString *)URLString
 - (NSURLSessionDataTask *)POST:(NSString *)URLString
@@ -198,19 +229,32 @@
                       progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
                       progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    return [self POST:URLString parameters:parameters headers:nil constructingBodyWithBlock:block progress:uploadProgress success:success failure:failure];
+}
+
+- (NSURLSessionDataTask *)POST:(NSString *)URLString
+                    parameters:(id)parameters
+                       headers:(NSDictionary<NSString *,NSString *> *)headers
+     constructingBodyWithBlock:(void (^)(id<AFMultipartFormData> _Nonnull))block
+                      progress:(void (^)(NSProgress * _Nonnull))uploadProgress
+                       success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
 {
 {
     NSError *serializationError = nil;
     NSError *serializationError = nil;
     NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];
     NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];
+    for (NSString *headerField in headers.keyEnumerator) {
+        [request addValue:headers[headerField] forHTTPHeaderField:headerField];
+    }
     if (serializationError) {
     if (serializationError) {
         if (failure) {
         if (failure) {
             dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
             dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
                 failure(nil, serializationError);
                 failure(nil, serializationError);
             });
             });
         }
         }
-
+        
         return nil;
         return nil;
     }
     }
-
+    
     __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {
     __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {
         if (error) {
         if (error) {
             if (failure) {
             if (failure) {
@@ -222,9 +266,9 @@
             }
             }
         }
         }
     }];
     }];
-
+    
     [task resume];
     [task resume];
-
+    
     return task;
     return task;
 }
 }
 
 
@@ -233,10 +277,19 @@
                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                       success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                       failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
 {
 {
-    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
+    return [self PUT:URLString parameters:parameters headers:nil success:success failure:failure];
+}
 
 
+- (NSURLSessionDataTask *)PUT:(NSString *)URLString
+                   parameters:(id)parameters
+                      headers:(NSDictionary<NSString *,NSString *> *)headers
+                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:success failure:failure];
+    
     [dataTask resume];
     [dataTask resume];
-
+    
     return dataTask;
     return dataTask;
 }
 }
 
 
@@ -245,10 +298,19 @@
                         success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                         success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
 {
 {
-    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
+    return [self PATCH:URLString parameters:parameters headers:nil success:success failure:failure];
+}
 
 
+- (NSURLSessionDataTask *)PATCH:(NSString *)URLString
+                     parameters:(id)parameters
+                        headers:(NSDictionary<NSString *,NSString *> *)headers
+                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:success failure:failure];
+    
     [dataTask resume];
     [dataTask resume];
-
+    
     return dataTask;
     return dataTask;
 }
 }
 
 
@@ -257,16 +319,26 @@
                          success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                          success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                          failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
                          failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
 {
 {
-    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
+    return [self DELETE:URLString parameters:parameters headers:nil success:success failure:failure];
+}
 
 
+- (NSURLSessionDataTask *)DELETE:(NSString *)URLString
+                      parameters:(id)parameters
+                         headers:(NSDictionary<NSString *,NSString *> *)headers
+                         success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
+                         failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
+{
+    NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:success failure:failure];
+    
     [dataTask resume];
     [dataTask resume];
-
+    
     return dataTask;
     return dataTask;
 }
 }
 
 
 - (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
 - (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
                                        URLString:(NSString *)URLString
                                        URLString:(NSString *)URLString
                                       parameters:(id)parameters
                                       parameters:(id)parameters
+                                         headers:(NSDictionary <NSString *, NSString *> *)headers
                                   uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress
                                   uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress
                                 downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress
                                 downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress
                                          success:(void (^)(NSURLSessionDataTask *, id))success
                                          success:(void (^)(NSURLSessionDataTask *, id))success
@@ -274,6 +346,9 @@
 {
 {
     NSError *serializationError = nil;
     NSError *serializationError = nil;
     NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
     NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
+    for (NSString *headerField in headers.keyEnumerator) {
+        [request addValue:headers[headerField] forHTTPHeaderField:headerField];
+    }
     if (serializationError) {
     if (serializationError) {
         if (failure) {
         if (failure) {
             dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
             dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{

+ 6 - 3
AFNetworking/AFNetworkReachabilityManager.h

@@ -108,9 +108,12 @@ NS_ASSUME_NONNULL_BEGIN
 - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
 - (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
 
 
 /**
 /**
- *  Initializes an instance of a network reachability manager
- *
- *  @return nil as this method is unavailable
+ *  Unavailable initializer
+ */
++ (instancetype)new NS_UNAVAILABLE;
+
+/**
+ *  Unavailable initializer
  */
  */
 - (instancetype)init NS_UNAVAILABLE;
 - (instancetype)init NS_UNAVAILABLE;
 
 

+ 4 - 1
AFNetworking/AFNetworkReachabilityManager.m

@@ -170,8 +170,11 @@ static void AFNetworkReachabilityReleaseCallback(const void *info) {
     return self;
     return self;
 }
 }
 
 
-- (instancetype)init NS_UNAVAILABLE
+- (instancetype)init
 {
 {
+    @throw [NSException exceptionWithName:NSGenericException
+                                   reason:@"`-init` unavailable. Use `-initWithReachability:` instead"
+                                 userInfo:nil];
     return nil;
     return nil;
 }
 }
 
 

+ 5 - 0
AFNetworking/AFURLRequestSerialization.m

@@ -679,6 +679,11 @@ NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
     return self;
     return self;
 }
 }
 
 
+- (void)setRequest:(NSMutableURLRequest *)request
+{
+    _request = [request mutableCopy];
+}
+
 - (BOOL)appendPartWithFileURL:(NSURL *)fileURL
 - (BOOL)appendPartWithFileURL:(NSURL *)fileURL
                          name:(NSString *)name
                          name:(NSString *)name
                         error:(NSError * __autoreleasing *)error
                         error:(NSError * __autoreleasing *)error

+ 8 - 1
AFNetworking/AFURLResponseSerialization.h

@@ -24,6 +24,11 @@
 
 
 NS_ASSUME_NONNULL_BEGIN
 NS_ASSUME_NONNULL_BEGIN
 
 
+/**
+ Recursively removes `NSNull` values from a JSON object.
+*/
+id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions);
+
 /**
 /**
  The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.
  The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.
 
 
@@ -108,6 +113,8 @@ NS_ASSUME_NONNULL_BEGIN
  - `application/json`
  - `application/json`
  - `text/json`
  - `text/json`
  - `text/javascript`
  - `text/javascript`
+
+ In RFC 7159 - Section 8.1, it states that JSON text is required to be encoded in UTF-8, UTF-16, or UTF-32, and the default encoding is UTF-8. NSJSONSerialization provides support for all the encodings listed in the specification, and recommends UTF-8 for efficiency. Using an unsupported encoding will result in serialization error. See the `NSJSONSerialization` documentation for more details.
  */
  */
 @interface AFJSONResponseSerializer : AFHTTPResponseSerializer
 @interface AFJSONResponseSerializer : AFHTTPResponseSerializer
 
 
@@ -163,7 +170,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (instancetype)init;
 - (instancetype)init;
 
 
 /**
 /**
- Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
+ Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSXMLDocument` documentation section "Input and Output Options". `0` by default.
  */
  */
 @property (nonatomic, assign) NSUInteger options;
 @property (nonatomic, assign) NSUInteger options;
 
 

+ 4 - 2
AFNetworking/AFURLResponseSerialization.m

@@ -60,11 +60,13 @@ static BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger co
     return NO;
     return NO;
 }
 }
 
 
-static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) {
+id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) {
     if ([JSONObject isKindOfClass:[NSArray class]]) {
     if ([JSONObject isKindOfClass:[NSArray class]]) {
         NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]];
         NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]];
         for (id value in (NSArray *)JSONObject) {
         for (id value in (NSArray *)JSONObject) {
-            [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)];
+            if (![value isEqual:[NSNull null]]) {
+                [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)];
+            }
         }
         }
 
 
         return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray];
         return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray];

+ 15 - 1
AFNetworking/AFURLSessionManager.h

@@ -25,6 +25,7 @@
 #import "AFURLResponseSerialization.h"
 #import "AFURLResponseSerialization.h"
 #import "AFURLRequestSerialization.h"
 #import "AFURLRequestSerialization.h"
 #import "AFSecurityPolicy.h"
 #import "AFSecurityPolicy.h"
+#import "AFCompatibilityMacros.h"
 #if !TARGET_OS_WATCH
 #if !TARGET_OS_WATCH
 #import "AFNetworkReachabilityManager.h"
 #import "AFNetworkReachabilityManager.h"
 #endif
 #endif
@@ -377,6 +378,14 @@ NS_ASSUME_NONNULL_BEGIN
  */
  */
 - (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block;
 - (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block;
 
 
+/**
+ Sets a block to be executed when metrics are finalized related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didFinishCollectingMetrics:`.
+
+ @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any metrics that were collected in the process of executing the task.
+ */
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+- (void)setTaskDidFinishCollectingMetricsBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSURLSessionTaskMetrics * _Nullable metrics))block;
+#endif
 ///-------------------------------------------
 ///-------------------------------------------
 /// @name Setting Data Task Delegate Callbacks
 /// @name Setting Data Task Delegate Callbacks
 ///-------------------------------------------
 ///-------------------------------------------
@@ -414,7 +423,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 
  @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.
  @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.
  */
  */
-- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block;
+- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block AF_API_UNAVAILABLE(macos);
 
 
 ///-----------------------------------------------
 ///-----------------------------------------------
 /// @name Setting Download Task Delegate Callbacks
 /// @name Setting Download Task Delegate Callbacks
@@ -497,4 +506,9 @@ FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey;
  */
  */
 FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey;
 FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey;
 
 
+/**
+ The session task metrics taken from the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteSessionTaskMetrics`
+ */
+FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSessionTaskMetrics;
+
 NS_ASSUME_NONNULL_END
 NS_ASSUME_NONNULL_END

+ 87 - 19
AFNetworking/AFURLSessionManager.m

@@ -38,14 +38,16 @@ static dispatch_queue_t url_session_manager_creation_queue() {
     return af_url_session_manager_creation_queue;
     return af_url_session_manager_creation_queue;
 }
 }
 
 
-static void url_session_manager_create_task_safely(dispatch_block_t block) {
-    if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) {
-        // Fix of bug
-        // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8)
-        // Issue about:https://github.com/AFNetworking/AFNetworking/issues/2093
-        dispatch_sync(url_session_manager_creation_queue(), block);
-    } else {
-        block();
+static void url_session_manager_create_task_safely(dispatch_block_t _Nonnull block) {
+    if (block != NULL) {
+        if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) {
+            // Fix of bug
+            // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8)
+            // Issue about:https://github.com/AFNetworking/AFNetworking/issues/2093
+            dispatch_sync(url_session_manager_creation_queue(), block);
+        } else {
+            block();
+        }
     }
     }
 }
 }
 
 
@@ -80,6 +82,7 @@ NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamof
 NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata";
 NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata";
 NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error";
 NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error";
 NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath";
 NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath";
+NSString * const AFNetworkingTaskDidCompleteSessionTaskMetrics = @"com.alamofire.networking.complete.sessiontaskmetrics";
 
 
 static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock";
 static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock";
 
 
@@ -95,6 +98,9 @@ typedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSes
 typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task);
 typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task);
 typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);
 typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);
 typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error);
 typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error);
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+typedef void (^AFURLSessionTaskDidFinishCollectingMetricsBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLSessionTaskMetrics * metrics);
+#endif
 
 
 typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response);
 typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response);
 typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask);
 typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask);
@@ -118,6 +124,9 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
 @property (nonatomic, strong) NSProgress *uploadProgress;
 @property (nonatomic, strong) NSProgress *uploadProgress;
 @property (nonatomic, strong) NSProgress *downloadProgress;
 @property (nonatomic, strong) NSProgress *downloadProgress;
 @property (nonatomic, copy) NSURL *downloadFileURL;
 @property (nonatomic, copy) NSURL *downloadFileURL;
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+@property (nonatomic, strong) NSURLSessionTaskMetrics *sessionTaskMetrics;
+#endif
 @property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;
 @property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;
 @property (nonatomic, copy) AFURLSessionTaskProgressBlock uploadProgressBlock;
 @property (nonatomic, copy) AFURLSessionTaskProgressBlock uploadProgressBlock;
 @property (nonatomic, copy) AFURLSessionTaskProgressBlock downloadProgressBlock;
 @property (nonatomic, copy) AFURLSessionTaskProgressBlock downloadProgressBlock;
@@ -148,11 +157,17 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
         progress.pausingHandler = ^{
         progress.pausingHandler = ^{
             [weakTask suspend];
             [weakTask suspend];
         };
         };
-        if ([progress respondsToSelector:@selector(setResumingHandler:)]) {
+#if AF_CAN_USE_AT_AVAILABLE
+        if (@available(iOS 9, macOS 10.11, *))
+#else
+        if ([progress respondsToSelector:@selector(setResumingHandler:)])
+#endif
+        {
             progress.resumingHandler = ^{
             progress.resumingHandler = ^{
                 [weakTask resume];
                 [weakTask resume];
             };
             };
         }
         }
+        
         [progress addObserver:self
         [progress addObserver:self
                    forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
                    forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
                       options:NSKeyValueObservingOptionNew
                       options:NSKeyValueObservingOptionNew
@@ -202,6 +217,14 @@ didCompleteWithError:(NSError *)error
         self.mutableData = nil;
         self.mutableData = nil;
     }
     }
 
 
+#if AF_CAN_USE_AT_AVAILABLE && AF_CAN_INCLUDE_SESSION_TASK_METRICS
+    if (@available(iOS 10, macOS 10.12, watchOS 3, tvOS 10, *)) {
+        if (self.sessionTaskMetrics) {
+            userInfo[AFNetworkingTaskDidCompleteSessionTaskMetrics] = self.sessionTaskMetrics;
+        }
+    }
+#endif
+
     if (self.downloadFileURL) {
     if (self.downloadFileURL) {
         userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL;
         userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL;
     } else if (data) {
     } else if (data) {
@@ -250,6 +273,14 @@ didCompleteWithError:(NSError *)error
     }
     }
 }
 }
 
 
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics {
+    self.sessionTaskMetrics = metrics;
+}
+#endif
+
 #pragma mark - NSURLSessionDataDelegate
 #pragma mark - NSURLSessionDataDelegate
 
 
 - (void)URLSession:(__unused NSURLSession *)session
 - (void)URLSession:(__unused NSURLSession *)session
@@ -448,12 +479,15 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
 @property (readwrite, nonatomic, strong) NSLock *lock;
 @property (readwrite, nonatomic, strong) NSLock *lock;
 @property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid;
 @property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid;
 @property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge;
 @property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge;
-@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession;
+@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession AF_API_UNAVAILABLE(macos);
 @property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete;
 @property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete;
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+@property (readwrite, nonatomic, copy) AFURLSessionTaskDidFinishCollectingMetricsBlock taskDidFinishCollectingMetrics;
+#endif
 @property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse;
 @property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse;
 @property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask;
 @property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask;
 @property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData;
 @property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData;
@@ -737,17 +771,21 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
     __block NSURLSessionUploadTask *uploadTask = nil;
     __block NSURLSessionUploadTask *uploadTask = nil;
     url_session_manager_create_task_safely(^{
     url_session_manager_create_task_safely(^{
         uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
         uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
-    });
-
-    // uploadTask may be nil on iOS7 because uploadTaskWithRequest:fromFile: may return nil despite being documented as nonnull (https://devforums.apple.com/message/926113#926113)
-    if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
-        for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
-            uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
+        
+        // uploadTask may be nil on iOS7 because uploadTaskWithRequest:fromFile: may return nil despite being documented as nonnull (https://devforums.apple.com/message/926113#926113)
+        if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
+            for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
+                uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
+            }
         }
         }
+    });
+    
+    if (uploadTask) {
+        [self addDelegateForUploadTask:uploadTask
+                              progress:uploadProgressBlock
+                     completionHandler:completionHandler];
     }
     }
 
 
-    [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
-
     return uploadTask;
     return uploadTask;
 }
 }
 
 
@@ -831,9 +869,11 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
     self.sessionDidReceiveAuthenticationChallenge = block;
     self.sessionDidReceiveAuthenticationChallenge = block;
 }
 }
 
 
+#if !TARGET_OS_OSX
 - (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block {
 - (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block {
     self.didFinishEventsForBackgroundURLSession = block;
     self.didFinishEventsForBackgroundURLSession = block;
 }
 }
+#endif
 
 
 #pragma mark -
 #pragma mark -
 
 
@@ -857,6 +897,12 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
     self.taskDidComplete = block;
     self.taskDidComplete = block;
 }
 }
 
 
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+- (void)setTaskDidFinishCollectingMetricsBlock:(void (^)(NSURLSession * _Nonnull, NSURLSessionTask * _Nonnull, NSURLSessionTaskMetrics * _Nullable))block {
+    self.taskDidFinishCollectingMetrics = block;
+}
+#endif
+
 #pragma mark -
 #pragma mark -
 
 
 - (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block {
 - (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block {
@@ -902,9 +948,12 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
         return self.dataTaskDidReceiveResponse != nil;
         return self.dataTaskDidReceiveResponse != nil;
     } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) {
     } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) {
         return self.dataTaskWillCacheResponse != nil;
         return self.dataTaskWillCacheResponse != nil;
-    } else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {
+    }
+#if !TARGET_OS_OSX
+    else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {
         return self.didFinishEventsForBackgroundURLSession != nil;
         return self.didFinishEventsForBackgroundURLSession != nil;
     }
     }
+#endif
 
 
     return [[self class] instancesRespondToSelector:selector];
     return [[self class] instancesRespondToSelector:selector];
 }
 }
@@ -1060,6 +1109,23 @@ didCompleteWithError:(NSError *)error
     }
     }
 }
 }
 
 
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+- (void)URLSession:(NSURLSession *)session
+              task:(NSURLSessionTask *)task
+didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics
+{
+    AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
+    // Metrics may fire after URLSession:task:didCompleteWithError: is called, delegate may be nil
+    if (delegate) {
+        [delegate URLSession:session task:task didFinishCollectingMetrics:metrics];
+    }
+
+    if (self.taskDidFinishCollectingMetrics) {
+        self.taskDidFinishCollectingMetrics(session, task, metrics);
+    }
+}
+#endif
+
 #pragma mark - NSURLSessionDataDelegate
 #pragma mark - NSURLSessionDataDelegate
 
 
 - (void)URLSession:(NSURLSession *)session
 - (void)URLSession:(NSURLSession *)session
@@ -1122,6 +1188,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask
     }
     }
 }
 }
 
 
+#if !TARGET_OS_OSX
 - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session {
 - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session {
     if (self.didFinishEventsForBackgroundURLSession) {
     if (self.didFinishEventsForBackgroundURLSession) {
         dispatch_async(dispatch_get_main_queue(), ^{
         dispatch_async(dispatch_get_main_queue(), ^{
@@ -1129,6 +1196,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask
         });
         });
     }
     }
 }
 }
+#endif
 
 
 #pragma mark - NSURLSessionDownloadDelegate
 #pragma mark - NSURLSessionDownloadDelegate
 
 

+ 90 - 0
CHANGELOG.md

@@ -4,6 +4,96 @@ All notable changes to this project will be documented in this file.
 
 
 --- 
 --- 
 
 
+## [3.2.1](https://github.com/AFNetworking/AFNetworking/releases/tag/3.2.1) (05/04/2018)
+Released on Friday, May 04, 2018. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.2.1+is%3Aclosed).
+
+#### Updated
+* Xcode 9.3 Support
+ * Implemented by Jeff Kelley in [#4199](https://github.com/AFNetworking/AFNetworking/pull/4199).
+* Update HTTPBin certificates for April 2018.
+ * Implemented by Jeff Kelley in [#4198](https://github.com/AFNetworking/AFNetworking/pull/4198).
+
+#### Additional Changes
+* Remove conflicting nullable specifier on init
+ * Implemented by Nick Brook and Jeff Kelley in [#4182](https://github.com/AFNetworking/AFNetworking/pull/4182).
+* Use @available if available to silence a warning.
+ * Implemented by Jeff Kelley in [#4138](https://github.com/AFNetworking/AFNetworking/pull/4138).
+* UIImageView+AFNetworking: Prevent stuck state for malformed urlRequest
+ * Implemented by Adam Duflo and aduflo in [#4131](https://github.com/AFNetworking/AFNetworking/pull/4131).
+* add the link for LICENSE
+ * Implemented by Liao Malin in [#4125](https://github.com/AFNetworking/AFNetworking/pull/4125).
+* Fix analyzer warning for upload task creation
+ * Implemented by Jeff Kelley in [#4122](https://github.com/AFNetworking/AFNetworking/pull/4122).
+ 
+
+## [3.2.0](https://github.com/AFNetworking/AFNetworking/releases/tag/3.2.0) (12/15/2017)
+Released on Friday, December 15, 2017. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.2.0+is%3Aclosed).
+
+#### Added
+* Config `AFImageDownloader` `NSURLCache` and ask `AFImageRequestCache` implementer if an image should be cached
+	* Implemented by wjehenddher in [#4010](https://github.com/AFNetworking/AFNetworking/pull/4010).
+* Add `XMLParser`/`XMLDocument` serializer tests
+	* Implemented by skyline75489 in [#3753](https://github.com/AFNetworking/AFNetworking/pull/3753).
+* Enable custom httpbin URL with `HTTPBIN_BASE_URL` environment variable
+	* Implemented by 0xced in [#3748](https://github.com/AFNetworking/AFNetworking/pull/3748).
+* `AFHTTPSessionManager` now throws exception if SSL pinning mode is set for non https sessions
+	* Implemented by 0xced in [#3687](https://github.com/AFNetworking/AFNetworking/pull/3687).
+
+#### Updated
+* Update security policy test certificates
+	* Implemented by SlaunchaMan in [#4103](https://github.com/AFNetworking/AFNetworking/pull/4103).
+* Allow return value of HTTP redirection block to be `NULL`
+	* Implemented by TheDom in [#3975](https://github.com/AFNetworking/AFNetworking/pull/3975).
+* Clarify documentation for supported encodings in `AFJSONResponseSerializer`
+	* Implemented by skyline75489 in [#3750](https://github.com/AFNetworking/AFNetworking/pull/3750).
+* Handle Error Pointers according to Cocoa Convention
+	* Implemented by tclementdev in [#3653](https://github.com/AFNetworking/AFNetworking/pull/3653).
+* Updates `AFHTTPSessionManager` documentation to reflect v3.x change
+	* Implemented by ecaselles in [#3476](https://github.com/AFNetworking/AFNetworking/pull/3476).
+* Improved code base to generate fewer warnings when using stricter compiler settings
+	* Implemented by 0xced in [3431](https://github.com/AFNetworking/AFNetworking/pull/3431).
+
+#### Changed
+* Change “Mac OS X” and “OS X” references to “macOS”
+	* Implemented by SlaunchaMan in [#4104](https://github.com/AFNetworking/AFNetworking/pull/4104).
+
+#### Fixed
+* Fixed crash around customizing `NSURLCache` size for < iOS 8.2
+	* Implemented by kcharwood in [#3735](https://github.com/AFNetworking/AFNetworking/pull/3735).
+* Fixed issue where `UIWebView` extension did not preserve all of the request information
+	* Implemented by skyline75489 in [#3733](https://github.com/AFNetworking/AFNetworking/pull/3733).
+* Fixed bug with webview delegate callback
+	* Implemented by kcharwood in [#3727](https://github.com/AFNetworking/AFNetworking/pull/3727).
+* Fixed crash when passing invalid JSON to request serialization
+	* Implemented by 0xced in [#3719](https://github.com/AFNetworking/AFNetworking/pull/3719).
+* Fixed potential KVO crasher for URL Session Task delegates
+	* Implemented by 0xced in [#3718](https://github.com/AFNetworking/AFNetworking/pull/3718).
+* Removed ambiguous array creation in `AFSecurityPolicy`
+	* Implemented by sgl0v in [#3679](https://github.com/AFNetworking/AFNetworking/pull/3679).
+* Fixed issue where `NS_UNAVAILABLE` is not reported for `AFNetworkReachabilityManager`
+	* Implemented by Microbee23 in [#3649](https://github.com/AFNetworking/AFNetworking/pull/3649).
+* Require app extension api only on watchOS
+	* Implemented by ethansinjin in [#3612](https://github.com/AFNetworking/AFNetworking/pull/3612).
+* Remove KVO of progress in favor of using the NSURLSession delegate APIs
+	* Implemented by coreyfloyd in [#3607](https://github.com/AFNetworking/AFNetworking/pull/3607).
+* Fixed an issue where registering a `UIProgessView` to a task that was causing a crash
+	* Implemented by Starscream27 in [#3604](https://github.com/AFNetworking/AFNetworking/pull/3604).
+* Moved `[self didChangeValueForKey:@"currentState"]` into correct scope
+	* Implemented by chenxin0123 in [#3565](https://github.com/AFNetworking/AFNetworking/pull/3565).
+* Fixed issue where response serializers did not inherit super class copying
+	* Implemented by kcharwood in [#3559](https://github.com/AFNetworking/AFNetworking/pull/3559).
+* Fixed crashes due to race conditions with `NSMutableDictionary` access in `AFHTTPRequestSerializer`
+	* Implemented by alexbird in [#3526](https://github.com/AFNetworking/AFNetworking/pull/3526).
+* Updated dash character to improve markdown parsing for license
+	* Implemented by gemmakbarlow in [#3488](https://github.com/AFNetworking/AFNetworking/pull/3488).
+
+#### Removed
+* Deprecate the unused stringEncoding property of `AFHTTPResponseSerializer`
+	* Implemented by 0xced in [#3751](https://github.com/AFNetworking/AFNetworking/pull/3751).
+* Removed unused `AFTaskStateChangedContext`
+	* Implemented by yulingtianxia in [#3432](https://github.com/AFNetworking/AFNetworking/pull/3432).
+ 
+
 ## [3.1.0](https://github.com/AFNetworking/AFNetworking/releases/tag/3.1.0) (03/31/2016)
 ## [3.1.0](https://github.com/AFNetworking/AFNetworking/releases/tag/3.1.0) (03/31/2016)
 Released on Thursday, March 31, 2016. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.1.0+is%3Aclosed).
 Released on Thursday, March 31, 2016. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.1.0+is%3Aclosed).
 
 

+ 93 - 27
Example/AFNetworking Example.xcodeproj/project.pbxproj

@@ -38,7 +38,7 @@
 		29E6F1E91BB9E37200A4466C /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29E6F1E81BB9E37200A4466C /* NotificationCenter.framework */; };
 		29E6F1E91BB9E37200A4466C /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29E6F1E81BB9E37200A4466C /* NotificationCenter.framework */; };
 		29E6F1ED1BB9E37200A4466C /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F1EC1BB9E37200A4466C /* TodayViewController.m */; };
 		29E6F1ED1BB9E37200A4466C /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F1EC1BB9E37200A4466C /* TodayViewController.m */; };
 		29E6F1F01BB9E37200A4466C /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29E6F1EE1BB9E37200A4466C /* MainInterface.storyboard */; };
 		29E6F1F01BB9E37200A4466C /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29E6F1EE1BB9E37200A4466C /* MainInterface.storyboard */; };
-		29E6F1F41BB9E37200A4466C /* Today Extension Example.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 29E6F1E61BB9E37200A4466C /* Today Extension Example.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		29E6F1F41BB9E37200A4466C /* iOS Today Extension Example.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
 		29E6F1F91BB9E56200A4466C /* Post.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19A1BB9DD7300A4466C /* Post.m */; };
 		29E6F1F91BB9E56200A4466C /* Post.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19A1BB9DD7300A4466C /* Post.m */; };
 		29E6F1FA1BB9E56500A4466C /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19C1BB9DD7300A4466C /* User.m */; };
 		29E6F1FA1BB9E56500A4466C /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19C1BB9DD7300A4466C /* User.m */; };
 		C2BFE0251C11870800BB258D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C2BFE0241C11870800BB258D /* AppDelegate.m */; };
 		C2BFE0251C11870800BB258D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C2BFE0241C11870800BB258D /* AppDelegate.m */; };
@@ -87,7 +87,7 @@
 			dstPath = "";
 			dstPath = "";
 			dstSubfolderSpec = 13;
 			dstSubfolderSpec = 13;
 			files = (
 			files = (
-				29E6F1F41BB9E37200A4466C /* Today Extension Example.appex in Embed App Extensions */,
+				29E6F1F41BB9E37200A4466C /* iOS Today Extension Example.appex in Embed App Extensions */,
 			);
 			);
 			name = "Embed App Extensions";
 			name = "Embed App Extensions";
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -108,7 +108,7 @@
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
 		291BFDB91BB9E85400FFB029 /* watchOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "watchOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		291BFDB91BB9E85400FFB029 /* watchOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "watchOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "watchOS Example Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
 		291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "watchOS Example Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
-		291BFDE71BB9E8C700FFB029 /* OS X Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "OS X Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+		291BFDE71BB9E8C700FFB029 /* macOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "macOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		291BFDED1BB9E8C700FFB029 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		291BFDED1BB9E8C700FFB029 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
 		291BFDF21BB9E8C700FFB029 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		291BFDF21BB9E8C700FFB029 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		291BFDF71BB9E8C700FFB029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		291BFDF71BB9E8C700FFB029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -137,7 +137,7 @@
 		29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFAppDotNetAPIClient.m; sourceTree = "<group>"; };
 		29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFAppDotNetAPIClient.m; sourceTree = "<group>"; };
 		29E6F1AB1BB9DDB600A4466C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		29E6F1AB1BB9DDB600A4466C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		29E6F1E01BB9E03600A4466C /* Launchscreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launchscreen.storyboard; path = "iOS Example/Launchscreen.storyboard"; sourceTree = SOURCE_ROOT; };
 		29E6F1E01BB9E03600A4466C /* Launchscreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launchscreen.storyboard; path = "iOS Example/Launchscreen.storyboard"; sourceTree = SOURCE_ROOT; };
-		29E6F1E61BB9E37200A4466C /* Today Extension Example.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Today Extension Example.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
+		29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "iOS Today Extension Example.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
 		29E6F1E81BB9E37200A4466C /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; };
 		29E6F1E81BB9E37200A4466C /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; };
 		29E6F1EB1BB9E37200A4466C /* TodayViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TodayViewController.h; sourceTree = "<group>"; };
 		29E6F1EB1BB9E37200A4466C /* TodayViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TodayViewController.h; sourceTree = "<group>"; };
 		29E6F1EC1BB9E37200A4466C /* TodayViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = "<group>"; };
 		29E6F1EC1BB9E37200A4466C /* TodayViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = "<group>"; };
@@ -205,7 +205,7 @@
 /* End PBXFrameworksBuildPhase section */
 /* End PBXFrameworksBuildPhase section */
 
 
 /* Begin PBXGroup section */
 /* Begin PBXGroup section */
-		291BFDE81BB9E8C700FFB029 /* OS X Example */ = {
+		291BFDE81BB9E8C700FFB029 /* macOS Example */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
 				C2BFE0231C11870800BB258D /* AppDelegate.h */,
 				C2BFE0231C11870800BB258D /* AppDelegate.h */,
@@ -215,7 +215,7 @@
 				291BFDF71BB9E8C700FFB029 /* Info.plist */,
 				291BFDF71BB9E8C700FFB029 /* Info.plist */,
 				291BFDEC1BB9E8C700FFB029 /* Supporting Files */,
 				291BFDEC1BB9E8C700FFB029 /* Supporting Files */,
 			);
 			);
-			path = "OS X Example";
+			path = "macOS Example";
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
 		291BFDEC1BB9E8C700FFB029 /* Supporting Files */ = {
 		291BFDEC1BB9E8C700FFB029 /* Supporting Files */ = {
@@ -267,7 +267,7 @@
 				29E6F1EA1BB9E37200A4466C /* Today Extension Example */,
 				29E6F1EA1BB9E37200A4466C /* Today Extension Example */,
 				29E6F20F1BB9E76A00A4466C /* watchOS Example */,
 				29E6F20F1BB9E76A00A4466C /* watchOS Example */,
 				29E6F21E1BB9E76A00A4466C /* watchOS Example Extension */,
 				29E6F21E1BB9E76A00A4466C /* watchOS Example Extension */,
-				291BFDE81BB9E8C700FFB029 /* OS X Example */,
+				291BFDE81BB9E8C700FFB029 /* macOS Example */,
 				291BFE161BB9ECEE00FFB029 /* tvOS Example */,
 				291BFE161BB9ECEE00FFB029 /* tvOS Example */,
 				29E6F1E71BB9E37200A4466C /* Frameworks */,
 				29E6F1E71BB9E37200A4466C /* Frameworks */,
 				29E6F1761BB9DCB500A4466C /* Products */,
 				29E6F1761BB9DCB500A4466C /* Products */,
@@ -281,10 +281,10 @@
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
 				29E6F1751BB9DCB500A4466C /* iOS Example.app */,
 				29E6F1751BB9DCB500A4466C /* iOS Example.app */,
-				29E6F1E61BB9E37200A4466C /* Today Extension Example.appex */,
+				29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */,
 				291BFDB91BB9E85400FFB029 /* watchOS Example.app */,
 				291BFDB91BB9E85400FFB029 /* watchOS Example.app */,
 				291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */,
 				291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */,
-				291BFDE71BB9E8C700FFB029 /* OS X Example.app */,
+				291BFDE71BB9E8C700FFB029 /* macOS Example.app */,
 				291BFE151BB9ECEE00FFB029 /* tvOS Example.app */,
 				291BFE151BB9ECEE00FFB029 /* tvOS Example.app */,
 			);
 			);
 			name = Products;
 			name = Products;
@@ -422,9 +422,9 @@
 			productReference = 291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */;
 			productReference = 291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */;
 			productType = "com.apple.product-type.watchkit2-extension";
 			productType = "com.apple.product-type.watchkit2-extension";
 		};
 		};
-		291BFDE61BB9E8C700FFB029 /* OS X Example */ = {
+		291BFDE61BB9E8C700FFB029 /* macOS Example */ = {
 			isa = PBXNativeTarget;
 			isa = PBXNativeTarget;
-			buildConfigurationList = 291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "OS X Example" */;
+			buildConfigurationList = 291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "macOS Example" */;
 			buildPhases = (
 			buildPhases = (
 				291BFDE31BB9E8C700FFB029 /* Sources */,
 				291BFDE31BB9E8C700FFB029 /* Sources */,
 				291BFDE41BB9E8C700FFB029 /* Frameworks */,
 				291BFDE41BB9E8C700FFB029 /* Frameworks */,
@@ -434,9 +434,9 @@
 			);
 			);
 			dependencies = (
 			dependencies = (
 			);
 			);
-			name = "OS X Example";
+			name = "macOS Example";
 			productName = "OS X Example";
 			productName = "OS X Example";
-			productReference = 291BFDE71BB9E8C700FFB029 /* OS X Example.app */;
+			productReference = 291BFDE71BB9E8C700FFB029 /* macOS Example.app */;
 			productType = "com.apple.product-type.application";
 			productType = "com.apple.product-type.application";
 		};
 		};
 		291BFE141BB9ECEE00FFB029 /* tvOS Example */ = {
 		291BFE141BB9ECEE00FFB029 /* tvOS Example */ = {
@@ -477,9 +477,9 @@
 			productReference = 29E6F1751BB9DCB500A4466C /* iOS Example.app */;
 			productReference = 29E6F1751BB9DCB500A4466C /* iOS Example.app */;
 			productType = "com.apple.product-type.application";
 			productType = "com.apple.product-type.application";
 		};
 		};
-		29E6F1E51BB9E37200A4466C /* Today Extension Example */ = {
+		29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */ = {
 			isa = PBXNativeTarget;
 			isa = PBXNativeTarget;
-			buildConfigurationList = 29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "Today Extension Example" */;
+			buildConfigurationList = 29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "iOS Today Extension Example" */;
 			buildPhases = (
 			buildPhases = (
 				29E6F1E21BB9E37200A4466C /* Sources */,
 				29E6F1E21BB9E37200A4466C /* Sources */,
 				29E6F1E31BB9E37200A4466C /* Frameworks */,
 				29E6F1E31BB9E37200A4466C /* Frameworks */,
@@ -489,9 +489,9 @@
 			);
 			);
 			dependencies = (
 			dependencies = (
 			);
 			);
-			name = "Today Extension Example";
+			name = "iOS Today Extension Example";
 			productName = "Today Extension Example";
 			productName = "Today Extension Example";
-			productReference = 29E6F1E61BB9E37200A4466C /* Today Extension Example.appex */;
+			productReference = 29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */;
 			productType = "com.apple.product-type.app-extension";
 			productType = "com.apple.product-type.app-extension";
 		};
 		};
 /* End PBXNativeTarget section */
 /* End PBXNativeTarget section */
@@ -500,7 +500,7 @@
 		29E6F16B1BB9DA2E00A4466C /* Project object */ = {
 		29E6F16B1BB9DA2E00A4466C /* Project object */ = {
 			isa = PBXProject;
 			isa = PBXProject;
 			attributes = {
 			attributes = {
-				LastUpgradeCheck = 0710;
+				LastUpgradeCheck = 0930;
 				TargetAttributes = {
 				TargetAttributes = {
 					291BFDB81BB9E85400FFB029 = {
 					291BFDB81BB9E85400FFB029 = {
 						CreatedOnToolsVersion = 7.1;
 						CreatedOnToolsVersion = 7.1;
@@ -537,10 +537,10 @@
 			projectRoot = "";
 			projectRoot = "";
 			targets = (
 			targets = (
 				29E6F1741BB9DCB500A4466C /* iOS Example */,
 				29E6F1741BB9DCB500A4466C /* iOS Example */,
-				29E6F1E51BB9E37200A4466C /* Today Extension Example */,
+				29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */,
 				291BFDB81BB9E85400FFB029 /* watchOS Example */,
 				291BFDB81BB9E85400FFB029 /* watchOS Example */,
 				291BFDC41BB9E85500FFB029 /* watchOS Example Extension */,
 				291BFDC41BB9E85500FFB029 /* watchOS Example Extension */,
-				291BFDE61BB9E8C700FFB029 /* OS X Example */,
+				291BFDE61BB9E8C700FFB029 /* macOS Example */,
 				291BFE141BB9ECEE00FFB029 /* tvOS Example */,
 				291BFE141BB9ECEE00FFB029 /* tvOS Example */,
 			);
 			);
 		};
 		};
@@ -668,7 +668,7 @@
 		};
 		};
 		29E6F1F31BB9E37200A4466C /* PBXTargetDependency */ = {
 		29E6F1F31BB9E37200A4466C /* PBXTargetDependency */ = {
 			isa = PBXTargetDependency;
 			isa = PBXTargetDependency;
-			target = 29E6F1E51BB9E37200A4466C /* Today Extension Example */;
+			target = 29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */;
 			targetProxy = 29E6F1F21BB9E37200A4466C /* PBXContainerItemProxy */;
 			targetProxy = 29E6F1F21BB9E37200A4466C /* PBXContainerItemProxy */;
 		};
 		};
 /* End PBXTargetDependency section */
 /* End PBXTargetDependency section */
@@ -709,6 +709,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -757,6 +758,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -800,6 +802,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -849,6 +852,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -892,6 +896,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -921,12 +926,12 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				INFOPLIST_FILE = "OS X Example/Info.plist";
+				INFOPLIST_FILE = "macOS Example/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
 				ONLY_ACTIVE_ARCH = YES;
-				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.OS-X-Example";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.macOS-Example";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 			};
 			};
@@ -941,6 +946,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -964,11 +970,11 @@
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_FUNCTION = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;
-				INFOPLIST_FILE = "OS X Example/Info.plist";
+				INFOPLIST_FILE = "macOS Example/Info.plist";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MACOSX_DEPLOYMENT_TARGET = 10.10;
 				MTL_ENABLE_DEBUG_INFO = NO;
 				MTL_ENABLE_DEBUG_INFO = NO;
-				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.OS-X-Example";
+				PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.macOS-Example";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = macosx;
 				SDKROOT = macosx;
 			};
 			};
@@ -984,6 +990,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1036,6 +1043,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1074,12 +1082,66 @@
 		29E6F16F1BB9DA2E00A4466C /* Debug */ = {
 		29E6F16F1BB9DA2E00A4466C /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				ONLY_ACTIVE_ARCH = YES;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		29E6F1701BB9DA2E00A4466C /* Release */ = {
 		29E6F1701BB9DA2E00A4466C /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				SWIFT_COMPILATION_MODE = wholemodule;
+				SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
@@ -1092,6 +1154,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1140,6 +1203,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1181,6 +1245,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1229,6 +1294,7 @@
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_CXX_LIBRARY = "libc++";
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_MODULES = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
 				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_BOOL_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_CONSTANT_CONVERSION = YES;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
 				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@@ -1284,7 +1350,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 			defaultConfigurationName = Release;
 		};
 		};
-		291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "OS X Example" */ = {
+		291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "macOS Example" */ = {
 			isa = XCConfigurationList;
 			isa = XCConfigurationList;
 			buildConfigurations = (
 			buildConfigurations = (
 				291BFDF91BB9E8C700FFB029 /* Debug */,
 				291BFDF91BB9E8C700FFB029 /* Debug */,
@@ -1320,7 +1386,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 			defaultConfigurationName = Release;
 		};
 		};
-		29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "Today Extension Example" */ = {
+		29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "iOS Today Extension Example" */ = {
 			isa = XCConfigurationList;
 			isa = XCConfigurationList;
 			buildConfigurations = (
 			buildConfigurations = (
 				29E6F1F61BB9E37200A4466C /* Debug */,
 				29E6F1F61BB9E37200A4466C /* Debug */,

+ 11 - 1
Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"
@@ -42,6 +42,16 @@
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
       shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "298D7C3A1BC2C79500FD3B3E"
+               BuildableName = "AFNetworking iOS Tests.xctest"
+               BlueprintName = "AFNetworking iOS Tests"
+               ReferencedContainer = "container:../AFNetworking.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
       </Testables>
       <MacroExpansion>
       <MacroExpansion>
          <BuildableReference
          <BuildableReference

+ 13 - 3
Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/Today Extension Example.xcscheme → Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    wasCreatedForAppExtension = "YES"
    wasCreatedForAppExtension = "YES"
    version = "2.0">
    version = "2.0">
    <BuildAction
    <BuildAction
@@ -30,8 +30,8 @@
             <BuildableReference
             <BuildableReference
                BuildableIdentifier = "primary"
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "29E6F1E51BB9E37200A4466C"
                BlueprintIdentifier = "29E6F1E51BB9E37200A4466C"
-               BuildableName = "Today Extension Example.appex"
-               BlueprintName = "Today Extension Example"
+               BuildableName = "iOS Today Extension Example.appex"
+               BlueprintName = "iOS Today Extension Example"
                ReferencedContainer = "container:AFNetworking Example.xcodeproj">
                ReferencedContainer = "container:AFNetworking Example.xcodeproj">
             </BuildableReference>
             </BuildableReference>
          </BuildActionEntry>
          </BuildActionEntry>
@@ -57,6 +57,16 @@
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
       shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "298D7C3A1BC2C79500FD3B3E"
+               BuildableName = "AFNetworking iOS Tests.xctest"
+               BlueprintName = "AFNetworking iOS Tests"
+               ReferencedContainer = "container:../AFNetworking.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
       </Testables>
       <MacroExpansion>
       <MacroExpansion>
          <BuildableReference
          <BuildableReference

+ 21 - 11
Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/OS X Example.xcscheme → Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"
@@ -15,8 +15,8 @@
             <BuildableReference
             <BuildableReference
                BuildableIdentifier = "primary"
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "298D7C491BC2C7B200FD3B3E"
                BlueprintIdentifier = "298D7C491BC2C7B200FD3B3E"
-               BuildableName = "AFNetworking Mac OS X Tests.xctest"
-               BlueprintName = "AFNetworking Mac OS X Tests"
+               BuildableName = "AFNetworking macOS Tests.xctest"
+               BlueprintName = "AFNetworking macOS Tests"
                ReferencedContainer = "container:../AFNetworking.xcodeproj">
                ReferencedContainer = "container:../AFNetworking.xcodeproj">
             </BuildableReference>
             </BuildableReference>
          </BuildActionEntry>
          </BuildActionEntry>
@@ -29,8 +29,8 @@
             <BuildableReference
             <BuildableReference
                BuildableIdentifier = "primary"
                BuildableIdentifier = "primary"
                BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
                BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
-               BuildableName = "OS X Example.app"
-               BlueprintName = "OS X Example"
+               BuildableName = "macOS Example.app"
+               BlueprintName = "macOS Example"
                ReferencedContainer = "container:AFNetworking Example.xcodeproj">
                ReferencedContainer = "container:AFNetworking Example.xcodeproj">
             </BuildableReference>
             </BuildableReference>
          </BuildActionEntry>
          </BuildActionEntry>
@@ -42,13 +42,23 @@
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
       shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "298D7C491BC2C7B200FD3B3E"
+               BuildableName = "AFNetworking macOS Tests.xctest"
+               BlueprintName = "AFNetworking macOS Tests"
+               ReferencedContainer = "container:../AFNetworking.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
       </Testables>
       <MacroExpansion>
       <MacroExpansion>
          <BuildableReference
          <BuildableReference
             BuildableIdentifier = "primary"
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
             BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
-            BuildableName = "OS X Example.app"
-            BlueprintName = "OS X Example"
+            BuildableName = "macOS Example.app"
+            BlueprintName = "macOS Example"
             ReferencedContainer = "container:AFNetworking Example.xcodeproj">
             ReferencedContainer = "container:AFNetworking Example.xcodeproj">
          </BuildableReference>
          </BuildableReference>
       </MacroExpansion>
       </MacroExpansion>
@@ -70,8 +80,8 @@
          <BuildableReference
          <BuildableReference
             BuildableIdentifier = "primary"
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
             BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
-            BuildableName = "OS X Example.app"
-            BlueprintName = "OS X Example"
+            BuildableName = "macOS Example.app"
+            BlueprintName = "macOS Example"
             ReferencedContainer = "container:AFNetworking Example.xcodeproj">
             ReferencedContainer = "container:AFNetworking Example.xcodeproj">
          </BuildableReference>
          </BuildableReference>
       </BuildableProductRunnable>
       </BuildableProductRunnable>
@@ -89,8 +99,8 @@
          <BuildableReference
          <BuildableReference
             BuildableIdentifier = "primary"
             BuildableIdentifier = "primary"
             BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
             BlueprintIdentifier = "291BFDE61BB9E8C700FFB029"
-            BuildableName = "OS X Example.app"
-            BlueprintName = "OS X Example"
+            BuildableName = "macOS Example.app"
+            BlueprintName = "macOS Example"
             ReferencedContainer = "container:AFNetworking Example.xcodeproj">
             ReferencedContainer = "container:AFNetworking Example.xcodeproj">
          </BuildableReference>
          </BuildableReference>
       </BuildableProductRunnable>
       </BuildableProductRunnable>

+ 11 - 1
Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"
@@ -42,6 +42,16 @@
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       shouldUseLaunchSchemeArgsEnv = "YES">
       shouldUseLaunchSchemeArgsEnv = "YES">
       <Testables>
       <Testables>
+         <TestableReference
+            skipped = "NO">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "2987B0AD1BC408A200179A4C"
+               BuildableName = "AFNetworking tvOS Tests.xctest"
+               BlueprintName = "AFNetworking tvOS Tests"
+               ReferencedContainer = "container:../AFNetworking.xcodeproj">
+            </BuildableReference>
+         </TestableReference>
       </Testables>
       </Testables>
       <MacroExpansion>
       <MacroExpansion>
          <BuildableReference
          <BuildableReference

+ 1 - 1
Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
 <Scheme
-   LastUpgradeVersion = "0800"
+   LastUpgradeVersion = "0930"
    version = "1.3">
    version = "1.3">
    <BuildAction
    <BuildAction
       parallelizeBuildables = "YES"
       parallelizeBuildables = "YES"

+ 62 - 32
Example/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -2,79 +2,109 @@
   "images" : [
   "images" : [
     {
     {
       "idiom" : "iphone",
       "idiom" : "iphone",
-      "size" : "29x29",
-      "scale" : "2x",
-      "filename" : "Icon-Small@2x.png"
+      "size" : "20x20",
+      "scale" : "2x"
     },
     },
     {
     {
       "idiom" : "iphone",
       "idiom" : "iphone",
-      "size" : "29x29",
-      "scale" : "3x",
-      "filename" : "Icon-Small@3x.png"
+      "size" : "20x20",
+      "scale" : "3x"
     },
     },
     {
     {
+      "size" : "29x29",
       "idiom" : "iphone",
       "idiom" : "iphone",
-      "size" : "40x40",
-      "scale" : "2x",
-      "filename" : "Icon-40@2x.png"
+      "filename" : "Icon-Small@2x.png",
+      "scale" : "2x"
     },
     },
     {
     {
+      "size" : "29x29",
       "idiom" : "iphone",
       "idiom" : "iphone",
+      "filename" : "Icon-Small@3x.png",
+      "scale" : "3x"
+    },
+    {
       "size" : "40x40",
       "size" : "40x40",
-      "scale" : "3x",
-      "filename" : "Icon-40@3x.png"
+      "idiom" : "iphone",
+      "filename" : "Icon-40@2x.png",
+      "scale" : "2x"
     },
     },
     {
     {
+      "size" : "40x40",
       "idiom" : "iphone",
       "idiom" : "iphone",
-      "size" : "60x60",
-      "scale" : "2x",
-      "filename" : "Icon-60@2x.png"
+      "filename" : "Icon-40@3x.png",
+      "scale" : "3x"
     },
     },
     {
     {
+      "size" : "60x60",
       "idiom" : "iphone",
       "idiom" : "iphone",
+      "filename" : "Icon-60@2x.png",
+      "scale" : "2x"
+    },
+    {
       "size" : "60x60",
       "size" : "60x60",
-      "scale" : "3x",
-      "filename" : "Icon-60@3x.png"
+      "idiom" : "iphone",
+      "filename" : "Icon-60@3x.png",
+      "scale" : "3x"
     },
     },
     {
     {
       "idiom" : "ipad",
       "idiom" : "ipad",
-      "size" : "29x29",
-      "scale" : "1x",
-      "filename" : "Icon-Small.png"
+      "size" : "20x20",
+      "scale" : "1x"
     },
     },
     {
     {
       "idiom" : "ipad",
       "idiom" : "ipad",
+      "size" : "20x20",
+      "scale" : "2x"
+    },
+    {
       "size" : "29x29",
       "size" : "29x29",
-      "scale" : "2x",
-      "filename" : "Icon-Small@2x.png"
+      "idiom" : "ipad",
+      "filename" : "Icon-Small.png",
+      "scale" : "1x"
     },
     },
     {
     {
+      "size" : "29x29",
       "idiom" : "ipad",
       "idiom" : "ipad",
-      "size" : "40x40",
-      "scale" : "1x",
-      "filename" : "Icon-40.png"
+      "filename" : "Icon-Small@2x.png",
+      "scale" : "2x"
     },
     },
     {
     {
+      "size" : "40x40",
       "idiom" : "ipad",
       "idiom" : "ipad",
+      "filename" : "Icon-40.png",
+      "scale" : "1x"
+    },
+    {
       "size" : "40x40",
       "size" : "40x40",
-      "scale" : "2x",
-      "filename" : "Icon-40@2x.png"
+      "idiom" : "ipad",
+      "filename" : "Icon-40@2x.png",
+      "scale" : "2x"
     },
     },
     {
     {
+      "size" : "76x76",
       "idiom" : "ipad",
       "idiom" : "ipad",
+      "filename" : "Icon-76.png",
+      "scale" : "1x"
+    },
+    {
       "size" : "76x76",
       "size" : "76x76",
-      "scale" : "1x",
-      "filename" : "Icon-76.png"
+      "idiom" : "ipad",
+      "filename" : "Icon-76@2x.png",
+      "scale" : "2x"
     },
     },
     {
     {
       "idiom" : "ipad",
       "idiom" : "ipad",
-      "size" : "76x76",
-      "scale" : "2x",
-      "filename" : "Icon-76@2x.png"
+      "size" : "83.5x83.5",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ios-marketing",
+      "size" : "1024x1024",
+      "scale" : "1x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {
     "version" : 1,
     "version" : 1,
-    "author" : "makeappicon"
+    "author" : "xcode"
   }
   }
 }
 }

+ 0 - 0
Example/OS X Example/AppDelegate.h → Example/macOS Example/AppDelegate.h


+ 0 - 0
Example/OS X Example/AppDelegate.m → Example/macOS Example/AppDelegate.m


+ 0 - 0
Example/OS X Example/Assets.xcassets/AppIcon.appiconset/Contents.json → Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json


+ 0 - 0
Example/OS X Example/Info.plist → Example/macOS Example/Info.plist


+ 16 - 15
Example/OS X Example/MainMenu.xib → Example/macOS Example/MainMenu.xib

@@ -1,7 +1,9 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9052" systemVersion="14F27" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
     <dependencies>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9052"/>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13529"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     </dependencies>
     <objects>
     <objects>
         <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
         <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -13,10 +15,10 @@
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <menu title="AMainMenu" systemMenu="main" id="29">
         <menu title="AMainMenu" systemMenu="main" id="29">
             <items>
             <items>
-                <menuItem title="AFNetworking OS X Example" id="56">
-                    <menu key="submenu" title="AFNetworking OS X Example" systemMenu="apple" id="57">
+                <menuItem title="AFNetworking macOS Example" id="56">
+                    <menu key="submenu" title="AFNetworking macOS Example" systemMenu="apple" id="57">
                         <items>
                         <items>
-                            <menuItem title="About AFNetworking OS X Example" id="58">
+                            <menuItem title="About AFNetworking macOS Example" id="58">
                                 <modifierMask key="keyEquivalentModifierMask"/>
                                 <modifierMask key="keyEquivalentModifierMask"/>
                                 <connections>
                                 <connections>
                                     <action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
                                     <action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
@@ -31,7 +33,7 @@
                             <menuItem isSeparatorItem="YES" id="144">
                             <menuItem isSeparatorItem="YES" id="144">
                                 <modifierMask key="keyEquivalentModifierMask" command="YES"/>
                                 <modifierMask key="keyEquivalentModifierMask" command="YES"/>
                             </menuItem>
                             </menuItem>
-                            <menuItem title="Hide AFNetworking OS X Example" keyEquivalent="h" id="134">
+                            <menuItem title="Hide AFNetworking macOS Example" keyEquivalent="h" id="134">
                                 <connections>
                                 <connections>
                                     <action selector="hide:" target="-1" id="367"/>
                                     <action selector="hide:" target="-1" id="367"/>
                                 </connections>
                                 </connections>
@@ -50,7 +52,7 @@
                             <menuItem isSeparatorItem="YES" id="149">
                             <menuItem isSeparatorItem="YES" id="149">
                                 <modifierMask key="keyEquivalentModifierMask" command="YES"/>
                                 <modifierMask key="keyEquivalentModifierMask" command="YES"/>
                             </menuItem>
                             </menuItem>
-                            <menuItem title="Quit AFNetworking OS X Example" keyEquivalent="q" id="136">
+                            <menuItem title="Quit AFNetworking macOS Example" keyEquivalent="q" id="136">
                                 <connections>
                                 <connections>
                                     <action selector="terminate:" target="-3" id="449"/>
                                     <action selector="terminate:" target="-3" id="449"/>
                                 </connections>
                                 </connections>
@@ -148,7 +150,7 @@
                     <modifierMask key="keyEquivalentModifierMask"/>
                     <modifierMask key="keyEquivalentModifierMask"/>
                     <menu key="submenu" title="Help" systemMenu="help" id="491">
                     <menu key="submenu" title="Help" systemMenu="help" id="491">
                         <items>
                         <items>
-                            <menuItem title="AFNetworking OS X Example Help" keyEquivalent="?" id="492">
+                            <menuItem title="AFNetworking macOS Example Help" keyEquivalent="?" id="492">
                                 <connections>
                                 <connections>
                                     <action selector="showHelp:" target="-1" id="493"/>
                                     <action selector="showHelp:" target="-1" id="493"/>
                                 </connections>
                                 </connections>
@@ -158,11 +160,11 @@
                 </menuItem>
                 </menuItem>
             </items>
             </items>
         </menu>
         </menu>
-        <window title="AFNetworking OS X Example" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="371">
-            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" unifiedTitleAndToolbar="YES"/>
+        <window title="AFNetworking macOS Example" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="371">
+            <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
             <rect key="contentRect" x="60" y="295" width="331" height="500"/>
             <rect key="contentRect" x="60" y="295" width="331" height="500"/>
-            <rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
+            <rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
             <value key="minSize" type="size" width="375" height="200"/>
             <value key="minSize" type="size" width="375" height="200"/>
             <value key="maxSize" type="size" width="375" height="1280"/>
             <value key="maxSize" type="size" width="375" height="1280"/>
             <view key="contentView" id="372">
             <view key="contentView" id="372">
@@ -176,13 +178,13 @@
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                             <subviews>
                             <subviews>
                                 <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" columnReordering="NO" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="85" rowSizeStyle="automatic" viewBased="YES" id="541">
                                 <tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" columnReordering="NO" columnSelection="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="85" rowSizeStyle="automatic" viewBased="YES" id="541">
-                                    <rect key="frame" x="0.0" y="0.0" width="331" height="0.0"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="331" height="498"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                     <size key="intercellSpacing" width="10" height="10"/>
                                     <size key="intercellSpacing" width="10" height="10"/>
                                     <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
                                     <color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
                                     <tableColumns>
                                     <tableColumns>
-                                        <tableColumn width="321" minWidth="70" maxWidth="10000" id="542">
+                                        <tableColumn identifier="" width="321" minWidth="70" maxWidth="10000" id="542">
                                             <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
                                             <tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" alignment="left">
                                                 <font key="font" metaFont="smallSystem"/>
                                                 <font key="font" metaFont="smallSystem"/>
                                                 <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
                                                 <color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@@ -261,7 +263,6 @@
                                     </tableColumns>
                                     </tableColumns>
                                 </tableView>
                                 </tableView>
                             </subviews>
                             </subviews>
-                            <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
                         </clipView>
                         </clipView>
                         <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="540">
                         <scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="540">
                             <rect key="frame" x="1" y="484" width="373" height="15"/>
                             <rect key="frame" x="1" y="484" width="373" height="15"/>

+ 0 - 0
Example/OS X Example/main.m → Example/macOS Example/main.m


+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 7 - 1
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json

@@ -12,6 +12,12 @@
       "filename" : "App Icon - Small.imagestack",
       "filename" : "App Icon - Small.imagestack",
       "role" : "primary-app-icon"
       "role" : "primary-app-icon"
     },
     },
+    {
+      "size" : "2320x720",
+      "idiom" : "tv",
+      "filename" : "Top Shelf Image Wide.imageset",
+      "role" : "top-shelf-image-wide"
+    },
     {
     {
       "size" : "1920x720",
       "size" : "1920x720",
       "idiom" : "tv",
       "idiom" : "tv",
@@ -23,4 +29,4 @@
     "version" : 1,
     "version" : 1,
     "author" : "xcode"
     "author" : "xcode"
   }
   }
-}
+}

+ 16 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json

@@ -0,0 +1,16 @@
+{
+  "images" : [
+    {
+      "idiom" : "tv",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 4 - 0
Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json

@@ -3,6 +3,10 @@
     {
     {
       "idiom" : "tv",
       "idiom" : "tv",
       "scale" : "1x"
       "scale" : "1x"
+    },
+    {
+      "idiom" : "tv",
+      "scale" : "2x"
     }
     }
   ],
   ],
   "info" : {
   "info" : {

+ 7 - 0
Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json

@@ -1,5 +1,12 @@
 {
 {
   "images" : [
   "images" : [
+    {
+      "orientation" : "landscape",
+      "idiom" : "tv",
+      "extent" : "full-screen",
+      "minimum-system-version" : "11.0",
+      "scale" : "2x"
+    },
     {
     {
       "orientation" : "landscape",
       "orientation" : "landscape",
       "idiom" : "tv",
       "idiom" : "tv",

+ 1 - 0
Framework/AFNetworking.h

@@ -38,6 +38,7 @@ FOUNDATION_EXPORT const unsigned char AFNetworkingVersionString[];
 #import <AFNetworking/AFURLRequestSerialization.h>
 #import <AFNetworking/AFURLRequestSerialization.h>
 #import <AFNetworking/AFURLResponseSerialization.h>
 #import <AFNetworking/AFURLResponseSerialization.h>
 #import <AFNetworking/AFSecurityPolicy.h>
 #import <AFNetworking/AFSecurityPolicy.h>
+#import <AFNetworking/AFCompatibilityMacros.h>
 
 
 #if !TARGET_OS_WATCH
 #if !TARGET_OS_WATCH
 #import <AFNetworking/AFNetworkReachabilityManager.h>
 #import <AFNetworking/AFNetworkReachabilityManager.h>

+ 3 - 3
Framework/Info.plist

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <plist version="1.0">
 <dict>
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleDevelopmentRegion</key>
@@ -15,11 +15,11 @@
 	<key>CFBundlePackageType</key>
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>
-	<string>3.0.0</string>
+	<string>3.1.0</string>
 	<key>CFBundleSignature</key>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<string>????</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
-	<string>3.1.0</string>
+	<string>3.2.1</string>
 	<key>NSPrincipalClass</key>
 	<key>NSPrincipalClass</key>
 	<string></string>
 	<string></string>
 </dict>
 </dict>

+ 5 - 5
README.md

@@ -9,7 +9,7 @@
 [![Platform](https://img.shields.io/cocoapods/p/AFNetworking.svg?style=flat)](http://cocoadocs.org/docsets/AFNetworking)
 [![Platform](https://img.shields.io/cocoapods/p/AFNetworking.svg?style=flat)](http://cocoadocs.org/docsets/AFNetworking)
 [![Twitter](https://img.shields.io/badge/twitter-@AFNetworking-blue.svg?style=flat)](http://twitter.com/AFNetworking)
 [![Twitter](https://img.shields.io/badge/twitter-@AFNetworking-blue.svg?style=flat)](http://twitter.com/AFNetworking)
 
 
-AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), 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.
+AFNetworking is a delightful networking library for iOS, macOS, watchOS, and tvOS. It's built on top of the [Foundation URL Loading System](http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html), 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.
 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.
 
 
@@ -83,7 +83,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
 
 
 ## Requirements
 ## Requirements
 
 
-| AFNetworking Version | Minimum iOS Target  | Minimum OS X Target  | Minimum watchOS Target  | Minimum tvOS Target  |                                   Notes                                   |
+| 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. |
 | 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.6 -> 2.6.3 | iOS 7 | OS X 10.9 | watchOS 2.0 | n/a | Xcode 7+ is required. |
@@ -91,7 +91,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
 | 1.x | iOS 5 | Mac OS X 10.7 | n/a | n/a |
 | 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 |
 | 0.10.x | iOS 4 | Mac OS X 10.6 | n/a | n/a |
 
 
-(OS X projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)).
+(macOS projects must support [64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)).
 
 
 > Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs.
 > Programming in Swift? Try [Alamofire](https://github.com/Alamofire/Alamofire) for a more conventional set of APIs.
 
 
@@ -112,7 +112,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
   - `AFHTTPResponseSerializer`
   - `AFHTTPResponseSerializer`
   - `AFJSONResponseSerializer`
   - `AFJSONResponseSerializer`
   - `AFXMLParserResponseSerializer`
   - `AFXMLParserResponseSerializer`
-  - `AFXMLDocumentResponseSerializer` _(Mac OS X)_
+  - `AFXMLDocumentResponseSerializer` _(macOS)_
   - `AFPropertyListResponseSerializer`
   - `AFPropertyListResponseSerializer`
   - `AFImageResponseSerializer`
   - `AFImageResponseSerializer`
   - `AFCompoundResponseSerializer`
   - `AFCompoundResponseSerializer`
@@ -319,4 +319,4 @@ If you believe you have identified a security vulnerability with AFNetworking, y
 
 
 ## License
 ## License
 
 
-AFNetworking is released under the MIT license. See LICENSE for details.
+AFNetworking is released under the MIT license. See [LICENSE](https://github.com/AFNetworking/AFNetworking/blob/master/LICENSE) for details.

BIN
Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer


BIN
Tests/Resources/HTTPBin.org/httpbinorg_08132017.cer


BIN
Tests/Resources/HTTPBin.org/httpbinorg_10102018.cer


+ 8 - 0
Tests/Tests/AFAutoPurgingImageCacheTests.m

@@ -230,4 +230,12 @@
     }
     }
 }
 }
 
 
+#pragma mark - Should Cache Image
+- (void)testThatShouldCacheIsYes {
+    NSURL *url = [NSURL URLWithString:@"http://test.com/image"];
+    NSString *identifier = @"filter";
+    NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
+    BOOL result = [self.cache shouldCacheImage:self.testImage forRequest:request withAdditionalIdentifier:identifier];
+    XCTAssertTrue(result);
+}
 @end
 @end

+ 4 - 4
Tests/Tests/AFCompoundResponseSerializerTests.m

@@ -71,8 +71,8 @@
     XCTAssertNotNil(copiedSerializer);
     XCTAssertNotNil(copiedSerializer);
     XCTAssertNotEqual(compoundSerializer, copiedSerializer);
     XCTAssertNotEqual(compoundSerializer, copiedSerializer);
     XCTAssertTrue(compoundSerializer.responseSerializers.count == copiedSerializer.responseSerializers.count);
     XCTAssertTrue(compoundSerializer.responseSerializers.count == copiedSerializer.responseSerializers.count);
-    XCTAssertTrue([NSStringFromClass([[copiedSerializer.responseSerializers objectAtIndex:0] class]) isEqualToString:NSStringFromClass([AFImageResponseSerializer class])]);
-    XCTAssertTrue([NSStringFromClass([[copiedSerializer.responseSerializers objectAtIndex:1] class]) isEqualToString:NSStringFromClass([AFJSONResponseSerializer class])]);
+    XCTAssertTrue([NSStringFromClass([copiedSerializer.responseSerializers[0] class]) isEqualToString:NSStringFromClass([AFImageResponseSerializer class])]);
+    XCTAssertTrue([NSStringFromClass([copiedSerializer.responseSerializers[1] class]) isEqualToString:NSStringFromClass([AFJSONResponseSerializer class])]);
     XCTAssertEqual(compoundSerializer.acceptableStatusCodes, copiedSerializer.acceptableStatusCodes);
     XCTAssertEqual(compoundSerializer.acceptableStatusCodes, copiedSerializer.acceptableStatusCodes);
     XCTAssertEqual(compoundSerializer.acceptableContentTypes, copiedSerializer.acceptableContentTypes);
     XCTAssertEqual(compoundSerializer.acceptableContentTypes, copiedSerializer.acceptableContentTypes);
 }
 }
@@ -87,8 +87,8 @@
     XCTAssertNotNil(unarchivedSerializer);
     XCTAssertNotNil(unarchivedSerializer);
     XCTAssertNotEqual(unarchivedSerializer, compoundSerializer);
     XCTAssertNotEqual(unarchivedSerializer, compoundSerializer);
     XCTAssertTrue(compoundSerializer.responseSerializers.count == compoundSerializer.responseSerializers.count);
     XCTAssertTrue(compoundSerializer.responseSerializers.count == compoundSerializer.responseSerializers.count);
-    XCTAssertTrue([NSStringFromClass([[unarchivedSerializer.responseSerializers objectAtIndex:0] class]) isEqualToString:NSStringFromClass([AFImageResponseSerializer class])]);
-    XCTAssertTrue([NSStringFromClass([[unarchivedSerializer.responseSerializers objectAtIndex:1] class]) isEqualToString:NSStringFromClass([AFJSONResponseSerializer class])]);
+    XCTAssertTrue([NSStringFromClass([unarchivedSerializer.responseSerializers[0] class]) isEqualToString:NSStringFromClass([AFImageResponseSerializer class])]);
+    XCTAssertTrue([NSStringFromClass([unarchivedSerializer.responseSerializers[1] class]) isEqualToString:NSStringFromClass([AFJSONResponseSerializer class])]);
 }
 }
 
 
 @end
 @end

+ 3 - 1
Tests/Tests/AFHTTPRequestSerializationTests.m

@@ -169,7 +169,9 @@
     NSError *serializerError = [NSError errorWithDomain:@"TestDomain" code:0 userInfo:nil];
     NSError *serializerError = [NSError errorWithDomain:@"TestDomain" code:0 userInfo:nil];
 
 
     [serializer setQueryStringSerializationWithBlock:^NSString *(NSURLRequest *request, NSDictionary *parameters, NSError *__autoreleasing *error) {
     [serializer setQueryStringSerializationWithBlock:^NSString *(NSURLRequest *request, NSDictionary *parameters, NSError *__autoreleasing *error) {
-        *error = serializerError;
+        if (error != NULL) {
+            *error = serializerError;
+        }
         return nil;
         return nil;
     }];
     }];
 
 

+ 220 - 4
Tests/Tests/AFHTTPSessionManagerTests.m

@@ -178,7 +178,9 @@
     XCTestExpectation *expectation = [self expectationWithDescription:@"Serialization should fail"];
     XCTestExpectation *expectation = [self expectationWithDescription:@"Serialization should fail"];
 
 
     [self.manager.requestSerializer setQueryStringSerializationWithBlock:^NSString * _Nonnull(NSURLRequest * _Nonnull request, id  _Nonnull parameters, NSError * _Nullable __autoreleasing * _Nullable error) {
     [self.manager.requestSerializer setQueryStringSerializationWithBlock:^NSString * _Nonnull(NSURLRequest * _Nonnull request, id  _Nonnull parameters, NSError * _Nullable __autoreleasing * _Nullable error) {
-        *error = [NSError errorWithDomain:@"Custom" code:-1 userInfo:nil];
+        if (error != NULL) {
+            *error = [NSError errorWithDomain:@"Custom" code:-1 userInfo:nil];
+        }
         return @"";
         return @"";
     }];
     }];
 
 
@@ -186,6 +188,7 @@
     nilTask = [self.manager
     nilTask = [self.manager
                GET:@"test"
                GET:@"test"
                parameters:@{@"key":@"value"}
                parameters:@{@"key":@"value"}
+               headers:nil
                progress:nil
                progress:nil
                success:nil
                success:nil
                failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
                failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
@@ -232,6 +235,7 @@
     [self.manager
     [self.manager
      GET:@"image"
      GET:@"image"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:^(NSProgress * _Nonnull downloadProgress) {
      progress:^(NSProgress * _Nonnull downloadProgress) {
          if (downloadProgress.fractionCompleted == 1.0) {
          if (downloadProgress.fractionCompleted == 1.0) {
              [expectation fulfill];
              [expectation fulfill];
@@ -253,6 +257,7 @@
     [self.manager
     [self.manager
      POST:@"post"
      POST:@"post"
      parameters:payload
      parameters:payload
+     headers:nil
      progress:^(NSProgress * _Nonnull uploadProgress) {
      progress:^(NSProgress * _Nonnull uploadProgress) {
          if (uploadProgress.fractionCompleted == 1.0) {
          if (uploadProgress.fractionCompleted == 1.0) {
              [expectation fulfill];
              [expectation fulfill];
@@ -271,6 +276,75 @@
 
 
     __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress Should equal 1.0"];
     __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress Should equal 1.0"];
 
 
+    [self.manager
+     POST:@"post"
+     parameters:nil
+     headers:nil
+     constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {
+         [formData appendPartWithFileData:[payload dataUsingEncoding:NSUTF8StringEncoding] name:@"AFNetworking" fileName:@"AFNetworking" mimeType:@"text/html"];
+     }
+     progress:^(NSProgress * _Nonnull uploadProgress) {
+         if (uploadProgress.fractionCompleted == 1.0) {
+             [expectation fulfill];
+         }
+     }
+     success:nil
+     failure:nil];
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+# pragma mark - Deprecated Progress
+
+- (void)testDownloadProgressIsReportedForDeprecatedGET {
+    __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress Should equal 1.0"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     GET:@"image"
+     parameters:nil
+     progress:^(NSProgress * _Nonnull downloadProgress) {
+         if (downloadProgress.fractionCompleted == 1.0) {
+             [expectation fulfill];
+         }
+     }
+     success:nil
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testUploadProgressIsReportedForDeprecatedPOST {
+    NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"];
+    while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) {
+        [payload appendString:@"AFNetworking"];
+    }
+    
+    __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress Should equal 1.0"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     POST:@"post"
+     parameters:payload
+     progress:^(NSProgress * _Nonnull uploadProgress) {
+         if (uploadProgress.fractionCompleted == 1.0) {
+             [expectation fulfill];
+         }
+     }
+     success:nil
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testUploadProgressIsReportedForStreamingDeprecatedPost {
+    NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"];
+    while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) {
+        [payload appendString:@"AFNetworking"];
+    }
+    
+    __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress Should equal 1.0"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
     [self.manager
     [self.manager
      POST:@"post"
      POST:@"post"
      parameters:nil
      parameters:nil
@@ -284,6 +358,7 @@
      }
      }
      success:nil
      success:nil
      failure:nil];
      failure:nil];
+#pragma clang diagnostic pop
     [self waitForExpectationsWithCommonTimeout];
     [self waitForExpectationsWithCommonTimeout];
 }
 }
 
 
@@ -294,6 +369,7 @@
     [self.manager
     [self.manager
      GET:@"status/200"
      GET:@"status/200"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          [expectation fulfill];
          [expectation fulfill];
@@ -307,6 +383,7 @@
     [self.manager
     [self.manager
      GET:@"status/404"
      GET:@"status/404"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:nil
      success:nil
      failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nullable error) {
      failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nullable error) {
@@ -321,6 +398,7 @@
     [self.manager
     [self.manager
      GET:@"status/204"
      GET:@"status/204"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          urlResponseObject = responseObject;
          urlResponseObject = responseObject;
@@ -338,6 +416,7 @@
     [self.manager
     [self.manager
      GET:@"get"
      GET:@"get"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          XCTAssertNotNil(responseObject);
          XCTAssertNotNil(responseObject);
@@ -352,6 +431,7 @@
     [self.manager
     [self.manager
      HEAD:@"get"
      HEAD:@"get"
      parameters:nil
      parameters:nil
+     headers:nil
      success:^(NSURLSessionDataTask * _Nonnull task) {
      success:^(NSURLSessionDataTask * _Nonnull task) {
          XCTAssertNotNil(task);
          XCTAssertNotNil(task);
          [expectation fulfill];
          [expectation fulfill];
@@ -365,8 +445,10 @@
     [self.manager
     [self.manager
      POST:@"post"
      POST:@"post"
      parameters:@{@"key":@"value"}
      parameters:@{@"key":@"value"}
+     headers:@{@"field":@"value"}
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          [expectation fulfill];
          [expectation fulfill];
      }
      }
@@ -379,6 +461,7 @@
     [self.manager
     [self.manager
      POST:@"post"
      POST:@"post"
      parameters:@{@"key":@"value"}
      parameters:@{@"key":@"value"}
+     headers:@{@"field":@"value"}
      constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {
      constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {
          [formData appendPartWithFileData:[@"Data" dataUsingEncoding:NSUTF8StringEncoding]
          [formData appendPartWithFileData:[@"Data" dataUsingEncoding:NSUTF8StringEncoding]
                                      name:@"DataName"
                                      name:@"DataName"
@@ -387,6 +470,7 @@
      }
      }
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"files"][@"DataName"] isEqualToString:@"Data"]);
          XCTAssertTrue([responseObject[@"files"][@"DataName"] isEqualToString:@"Data"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          [expectation fulfill];
          [expectation fulfill];
@@ -400,7 +484,9 @@
     [self.manager
     [self.manager
      PUT:@"put"
      PUT:@"put"
      parameters:@{@"key":@"value"}
      parameters:@{@"key":@"value"}
+     headers:@{@"field":@"value"}
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          [expectation fulfill];
          [expectation fulfill];
      }
      }
@@ -413,7 +499,9 @@
     [self.manager
     [self.manager
      DELETE:@"delete"
      DELETE:@"delete"
      parameters:@{@"key":@"value"}
      parameters:@{@"key":@"value"}
+     headers:@{@"field":@"value"}
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"args"][@"key"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"args"][@"key"] isEqualToString:@"value"]);
          [expectation fulfill];
          [expectation fulfill];
      }
      }
@@ -426,7 +514,9 @@
     [self.manager
     [self.manager
      PATCH:@"patch"
      PATCH:@"patch"
      parameters:@{@"key":@"value"}
      parameters:@{@"key":@"value"}
+     headers:@{@"field":@"value"}
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
          [expectation fulfill];
          [expectation fulfill];
      }
      }
@@ -437,7 +527,7 @@
 
 
 #pragma mark - Deprecated Rest Interface
 #pragma mark - Deprecated Rest Interface
 
 
-- (void)testDeprecatedGET {
+- (void)testDeprecatedGETWithoutProgress {
     XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
     XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
 #pragma clang diagnostic push
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -453,7 +543,7 @@
     [self waitForExpectationsWithCommonTimeout];
     [self waitForExpectationsWithCommonTimeout];
 }
 }
 
 
-- (void)testDeprecatedPOST {
+- (void)testDeprecatedPOSTWithoutProgress {
     XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
     XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
 #pragma clang diagnostic push
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -469,7 +559,7 @@
     [self waitForExpectationsWithCommonTimeout];
     [self waitForExpectationsWithCommonTimeout];
 }
 }
 
 
-- (void)testDeprecatedPOSTWithConstructingBody {
+- (void)testDeprecatedPOSTWithoutProgressWithConstructingBody {
     XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
     XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
 #pragma clang diagnostic push
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
@@ -492,6 +582,129 @@
     [self waitForExpectationsWithCommonTimeout];
     [self waitForExpectationsWithCommonTimeout];
 }
 }
 
 
+
+- (void)testDeprecatedGETWithoutHeaders {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     GET:@"get"
+     parameters:nil
+     progress:nil
+     success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertNotNil(responseObject);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testDeprecatedHEADWithoutHeaders {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     HEAD:@"get"
+     parameters:nil
+     success:^(NSURLSessionDataTask * _Nonnull task) {
+         XCTAssertNotNil(task);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testDeprecatedPOSTWithoutHeaders {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     POST:@"post"
+     parameters:@{@"key":@"value"}
+     progress:nil
+     success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testDeprecatedPOSTWithoutHeadersWithConstructingBody {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     POST:@"post"
+     parameters:@{@"key":@"value"}
+     constructingBodyWithBlock:^(id<AFMultipartFormData>  _Nonnull formData) {
+         [formData appendPartWithFileData:[@"Data" dataUsingEncoding:NSUTF8StringEncoding]
+                                     name:@"DataName"
+                                 fileName:@"DataFileName"
+                                 mimeType:@"data"];
+     }
+     progress:nil
+     success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([responseObject[@"files"][@"DataName"] isEqualToString:@"Data"]);
+         XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testDeprecatedPUTWithoutHeaders {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     PUT:@"put"
+     parameters:@{@"key":@"value"}
+     success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testDeprecatedDELETEWithoutHeaders {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     DELETE:@"delete"
+     parameters:@{@"key":@"value"}
+     success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([responseObject[@"args"][@"key"] isEqualToString:@"value"]);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+- (void)testDeprecatedPATCHWithoutHeaders {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"];
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    [self.manager
+     PATCH:@"patch"
+     parameters:@{@"key":@"value"}
+     success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
+         XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]);
+         [expectation fulfill];
+     }
+     failure:nil];
+#pragma clang diagnostic pop
+    [self waitForExpectationsWithCommonTimeout];
+}
+
 #pragma mark - Auth
 #pragma mark - Auth
 
 
 - (void)testHiddenBasicAuthentication {
 - (void)testHiddenBasicAuthentication {
@@ -500,6 +713,7 @@
     [self.manager
     [self.manager
      GET:@"hidden-basic-auth/user/password"
      GET:@"hidden-basic-auth/user/password"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          [expectation fulfill];
          [expectation fulfill];
@@ -572,6 +786,7 @@
     [manager
     [manager
      GET:@""
      GET:@""
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          XCTFail(@"Request should fail");
          XCTFail(@"Request should fail");
@@ -596,6 +811,7 @@
     [manager
     [manager
      GET:@""
      GET:@""
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
          XCTFail(@"Request should fail");
          XCTFail(@"Request should fail");

+ 132 - 0
Tests/Tests/AFImageDownloaderTests.m

@@ -22,6 +22,11 @@
 #import "AFTestCase.h"
 #import "AFTestCase.h"
 #import "AFImageDownloader.h"
 #import "AFImageDownloader.h"
 
 
+@interface MockAFAutoPurgingImageCache : AFAutoPurgingImageCache
+@property (nonatomic, strong) BOOL(^shouldCache)(UIImage*, NSURLRequest*, NSString*);
+@property (nonatomic, strong) void(^addCache)(UIImage*, NSString*);
+@end
+
 @interface AFImageDownloaderTests : AFTestCase
 @interface AFImageDownloaderTests : AFTestCase
 @property (nonatomic, strong) NSURLRequest *pngRequest;
 @property (nonatomic, strong) NSURLRequest *pngRequest;
 @property (nonatomic, strong) NSURLRequest *jpegRequest;
 @property (nonatomic, strong) NSURLRequest *jpegRequest;
@@ -234,6 +239,112 @@
     XCTAssertEqual(responseImage1, responseImage2);
     XCTAssertEqual(responseImage1, responseImage2);
 }
 }
 
 
+- (void)testThatImageCacheIsPromptedShouldCache {
+    XCTestExpectation *expectation3 = [self expectationWithDescription:@"image 1 shouldCache called"];
+    XCTestExpectation *expectation4 = [self expectationWithDescription:@"image 1 addCache called"];
+    
+    MockAFAutoPurgingImageCache *mock = [[MockAFAutoPurgingImageCache alloc] init];
+    mock.shouldCache = ^BOOL(UIImage *img, NSURLRequest *req, NSString *iden) {
+        [expectation3 fulfill];
+        return YES;
+    };
+    mock.addCache = ^(UIImage *img, NSString *ident) {
+        [expectation4 fulfill];
+    };
+    self.downloader.imageCache = mock;
+    
+    XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"];
+    __block NSHTTPURLResponse *urlResponse1 = nil;
+    __block UIImage *responseImage1 = nil;
+    
+    [self.downloader
+     downloadImageForURLRequest:self.pngRequest
+     success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) {
+         urlResponse1 = response;
+         responseImage1 = responseObject;
+         [expectation1 fulfill];
+     }
+     failure:nil];
+    
+    [self waitForExpectationsWithCommonTimeout];
+    
+    XCTestExpectation *expectation2 = [self expectationWithDescription:@"image 2 download should succeed"];
+    __block NSHTTPURLResponse *urlResponse2 = nil;
+    __block UIImage *responseImage2 = nil;
+    
+    [self.downloader
+     downloadImageForURLRequest:self.pngRequest
+     success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) {
+         urlResponse2 = response;
+         responseImage2 = responseObject;
+         [expectation2 fulfill];
+     }
+     failure:nil];
+    
+    [self waitForExpectationsWithCommonTimeout];
+    
+    XCTAssertNotNil(urlResponse1);
+    XCTAssertNotNil(responseImage1);
+    XCTAssertNil(urlResponse2);
+    XCTAssertEqual(responseImage1, responseImage2);
+}
+
+- (void)testThatImageCacheIsPromptedShouldCacheNot {
+    XCTestExpectation *expectation3 = [self expectationWithDescription:@"image 1 shouldCache called"];
+    
+    MockAFAutoPurgingImageCache *mock = [[MockAFAutoPurgingImageCache alloc] init];
+    mock.shouldCache = ^BOOL(UIImage *img, NSURLRequest *req, NSString *iden) {
+        [expectation3 fulfill];
+        return NO;
+    };
+    mock.addCache = ^(UIImage *img, NSString *ident) {
+        XCTFail(@"Not expected");
+    };
+    self.downloader.imageCache = mock;
+    
+    XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"];
+    __block NSHTTPURLResponse *urlResponse1 = nil;
+    __block UIImage *responseImage1 = nil;
+    
+    [self.downloader
+     downloadImageForURLRequest:self.pngRequest
+     success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) {
+         urlResponse1 = response;
+         responseImage1 = responseObject;
+         [expectation1 fulfill];
+     }
+     failure:nil];
+    
+    [self waitForExpectationsWithCommonTimeout];
+    
+    XCTestExpectation *expectation2 = [self expectationWithDescription:@"image 2 download should succeed"];
+    __block NSHTTPURLResponse *urlResponse2 = nil;
+    __block UIImage *responseImage2 = nil;
+    
+    XCTestExpectation *expectation5 = [self expectationWithDescription:@"image 2 shouldCache called"];
+    
+    mock.shouldCache = ^BOOL(UIImage *img, NSURLRequest *req, NSString *iden) {
+        [expectation5 fulfill];
+        return NO;
+    };
+    
+    [self.downloader
+     downloadImageForURLRequest:self.pngRequest
+     success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) {
+         urlResponse2 = response;
+         responseImage2 = responseObject;
+         [expectation2 fulfill];
+     }
+     failure:nil];
+    
+    [self waitForExpectationsWithCommonTimeout];
+    
+    XCTAssertNotNil(urlResponse1);
+    XCTAssertNotNil(responseImage1);
+    XCTAssertNotNil(urlResponse2);
+    XCTAssertNotEqual(responseImage1, responseImage2);
+}
+
 - (void)testThatImageDownloadReceiptIsNilForCachedImage {
 - (void)testThatImageDownloadReceiptIsNilForCachedImage {
     XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"];
     XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"];
     AFImageDownloadReceipt *receipt1;
     AFImageDownloadReceipt *receipt1;
@@ -445,3 +556,24 @@
 }
 }
 
 
 @end
 @end
+
+#pragma mark -
+
+@implementation MockAFAutoPurgingImageCache
+
+-(BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier {
+    if (self.shouldCache) {
+        return self.shouldCache(image, request, identifier);
+    }
+    else {
+        return [super shouldCacheImage:image forRequest:request withAdditionalIdentifier:identifier];
+    }
+}
+
+-(void)addImage:(UIImage *)image withIdentifier:(NSString *)identifier{
+    [super addImage:image withIdentifier:identifier];
+    if (self.addCache) {
+        self.addCache(image, identifier);
+    }
+}
+@end

+ 2 - 1
Tests/Tests/AFJSONSerializationTests.m

@@ -177,7 +177,7 @@ static NSData * AFJSONTestData() {
 - (void)testThatJSONRemovesKeysWithNullValues {
 - (void)testThatJSONRemovesKeysWithNullValues {
     self.responseSerializer.removesKeysWithNullValues = YES;
     self.responseSerializer.removesKeysWithNullValues = YES;
     NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type":@"text/json"}];
     NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type":@"text/json"}];
-    NSData *data = [NSJSONSerialization dataWithJSONObject:@{@"key":@"value",@"nullkey":[NSNull null],@"array":@[@{@"subnullkey":[NSNull null]}]}
+    NSData *data = [NSJSONSerialization dataWithJSONObject:@{@"key":@"value",@"nullkey":[NSNull null],@"array":@[@{@"subnullkey":[NSNull null]}], @"arrayWithNulls": @[[NSNull null]]}
                                                    options:(NSJSONWritingOptions)0
                                                    options:(NSJSONWritingOptions)0
                                                      error:nil];
                                                      error:nil];
 
 
@@ -189,6 +189,7 @@ static NSData * AFJSONTestData() {
     XCTAssertNotNil(responseObject[@"key"]);
     XCTAssertNotNil(responseObject[@"key"]);
     XCTAssertNil(responseObject[@"nullkey"]);
     XCTAssertNil(responseObject[@"nullkey"]);
     XCTAssertNil(responseObject[@"array"][0][@"subnullkey"]);
     XCTAssertNil(responseObject[@"array"][0][@"subnullkey"]);
+    XCTAssertEqualObjects(responseObject[@"arrayWithNulls"], @[]);
 }
 }
 
 
 - (void)testThatJSONResponseSerializerCanBeCopied {
 - (void)testThatJSONResponseSerializerCanBeCopied {

+ 5 - 0
Tests/Tests/AFNetworkActivityManagerTests.m

@@ -69,6 +69,7 @@
     [self.sessionManager
     [self.sessionManager
      GET:@"/delay/1"
      GET:@"/delay/1"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
          [requestExpectation fulfill];
          [requestExpectation fulfill];
@@ -95,6 +96,7 @@
     [self.sessionManager
     [self.sessionManager
      GET:@"/status/404"
      GET:@"/status/404"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:nil
      success:nil
      failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
      failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
@@ -128,6 +130,7 @@
     [self.sessionManager
     [self.sessionManager
      GET:@"/delay/2"
      GET:@"/delay/2"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
          requestEndTime = CACurrentMediaTime();
          requestEndTime = CACurrentMediaTime();
@@ -157,6 +160,7 @@
     [self.sessionManager
     [self.sessionManager
      GET:@"/delay/4"
      GET:@"/delay/4"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
          [requestExpectation fulfill];
          [requestExpectation fulfill];
@@ -167,6 +171,7 @@
     [self.sessionManager
     [self.sessionManager
      GET:@"/delay/2"
      GET:@"/delay/2"
      parameters:nil
      parameters:nil
+     headers:nil
      progress:nil
      progress:nil
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
      success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
 
 

+ 15 - 0
Tests/Tests/AFNetworkReachabilityManagerTests.m

@@ -23,6 +23,7 @@
 
 
 #import "AFNetworkReachabilityManager.h"
 #import "AFNetworkReachabilityManager.h"
 #import <netinet/in.h>
 #import <netinet/in.h>
+#import <objc/message.h>
 
 
 @interface AFNetworkReachabilityManagerTests : AFTestCase
 @interface AFNetworkReachabilityManagerTests : AFTestCase
 @property (nonatomic, strong) AFNetworkReachabilityManager *addressReachability;
 @property (nonatomic, strong) AFNetworkReachabilityManager *addressReachability;
@@ -47,6 +48,20 @@
     [super tearDown];
     [super tearDown];
 }
 }
 
 
+- (void)testInitializerThrowsExceptionWhenCalled {
+    AFNetworkReachabilityManager *manager = [AFNetworkReachabilityManager alloc];
+    id (*custom_msgSend)(id, SEL) = (id(*)(id, SEL))objc_msgSend;
+
+    XCTAssertThrows(custom_msgSend(manager, @selector(init)));
+}
+
+- (void)testNewThrowsExceptionWhenCalled {
+    id (*custom_msgSend)(id, SEL) = (id(*)(id, SEL))objc_msgSend;
+
+    XCTAssertThrows(custom_msgSend([AFNetworkReachabilityManager class],
+                                   @selector(new)));
+}
+
 - (void)testAddressReachabilityStartsInUnknownState {
 - (void)testAddressReachabilityStartsInUnknownState {
     XCTAssertEqual(self.addressReachability.networkReachabilityStatus, AFNetworkReachabilityStatusUnknown,
     XCTAssertEqual(self.addressReachability.networkReachabilityStatus, AFNetworkReachabilityStatusUnknown,
                    @"Reachability should start in an unknown state");
                    @"Reachability should start in an unknown state");

+ 2 - 2
Tests/Tests/AFSecurityPolicyTests.m

@@ -32,7 +32,7 @@ static SecTrustRef AFUTTrustChainForCertsInDirectory(NSString *directoryPath) {
     for (NSString *path in certFileNames) {
     for (NSString *path in certFileNames) {
         NSData *certData = [NSData dataWithContentsOfFile:[directoryPath stringByAppendingPathComponent:path]];
         NSData *certData = [NSData dataWithContentsOfFile:[directoryPath stringByAppendingPathComponent:path]];
         SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
         SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData));
-        [certs addObject:(__bridge id)(cert)];
+        [certs addObject:(__bridge_transfer id)(cert)];
     }
     }
 
 
     SecPolicyRef policy = SecPolicyCreateBasicX509();
     SecPolicyRef policy = SecPolicyCreateBasicX509();
@@ -58,7 +58,7 @@ static SecTrustRef AFUTADNNetServerTrust() {
 }
 }
 
 
 static SecCertificateRef AFUTHTTPBinOrgCertificate() {
 static SecCertificateRef AFUTHTTPBinOrgCertificate() {
-    NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"httpbinorg_08132017" ofType:@"cer"];
+    NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"httpbinorg_10102018" ofType:@"cer"];
     NSCAssert(certPath != nil, @"Path for certificate should not be nil");
     NSCAssert(certPath != nil, @"Path for certificate should not be nil");
     NSData *certData = [NSData dataWithContentsOfFile:certPath];
     NSData *certData = [NSData dataWithContentsOfFile:certPath];
 
 

+ 24 - 0
Tests/Tests/AFUIImageViewTests.m

@@ -137,6 +137,30 @@
     XCTAssertNotNil(responseImage);
     XCTAssertNotNil(responseImage);
 }
 }
 
 
+- (void)testThatImageDownloadFailsWhenUsingMalformedURLRequest {
+    XCTestExpectation *expectation = [self expectationWithDescription:@"Request should fail"];
+    UIImage *placeholder = [UIImage imageNamed:@"logo"];
+    __block NSURLRequest *failureRequest;
+    __block NSHTTPURLResponse *failureResponse;
+    __block NSError *failureError;
+    NSString *nilString;
+    NSURLRequest *malformedRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:nilString]];
+    [self.imageView setImageWithURLRequest:malformedRequest
+                          placeholderImage:placeholder
+                                   success:nil
+                                   failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) {
+                                       failureRequest = request;
+                                       failureResponse = response;
+                                       failureError = error;
+                                       [expectation fulfill];
+                                   }];
+    [self waitForExpectationsWithCommonTimeout];
+    XCTAssertEqual(self.imageView.image, placeholder);
+    XCTAssertEqual(failureRequest, malformedRequest);
+    XCTAssertNil(failureResponse);
+    XCTAssertNotNil(failureError);
+}
+
 - (void)testThatNilURLDoesntCrash {
 - (void)testThatNilURLDoesntCrash {
 #pragma clang diagnostic push
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wnonnull"
 #pragma clang diagnostic ignored "-Wnonnull"

+ 41 - 2
Tests/Tests/AFURLSessionManagerTests.m

@@ -37,7 +37,6 @@
 @property (readwrite, nonatomic, strong) AFURLSessionManager *backgroundManager;
 @property (readwrite, nonatomic, strong) AFURLSessionManager *backgroundManager;
 @end
 @end
 
 
-
 @implementation AFURLSessionManagerTests
 @implementation AFURLSessionManagerTests
 
 
 - (NSURLRequest *)bigImageURLRequest {
 - (NSURLRequest *)bigImageURLRequest {
@@ -134,6 +133,46 @@
     [self waitForExpectationsWithCommonTimeout];
     [self waitForExpectationsWithCommonTimeout];
 }
 }
 
 
+- (void)testSessionTaskDoesReportMetrics {
+    [self expectationForNotification:AFNetworkingTaskDidCompleteNotification object:nil handler:^BOOL(NSNotification * _Nonnull notification) {
+#if AF_CAN_USE_AT_AVAILABLE && AF_CAN_INCLUDE_SESSION_TASK_METRICS
+        if (@available(iOS 10, macOS 10.12, watchOS 3, tvOS 10, *)) {
+            return [notification userInfo][AFNetworkingTaskDidCompleteSessionTaskMetrics] != nil;
+        }
+#endif
+        return YES;
+    }];
+
+#if AF_CAN_INCLUDE_SESSION_TASK_METRICS
+    __weak XCTestExpectation *metricsBlock = [self expectationWithDescription:@"Metrics completion block is called"];
+    [self.localManager setTaskDidFinishCollectingMetricsBlock:^(NSURLSession * _Nonnull session, NSURLSessionTask * _Nonnull task, NSURLSessionTaskMetrics * _Nullable metrics) {
+        [metricsBlock fulfill];
+    }];
+#endif
+
+    NSURLSessionTask *task = [self.localManager downloadTaskWithRequest:[self bigImageURLRequest]
+                                                               progress:nil
+                                                            destination:nil
+                                                      completionHandler:nil];
+    [task resume];
+    [self waitForExpectationsWithCommonTimeout];
+}
+
+// iOS 7 has a bug that may return nil for a session. To simulate that, nil out the
+// session and it will return nil itself.
+- (void)testFileUploadTaskReturnsNilWithBug {
+    [self.localManager setValue:nil forKey:@"session"];
+    
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnonnull"
+    XCTAssertNil([self.localManager uploadTaskWithRequest:[NSURLRequest requestWithURL:self.baseURL]
+                                                 fromFile:nil
+                                                 progress:NULL
+                                        completionHandler:NULL],
+                 @"Upload task should be nil.");
+#pragma GCC diagnostic pop
+}
+
 - (void)testUploadTaskDoesReportProgress {
 - (void)testUploadTaskDoesReportProgress {
     NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"];
     NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"];
     while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) {
     while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) {
@@ -459,7 +498,7 @@
     return [NSURLRequest requestWithURL:self.delayURL];
     return [NSURLRequest requestWithURL:self.delayURL];
 }
 }
 
 
-- (IMP)_implementationForTask:(NSURLSessionTask  *)task selector:(SEL)selector {
+- (IMP)_implementationForTask:(NSURLSessionTask *)task selector:(SEL)selector {
     return [self _implementationForClass:[task class] selector:selector];
     return [self _implementationForClass:[task class] selector:selector];
 }
 }
 
 

+ 101 - 0
Tests/Tests/AFXMLDocumentResponseSerializerTests.m

@@ -0,0 +1,101 @@
+// AFXMLDocumentResponseSerializerTests.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFTestCase.h"
+
+#import "AFURLRequestSerialization.h"
+#import "AFURLResponseSerialization.h"
+
+#import <XCTest/XCTest.h>
+
+static NSData * AFXMLTestData() {
+    return [@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo attr1=\"1\" attr2=\"2\"><bar>someValue</bar></foo>" dataUsingEncoding:NSUTF8StringEncoding];
+}
+
+#pragma mark -
+
+@interface AFXMLDocumentResponseSerializerTests : AFTestCase
+@property (nonatomic, strong) AFXMLDocumentResponseSerializer *responseSerializer;
+@end
+
+#pragma mark -
+
+@implementation AFXMLDocumentResponseSerializerTests
+
+- (void)setUp {
+    [super setUp];
+    self.responseSerializer = [AFXMLDocumentResponseSerializer serializer];
+}
+
+- (void)testThatXMLDocumentResponseSerializerAcceptsApplicationXMLMimeType {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer validateResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNil(error, @"Error handling application/xml");
+}
+
+- (void)testThatXMLDocumentResponseSerializerAcceptsTextXMLMimeType {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"text/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer validateResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNil(error, @"Error handling text/xml");
+}
+
+- (void)testThatXMLDocumentResponseSerializerDoesNotAcceptsNonStandardXMLMimeType {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"nonstandard/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer validateResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNotNil(error, @"Error should have been thrown for nonstandard/xml");
+}
+
+- (void)testThatXMLDocumentResponseSerializerReturnsNSXMLDocumentObjectForValidXML {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/xml"}];
+    NSError *error = nil;
+    id responseObject = [self.responseSerializer responseObjectForResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNil(error, @"Serialization error should be nil");
+    XCTAssert([responseObject isKindOfClass:[NSXMLDocument class]], @"Expected response to be a NSXMLDocument");
+}
+
+- (void)testThatXMLDocumentResponseSerializerReturnsErrorForInvalidXML {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer responseObjectForResponse:response data:[@"<foo" dataUsingEncoding:NSUTF8StringEncoding] error:&error];
+
+    XCTAssertNotNil(error, @"Serialization error should not be nil");
+}
+
+- (void)testThatXMLDocumentResponseSerializerCanBeCopied {
+    [self.responseSerializer setAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:100]];
+    [self.responseSerializer setAcceptableContentTypes:[NSSet setWithObject:@"test/type"]];
+
+    [self.responseSerializer setOptions:1];
+    AFXMLDocumentResponseSerializer *copiedSerializer = [self.responseSerializer copy];
+    XCTAssertNotEqual(copiedSerializer, self.responseSerializer);
+    XCTAssertEqual(copiedSerializer.acceptableStatusCodes, self.responseSerializer.acceptableStatusCodes);
+    XCTAssertEqual(copiedSerializer.acceptableContentTypes, self.responseSerializer.acceptableContentTypes);
+    XCTAssertEqual(copiedSerializer.options, self.responseSerializer.options);
+}
+
+@end

+ 89 - 0
Tests/Tests/AFXMLParserResponseSerializerTests.m

@@ -0,0 +1,89 @@
+// AFXMLParserResponseSerializerTests.m
+// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import "AFTestCase.h"
+
+#import "AFURLRequestSerialization.h"
+#import "AFURLResponseSerialization.h"
+
+static NSData * AFXMLTestData() {
+    return [@"<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo attr1=\"1\" attr2=\"2\"><bar>someValue</bar></foo>" dataUsingEncoding:NSUTF8StringEncoding];
+}
+
+#pragma mark -
+
+@interface AFXMLParserResponseSerializerTests : AFTestCase
+@property (nonatomic, strong) AFXMLParserResponseSerializer *responseSerializer;
+@end
+
+#pragma mark -
+
+@implementation AFXMLParserResponseSerializerTests
+
+- (void)setUp {
+    [super setUp];
+    self.responseSerializer = [AFXMLParserResponseSerializer serializer];
+}
+
+- (void)testThatXMLParserResponseSerializerAcceptsApplicationXMLMimeType {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer validateResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNil(error, @"Error handling application/xml");
+}
+
+- (void)testThatXMLParserResponseSerializerAcceptsTextXMLMimeType {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"text/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer validateResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNil(error, @"Error handling text/xml");
+}
+
+- (void)testThatXMLParserResponseSerializerDoesNotAcceptsNonStandardXMLMimeType {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"nonstandard/xml"}];
+    NSError *error = nil;
+    [self.responseSerializer validateResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNotNil(error, @"Error should have been thrown for nonstandard/xml");
+}
+
+- (void)testThatXMLParserResponseSerializerReturnsNSXMLParserObjectForValidXML {
+    NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/xml"}];
+    NSError *error = nil;
+    id responseObject = [self.responseSerializer responseObjectForResponse:response data:AFXMLTestData() error:&error];
+
+    XCTAssertNil(error, @"Serialization error should be nil");
+    XCTAssert([responseObject isKindOfClass:[NSXMLParser class]], @"Expected response to be a NSXMLParser");
+}
+
+- (void)testThatXMLParserResponseSerializerCanBeCopied {
+    [self.responseSerializer setAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:100]];
+    [self.responseSerializer setAcceptableContentTypes:[NSSet setWithObject:@"test/type"]];
+
+    AFXMLParserResponseSerializer *copiedSerializer = [self.responseSerializer copy];
+    XCTAssertNotEqual(copiedSerializer, self.responseSerializer);
+    XCTAssertEqual(copiedSerializer.acceptableStatusCodes, self.responseSerializer.acceptableStatusCodes);
+    XCTAssertEqual(copiedSerializer.acceptableContentTypes, self.responseSerializer.acceptableContentTypes);
+}
+
+@end

+ 11 - 0
UIKit+AFNetworking/AFAutoPurgingImageCache.h

@@ -72,6 +72,17 @@ NS_ASSUME_NONNULL_BEGIN
  */
  */
 @protocol AFImageRequestCache <AFImageCache>
 @protocol AFImageRequestCache <AFImageCache>
 
 
+/**
+ Asks if the image should be cached using an identifier created from the request and additional identifier.
+ 
+ @param image The image to be cached.
+ @param request The unique URL request identifing the image asset.
+ @param identifier The additional identifier to apply to the URL request to identify the image.
+ 
+ @return A BOOL indicating whether or not the image should be added to the cache. YES will cache, NO will prevent caching.
+ */
+- (BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier;
+
 /**
 /**
  Adds the image to the cache using an identifier created from the request and additional identifier.
  Adds the image to the cache using an identifier created from the request and additional identifier.
 
 

+ 7 - 3
UIKit+AFNetworking/AFAutoPurgingImageCache.m

@@ -28,7 +28,7 @@
 @interface AFCachedImage : NSObject
 @interface AFCachedImage : NSObject
 
 
 @property (nonatomic, strong) UIImage *image;
 @property (nonatomic, strong) UIImage *image;
-@property (nonatomic, strong) NSString *identifier;
+@property (nonatomic, copy) NSString *identifier;
 @property (nonatomic, assign) UInt64 totalBytes;
 @property (nonatomic, assign) UInt64 totalBytes;
 @property (nonatomic, strong) NSDate *lastAccessDate;
 @property (nonatomic, strong) NSDate *lastAccessDate;
 @property (nonatomic, assign) UInt64 currentMemoryUsage;
 @property (nonatomic, assign) UInt64 currentMemoryUsage;
@@ -37,7 +37,7 @@
 
 
 @implementation AFCachedImage
 @implementation AFCachedImage
 
 
--(instancetype)initWithImage:(UIImage *)image identifier:(NSString *)identifier {
+- (instancetype)initWithImage:(UIImage *)image identifier:(NSString *)identifier {
     if (self = [self init]) {
     if (self = [self init]) {
         self.image = image;
         self.image = image;
         self.identifier = identifier;
         self.identifier = identifier;
@@ -51,7 +51,7 @@
     return self;
     return self;
 }
 }
 
 
-- (UIImage*)accessImage {
+- (UIImage *)accessImage {
     self.lastAccessDate = [NSDate date];
     self.lastAccessDate = [NSDate date];
     return self.image;
     return self.image;
 }
 }
@@ -196,6 +196,10 @@
     return key;
     return key;
 }
 }
 
 
+- (BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier {
+    return YES;
+}
+
 @end
 @end
 
 
 #endif
 #endif

+ 14 - 0
UIKit+AFNetworking/AFImageDownloader.h

@@ -81,6 +81,11 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
  */
  */
 + (NSURLCache *)defaultURLCache;
 + (NSURLCache *)defaultURLCache;
 
 
+/**
+ The default `NSURLSessionConfiguration` with common usage parameter values.
+ */
++ (NSURLSessionConfiguration *)defaultURLSessionConfiguration;
+
 /**
 /**
  Default initializer
  Default initializer
 
 
@@ -88,6 +93,15 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
  */
  */
 - (instancetype)init;
 - (instancetype)init;
 
 
+/**
+ Initializer with specific `URLSessionConfiguration`
+ 
+ @param configuration The `NSURLSessionConfiguration` to be be used
+ 
+ @return An instance of `AFImageDownloader` initialized with default values and custom `NSURLSessionConfiguration`
+ */
+- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration;
+
 /**
 /**
  Initializes the `AFImageDownloader` instance with the given session manager, download prioritization, maximum active download count and image cache.
  Initializes the `AFImageDownloader` instance with the given session manager, download prioritization, maximum active download count and image cache.
 
 

+ 25 - 11
UIKit+AFNetworking/AFImageDownloader.m

@@ -28,8 +28,8 @@
 
 
 @interface AFImageDownloaderResponseHandler : NSObject
 @interface AFImageDownloaderResponseHandler : NSObject
 @property (nonatomic, strong) NSUUID *uuid;
 @property (nonatomic, strong) NSUUID *uuid;
-@property (nonatomic, copy) void (^successBlock)(NSURLRequest*, NSHTTPURLResponse*, UIImage*);
-@property (nonatomic, copy) void (^failureBlock)(NSURLRequest*, NSHTTPURLResponse*, NSError*);
+@property (nonatomic, copy) void (^successBlock)(NSURLRequest *, NSHTTPURLResponse *, UIImage *);
+@property (nonatomic, copy) void (^failureBlock)(NSURLRequest *, NSHTTPURLResponse *, NSError *);
 @end
 @end
 
 
 @implementation AFImageDownloaderResponseHandler
 @implementation AFImageDownloaderResponseHandler
@@ -71,11 +71,11 @@
     return self;
     return self;
 }
 }
 
 
-- (void)addResponseHandler:(AFImageDownloaderResponseHandler*)handler {
+- (void)addResponseHandler:(AFImageDownloaderResponseHandler *)handler {
     [self.responseHandlers addObject:handler];
     [self.responseHandlers addObject:handler];
 }
 }
 
 
-- (void)removeResponseHandler:(AFImageDownloaderResponseHandler*)handler {
+- (void)removeResponseHandler:(AFImageDownloaderResponseHandler *)handler {
     [self.responseHandlers removeObject:handler];
     [self.responseHandlers removeObject:handler];
 }
 }
 
 
@@ -106,10 +106,10 @@
 
 
 @end
 @end
 
 
-
 @implementation AFImageDownloader
 @implementation AFImageDownloader
 
 
 + (NSURLCache *)defaultURLCache {
 + (NSURLCache *)defaultURLCache {
+    
     // It's been discovered that a crash will occur on certain versions
     // It's been discovered that a crash will occur on certain versions
     // of iOS if you customize the cache.
     // of iOS if you customize the cache.
     //
     //
@@ -143,7 +143,11 @@
 
 
 - (instancetype)init {
 - (instancetype)init {
     NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration];
     NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration];
-    AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:defaultConfiguration];
+    return [self initWithSessionConfiguration:defaultConfiguration];
+}
+
+- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
+    AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:configuration];
     sessionManager.responseSerializer = [AFImageResponseSerializer serializer];
     sessionManager.responseSerializer = [AFImageResponseSerializer serializer];
 
 
     return [self initWithSessionManager:sessionManager
     return [self initWithSessionManager:sessionManager
@@ -250,24 +254,26 @@
                        completionHandler:^(NSURLResponse * _Nonnull response, id  _Nullable responseObject, NSError * _Nullable error) {
                        completionHandler:^(NSURLResponse * _Nonnull response, id  _Nullable responseObject, NSError * _Nullable error) {
                            dispatch_async(self.responseQueue, ^{
                            dispatch_async(self.responseQueue, ^{
                                __strong __typeof__(weakSelf) strongSelf = weakSelf;
                                __strong __typeof__(weakSelf) strongSelf = weakSelf;
-                               AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
+                               AFImageDownloaderMergedTask *mergedTask = [strongSelf safelyGetMergedTask:URLIdentifier];
                                if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
                                if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
                                    mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
                                    mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
                                    if (error) {
                                    if (error) {
                                        for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
                                        for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
                                            if (handler.failureBlock) {
                                            if (handler.failureBlock) {
                                                dispatch_async(dispatch_get_main_queue(), ^{
                                                dispatch_async(dispatch_get_main_queue(), ^{
-                                                   handler.failureBlock(request, (NSHTTPURLResponse*)response, error);
+                                                   handler.failureBlock(request, (NSHTTPURLResponse *)response, error);
                                                });
                                                });
                                            }
                                            }
                                        }
                                        }
                                    } else {
                                    } else {
-                                       [strongSelf.imageCache addImage:responseObject forRequest:request withAdditionalIdentifier:nil];
+                                       if ([strongSelf.imageCache shouldCacheImage:responseObject forRequest:request withAdditionalIdentifier:nil]) {
+                                           [strongSelf.imageCache addImage:responseObject forRequest:request withAdditionalIdentifier:nil];
+                                       }
 
 
                                        for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
                                        for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
                                            if (handler.successBlock) {
                                            if (handler.successBlock) {
                                                dispatch_async(dispatch_get_main_queue(), ^{
                                                dispatch_async(dispatch_get_main_queue(), ^{
-                                                   handler.successBlock(request, (NSHTTPURLResponse*)response, responseObject);
+                                                   handler.successBlock(request, (NSHTTPURLResponse *)response, responseObject);
                                                });
                                                });
                                            }
                                            }
                                        }
                                        }
@@ -334,7 +340,7 @@
     });
     });
 }
 }
 
 
-- (AFImageDownloaderMergedTask*)safelyRemoveMergedTaskWithURLIdentifier:(NSString *)URLIdentifier {
+- (AFImageDownloaderMergedTask *)safelyRemoveMergedTaskWithURLIdentifier:(NSString *)URLIdentifier {
     __block AFImageDownloaderMergedTask *mergedTask = nil;
     __block AFImageDownloaderMergedTask *mergedTask = nil;
     dispatch_sync(self.synchronizationQueue, ^{
     dispatch_sync(self.synchronizationQueue, ^{
         mergedTask = [self removeMergedTaskWithURLIdentifier:URLIdentifier];
         mergedTask = [self removeMergedTaskWithURLIdentifier:URLIdentifier];
@@ -398,6 +404,14 @@
     return self.activeRequestCount < self.maximumActiveDownloads;
     return self.activeRequestCount < self.maximumActiveDownloads;
 }
 }
 
 
+- (AFImageDownloaderMergedTask *)safelyGetMergedTask:(NSString *)URLIdentifier {
+    __block AFImageDownloaderMergedTask *mergedTask;
+    dispatch_sync(self.synchronizationQueue, ^(){
+        mergedTask = self.mergedTasks[URLIdentifier];
+    });
+    return mergedTask;
+}
+
 @end
 @end
 
 
 #endif
 #endif

+ 1 - 1
UIKit+AFNetworking/UIImage+AFNetworking.h

@@ -28,7 +28,7 @@
 
 
 @interface UIImage (AFNetworking)
 @interface UIImage (AFNetworking)
 
 
-+ (UIImage*) safeImageWithData:(NSData*)data;
++ (UIImage *)safeImageWithData:(NSData *)data;
 
 
 @end
 @end
 
 

+ 7 - 4
UIKit+AFNetworking/UIImageView+AFNetworking.m

@@ -75,17 +75,20 @@
                        success:(void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success
                        success:(void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success
                        failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure
                        failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure
 {
 {
-
+    
     if ([urlRequest URL] == nil) {
     if ([urlRequest URL] == nil) {
-        [self cancelImageDownloadTask];
         self.image = placeholderImage;
         self.image = placeholderImage;
+        if (failure) {
+            NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadURL userInfo:nil];
+            failure(urlRequest, nil, error);
+        }
         return;
         return;
     }
     }
-
+    
     if ([self isActiveTaskURLEqualToURLRequest:urlRequest]){
     if ([self isActiveTaskURLEqualToURLRequest:urlRequest]){
         return;
         return;
     }
     }
-
+    
     [self cancelImageDownloadTask];
     [self cancelImageDownloadTask];
 
 
     AFImageDownloader *downloader = [[self class] sharedImageDownloader];
     AFImageDownloader *downloader = [[self class] sharedImageDownloader];

+ 1 - 1
UIKit+AFNetworking/UIWebView+AFNetworking.m

@@ -49,7 +49,7 @@
 
 
 @implementation UIWebView (AFNetworking)
 @implementation UIWebView (AFNetworking)
 
 
-- (AFHTTPSessionManager  *)sessionManager {
+- (AFHTTPSessionManager *)sessionManager {
     static AFHTTPSessionManager *_af_defaultHTTPSessionManager = nil;
     static AFHTTPSessionManager *_af_defaultHTTPSessionManager = nil;
     static dispatch_once_t onceToken;
     static dispatch_once_t onceToken;
     dispatch_once(&onceToken, ^{
     dispatch_once(&onceToken, ^{

+ 2 - 2
fastlane/.env

@@ -2,10 +2,10 @@ AF_WORKSPACE="AFNetworking.xcworkspace"
 
 
 AF_IOS_FRAMEWORK_SCHEME="AFNetworking iOS"
 AF_IOS_FRAMEWORK_SCHEME="AFNetworking iOS"
 AF_TVOS_FRAMEWORK_SCHEME="AFNetworking tvOS"
 AF_TVOS_FRAMEWORK_SCHEME="AFNetworking tvOS"
-AF_OSX_FRAMEWORK_SCHEME="AFNetworking OS X"
+AF_OSX_FRAMEWORK_SCHEME="AFNetworking macOS"
 
 
 AF_IOS_EXAMPLE_SCHEME="iOS Example"
 AF_IOS_EXAMPLE_SCHEME="iOS Example"
 AF_TVOS_EXAMPLE_SCHEME="tvOS Example"
 AF_TVOS_EXAMPLE_SCHEME="tvOS Example"
-AF_OSX_EXAMPLE_SCHEME="OS X Example"
+AF_OSX_EXAMPLE_SCHEME="macOS Example"
 
 
 FASTLANE_EXPLICIT_OPEN_SIMULATOR=1
 FASTLANE_EXPLICIT_OPEN_SIMULATOR=1

+ 4 - 4
fastlane/.env.default

@@ -1,6 +1,6 @@
-AF_IOS_SDK=iphonesimulator10.0
-AF_MAC_SDK=macosx10.11
-AF_TVOS_SDK=appletvsimulator10.0
+AF_IOS_SDK=iphonesimulator11.4
+AF_MAC_SDK=macosx10.13
+AF_TVOS_SDK=appletvsimulator11.4
 
 
 AF_CONFIGURATION=Release
 AF_CONFIGURATION=Release
 
 
@@ -11,4 +11,4 @@ SCAN_OUTPUT_DIRECTORY=fastlane/test-output
 
 
 EXAMPLE_WORKSPACE=$AF_WORKSPACE
 EXAMPLE_WORKSPACE=$AF_WORKSPACE
 EXAMPLE_SCHEME=$AF_IOS_EXAMPLE_SCHEME
 EXAMPLE_SCHEME=$AF_IOS_EXAMPLE_SCHEME
-EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 7"
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 8"

+ 2 - 2
fastlane/.env.ios10_xcode8

@@ -1,3 +1,3 @@
 SCAN_DEVICE="iPhone 7"
 SCAN_DEVICE="iPhone 7"
-SCAN_SDK=$AF_IOS_SDK
-EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 7"
+SCAN_SDK="iphonesimulator10.3"
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 7"

+ 3 - 0
fastlane/.env.ios11_xcode9

@@ -0,0 +1,3 @@
+SCAN_DEVICE="iPhone 8"
+SCAN_SDK=iphonesimulator11.0
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 8"

+ 3 - 0
fastlane/.env.ios11_xcode91

@@ -0,0 +1,3 @@
+SCAN_DEVICE="iPhone 8"
+SCAN_SDK=iphonesimulator11.1
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 8"

+ 3 - 0
fastlane/.env.ios11_xcode92

@@ -0,0 +1,3 @@
+SCAN_DEVICE="iPhone 8"
+SCAN_SDK=iphonesimulator11.2
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 8"

+ 3 - 0
fastlane/.env.ios11_xcode93

@@ -0,0 +1,3 @@
+SCAN_DEVICE="iPhone 8"
+SCAN_SDK=iphonesimulator11.3
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 8"

+ 3 - 0
fastlane/.env.ios11_xcode94

@@ -0,0 +1,3 @@
+SCAN_DEVICE="iPhone 8"
+SCAN_SDK=$AF_IOS_SDK
+EXAMPLE_DESTINATION="platform=iOS Simulator,name=iPhone 8"

+ 0 - 0
fastlane/.env.ios81_xcode73 → fastlane/.env.ios8_xcode7


+ 0 - 0
fastlane/.env.ios93_xcode73 → fastlane/.env.ios9_xcode7


+ 2 - 2
fastlane/.env.tvos10_xcode8 → fastlane/.env.tvos11_xcode9

@@ -1,6 +1,6 @@
 SCAN_SCHEME=$AF_TVOS_FRAMEWORK_SCHEME
 SCAN_SCHEME=$AF_TVOS_FRAMEWORK_SCHEME
-SCAN_DEVICE="Apple TV 1080p"
+SCAN_DEVICE="Apple TV 4K"
 SCAN_SDK=$AF_TVOS_SDK
 SCAN_SDK=$AF_TVOS_SDK
 
 
 EXAMPLE_SCHEME=$AF_TVOS_EXAMPLE_SCHEME
 EXAMPLE_SCHEME=$AF_TVOS_EXAMPLE_SCHEME
-EXAMPLE_DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p"
+EXAMPLE_DESTINATION="platform=tvOS Simulator,name=Apple TV 4K"

+ 1 - 1
fastlane/Fastfile

@@ -1,4 +1,4 @@
 import_from_git(
 import_from_git(
   url: 'https://github.com/AFNetworking/fastlane.git', 
   url: 'https://github.com/AFNetworking/fastlane.git', 
-  branch: '0.0.6'
+  branch: '0.0.8'
 )
 )