Merge branch 'master' into pr/4051

This commit is contained in:
Jeff Kelley 2018-07-13 17:09:18 -04:00
commit 5fe5ea3355
75 changed files with 1093 additions and 230 deletions

View File

@ -9,21 +9,29 @@ env:
- FASTLANE_LANE=ci_commit
matrix:
include:
- osx_image: xcode8
- osx_image: xcode9.3
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.3
env: FASTLANE_ENV=ios11_xcode93
- osx_image: xcode9.3
env: FASTLANE_ENV=tvos11_xcode9
- osx_image: xcode9.3
env: FASTLANE_ENV=osx
- 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
env: FASTLANE_ENV=ios93_xcode73
env: FASTLANE_ENV=ios9_xcode7
- osx_image: xcode7.3
env: FASTLANE_ENV=ios81_xcode73
env: FASTLANE_ENV=ios8_xcode7
before_install:
# 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 fastlane --no-rdoc --no-ri --no-document --quiet
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AFNetworking'
s.version = '3.1.0'
s.version = '3.2.1'
s.license = 'MIT'
s.summary = 'A delightful iOS and OS X networking framework.'
s.homepage = 'https://github.com/AFNetworking/AFNetworking'
@ -64,8 +64,8 @@ EOS
ss.tvos.dependency 'AFNetworking/Reachability'
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
s.subspec 'UIKit' do |ss|

View File

@ -3,22 +3,26 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 47;
objects = {
/* Begin PBXBuildFile section */
1BF9F9601C87832B00F1F35A /* AFImageResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */; };
1BF9F9611C87843200F1F35A /* AFImageResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */; };
1BF9F9621C87843300F1F35A /* AFImageResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */; };
1F1A629420CAE88D00CFC27B /* httpbinorg_08102018.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F1A629320CAE88C00CFC27B /* httpbinorg_08102018.cer */; };
1F1A629520CAE88D00CFC27B /* httpbinorg_08102018.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F1A629320CAE88C00CFC27B /* httpbinorg_08102018.cer */; };
1F1A629620CAE88D00CFC27B /* httpbinorg_08102018.cer in Resources */ = {isa = PBXBuildFile; fileRef = 1F1A629320CAE88C00CFC27B /* httpbinorg_08102018.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 */; };
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 */; };
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 */; };
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 */; };
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 */; };
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 */; };
@ -173,6 +177,10 @@
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, ); }; };
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 */; };
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 */; };
@ -225,7 +233,8 @@
/* Begin PBXFileReference section */
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>"; };
1F1A629320CAE88C00CFC27B /* httpbinorg_08102018.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = httpbinorg_08102018.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>"; };
2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFUIButtonTests.m; sourceTree = "<group>"; };
@ -235,7 +244,7 @@
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; };
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>"; };
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>"; };
@ -297,6 +306,8 @@
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>"; };
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>"; };
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>"; };
@ -401,7 +412,7 @@
298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */,
1F6F7DF61F1703A100C979D0 /* DST Root CA X3.cer */,
1F6F7DF51F1703A100C979D0 /* Let's Encrypt Authority X3.cer */,
1F6F7DF41F1703A100C979D0 /* httpbinorg_08132017.cer */,
1F1A629320CAE88C00CFC27B /* httpbinorg_08102018.cer */,
);
path = HTTPBin.org;
sourceTree = "<group>";
@ -434,6 +445,8 @@
298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */,
298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */,
298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */,
2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */,
2D4563931DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m */,
298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */,
E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */,
29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */,
@ -481,7 +494,7 @@
299522651BBF129200859F49 /* AFNetworking.framework */,
299522771BBF136400859F49 /* AFNetworking.framework */,
298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */,
298D7C4A1BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests.xctest */,
298D7C4A1BC2C7B200FD3B3E /* AFNetworking macOS Tests.xctest */,
2987B0A51BC408A200179A4C /* AFNetworking.framework */,
2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */,
);
@ -501,6 +514,7 @@
299522451BBF125A00859F49 /* AFNetworking */ = {
isa = PBXGroup;
children = (
1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */,
299522461BBF125A00859F49 /* AFHTTPSessionManager.h */,
299522471BBF125A00859F49 /* AFHTTPSessionManager.m */,
299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */,
@ -573,6 +587,7 @@
29D96E8D1BCC3D7D00F571A5 /* AFURLSessionManager.h in Headers */,
29D96E941BCC406B00F571A5 /* AFAutoPurgingImageCache.h in Headers */,
29D96E951BCC406B00F571A5 /* AFImageDownloader.h in Headers */,
1F96D2A7203649580085FC3F /* AFCompatibilityMacros.h in Headers */,
29D96E961BCC406B00F571A5 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
29D96E971BCC406B00F571A5 /* UIButton+AFNetworking.h in Headers */,
29D96E981BCC406B00F571A5 /* UIImage+AFNetworking.h in Headers */,
@ -597,6 +612,7 @@
2995225E1BBF125A00859F49 /* AFURLSessionManager.h in Headers */,
2995225C1BBF125A00859F49 /* AFURLResponseSerialization.h in Headers */,
299522A21BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h in Headers */,
1F96D2A4203649560085FC3F /* AFCompatibilityMacros.h in Headers */,
2995223D1BBF104D00859F49 /* AFNetworking.h in Headers */,
299522B01BBF13C700859F49 /* UIWebView+AFNetworking.h in Headers */,
299522AC1BBF13C700859F49 /* UIProgressView+AFNetworking.h in Headers */,
@ -612,6 +628,7 @@
files = (
29D96E7A1BCC3D6000F571A5 /* AFHTTPSessionManager.h in Headers */,
29D96E7C1BCC3D6000F571A5 /* AFSecurityPolicy.h in Headers */,
1F96D2A5203649570085FC3F /* AFCompatibilityMacros.h in Headers */,
29D96E7D1BCC3D6000F571A5 /* AFURLRequestSerialization.h in Headers */,
29D96E7E1BCC3D6000F571A5 /* AFURLResponseSerialization.h in Headers */,
29D96E7F1BCC3D6000F571A5 /* AFURLSessionManager.h in Headers */,
@ -626,6 +643,7 @@
29D96E811BCC3D7200F571A5 /* AFHTTPSessionManager.h in Headers */,
29D96E821BCC3D7200F571A5 /* AFNetworkReachabilityManager.h in Headers */,
29D96E831BCC3D7200F571A5 /* AFSecurityPolicy.h in Headers */,
1F96D2A6203649570085FC3F /* AFCompatibilityMacros.h in Headers */,
29D96E841BCC3D7200F571A5 /* AFURLRequestSerialization.h in Headers */,
29D96E851BCC3D7200F571A5 /* AFURLResponseSerialization.h in Headers */,
29D96E861BCC3D7200F571A5 /* AFURLSessionManager.h in Headers */,
@ -690,9 +708,9 @@
productReference = 298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
298D7C491BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests */ = {
298D7C491BC2C7B200FD3B3E /* AFNetworking macOS Tests */ = {
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 = (
298D7C461BC2C7B200FD3B3E /* Sources */,
298D7C471BC2C7B200FD3B3E /* Frameworks */,
@ -703,9 +721,9 @@
dependencies = (
298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */,
);
name = "AFNetworking Mac OS X Tests";
name = "AFNetworking macOS 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";
};
299522381BBF104D00859F49 /* AFNetworking iOS */ = {
@ -744,9 +762,9 @@
productReference = 299522651BBF129200859F49 /* AFNetworking.framework */;
productType = "com.apple.product-type.framework";
};
299522761BBF136400859F49 /* AFNetworking OS X */ = {
299522761BBF136400859F49 /* AFNetworking macOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = 2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking OS X" */;
buildConfigurationList = 2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking macOS" */;
buildPhases = (
299522721BBF136400859F49 /* Sources */,
299522731BBF136400859F49 /* Frameworks */,
@ -757,7 +775,7 @@
);
dependencies = (
);
name = "AFNetworking OS X";
name = "AFNetworking macOS";
productName = "AFNetworking OS X";
productReference = 299522771BBF136400859F49 /* AFNetworking.framework */;
productType = "com.apple.product-type.framework";
@ -768,7 +786,7 @@
299522301BBF104D00859F49 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = AFNetworking;
TargetAttributes = {
2987B0A41BC408A200179A4C = {
@ -797,7 +815,7 @@
};
};
buildConfigurationList = 299522331BBF104D00859F49 /* Build configuration list for PBXProject "AFNetworking" */;
compatibilityVersion = "Xcode 3.2";
compatibilityVersion = "Xcode 6.3";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
@ -810,10 +828,10 @@
targets = (
299522381BBF104D00859F49 /* AFNetworking iOS */,
299522641BBF129200859F49 /* AFNetworking watchOS */,
299522761BBF136400859F49 /* AFNetworking OS X */,
299522761BBF136400859F49 /* AFNetworking macOS */,
2987B0A41BC408A200179A4C /* AFNetworking tvOS */,
298D7C3A1BC2C79500FD3B3E /* AFNetworking iOS Tests */,
298D7C491BC2C7B200FD3B3E /* AFNetworking Mac OS X Tests */,
298D7C491BC2C7B200FD3B3E /* AFNetworking macOS Tests */,
2987B0AD1BC408A200179A4C /* AFNetworking tvOS Tests */,
);
};
@ -835,9 +853,9 @@
2987B0D61BC40AEC00179A4C /* ADNNetServerTrustChain in Resources */,
2987B0DF1BC40AFB00179A4C /* NoDomains.cer in Resources */,
2987B0D41BC40AE900179A4C /* adn_1.cer in Resources */,
1F6F7DFF1F17051100C979D0 /* httpbinorg_08132017.cer in Resources */,
2987B0DD1BC40AFB00179A4C /* AltName.cer in Resources */,
2987B0D71BC40AF000179A4C /* HTTPBinOrgServerTrustChain in Resources */,
1F1A629620CAE88D00CFC27B /* httpbinorg_08102018.cer in Resources */,
2987B0D31BC40AE900179A4C /* adn_0.cer in Resources */,
2987B0DC1BC40AF600179A4C /* logo.png in Resources */,
2987B0D51BC40AE900179A4C /* adn_2.cer in Resources */,
@ -861,9 +879,9 @@
298D7CBA1BC2CA9800FD3B3E /* logo.png in Resources */,
297824A31BC2D69A0041C395 /* adn_0.cer in Resources */,
298D7CE31BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */,
1F6F7DF91F17051000C979D0 /* httpbinorg_08132017.cer in Resources */,
297824A71BC2D69A0041C395 /* adn_2.cer in Resources */,
297824A51BC2D69A0041C395 /* adn_1.cer in Resources */,
1F1A629420CAE88D00CFC27B /* httpbinorg_08102018.cer in Resources */,
298D7CC01BC2CA9D00FD3B3E /* NoDomains.cer in Resources */,
298D7CE01BC2CB5A00FD3B3E /* ADNNetServerTrustChain in Resources */,
298D7CBE1BC2CA9D00FD3B3E /* AltName.cer in Resources */,
@ -887,9 +905,9 @@
298D7CB91BC2CA9800FD3B3E /* logo.png in Resources */,
297824A41BC2D69A0041C395 /* adn_0.cer in Resources */,
298D7CE41BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */,
1F6F7DFC1F17051000C979D0 /* httpbinorg_08132017.cer in Resources */,
297824A81BC2D69A0041C395 /* adn_2.cer in Resources */,
297824A61BC2D69A0041C395 /* adn_1.cer in Resources */,
1F1A629520CAE88D00CFC27B /* httpbinorg_08102018.cer in Resources */,
298D7CBD1BC2CA9C00FD3B3E /* NoDomains.cer in Resources */,
298D7CE11BC2CB5A00FD3B3E /* ADNNetServerTrustChain in Resources */,
298D7CBB1BC2CA9C00FD3B3E /* AltName.cer in Resources */,
@ -967,6 +985,7 @@
2987B0CF1BC40A7600179A4C /* AFPropertyListResponseSerializerTests.m in Sources */,
2987B0D21BC40AD800179A4C /* AFTestCase.m in Sources */,
2987B0CD1BC40A7600179A4C /* AFJSONSerializationTests.m in Sources */,
2D4563921DB117A200AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */,
E91164671DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -992,6 +1011,7 @@
298D7C981BC2CA2500FD3B3E /* AFURLSessionManagerTests.m in Sources */,
297824AC1BC2DB450041C395 /* AFImageDownloaderTests.m in Sources */,
29F5EF031C47E64F008B976A /* AFUIWebViewTests.m in Sources */,
2D4563901DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */,
298D7CD51BC2CAEC00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */,
298D7CD71BC2CAEF00FD3B3E /* AFJSONSerializationTests.m in Sources */,
298D7CDB1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */,
@ -1010,8 +1030,10 @@
1BF9F9611C87843200F1F35A /* AFImageResponseSerializerTests.m in Sources */,
298D7C971BC2C94500FD3B3E /* AFTestCase.m in Sources */,
298D7CD81BC2CAF000FD3B3E /* AFJSONSerializationTests.m in Sources */,
2D4563941DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m in Sources */,
298D7CDC1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */,
298D7CD61BC2CAED00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */,
2D4563911DB117A200AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */,
298D7CDA1BC2CAF300FD3B3E /* AFNetworkReachabilityManagerTests.m in Sources */,
298D7C991BC2CA2600FD3B3E /* AFURLSessionManagerTests.m in Sources */,
);
@ -1079,7 +1101,7 @@
};
298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 299522761BBF136400859F49 /* AFNetworking OS X */;
target = 299522761BBF136400859F49 /* AFNetworking macOS */;
targetProxy = 298D7C501BC2C7B200FD3B3E /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
@ -1088,7 +1110,9 @@
2987B0B61BC408A200179A4C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1111,7 +1135,9 @@
2987B0B71BC408A200179A4C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1134,6 +1160,7 @@
2987B0B81BC408A200179A4C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = ./Tests/Info.plist;
@ -1148,6 +1175,7 @@
2987B0B91BC408A200179A4C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = ./Tests/Info.plist;
@ -1162,6 +1190,7 @@
298D7C431BC2C79500FD3B3E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
DEVELOPMENT_TEAM = "";
GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@ -1176,6 +1205,7 @@
298D7C441BC2C79500FD3B3E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
DEVELOPMENT_TEAM = "";
GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@ -1190,6 +1220,7 @@
298D7C531BC2C7B200FD3B3E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMBINE_HIDPI_IMAGES = YES;
GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@ -1205,6 +1236,7 @@
298D7C541BC2C7B200FD3B3E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMBINE_HIDPI_IMAGES = YES;
GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch";
@ -1226,7 +1258,9 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_ASSIGN_ENUM = YES;
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_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1236,10 +1270,14 @@
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = 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_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
@ -1300,7 +1338,9 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_ASSIGN_ENUM = YES;
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_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1310,10 +1350,14 @@
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = 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_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
@ -1362,7 +1406,9 @@
299522421BBF104D00859F49 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
@ -1371,7 +1417,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ./Framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking;
PRODUCT_NAME = AFNetworking;
@ -1384,7 +1429,9 @@
299522431BBF104D00859F49 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
@ -1393,7 +1440,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = ./Framework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking;
PRODUCT_NAME = AFNetworking;
@ -1408,6 +1454,7 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1431,6 +1478,7 @@
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1452,7 +1500,9 @@
2995227D1BBF136400859F49 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = marker;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -1477,7 +1527,9 @@
2995227E1BBF136400859F49 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
BITCODE_GENERATION_MODE = bitcode;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -1529,7 +1581,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking Mac OS X Tests" */ = {
298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking macOS Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
298D7C531BC2C7B200FD3B3E /* Debug */,
@ -1565,7 +1617,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking OS X" */ = {
2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking macOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
2995227D1BBF136400859F49 /* Debug */,

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,37 @@
// AFCompatibilityMacros.h
// Copyright (c) 20112016 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
#endif /* AFCompatibilityMacros_h */

View File

@ -108,11 +108,14 @@ NS_ASSUME_NONNULL_BEGIN
- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
/**
* Initializes an instance of a network reachability manager
*
* @return nil as this method is unavailable
* Unavailable initializer
*/
- (nullable instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/**
* Unavailable initializer
*/
- (instancetype)init NS_UNAVAILABLE;
///--------------------------------------------------
/// @name Starting & Stopping Reachability Monitoring

View File

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

View File

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

View File

@ -113,6 +113,8 @@ id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions
- `application/json`
- `text/json`
- `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
@ -168,7 +170,7 @@ id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions
- (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;

View File

@ -64,7 +64,9 @@ id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions
if ([JSONObject isKindOfClass:[NSArray class]]) {
NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]];
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];

View File

@ -25,6 +25,7 @@
#import "AFURLResponseSerialization.h"
#import "AFURLRequestSerialization.h"
#import "AFSecurityPolicy.h"
#import "AFCompatibilityMacros.h"
#if !TARGET_OS_WATCH
#import "AFNetworkReachabilityManager.h"
#endif
@ -414,7 +415,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.
*/
- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block;
- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block AF_API_UNAVAILABLE(macos);
///-----------------------------------------------
/// @name Setting Download Task Delegate Callbacks

View File

@ -38,14 +38,16 @@ static dispatch_queue_t 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();
}
}
}
@ -148,11 +150,17 @@ typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id re
progress.pausingHandler = ^{
[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 = ^{
[weakTask resume];
};
}
[progress addObserver:self
forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
options:NSKeyValueObservingOptionNew
@ -448,7 +456,7 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
@property (readwrite, nonatomic, strong) NSLock *lock;
@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid;
@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) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge;
@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream;
@ -737,17 +745,21 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
__block NSURLSessionUploadTask *uploadTask = nil;
url_session_manager_create_task_safely(^{
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;
}
@ -831,9 +843,11 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
self.sessionDidReceiveAuthenticationChallenge = block;
}
#if !TARGET_OS_OSX
- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block {
self.didFinishEventsForBackgroundURLSession = block;
}
#endif
#pragma mark -
@ -902,9 +916,12 @@ static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofi
return self.dataTaskDidReceiveResponse != nil;
} else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) {
return self.dataTaskWillCacheResponse != nil;
} else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {
}
#if !TARGET_OS_OSX
else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {
return self.didFinishEventsForBackgroundURLSession != nil;
}
#endif
return [[self class] instancesRespondToSelector:selector];
}
@ -1122,6 +1139,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask
}
}
#if !TARGET_OS_OSX
- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session {
if (self.didFinishEventsForBackgroundURLSession) {
dispatch_async(dispatch_get_main_queue(), ^{
@ -1129,6 +1147,7 @@ didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask
});
}
}
#endif
#pragma mark - NSURLSessionDownloadDelegate

View File

@ -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)
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).

View File

@ -38,7 +38,7 @@
29E6F1E91BB9E37200A4466C /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29E6F1E81BB9E37200A4466C /* NotificationCenter.framework */; };
29E6F1ED1BB9E37200A4466C /* TodayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F1EC1BB9E37200A4466C /* TodayViewController.m */; };
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 */; };
29E6F1FA1BB9E56500A4466C /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19C1BB9DD7300A4466C /* User.m */; };
C2BFE0251C11870800BB258D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C2BFE0241C11870800BB258D /* AppDelegate.m */; };
@ -87,7 +87,7 @@
dstPath = "";
dstSubfolderSpec = 13;
files = (
29E6F1F41BB9E37200A4466C /* Today Extension Example.appex in Embed App Extensions */,
29E6F1F41BB9E37200A4466C /* iOS Today Extension Example.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
@ -108,7 +108,7 @@
/* Begin PBXFileReference section */
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; };
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>"; };
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>"; };
@ -137,7 +137,7 @@
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>"; };
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; };
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>"; };
@ -205,7 +205,7 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
291BFDE81BB9E8C700FFB029 /* OS X Example */ = {
291BFDE81BB9E8C700FFB029 /* macOS Example */ = {
isa = PBXGroup;
children = (
C2BFE0231C11870800BB258D /* AppDelegate.h */,
@ -215,7 +215,7 @@
291BFDF71BB9E8C700FFB029 /* Info.plist */,
291BFDEC1BB9E8C700FFB029 /* Supporting Files */,
);
path = "OS X Example";
path = "macOS Example";
sourceTree = "<group>";
};
291BFDEC1BB9E8C700FFB029 /* Supporting Files */ = {
@ -267,7 +267,7 @@
29E6F1EA1BB9E37200A4466C /* Today Extension Example */,
29E6F20F1BB9E76A00A4466C /* watchOS Example */,
29E6F21E1BB9E76A00A4466C /* watchOS Example Extension */,
291BFDE81BB9E8C700FFB029 /* OS X Example */,
291BFDE81BB9E8C700FFB029 /* macOS Example */,
291BFE161BB9ECEE00FFB029 /* tvOS Example */,
29E6F1E71BB9E37200A4466C /* Frameworks */,
29E6F1761BB9DCB500A4466C /* Products */,
@ -281,10 +281,10 @@
isa = PBXGroup;
children = (
29E6F1751BB9DCB500A4466C /* iOS Example.app */,
29E6F1E61BB9E37200A4466C /* Today Extension Example.appex */,
29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */,
291BFDB91BB9E85400FFB029 /* watchOS Example.app */,
291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */,
291BFDE71BB9E8C700FFB029 /* OS X Example.app */,
291BFDE71BB9E8C700FFB029 /* macOS Example.app */,
291BFE151BB9ECEE00FFB029 /* tvOS Example.app */,
);
name = Products;
@ -422,9 +422,9 @@
productReference = 291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */;
productType = "com.apple.product-type.watchkit2-extension";
};
291BFDE61BB9E8C700FFB029 /* OS X Example */ = {
291BFDE61BB9E8C700FFB029 /* macOS Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "OS X Example" */;
buildConfigurationList = 291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "macOS Example" */;
buildPhases = (
291BFDE31BB9E8C700FFB029 /* Sources */,
291BFDE41BB9E8C700FFB029 /* Frameworks */,
@ -434,9 +434,9 @@
);
dependencies = (
);
name = "OS X Example";
name = "macOS Example";
productName = "OS X Example";
productReference = 291BFDE71BB9E8C700FFB029 /* OS X Example.app */;
productReference = 291BFDE71BB9E8C700FFB029 /* macOS Example.app */;
productType = "com.apple.product-type.application";
};
291BFE141BB9ECEE00FFB029 /* tvOS Example */ = {
@ -477,9 +477,9 @@
productReference = 29E6F1751BB9DCB500A4466C /* iOS Example.app */;
productType = "com.apple.product-type.application";
};
29E6F1E51BB9E37200A4466C /* Today Extension Example */ = {
29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "Today Extension Example" */;
buildConfigurationList = 29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "iOS Today Extension Example" */;
buildPhases = (
29E6F1E21BB9E37200A4466C /* Sources */,
29E6F1E31BB9E37200A4466C /* Frameworks */,
@ -489,9 +489,9 @@
);
dependencies = (
);
name = "Today Extension Example";
name = "iOS 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";
};
/* End PBXNativeTarget section */
@ -500,7 +500,7 @@
29E6F16B1BB9DA2E00A4466C /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0710;
LastUpgradeCheck = 0930;
TargetAttributes = {
291BFDB81BB9E85400FFB029 = {
CreatedOnToolsVersion = 7.1;
@ -537,10 +537,10 @@
projectRoot = "";
targets = (
29E6F1741BB9DCB500A4466C /* iOS Example */,
29E6F1E51BB9E37200A4466C /* Today Extension Example */,
29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */,
291BFDB81BB9E85400FFB029 /* watchOS Example */,
291BFDC41BB9E85500FFB029 /* watchOS Example Extension */,
291BFDE61BB9E8C700FFB029 /* OS X Example */,
291BFDE61BB9E8C700FFB029 /* macOS Example */,
291BFE141BB9ECEE00FFB029 /* tvOS Example */,
);
};
@ -668,7 +668,7 @@
};
29E6F1F31BB9E37200A4466C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 29E6F1E51BB9E37200A4466C /* Today Extension Example */;
target = 29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */;
targetProxy = 29E6F1F21BB9E37200A4466C /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
@ -709,6 +709,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -757,6 +758,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -800,6 +802,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -849,6 +852,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -892,6 +896,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -921,12 +926,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = 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";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.OS-X-Example";
PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.macOS-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
};
@ -941,6 +946,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -964,11 +970,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = 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";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.OS-X-Example";
PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.macOS-Example";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
};
@ -984,6 +990,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1036,6 +1043,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1074,12 +1082,66 @@
29E6F16F1BB9DA2E00A4466C /* Debug */ = {
isa = XCBuildConfiguration;
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;
};
29E6F1701BB9DA2E00A4466C /* Release */ = {
isa = XCBuildConfiguration;
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;
};
@ -1092,6 +1154,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1140,6 +1203,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1181,6 +1245,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1229,6 +1294,7 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
@ -1284,7 +1350,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "OS X Example" */ = {
291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "macOS Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
291BFDF91BB9E8C700FFB029 /* Debug */,
@ -1320,7 +1386,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "Today Extension Example" */ = {
29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "iOS Today Extension Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
29E6F1F61BB9E37200A4466C /* Debug */,

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -42,6 +42,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<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>
<MacroExpansion>
<BuildableReference

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0930"
wasCreatedForAppExtension = "YES"
version = "2.0">
<BuildAction
@ -30,8 +30,8 @@
<BuildableReference
BuildableIdentifier = "primary"
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">
</BuildableReference>
</BuildActionEntry>
@ -57,6 +57,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<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>
<MacroExpansion>
<BuildableReference

View File

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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0800"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -42,6 +42,16 @@
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<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>
<MacroExpansion>
<BuildableReference

View File

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

View File

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

View File

@ -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>
<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>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@ -13,10 +15,10 @@
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<menu title="AMainMenu" systemMenu="main" id="29">
<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>
<menuItem title="About AFNetworking OS X Example" id="58">
<menuItem title="About AFNetworking macOS Example" id="58">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
@ -31,7 +33,7 @@
<menuItem isSeparatorItem="YES" id="144">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Hide AFNetworking OS X Example" keyEquivalent="h" id="134">
<menuItem title="Hide AFNetworking macOS Example" keyEquivalent="h" id="134">
<connections>
<action selector="hide:" target="-1" id="367"/>
</connections>
@ -50,7 +52,7 @@
<menuItem isSeparatorItem="YES" id="149">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Quit AFNetworking OS X Example" keyEquivalent="q" id="136">
<menuItem title="Quit AFNetworking macOS Example" keyEquivalent="q" id="136">
<connections>
<action selector="terminate:" target="-3" id="449"/>
</connections>
@ -148,7 +150,7 @@
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="491">
<items>
<menuItem title="AFNetworking OS X Example Help" keyEquivalent="?" id="492">
<menuItem title="AFNetworking macOS Example Help" keyEquivalent="?" id="492">
<connections>
<action selector="showHelp:" target="-1" id="493"/>
</connections>
@ -158,11 +160,11 @@
</menuItem>
</items>
</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"/>
<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="maxSize" type="size" width="375" height="1280"/>
<view key="contentView" id="372">
@ -176,13 +178,13 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<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">
<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"/>
<size key="intercellSpacing" width="10" height="10"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<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">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
@ -261,7 +263,6 @@
</tableColumns>
</tableView>
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="540">
<rect key="frame" x="1" y="484" width="373" height="15"/>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<?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">
<dict>
<key>CFBundleDevelopmentRegion</key>
@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>3.1.0</string>
<string>3.2.1</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>

View File

@ -9,7 +9,7 @@
[![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)
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.
@ -83,7 +83,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
## 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. |
| 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 |
| 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.
@ -112,7 +112,7 @@ Run `carthage` to build the framework and drag the built `AFNetworking.framework
- `AFHTTPResponseSerializer`
- `AFJSONResponseSerializer`
- `AFXMLParserResponseSerializer`
- `AFXMLDocumentResponseSerializer` _(Mac OS X)_
- `AFXMLDocumentResponseSerializer` _(macOS)_
- `AFPropertyListResponseSerializer`
- `AFImageResponseSerializer`
- `AFCompoundResponseSerializer`
@ -319,4 +319,4 @@ If you believe you have identified a security vulnerability with AFNetworking, y
## 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.

Binary file not shown.

View File

@ -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

View File

@ -71,8 +71,8 @@
XCTAssertNotNil(copiedSerializer);
XCTAssertNotEqual(compoundSerializer, copiedSerializer);
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.acceptableContentTypes, copiedSerializer.acceptableContentTypes);
}
@ -87,8 +87,8 @@
XCTAssertNotNil(unarchivedSerializer);
XCTAssertNotEqual(unarchivedSerializer, compoundSerializer);
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

View File

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

View File

@ -178,7 +178,9 @@
XCTestExpectation *expectation = [self expectationWithDescription:@"Serialization should fail"];
[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 @"";
}];

View File

@ -22,6 +22,11 @@
#import "AFTestCase.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
@property (nonatomic, strong) NSURLRequest *pngRequest;
@property (nonatomic, strong) NSURLRequest *jpegRequest;
@ -234,6 +239,112 @@
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 {
XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"];
AFImageDownloadReceipt *receipt1;
@ -445,3 +556,24 @@
}
@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

View File

@ -177,7 +177,7 @@ static NSData * AFJSONTestData() {
- (void)testThatJSONRemovesKeysWithNullValues {
self.responseSerializer.removesKeysWithNullValues = YES;
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
error:nil];
@ -189,6 +189,7 @@ static NSData * AFJSONTestData() {
XCTAssertNotNil(responseObject[@"key"]);
XCTAssertNil(responseObject[@"nullkey"]);
XCTAssertNil(responseObject[@"array"][0][@"subnullkey"]);
XCTAssertEqualObjects(responseObject[@"arrayWithNulls"], @[]);
}
- (void)testThatJSONResponseSerializerCanBeCopied {

View File

@ -23,6 +23,7 @@
#import "AFNetworkReachabilityManager.h"
#import <netinet/in.h>
#import <objc/message.h>
@interface AFNetworkReachabilityManagerTests : AFTestCase
@property (nonatomic, strong) AFNetworkReachabilityManager *addressReachability;
@ -47,6 +48,20 @@
[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 {
XCTAssertEqual(self.addressReachability.networkReachabilityStatus, AFNetworkReachabilityStatusUnknown,
@"Reachability should start in an unknown state");

View File

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

View File

@ -137,6 +137,30 @@
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 {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnonnull"

View File

@ -37,7 +37,6 @@
@property (readwrite, nonatomic, strong) AFURLSessionManager *backgroundManager;
@end
@implementation AFURLSessionManagerTests
- (NSURLRequest *)bigImageURLRequest {
@ -134,6 +133,21 @@
[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 {
NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"];
while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) {
@ -459,7 +473,7 @@
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];
}

View File

@ -0,0 +1,101 @@
// AFXMLDocumentResponseSerializerTests.m
// Copyright (c) 20112016 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

View File

@ -0,0 +1,89 @@
// AFXMLParserResponseSerializerTests.m
// Copyright (c) 20112016 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

View File

@ -72,6 +72,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
@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.

View File

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

View File

@ -81,6 +81,11 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
*/
+ (NSURLCache *)defaultURLCache;
/**
The default `NSURLSessionConfiguration` with common usage parameter values.
*/
+ (NSURLSessionConfiguration *)defaultURLSessionConfiguration;
/**
Default initializer
@ -88,6 +93,15 @@ typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) {
*/
- (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.

View File

@ -28,8 +28,8 @@
@interface AFImageDownloaderResponseHandler : NSObject
@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
@implementation AFImageDownloaderResponseHandler
@ -71,11 +71,11 @@
return self;
}
- (void)addResponseHandler:(AFImageDownloaderResponseHandler*)handler {
- (void)addResponseHandler:(AFImageDownloaderResponseHandler *)handler {
[self.responseHandlers addObject:handler];
}
- (void)removeResponseHandler:(AFImageDownloaderResponseHandler*)handler {
- (void)removeResponseHandler:(AFImageDownloaderResponseHandler *)handler {
[self.responseHandlers removeObject:handler];
}
@ -106,10 +106,10 @@
@end
@implementation AFImageDownloader
+ (NSURLCache *)defaultURLCache {
// It's been discovered that a crash will occur on certain versions
// of iOS if you customize the cache.
//
@ -143,7 +143,11 @@
- (instancetype)init {
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];
return [self initWithSessionManager:sessionManager
@ -250,24 +254,26 @@
completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
dispatch_async(self.responseQueue, ^{
__strong __typeof__(weakSelf) strongSelf = weakSelf;
AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier];
AFImageDownloaderMergedTask *mergedTask = [strongSelf safelyGetMergedTask:URLIdentifier];
if ([mergedTask.identifier isEqual:mergedTaskIdentifier]) {
mergedTask = [strongSelf safelyRemoveMergedTaskWithURLIdentifier:URLIdentifier];
if (error) {
for (AFImageDownloaderResponseHandler *handler in mergedTask.responseHandlers) {
if (handler.failureBlock) {
dispatch_async(dispatch_get_main_queue(), ^{
handler.failureBlock(request, (NSHTTPURLResponse*)response, error);
handler.failureBlock(request, (NSHTTPURLResponse *)response, error);
});
}
}
} 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) {
if (handler.successBlock) {
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;
dispatch_sync(self.synchronizationQueue, ^{
mergedTask = [self removeMergedTaskWithURLIdentifier:URLIdentifier];
@ -398,6 +404,14 @@
return self.activeRequestCount < self.maximumActiveDownloads;
}
- (AFImageDownloaderMergedTask *)safelyGetMergedTask:(NSString *)URLIdentifier {
__block AFImageDownloaderMergedTask *mergedTask;
dispatch_sync(self.synchronizationQueue, ^(){
mergedTask = self.mergedTasks[URLIdentifier];
});
return mergedTask;
}
@end
#endif

View File

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

View File

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

View File

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

View File

@ -2,10 +2,10 @@ AF_WORKSPACE="AFNetworking.xcworkspace"
AF_IOS_FRAMEWORK_SCHEME="AFNetworking iOS"
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_TVOS_EXAMPLE_SCHEME="tvOS Example"
AF_OSX_EXAMPLE_SCHEME="OS X Example"
AF_OSX_EXAMPLE_SCHEME="macOS Example"
FASTLANE_EXPLICIT_OPEN_SIMULATOR=1

View File

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

View File

@ -1,3 +1,3 @@
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"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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