From b91fa587b0965feadc986224b4e5f3e4bf88bb2a Mon Sep 17 00:00:00 2001 From: wenfei Date: Wed, 20 Aug 2025 18:13:41 +0800 Subject: [PATCH] first commit --- TwoNetworking/AFNetworking/.cocoadocs.yml | 7 + TwoNetworking/AFNetworking/.codecov.yml | 2 + .../AFNetworking/.github/issue_template.md | 33 + .../.github/pull_request_template.md | 13 + TwoNetworking/AFNetworking/.github/stale.yml | 33 + .../AFNetworking/.github/workflows/ci.yml | 68 + TwoNetworking/AFNetworking/.gitignore | 32 + TwoNetworking/AFNetworking/.ruby-gemset | 1 + TwoNetworking/AFNetworking/.ruby-version | 1 + .../AFNetworking/AFNetworking.podspec | 56 + .../AFNetworking.xcodeproj/project.pbxproj | 1686 ++++++ .../xcschemes/AFNetworking iOS.xcscheme | 144 + .../xcschemes/AFNetworking macOS.xcscheme | 117 + .../xcschemes/AFNetworking tvOS.xcscheme | 136 + .../xcschemes/AFNetworking watchOS.xcscheme | 76 + .../AFNetworking/AFCompatibilityMacros.h | 49 + .../AFNetworking/AFHTTPSessionManager.h | 285 + .../AFNetworking/AFHTTPSessionManager.m | 357 ++ .../AFNetworkReachabilityManager.h | 216 + .../AFNetworkReachabilityManager.m | 269 + .../AFNetworking/AFNetworking/AFNetworking.h | 41 + .../AFNetworking/AFSecurityPolicy.h | 161 + .../AFNetworking/AFSecurityPolicy.m | 341 ++ .../AFNetworking/AFURLRequestSerialization.h | 479 ++ .../AFNetworking/AFURLRequestSerialization.m | 1399 +++++ .../AFNetworking/AFURLResponseSerialization.h | 313 ++ .../AFNetworking/AFURLResponseSerialization.m | 836 +++ .../AFNetworking/AFURLSessionManager.h | 516 ++ .../AFNetworking/AFURLSessionManager.m | 1274 +++++ TwoNetworking/AFNetworking/CHANGELOG.md | 2244 ++++++++ TwoNetworking/AFNetworking/CONTRIBUTING.md | 96 + TwoNetworking/AFNetworking/CONTRIBUTING_CH.md | 97 + .../Example/AFNetworking Example.entitlements | 12 + .../project.pbxproj | 1401 +++++ .../xcschemes/iOS Example.xcscheme | 120 + .../iOS Today Extension Example.xcscheme | 129 + .../xcschemes/macOS Example.xcscheme | 120 + .../xcschemes/tvOS Example.xcscheme | 120 + .../xcschemes/watchOS Example.xcscheme | 139 + .../project.pbxproj | 438 ++ .../AppIcon.appiconset/Contents.json | 62 + .../Base.lproj/Interface.storyboard | 15 + .../Example/AFNetworking watchOS/Info.plist | 35 + .../AppIcon.appiconset/Contents.json | 110 + .../AppIcon.appiconset/Icon-40.png | Bin 0 -> 5051 bytes .../AppIcon.appiconset/Icon-40@2x.png | Bin 0 -> 8649 bytes .../AppIcon.appiconset/Icon-40@3x.png | Bin 0 -> 11725 bytes .../AppIcon.appiconset/Icon-60@2x.png | Bin 0 -> 11725 bytes .../AppIcon.appiconset/Icon-60@3x.png | Bin 0 -> 18908 bytes .../AppIcon.appiconset/Icon-76.png | Bin 0 -> 8223 bytes .../AppIcon.appiconset/Icon-76@2x.png | Bin 0 -> 15373 bytes .../AppIcon.appiconset/Icon-Small.png | Bin 0 -> 4195 bytes .../AppIcon.appiconset/Icon-Small@2x.png | Bin 0 -> 6599 bytes .../AppIcon.appiconset/Icon-Small@3x.png | Bin 0 -> 9300 bytes .../Example/Assets.xcassets/Contents.json | 6 + .../Contents.json | 22 + .../profile-image-placeholder.png | Bin 0 -> 1098 bytes .../profile-image-placeholder@2x.png | Bin 0 -> 2767 bytes .../AFNetworking/Example/Certificates/adn.cer | Bin 0 -> 1321 bytes .../Example/Certificates/digicert_ca_3.cer | Bin 0 -> 1628 bytes .../Example/Certificates/root_ca.cer | Bin 0 -> 969 bytes .../Example/Classes/Models/Post.h | 41 + .../Example/Classes/Models/Post.m | 92 + .../Example/Classes/Models/User.h | 42 + .../Example/Classes/Models/User.m | 130 + .../AFAppDotNetAPIClient.h | 30 + .../AFAppDotNetAPIClient.m | 40 + TwoNetworking/AFNetworking/Example/Prefix.pch | 21 + .../Base.lproj/MainInterface.storyboard | 70 + .../Today Extension Example/Info.plist | 48 + .../TodayViewController.h | 27 + .../TodayViewController.m | 106 + .../Example/en.lproj/MainMenu.xib | 4587 +++++++++++++++++ .../Example/iOS Example/AppDelegate.h | 30 + .../Example/iOS Example/AppDelegate.m | 49 + .../GlobalTimelineViewController.h | 27 + .../GlobalTimelineViewController.m | 103 + .../Example/iOS Example/Info.plist | 68 + .../iOS Example/Launchscreen.storyboard | 50 + .../iOS Example/Views/PostTableViewCell.h | 33 + .../iOS Example/Views/PostTableViewCell.m | 82 + .../Example/macOS Example/AppDelegate.h | 31 + .../Example/macOS Example/AppDelegate.m | 64 + .../AppIcon.appiconset/Contents.json | 58 + .../Example/macOS Example/Info.plist | 32 + .../Example/macOS Example/MainMenu.xib | 292 ++ .../AFNetworking/Example/macOS Example/main.m | 26 + TwoNetworking/AFNetworking/Example/main.m | 38 + ...FNetworking tvOS Example-Bridging-Header.h | 6 + .../Example/tvOS Example/AppDelegate.swift | 59 + .../Content.imageset/Contents.json | 16 + .../Back.imagestacklayer/Contents.json | 6 + .../App Icon - Large.imagestack/Contents.json | 17 + .../Content.imageset/Contents.json | 16 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 16 + .../Middle.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 16 + .../Back.imagestacklayer/Contents.json | 6 + .../App Icon - Small.imagestack/Contents.json | 17 + .../Content.imageset/Contents.json | 16 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 16 + .../Middle.imagestacklayer/Contents.json | 6 + .../Contents.json | 32 + .../Contents.json | 16 + .../Top Shelf Image.imageset/Contents.json | 16 + .../Assets.xcassets/Contents.json | 6 + .../LaunchImage.launchimage/Contents.json | 22 + .../tvOS Example/Base.lproj/Main.storyboard | 76 + .../Example/tvOS Example/Gravatar.swift | 113 + .../Example/tvOS Example/Info.plist | 32 + .../Example/tvOS Example/ViewController.swift | 79 + .../README__ignoredByTemplate__ | 1 + .../ExtensionDelegate.h | 26 + .../ExtensionDelegate.m | 39 + .../watchOS Example Extension/Info.plist | 40 + .../InterfaceController.h | 27 + .../InterfaceController.m | 51 + .../AppIcon.appiconset/Contents.json | 62 + .../Base.lproj/Interface.storyboard | 15 + .../Example/watchOS Example/Info.plist | 35 + .../AFNetworking/Framework/AFNetworking.h | 66 + .../AFNetworking/Framework/Info.plist | 26 + .../AFNetworking/Framework/module.modulemap | 5 + TwoNetworking/AFNetworking/Gemfile | 5 + TwoNetworking/AFNetworking/Gemfile.lock | 248 + TwoNetworking/AFNetworking/LICENSE | 19 + TwoNetworking/AFNetworking/Package.swift | 37 + TwoNetworking/AFNetworking/README.md | 298 ++ TwoNetworking/AFNetworking/Tests/Info.plist | 22 + .../ADN.net/ADNNetServerTrustChain/adn_0.cer | Bin 0 -> 1321 bytes .../ADN.net/ADNNetServerTrustChain/adn_1.cer | Bin 0 -> 1628 bytes .../ADN.net/ADNNetServerTrustChain/adn_2.cer | Bin 0 -> 969 bytes ...ifax_Secure_Certificate_Authority_Root.cer | Bin 0 -> 804 bytes .../Google.com/GeoTrust_Global_CA-cross.cer | Bin 0 -> 897 bytes .../Google.com/GeoTrust_Global_CA_Root.cer | Bin 0 -> 856 bytes .../googlecom_0.cer | Bin 0 -> 1965 bytes .../googlecom_1.cer | Bin 0 -> 1012 bytes .../googlecom_0.cer | Bin 0 -> 1965 bytes .../googlecom_1.cer | Bin 0 -> 1012 bytes .../googlecom_2.cer | Bin 0 -> 897 bytes .../Google.com/GoogleInternetAuthorityG2.cer | Bin 0 -> 1012 bytes .../Tests/Resources/Google.com/google.com.cer | Bin 0 -> 1965 bytes .../HTTPBin.org/Amazon Root CA 1.cer | Bin 0 -> 1174 bytes .../Tests/Resources/HTTPBin.org/Amazon.cer | Bin 0 -> 1101 bytes .../HTTPBinOrgServerTrustChain/httpbin_0.cer | Bin 0 -> 1394 bytes .../HTTPBinOrgServerTrustChain/httpbin_1.cer | Bin 0 -> 1101 bytes .../HTTPBinOrgServerTrustChain/httpbin_2.cer | Bin 0 -> 1174 bytes .../HTTPBinOrgServerTrustChain/httpbin_3.cer | Bin 0 -> 1145 bytes ...rvices Root Certificate Authority - G2.cer | Bin 0 -> 1145 bytes .../HTTPBin.org/httpbinorg_02182021.cer | Bin 0 -> 1394 bytes .../Tests/Resources/SelfSigned/AltName.cer | Bin 0 -> 766 bytes .../Tests/Resources/SelfSigned/NoDomains.cer | Bin 0 -> 747 bytes .../Tests/Resources/SelfSigned/foobar.com.cer | Bin 0 -> 747 bytes .../AFNetworking/Tests/Resources/logo.png | Bin 0 -> 14795 bytes .../AFNetworking/Tests/Tests-Prefix.pch | 9 + .../Tests/AFAutoPurgingImageCacheTests.m | 241 + .../Tests/AFCompoundResponseSerializerTests.m | 94 + .../Tests/AFHTTPRequestSerializationTests.m | 244 + .../Tests/AFHTTPResponseSerializationTests.m | 117 + .../Tests/Tests/AFHTTPSessionManagerTests.m | 694 +++ .../Tests/Tests/AFImageDownloaderTests.m | 600 +++ .../Tests/AFImageResponseSerializerTests.m | 98 + .../Tests/Tests/AFJSONSerializationTests.m | 228 + .../Tests/AFNetworkActivityManagerTests.m | 201 + .../Tests/AFNetworkReachabilityManagerTests.m | 141 + .../AFPropertyListRequestSerializerTests.m | 56 + .../AFPropertyListResponseSerializerTests.m | 94 + .../Tests/Tests/AFSecurityPolicyTests.m | 548 ++ .../AFNetworking/Tests/Tests/AFTestCase.h | 41 + .../AFNetworking/Tests/Tests/AFTestCase.m | 97 + .../Tests/AFUIActivityIndicatorViewTests.m | 121 + .../Tests/Tests/AFUIButtonTests.m | 110 + .../Tests/Tests/AFUIImageViewTests.m | 174 + .../Tests/Tests/AFUIRefreshControlTests.m | 116 + .../Tests/Tests/AFURLSessionManagerTests.m | 550 ++ .../Tests/Tests/AFWKWebViewTests.m | 136 + .../AFXMLDocumentResponseSerializerTests.m | 101 + .../AFXMLParserResponseSerializerTests.m | 89 + .../AFAutoPurgingImageCache.h | 160 + .../AFAutoPurgingImageCache.m | 205 + .../UIKit+AFNetworking/AFImageDownloader.h | 171 + .../UIKit+AFNetworking/AFImageDownloader.m | 421 ++ .../AFNetworkActivityIndicatorManager.h | 103 + .../AFNetworkActivityIndicatorManager.m | 239 + .../UIActivityIndicatorView+AFNetworking.h | 48 + .../UIActivityIndicatorView+AFNetworking.m | 114 + .../UIButton+AFNetworking.h | 175 + .../UIButton+AFNetworking.m | 302 ++ .../UIImageView+AFNetworking.h | 109 + .../UIImageView+AFNetworking.m | 159 + .../UIKit+AFNetworking/UIKit+AFNetworking.h | 43 + .../UIProgressView+AFNetworking.h | 64 + .../UIProgressView+AFNetworking.m | 126 + .../UIRefreshControl+AFNetworking.h | 53 + .../UIRefreshControl+AFNetworking.m | 113 + .../WKWebView+AFNetworking.h | 80 + .../WKWebView+AFNetworking.m | 154 + TwoNetworking/AFNetworking/fastlane/.env | 11 + .../AFNetworking/fastlane/.env.catalyst | 2 + .../AFNetworking/fastlane/.env.default | 4 + .../AFNetworking/fastlane/.env.deploy | 14 + .../AFNetworking/fastlane/.env.ios11_xcode94 | 2 + .../AFNetworking/fastlane/.env.ios12_xcode10 | 3 + .../AFNetworking/fastlane/.env.ios13_xcode11 | 3 + .../AFNetworking/fastlane/.env.macos | 2 + .../AFNetworking/fastlane/.env.tvos13_xcode11 | 3 + TwoNetworking/AFNetworking/fastlane/Fastfile | 4 + .../TwoNetworking.xcodeproj/project.pbxproj | 357 ++ .../contents.xcworkspacedata | 7 + TwoNetworking/TwoNetworking/1755680333205.jpg | Bin 0 -> 115695 bytes TwoNetworking/TwoNetworking/1755680367903.jpg | Bin 0 -> 86716 bytes TwoNetworking/TwoNetworking/AppDelegate.h | 15 + TwoNetworking/TwoNetworking/AppDelegate.m | 40 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 35 + .../Assets.xcassets/Contents.json | 6 + .../Base.lproj/LaunchScreen.storyboard | 25 + .../TwoNetworking/Base.lproj/Main.storyboard | 132 + TwoNetworking/TwoNetworking/Info.plist | 25 + TwoNetworking/TwoNetworking/NetworkTools.h | 30 + TwoNetworking/TwoNetworking/NetworkTools.m | 154 + TwoNetworking/TwoNetworking/RSAUtil.h | 44 + TwoNetworking/TwoNetworking/RSAUtil.m | 406 ++ TwoNetworking/TwoNetworking/SceneDelegate.h | 15 + TwoNetworking/TwoNetworking/SceneDelegate.m | 57 + TwoNetworking/TwoNetworking/ViewController.h | 23 + TwoNetworking/TwoNetworking/ViewController.m | 284 + TwoNetworking/TwoNetworking/main.m | 18 + 230 files changed, 31440 insertions(+) create mode 100644 TwoNetworking/AFNetworking/.cocoadocs.yml create mode 100644 TwoNetworking/AFNetworking/.codecov.yml create mode 100644 TwoNetworking/AFNetworking/.github/issue_template.md create mode 100644 TwoNetworking/AFNetworking/.github/pull_request_template.md create mode 100644 TwoNetworking/AFNetworking/.github/stale.yml create mode 100644 TwoNetworking/AFNetworking/.github/workflows/ci.yml create mode 100644 TwoNetworking/AFNetworking/.gitignore create mode 100644 TwoNetworking/AFNetworking/.ruby-gemset create mode 100644 TwoNetworking/AFNetworking/.ruby-version create mode 100644 TwoNetworking/AFNetworking/AFNetworking.podspec create mode 100644 TwoNetworking/AFNetworking/AFNetworking.xcodeproj/project.pbxproj create mode 100644 TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme create mode 100644 TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme create mode 100644 TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme create mode 100644 TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFCompatibilityMacros.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.m create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.m create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.m create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.h create mode 100755 TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.m create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.h create mode 100644 TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.m create mode 100644 TwoNetworking/AFNetworking/CHANGELOG.md create mode 100644 TwoNetworking/AFNetworking/CONTRIBUTING.md create mode 100644 TwoNetworking/AFNetworking/CONTRIBUTING_CH.md create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.entitlements create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/project.pbxproj create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard create mode 100644 TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Info.plist create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-76.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/profile-image-placeholder.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder.png create mode 100644 TwoNetworking/AFNetworking/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder@2x.png create mode 100644 TwoNetworking/AFNetworking/Example/Certificates/adn.cer create mode 100644 TwoNetworking/AFNetworking/Example/Certificates/digicert_ca_3.cer create mode 100644 TwoNetworking/AFNetworking/Example/Certificates/root_ca.cer create mode 100644 TwoNetworking/AFNetworking/Example/Classes/Models/Post.h create mode 100644 TwoNetworking/AFNetworking/Example/Classes/Models/Post.m create mode 100644 TwoNetworking/AFNetworking/Example/Classes/Models/User.h create mode 100644 TwoNetworking/AFNetworking/Example/Classes/Models/User.m create mode 100644 TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h create mode 100644 TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m create mode 100644 TwoNetworking/AFNetworking/Example/Prefix.pch create mode 100644 TwoNetworking/AFNetworking/Example/Today Extension Example/Base.lproj/MainInterface.storyboard create mode 100644 TwoNetworking/AFNetworking/Example/Today Extension Example/Info.plist create mode 100644 TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.h create mode 100644 TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.m create mode 100644 TwoNetworking/AFNetworking/Example/en.lproj/MainMenu.xib create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.h create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.m create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.h create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.m create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/Info.plist create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/Launchscreen.storyboard create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.h create mode 100644 TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.m create mode 100644 TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.h create mode 100644 TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.m create mode 100644 TwoNetworking/AFNetworking/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/macOS Example/Info.plist create mode 100644 TwoNetworking/AFNetworking/Example/macOS Example/MainMenu.xib create mode 100644 TwoNetworking/AFNetworking/Example/macOS Example/main.m create mode 100644 TwoNetworking/AFNetworking/Example/main.m create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/AppDelegate.swift create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Base.lproj/Main.storyboard create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Gravatar.swift create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/Info.plist create mode 100644 TwoNetworking/AFNetworking/Example/tvOS Example/ViewController.swift create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.h create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.m create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example Extension/Info.plist create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.h create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.m create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example/Base.lproj/Interface.storyboard create mode 100644 TwoNetworking/AFNetworking/Example/watchOS Example/Info.plist create mode 100644 TwoNetworking/AFNetworking/Framework/AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/Framework/Info.plist create mode 100644 TwoNetworking/AFNetworking/Framework/module.modulemap create mode 100644 TwoNetworking/AFNetworking/Gemfile create mode 100644 TwoNetworking/AFNetworking/Gemfile.lock create mode 100644 TwoNetworking/AFNetworking/LICENSE create mode 100644 TwoNetworking/AFNetworking/Package.swift create mode 100644 TwoNetworking/AFNetworking/README.md create mode 100644 TwoNetworking/AFNetworking/Tests/Info.plist create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_0.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_1.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_2.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/Equifax_Secure_Certificate_Authority_Root.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GeoTrust_Global_CA-cross.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GeoTrust_Global_CA_Root.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_0.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_1.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_0.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_1.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_2.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleInternetAuthorityG2.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/Google.com/google.com.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Amazon Root CA 1.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Amazon.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_1.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_2.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_3.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Starfield Services Root Certificate Authority - G2.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/httpbinorg_02182021.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/AltName.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/NoDomains.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/foobar.com.cer create mode 100644 TwoNetworking/AFNetworking/Tests/Resources/logo.png create mode 100644 TwoNetworking/AFNetworking/Tests/Tests-Prefix.pch create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFAutoPurgingImageCacheTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFCompoundResponseSerializerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFHTTPRequestSerializationTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFHTTPResponseSerializationTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFHTTPSessionManagerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFImageDownloaderTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFImageResponseSerializerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFJSONSerializationTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFNetworkActivityManagerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFNetworkReachabilityManagerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListRequestSerializerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListResponseSerializerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFSecurityPolicyTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.h create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFUIActivityIndicatorViewTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFUIButtonTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFUIImageViewTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFUIRefreshControlTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFURLSessionManagerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFWKWebViewTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFXMLDocumentResponseSerializerTests.m create mode 100644 TwoNetworking/AFNetworking/Tests/Tests/AFXMLParserResponseSerializerTests.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.h create mode 100644 TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.m create mode 100644 TwoNetworking/AFNetworking/fastlane/.env create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.catalyst create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.default create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.deploy create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.ios11_xcode94 create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.ios12_xcode10 create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.ios13_xcode11 create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.macos create mode 100644 TwoNetworking/AFNetworking/fastlane/.env.tvos13_xcode11 create mode 100644 TwoNetworking/AFNetworking/fastlane/Fastfile create mode 100644 TwoNetworking/TwoNetworking.xcodeproj/project.pbxproj create mode 100644 TwoNetworking/TwoNetworking.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 TwoNetworking/TwoNetworking/1755680333205.jpg create mode 100644 TwoNetworking/TwoNetworking/1755680367903.jpg create mode 100644 TwoNetworking/TwoNetworking/AppDelegate.h create mode 100644 TwoNetworking/TwoNetworking/AppDelegate.m create mode 100644 TwoNetworking/TwoNetworking/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 TwoNetworking/TwoNetworking/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 TwoNetworking/TwoNetworking/Assets.xcassets/Contents.json create mode 100644 TwoNetworking/TwoNetworking/Base.lproj/LaunchScreen.storyboard create mode 100644 TwoNetworking/TwoNetworking/Base.lproj/Main.storyboard create mode 100644 TwoNetworking/TwoNetworking/Info.plist create mode 100644 TwoNetworking/TwoNetworking/NetworkTools.h create mode 100644 TwoNetworking/TwoNetworking/NetworkTools.m create mode 100755 TwoNetworking/TwoNetworking/RSAUtil.h create mode 100755 TwoNetworking/TwoNetworking/RSAUtil.m create mode 100644 TwoNetworking/TwoNetworking/SceneDelegate.h create mode 100644 TwoNetworking/TwoNetworking/SceneDelegate.m create mode 100644 TwoNetworking/TwoNetworking/ViewController.h create mode 100644 TwoNetworking/TwoNetworking/ViewController.m create mode 100644 TwoNetworking/TwoNetworking/main.m diff --git a/TwoNetworking/AFNetworking/.cocoadocs.yml b/TwoNetworking/AFNetworking/.cocoadocs.yml new file mode 100644 index 0000000..aaf16cb --- /dev/null +++ b/TwoNetworking/AFNetworking/.cocoadocs.yml @@ -0,0 +1,7 @@ +highlight-color: "#F89915" +highlight-dark-color: "#E23B1B" +darker-color: "#D8A688" +darker-dark-color: "#E93D1C" +background-color: "#E9DFDB" +alt-link-color: "#E23B1B" +warning-color: "#E23B1B" diff --git a/TwoNetworking/AFNetworking/.codecov.yml b/TwoNetworking/AFNetworking/.codecov.yml new file mode 100644 index 0000000..951b97b --- /dev/null +++ b/TwoNetworking/AFNetworking/.codecov.yml @@ -0,0 +1,2 @@ +ignore: + - "Tests" diff --git a/TwoNetworking/AFNetworking/.github/issue_template.md b/TwoNetworking/AFNetworking/.github/issue_template.md new file mode 100644 index 0000000..7d2ed51 --- /dev/null +++ b/TwoNetworking/AFNetworking/.github/issue_template.md @@ -0,0 +1,33 @@ +> ℹ Please fill out this template when filing an issue. +> All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info. +> +> Per our [*CONTRIBUTING guidelines](https://github.com/AFNetworking/AFNetworking/blob/master/CONTRIBUTING.md), we use GitHub for +> bugs and feature requests, not general support. Other issues should be opened on Stack Overflow with the tag `afnetworking`. +> +> Please remove this line and everything above it before submitting. + +* [ ] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/AFNetworking/AFNetworking/blob/master/CONTRIBUTING.md). + +## What did you do? + +ℹ Please replace this with what you did. + +## What did you expect to happen? + +ℹ Please replace this with what you expected to happen. + +## What happened instead? + +ℹ Please replace this with of what happened instead. + +## AFNetworking Environment + +**AFNetworking version:** +**Xcode version:** +**Swift version:** +**Platform(s) running AFNetworking:** +**macOS version running Xcode:** + +## Demo Project + +ℹ Please link to or upload a project we can download that reproduces the issue. diff --git a/TwoNetworking/AFNetworking/.github/pull_request_template.md b/TwoNetworking/AFNetworking/.github/pull_request_template.md new file mode 100644 index 0000000..6e04c37 --- /dev/null +++ b/TwoNetworking/AFNetworking/.github/pull_request_template.md @@ -0,0 +1,13 @@ +### Issue Link :link: + + +### Goals :soccer: + + + +### Implementation Details :construction: + + + +### Testing Details :mag: + diff --git a/TwoNetworking/AFNetworking/.github/stale.yml b/TwoNetworking/AFNetworking/.github/stale.yml new file mode 100644 index 0000000..65f633c --- /dev/null +++ b/TwoNetworking/AFNetworking/.github/stale.yml @@ -0,0 +1,33 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 14 + +# Number of days of inactivity before a stale Issue or Pull Request is closed +daysUntilClose: 7 + +# Issues or Pull Requests with these labels will never be considered stale +exemptLabels: + - "support" + - "bug" + - "security" + +# Label to use when marking as stale +staleLabel: stale + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. + +# Comment to post when removing the stale label. Set to `false` to disable +unmarkComment: false + +# Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable +closeComment: > + This issue has been auto-closed because there hasn't been any activity for at least 21 days. + However, we really appreciate your contribution, so thank you for that! 🙏 + Also, feel free to [open a new issue](https://github.com/AFNetworking/AFNetworking/issues/new) if you still experience this problem 👍. + +# Limit to only `issues` +only: issues diff --git a/TwoNetworking/AFNetworking/.github/workflows/ci.yml b/TwoNetworking/AFNetworking/.github/workflows/ci.yml new file mode 100644 index 0000000..ec939bb --- /dev/null +++ b/TwoNetworking/AFNetworking/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +name: "AFNetworking CI" + +on: + push: + branches: + - master + pull_request: + branches: + - '*' + +jobs: + macOS: + name: Test macOS + runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer + steps: + - uses: actions/checkout@v2 + - name: macOS + run: fastlane ci_commit configuration:Debug --env macos + iOS: + name: Test iOS + runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer + steps: + - uses: actions/checkout@v2 + - name: iOS + run: fastlane ci_commit configuration:Debug --env ios13_xcode11 + Catalyst: + name: Test Catalyst + runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer + steps: + - uses: actions/checkout@v2 + - name: Catalyst + run: fastlane ci_commit configuration:Debug --env catalyst + tvOS: + name: Test tvOS + runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer + steps: + - uses: actions/checkout@v2 + - name: tvOS + run: fastlane ci_commit configuration:Debug --env tvos13_xcode11 + watchOS: + name: Build watchOS + runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer + strategy: + matrix: + destination: ["OS=6.1.1,name=Apple Watch Series 5 - 44mm"] #, "OS=4.2,name=Apple Watch Series 3 - 42mm", "OS=3.2,name=Apple Watch Series 2 - 42mm"] + steps: + - uses: actions/checkout@v2 + - name: watchOS - ${{ matrix.destination }} + run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -project "AFNetworking.xcodeproj" -scheme "AFNetworking watchOS" -destination "${{ matrix.destination }}" clean build | xcpretty + SPM: + name: Build with SPM + runs-on: macOS-latest + env: + DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer + steps: + - uses: actions/checkout@v2 + - name: SPM Build + run: swift build diff --git a/TwoNetworking/AFNetworking/.gitignore b/TwoNetworking/AFNetworking/.gitignore new file mode 100644 index 0000000..cddadc3 --- /dev/null +++ b/TwoNetworking/AFNetworking/.gitignore @@ -0,0 +1,32 @@ +# Xcode +.DS_Store +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +*.xcworkspace +!default.xcworkspace +xcuserdata +profile +*.moved-aside +DerivedData +.idea/ +Tests/Pods +Tests/Podfile.lock +Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/ +AFNetworking.framework.zip + +# Fastlane +/fastlane/report.xml +/fastlane/.env*private* +fastlane/test-output/* + +Carthage/Build + +fastlane/README.md +.build diff --git a/TwoNetworking/AFNetworking/.ruby-gemset b/TwoNetworking/AFNetworking/.ruby-gemset new file mode 100644 index 0000000..0edabf3 --- /dev/null +++ b/TwoNetworking/AFNetworking/.ruby-gemset @@ -0,0 +1 @@ +afnetworking diff --git a/TwoNetworking/AFNetworking/.ruby-version b/TwoNetworking/AFNetworking/.ruby-version new file mode 100644 index 0000000..24ba9a3 --- /dev/null +++ b/TwoNetworking/AFNetworking/.ruby-version @@ -0,0 +1 @@ +2.7.0 diff --git a/TwoNetworking/AFNetworking/AFNetworking.podspec b/TwoNetworking/AFNetworking/AFNetworking.podspec new file mode 100644 index 0000000..ef11034 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking.podspec @@ -0,0 +1,56 @@ +Pod::Spec.new do |s| + s.name = 'AFNetworking' + s.version = '4.0.1' + s.license = 'MIT' + s.summary = 'A delightful networking framework for Apple platforms.' + s.homepage = 'https://github.com/AFNetworking/AFNetworking' + s.social_media_url = 'https://twitter.com/AFNetworking' + s.authors = { 'Mattt Thompson' => 'm@mattt.me' } + s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => s.version } + + s.ios.deployment_target = '9.0' + s.osx.deployment_target = '10.10' + s.watchos.deployment_target = '2.0' + s.tvos.deployment_target = '9.0' + + s.ios.pod_target_xcconfig = { 'PRODUCT_BUNDLE_IDENTIFIER' => 'com.alamofire.AFNetworking' } + s.osx.pod_target_xcconfig = { 'PRODUCT_BUNDLE_IDENTIFIER' => 'com.alamofire.AFNetworking' } + s.watchos.pod_target_xcconfig = { 'PRODUCT_BUNDLE_IDENTIFIER' => 'com.alamofire.AFNetworking-watchOS' } + s.tvos.pod_target_xcconfig = { 'PRODUCT_BUNDLE_IDENTIFIER' => 'com.alamofire.AFNetworking' } + + s.source_files = 'AFNetworking/AFNetworking.h' + + s.subspec 'Serialization' do |ss| + ss.source_files = 'AFNetworking/AFURL{Request,Response}Serialization.{h,m}' + end + + s.subspec 'Security' do |ss| + ss.source_files = 'AFNetworking/AFSecurityPolicy.{h,m}' + end + + s.subspec 'Reachability' do |ss| + ss.ios.deployment_target = '9.0' + ss.osx.deployment_target = '10.10' + ss.tvos.deployment_target = '9.0' + + ss.source_files = 'AFNetworking/AFNetworkReachabilityManager.{h,m}' + end + + s.subspec 'NSURLSession' do |ss| + ss.dependency 'AFNetworking/Serialization' + ss.ios.dependency 'AFNetworking/Reachability' + ss.osx.dependency 'AFNetworking/Reachability' + ss.tvos.dependency 'AFNetworking/Reachability' + ss.dependency 'AFNetworking/Security' + + ss.source_files = 'AFNetworking/AF{URL,HTTP}SessionManager.{h,m}', 'AFNetworking/AFCompatibilityMacros.h' + end + + s.subspec 'UIKit' do |ss| + ss.ios.deployment_target = '9.0' + ss.tvos.deployment_target = '9.0' + ss.dependency 'AFNetworking/NSURLSession' + + ss.source_files = 'UIKit+AFNetworking' + end +end diff --git a/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/project.pbxproj b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c6b4daf --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/project.pbxproj @@ -0,0 +1,1686 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + 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 */; }; + 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 */; }; + 297824A51BC2D69A0041C395 /* adn_1.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A11BC2D69A0041C395 /* adn_1.cer */; }; + 297824A61BC2D69A0041C395 /* adn_1.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A11BC2D69A0041C395 /* adn_1.cer */; }; + 297824A71BC2D69A0041C395 /* adn_2.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A21BC2D69A0041C395 /* adn_2.cer */; }; + 297824A81BC2D69A0041C395 /* adn_2.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A21BC2D69A0041C395 /* adn_2.cer */; }; + 297824AA1BC2DAD80041C395 /* AFAutoPurgingImageCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C801BC2C88F00FD3B3E /* AFAutoPurgingImageCacheTests.m */; }; + 297824AB1BC2DB060041C395 /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 299522391BBF104D00859F49 /* AFNetworking.framework */; }; + 297824AC1BC2DB450041C395 /* AFImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C841BC2C88F00FD3B3E /* AFImageDownloaderTests.m */; }; + 297824AD1BC2DBA40041C395 /* AFNetworkActivityManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C861BC2C88F00FD3B3E /* AFNetworkActivityManagerTests.m */; }; + 297824AE1BC2DBD80041C395 /* AFUIActivityIndicatorViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8C1BC2C88F00FD3B3E /* AFUIActivityIndicatorViewTests.m */; }; + 297824AF1BC2DBEF0041C395 /* AFUIRefreshControlTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8E1BC2C88F00FD3B3E /* AFUIRefreshControlTests.m */; }; + 297824B01BC2DC2D0041C395 /* AFUIImageViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8D1BC2C88F00FD3B3E /* AFUIImageViewTests.m */; }; + 2987B0AF1BC408A200179A4C /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2987B0A51BC408A200179A4C /* AFNetworking.framework */; }; + 2987B0BC1BC408D900179A4C /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522471BBF125A00859F49 /* AFHTTPSessionManager.m */; }; + 2987B0BD1BC408D900179A4C /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224A1BBF125A00859F49 /* AFNetworkReachabilityManager.m */; }; + 2987B0BE1BC408D900179A4C /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224C1BBF125A00859F49 /* AFSecurityPolicy.m */; }; + 2987B0BF1BC408D900179A4C /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224E1BBF125A00859F49 /* AFURLRequestSerialization.m */; }; + 2987B0C01BC408D900179A4C /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522501BBF125A00859F49 /* AFURLResponseSerialization.m */; }; + 2987B0C11BC408D900179A4C /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522521BBF125A00859F49 /* AFURLSessionManager.m */; }; + 2987B0C21BC408F900179A4C /* AFAutoPurgingImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522871BBF13C700859F49 /* AFAutoPurgingImageCache.m */; }; + 2987B0C31BC408F900179A4C /* AFImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522891BBF13C700859F49 /* AFImageDownloader.m */; }; + 2987B0C41BC408F900179A4C /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995228D1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.m */; }; + 2987B0C51BC408F900179A4C /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522911BBF13C700859F49 /* UIButton+AFNetworking.m */; }; + 2987B0C61BC408F900179A4C /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522941BBF13C700859F49 /* UIImageView+AFNetworking.m */; }; + 2987B0C71BC408F900179A4C /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522971BBF13C700859F49 /* UIProgressView+AFNetworking.m */; }; + 2987B0CA1BC40A7600179A4C /* AFHTTPRequestSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C811BC2C88F00FD3B3E /* AFHTTPRequestSerializationTests.m */; }; + 2987B0CB1BC40A7600179A4C /* AFHTTPResponseSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */; }; + 2987B0CC1BC40A7600179A4C /* AFHTTPSessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */; }; + 2987B0CD1BC40A7600179A4C /* AFJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */; }; + 2987B0CE1BC40A7600179A4C /* AFNetworkReachabilityManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C871BC2C88F00FD3B3E /* AFNetworkReachabilityManagerTests.m */; }; + 2987B0CF1BC40A7600179A4C /* AFPropertyListResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */; }; + 2987B0D01BC40A7600179A4C /* AFSecurityPolicyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C891BC2C88F00FD3B3E /* AFSecurityPolicyTests.m */; }; + 2987B0D11BC40A7600179A4C /* AFURLSessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8F1BC2C88F00FD3B3E /* AFURLSessionManagerTests.m */; }; + 2987B0D21BC40AD800179A4C /* AFTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8B1BC2C88F00FD3B3E /* AFTestCase.m */; }; + 2987B0D31BC40AE900179A4C /* adn_0.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A01BC2D69A0041C395 /* adn_0.cer */; }; + 2987B0D41BC40AE900179A4C /* adn_1.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A11BC2D69A0041C395 /* adn_1.cer */; }; + 2987B0D51BC40AE900179A4C /* adn_2.cer in Resources */ = {isa = PBXBuildFile; fileRef = 297824A21BC2D69A0041C395 /* adn_2.cer */; }; + 2987B0D61BC40AEC00179A4C /* ADNNetServerTrustChain in Resources */ = {isa = PBXBuildFile; fileRef = 298D7CDF1BC2CB5A00FD3B3E /* ADNNetServerTrustChain */; }; + 2987B0D71BC40AF000179A4C /* HTTPBinOrgServerTrustChain in Resources */ = {isa = PBXBuildFile; fileRef = 298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */; }; + 2987B0DC1BC40AF600179A4C /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C771BC2C88F00FD3B3E /* logo.png */; }; + 2987B0DD1BC40AFB00179A4C /* AltName.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C791BC2C88F00FD3B3E /* AltName.cer */; }; + 2987B0DE1BC40AFB00179A4C /* foobar.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */; }; + 2987B0DF1BC40AFB00179A4C /* NoDomains.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C7B1BC2C88F00FD3B3E /* NoDomains.cer */; }; + 2987B0E01BC40B0900179A4C /* AFAutoPurgingImageCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C801BC2C88F00FD3B3E /* AFAutoPurgingImageCacheTests.m */; }; + 2987B0E11BC40B0900179A4C /* AFImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C841BC2C88F00FD3B3E /* AFImageDownloaderTests.m */; }; + 2987B0E31BC40B0900179A4C /* AFUIActivityIndicatorViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8C1BC2C88F00FD3B3E /* AFUIActivityIndicatorViewTests.m */; }; + 2987B0E41BC40B0900179A4C /* AFUIImageViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8D1BC2C88F00FD3B3E /* AFUIImageViewTests.m */; }; + 298D7C4F1BC2C7B200FD3B3E /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 299522771BBF136400859F49 /* AFNetworking.framework */; }; + 298D7C961BC2C94400FD3B3E /* AFTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8B1BC2C88F00FD3B3E /* AFTestCase.m */; }; + 298D7C971BC2C94500FD3B3E /* AFTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8B1BC2C88F00FD3B3E /* AFTestCase.m */; }; + 298D7C981BC2CA2500FD3B3E /* AFURLSessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8F1BC2C88F00FD3B3E /* AFURLSessionManagerTests.m */; }; + 298D7C991BC2CA2600FD3B3E /* AFURLSessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C8F1BC2C88F00FD3B3E /* AFURLSessionManagerTests.m */; }; + 298D7CB11BC2CA6E00FD3B3E /* AFHTTPRequestSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C811BC2C88F00FD3B3E /* AFHTTPRequestSerializationTests.m */; }; + 298D7CB21BC2CA6E00FD3B3E /* AFHTTPRequestSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C811BC2C88F00FD3B3E /* AFHTTPRequestSerializationTests.m */; }; + 298D7CB91BC2CA9800FD3B3E /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C771BC2C88F00FD3B3E /* logo.png */; }; + 298D7CBA1BC2CA9800FD3B3E /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C771BC2C88F00FD3B3E /* logo.png */; }; + 298D7CBB1BC2CA9C00FD3B3E /* AltName.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C791BC2C88F00FD3B3E /* AltName.cer */; }; + 298D7CBC1BC2CA9C00FD3B3E /* foobar.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */; }; + 298D7CBD1BC2CA9C00FD3B3E /* NoDomains.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C7B1BC2C88F00FD3B3E /* NoDomains.cer */; }; + 298D7CBE1BC2CA9D00FD3B3E /* AltName.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C791BC2C88F00FD3B3E /* AltName.cer */; }; + 298D7CBF1BC2CA9D00FD3B3E /* foobar.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */; }; + 298D7CC01BC2CA9D00FD3B3E /* NoDomains.cer in Resources */ = {isa = PBXBuildFile; fileRef = 298D7C7B1BC2C88F00FD3B3E /* NoDomains.cer */; }; + 298D7CD31BC2CAE800FD3B3E /* AFHTTPResponseSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */; }; + 298D7CD41BC2CAE900FD3B3E /* AFHTTPResponseSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */; }; + 298D7CD51BC2CAEC00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */; }; + 298D7CD61BC2CAED00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */; }; + 298D7CD71BC2CAEF00FD3B3E /* AFJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */; }; + 298D7CD81BC2CAF000FD3B3E /* AFJSONSerializationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */; }; + 298D7CD91BC2CAF200FD3B3E /* AFNetworkReachabilityManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C871BC2C88F00FD3B3E /* AFNetworkReachabilityManagerTests.m */; }; + 298D7CDA1BC2CAF300FD3B3E /* AFNetworkReachabilityManagerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C871BC2C88F00FD3B3E /* AFNetworkReachabilityManagerTests.m */; }; + 298D7CDB1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */; }; + 298D7CDC1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */; }; + 298D7CDD1BC2CAF700FD3B3E /* AFSecurityPolicyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C891BC2C88F00FD3B3E /* AFSecurityPolicyTests.m */; }; + 298D7CDE1BC2CAF800FD3B3E /* AFSecurityPolicyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 298D7C891BC2C88F00FD3B3E /* AFSecurityPolicyTests.m */; }; + 298D7CE01BC2CB5A00FD3B3E /* ADNNetServerTrustChain in Resources */ = {isa = PBXBuildFile; fileRef = 298D7CDF1BC2CB5A00FD3B3E /* ADNNetServerTrustChain */; }; + 298D7CE11BC2CB5A00FD3B3E /* ADNNetServerTrustChain in Resources */ = {isa = PBXBuildFile; fileRef = 298D7CDF1BC2CB5A00FD3B3E /* ADNNetServerTrustChain */; }; + 298D7CE31BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */ = {isa = PBXBuildFile; fileRef = 298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */; }; + 298D7CE41BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */ = {isa = PBXBuildFile; fileRef = 298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */; }; + 2995223D1BBF104D00859F49 /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995223C1BBF104D00859F49 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522531BBF125A00859F49 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522461BBF125A00859F49 /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522541BBF125A00859F49 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522471BBF125A00859F49 /* AFHTTPSessionManager.m */; }; + 299522561BBF125A00859F49 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522571BBF125A00859F49 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224A1BBF125A00859F49 /* AFNetworkReachabilityManager.m */; }; + 299522581BBF125A00859F49 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224B1BBF125A00859F49 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522591BBF125A00859F49 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224C1BBF125A00859F49 /* AFSecurityPolicy.m */; }; + 2995225A1BBF125A00859F49 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224D1BBF125A00859F49 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2995225B1BBF125A00859F49 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224E1BBF125A00859F49 /* AFURLRequestSerialization.m */; }; + 2995225C1BBF125A00859F49 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224F1BBF125A00859F49 /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2995225D1BBF125A00859F49 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522501BBF125A00859F49 /* AFURLResponseSerialization.m */; }; + 2995225E1BBF125A00859F49 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522511BBF125A00859F49 /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2995225F1BBF125A00859F49 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522521BBF125A00859F49 /* AFURLSessionManager.m */; }; + 2995226D1BBF133400859F49 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522471BBF125A00859F49 /* AFHTTPSessionManager.m */; }; + 2995226E1BBF133400859F49 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224C1BBF125A00859F49 /* AFSecurityPolicy.m */; }; + 2995226F1BBF133400859F49 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224E1BBF125A00859F49 /* AFURLRequestSerialization.m */; }; + 299522701BBF133400859F49 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522501BBF125A00859F49 /* AFURLResponseSerialization.m */; }; + 299522711BBF133400859F49 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522521BBF125A00859F49 /* AFURLSessionManager.m */; }; + 2995227F1BBF13A100859F49 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522471BBF125A00859F49 /* AFHTTPSessionManager.m */; }; + 299522801BBF13A100859F49 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224A1BBF125A00859F49 /* AFNetworkReachabilityManager.m */; }; + 299522811BBF13A100859F49 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224C1BBF125A00859F49 /* AFSecurityPolicy.m */; }; + 299522821BBF13A100859F49 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995224E1BBF125A00859F49 /* AFURLRequestSerialization.m */; }; + 299522831BBF13A100859F49 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522501BBF125A00859F49 /* AFURLResponseSerialization.m */; }; + 299522841BBF13A100859F49 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522521BBF125A00859F49 /* AFURLSessionManager.m */; }; + 2995229C1BBF13C700859F49 /* AFAutoPurgingImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522861BBF13C700859F49 /* AFAutoPurgingImageCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2995229D1BBF13C700859F49 /* AFAutoPurgingImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522871BBF13C700859F49 /* AFAutoPurgingImageCache.m */; }; + 2995229E1BBF13C700859F49 /* AFImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522881BBF13C700859F49 /* AFImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2995229F1BBF13C700859F49 /* AFImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522891BBF13C700859F49 /* AFImageDownloader.m */; }; + 299522A01BBF13C700859F49 /* AFNetworkActivityIndicatorManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995228A1BBF13C700859F49 /* AFNetworkActivityIndicatorManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522A11BBF13C700859F49 /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995228B1BBF13C700859F49 /* AFNetworkActivityIndicatorManager.m */; }; + 299522A21BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995228C1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522A31BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 2995228D1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.m */; }; + 299522A61BBF13C700859F49 /* UIButton+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522901BBF13C700859F49 /* UIButton+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522A71BBF13C700859F49 /* UIButton+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522911BBF13C700859F49 /* UIButton+AFNetworking.m */; }; + 299522A91BBF13C700859F49 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522931BBF13C700859F49 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522AA1BBF13C700859F49 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522941BBF13C700859F49 /* UIImageView+AFNetworking.m */; }; + 299522AC1BBF13C700859F49 /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522961BBF13C700859F49 /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522AD1BBF13C700859F49 /* UIProgressView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522971BBF13C700859F49 /* UIProgressView+AFNetworking.m */; }; + 299522AE1BBF13C700859F49 /* UIRefreshControl+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522981BBF13C700859F49 /* UIRefreshControl+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 299522AF1BBF13C700859F49 /* UIRefreshControl+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 299522991BBF13C700859F49 /* UIRefreshControl+AFNetworking.m */; }; + 29D3413F1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */; }; + 29D341401C20D46400A7D266 /* AFCompoundResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */; }; + 29D341411C20D46400A7D266 /* AFCompoundResponseSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */; }; + 29D96E7A1BCC3D6000F571A5 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522461BBF125A00859F49 /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E7C1BCC3D6000F571A5 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224B1BBF125A00859F49 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E7D1BCC3D6000F571A5 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224D1BBF125A00859F49 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E7E1BCC3D6000F571A5 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224F1BBF125A00859F49 /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E7F1BCC3D6000F571A5 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522511BBF125A00859F49 /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E801BCC3D6000F571A5 /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995223C1BBF104D00859F49 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E811BCC3D7200F571A5 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522461BBF125A00859F49 /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E821BCC3D7200F571A5 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E831BCC3D7200F571A5 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224B1BBF125A00859F49 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E841BCC3D7200F571A5 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224D1BBF125A00859F49 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E851BCC3D7200F571A5 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224F1BBF125A00859F49 /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E861BCC3D7200F571A5 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522511BBF125A00859F49 /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E871BCC3D7200F571A5 /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995223C1BBF104D00859F49 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E881BCC3D7D00F571A5 /* AFHTTPSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522461BBF125A00859F49 /* AFHTTPSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E891BCC3D7D00F571A5 /* AFNetworkReachabilityManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E8A1BCC3D7D00F571A5 /* AFSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224B1BBF125A00859F49 /* AFSecurityPolicy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E8B1BCC3D7D00F571A5 /* AFURLRequestSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224D1BBF125A00859F49 /* AFURLRequestSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E8C1BCC3D7D00F571A5 /* AFURLResponseSerialization.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995224F1BBF125A00859F49 /* AFURLResponseSerialization.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E8D1BCC3D7D00F571A5 /* AFURLSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522511BBF125A00859F49 /* AFURLSessionManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E8E1BCC3D7D00F571A5 /* AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995223C1BBF104D00859F49 /* AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E941BCC406B00F571A5 /* AFAutoPurgingImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522861BBF13C700859F49 /* AFAutoPurgingImageCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E951BCC406B00F571A5 /* AFImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522881BBF13C700859F49 /* AFImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E961BCC406B00F571A5 /* UIActivityIndicatorView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2995228C1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E971BCC406B00F571A5 /* UIButton+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522901BBF13C700859F49 /* UIButton+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E991BCC406B00F571A5 /* UIImageView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522931BBF13C700859F49 /* UIImageView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 29D96E9A1BCC406B00F571A5 /* UIProgressView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 299522961BBF13C700859F49 /* UIProgressView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 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 */; }; + 31CBC007242D8DF200934333 /* httpbinorg_02182021.cer in Resources */ = {isa = PBXBuildFile; fileRef = 31CBC006242D8DF200934333 /* httpbinorg_02182021.cer */; }; + 31CBC008242D8DF200934333 /* httpbinorg_02182021.cer in Resources */ = {isa = PBXBuildFile; fileRef = 31CBC006242D8DF200934333 /* httpbinorg_02182021.cer */; }; + 31CBC009242D8DF200934333 /* httpbinorg_02182021.cer in Resources */ = {isa = PBXBuildFile; fileRef = 31CBC006242D8DF200934333 /* httpbinorg_02182021.cer */; }; + 323D83E2231D185400C5BFC6 /* WKWebView+AFNetworking.h in Headers */ = {isa = PBXBuildFile; fileRef = 323D83E0231D185400C5BFC6 /* WKWebView+AFNetworking.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 323D83E3231D185400C5BFC6 /* WKWebView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 323D83E1231D185400C5BFC6 /* WKWebView+AFNetworking.m */; }; + 323D83E5231D188400C5BFC6 /* AFWKWebViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 323D83E4231D188400C5BFC6 /* AFWKWebViewTests.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 */; }; + 5F4323BE1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */; }; + 5F4323BF1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */; }; + 5F4323C01BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */; }; + 5F4323C11BF63741003B8749 /* google.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B51BF63741003B8749 /* google.com.cer */; }; + 5F4323C21BF63741003B8749 /* google.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B51BF63741003B8749 /* google.com.cer */; }; + 5F4323C31BF63741003B8749 /* google.com.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323B51BF63741003B8749 /* google.com.cer */; }; + 5F4323CD1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323BA1BF63741003B8749 /* GoogleInternetAuthorityG2.cer */; }; + 5F4323CE1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323BA1BF63741003B8749 /* GoogleInternetAuthorityG2.cer */; }; + 5F4323CF1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323BA1BF63741003B8749 /* GoogleInternetAuthorityG2.cer */; }; + 5F4323D51BF63CB0003B8749 /* GoogleComServerTrustChainPath1 in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323D41BF63CB0003B8749 /* GoogleComServerTrustChainPath1 */; }; + 5F4323D61BF63CB0003B8749 /* GoogleComServerTrustChainPath1 in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323D41BF63CB0003B8749 /* GoogleComServerTrustChainPath1 */; }; + 5F4323D71BF63CB0003B8749 /* GoogleComServerTrustChainPath1 in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323D41BF63CB0003B8749 /* GoogleComServerTrustChainPath1 */; }; + 5F4323D91BF63CBA003B8749 /* GoogleComServerTrustChainPath2 in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323D81BF63CBA003B8749 /* GoogleComServerTrustChainPath2 */; }; + 5F4323DA1BF63CBA003B8749 /* GoogleComServerTrustChainPath2 in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323D81BF63CBA003B8749 /* GoogleComServerTrustChainPath2 */; }; + 5F4323DB1BF63CBA003B8749 /* GoogleComServerTrustChainPath2 in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323D81BF63CBA003B8749 /* GoogleComServerTrustChainPath2 */; }; + 5F4323DD1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323DC1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer */; }; + 5F4323DE1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323DC1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer */; }; + 5F4323DF1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */ = {isa = PBXBuildFile; fileRef = 5F4323DC1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer */; }; + E2B10D8E233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8B233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer */; }; + E2B10D8F233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8B233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer */; }; + E2B10D90233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8B233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer */; }; + E2B10D91233035100004E005 /* Amazon Root CA 1.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8C233035100004E005 /* Amazon Root CA 1.cer */; }; + E2B10D92233035100004E005 /* Amazon Root CA 1.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8C233035100004E005 /* Amazon Root CA 1.cer */; }; + E2B10D93233035100004E005 /* Amazon Root CA 1.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8C233035100004E005 /* Amazon Root CA 1.cer */; }; + E2B10D94233035100004E005 /* Amazon.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8D233035100004E005 /* Amazon.cer */; }; + E2B10D95233035100004E005 /* Amazon.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8D233035100004E005 /* Amazon.cer */; }; + E2B10D96233035100004E005 /* Amazon.cer in Resources */ = {isa = PBXBuildFile; fileRef = E2B10D8D233035100004E005 /* Amazon.cer */; }; + E91164651DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */; }; + E91164661DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */; }; + E91164671DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 2987B0B01BC408A200179A4C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 299522301BBF104D00859F49 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2987B0A41BC408A200179A4C; + remoteInfo = "AFNetworking tvOS"; + }; + 298D7C411BC2C79500FD3B3E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 299522301BBF104D00859F49 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 299522381BBF104D00859F49; + remoteInfo = "AFNetworking iOS"; + }; + 298D7C501BC2C7B200FD3B3E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 299522301BBF104D00859F49 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 299522761BBF136400859F49; + remoteInfo = "AFNetworking OS X"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageResponseSerializerTests.m; sourceTree = ""; }; + 1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AFCompatibilityMacros.h; sourceTree = ""; }; + 2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFUIButtonTests.m; sourceTree = ""; }; + 297824A01BC2D69A0041C395 /* adn_0.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_0.cer; path = ADNNetServerTrustChain/adn_0.cer; sourceTree = ""; }; + 297824A11BC2D69A0041C395 /* adn_1.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_1.cer; path = ADNNetServerTrustChain/adn_1.cer; sourceTree = ""; }; + 297824A21BC2D69A0041C395 /* adn_2.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = adn_2.cer; path = ADNNetServerTrustChain/adn_2.cer; sourceTree = ""; }; + 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 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 = ""; }; + 298D7C791BC2C88F00FD3B3E /* AltName.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = AltName.cer; sourceTree = ""; }; + 298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = foobar.com.cer; sourceTree = ""; }; + 298D7C7B1BC2C88F00FD3B3E /* NoDomains.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = NoDomains.cer; sourceTree = ""; }; + 298D7C801BC2C88F00FD3B3E /* AFAutoPurgingImageCacheTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFAutoPurgingImageCacheTests.m; sourceTree = ""; }; + 298D7C811BC2C88F00FD3B3E /* AFHTTPRequestSerializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestSerializationTests.m; sourceTree = ""; }; + 298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFHTTPResponseSerializationTests.m; sourceTree = ""; }; + 298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFHTTPSessionManagerTests.m; sourceTree = ""; }; + 298D7C841BC2C88F00FD3B3E /* AFImageDownloaderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFImageDownloaderTests.m; sourceTree = ""; }; + 298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFJSONSerializationTests.m; sourceTree = ""; }; + 298D7C861BC2C88F00FD3B3E /* AFNetworkActivityManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityManagerTests.m; sourceTree = ""; }; + 298D7C871BC2C88F00FD3B3E /* AFNetworkReachabilityManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFNetworkReachabilityManagerTests.m; sourceTree = ""; }; + 298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListResponseSerializerTests.m; sourceTree = ""; }; + 298D7C891BC2C88F00FD3B3E /* AFSecurityPolicyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicyTests.m; sourceTree = ""; }; + 298D7C8A1BC2C88F00FD3B3E /* AFTestCase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AFTestCase.h; sourceTree = ""; }; + 298D7C8B1BC2C88F00FD3B3E /* AFTestCase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFTestCase.m; sourceTree = ""; }; + 298D7C8C1BC2C88F00FD3B3E /* AFUIActivityIndicatorViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFUIActivityIndicatorViewTests.m; sourceTree = ""; }; + 298D7C8D1BC2C88F00FD3B3E /* AFUIImageViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFUIImageViewTests.m; sourceTree = ""; }; + 298D7C8E1BC2C88F00FD3B3E /* AFUIRefreshControlTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFUIRefreshControlTests.m; sourceTree = ""; }; + 298D7C8F1BC2C88F00FD3B3E /* AFURLSessionManagerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFURLSessionManagerTests.m; sourceTree = ""; }; + 298D7CDF1BC2CB5A00FD3B3E /* ADNNetServerTrustChain */ = {isa = PBXFileReference; lastKnownFileType = folder; path = ADNNetServerTrustChain; sourceTree = ""; }; + 298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */ = {isa = PBXFileReference; lastKnownFileType = folder; path = HTTPBinOrgServerTrustChain; sourceTree = ""; }; + 299522391BBF104D00859F49 /* AFNetworking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AFNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2995223C1BBF104D00859F49 /* AFNetworking.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = ../Framework/AFNetworking.h; sourceTree = ""; }; + 2995223E1BBF104D00859F49 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ../Framework/Info.plist; sourceTree = ""; }; + 299522461BBF125A00859F49 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPSessionManager.h; sourceTree = ""; }; + 299522471BBF125A00859F49 /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPSessionManager.m; sourceTree = ""; }; + 299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkReachabilityManager.h; sourceTree = ""; }; + 2995224A1BBF125A00859F49 /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkReachabilityManager.m; sourceTree = ""; }; + 2995224B1BBF125A00859F49 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSecurityPolicy.h; sourceTree = ""; }; + 2995224C1BBF125A00859F49 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicy.m; sourceTree = ""; }; + 2995224D1BBF125A00859F49 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLRequestSerialization.h; sourceTree = ""; }; + 2995224E1BBF125A00859F49 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLRequestSerialization.m; sourceTree = ""; }; + 2995224F1BBF125A00859F49 /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLResponseSerialization.h; sourceTree = ""; }; + 299522501BBF125A00859F49 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLResponseSerialization.m; sourceTree = ""; }; + 299522511BBF125A00859F49 /* AFURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLSessionManager.h; sourceTree = ""; }; + 299522521BBF125A00859F49 /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLSessionManager.m; sourceTree = ""; }; + 299522651BBF129200859F49 /* AFNetworking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AFNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 299522771BBF136400859F49 /* AFNetworking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AFNetworking.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 299522861BBF13C700859F49 /* AFAutoPurgingImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFAutoPurgingImageCache.h; sourceTree = ""; }; + 299522871BBF13C700859F49 /* AFAutoPurgingImageCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFAutoPurgingImageCache.m; sourceTree = ""; }; + 299522881BBF13C700859F49 /* AFImageDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageDownloader.h; sourceTree = ""; }; + 299522891BBF13C700859F49 /* AFImageDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageDownloader.m; sourceTree = ""; }; + 2995228A1BBF13C700859F49 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = ""; }; + 2995228B1BBF13C700859F49 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = ""; }; + 2995228C1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIActivityIndicatorView+AFNetworking.h"; sourceTree = ""; }; + 2995228D1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIActivityIndicatorView+AFNetworking.m"; sourceTree = ""; }; + 299522901BBF13C700859F49 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+AFNetworking.h"; sourceTree = ""; }; + 299522911BBF13C700859F49 /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+AFNetworking.m"; sourceTree = ""; }; + 299522931BBF13C700859F49 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = ""; }; + 299522941BBF13C700859F49 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = ""; }; + 299522951BBF13C700859F49 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIKit+AFNetworking.h"; sourceTree = ""; }; + 299522961BBF13C700859F49 /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIProgressView+AFNetworking.h"; sourceTree = ""; }; + 299522971BBF13C700859F49 /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIProgressView+AFNetworking.m"; sourceTree = ""; }; + 299522981BBF13C700859F49 /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIRefreshControl+AFNetworking.h"; sourceTree = ""; }; + 299522991BBF13C700859F49 /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIRefreshControl+AFNetworking.m"; sourceTree = ""; }; + 29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFCompoundResponseSerializerTests.m; sourceTree = ""; }; + 2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLParserResponseSerializerTests.m; sourceTree = ""; }; + 2D4563931DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLDocumentResponseSerializerTests.m; sourceTree = ""; }; + 31CBC006242D8DF200934333 /* httpbinorg_02182021.cer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = httpbinorg_02182021.cer; sourceTree = ""; }; + 323D83E0231D185400C5BFC6 /* WKWebView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WKWebView+AFNetworking.h"; sourceTree = ""; }; + 323D83E1231D185400C5BFC6 /* WKWebView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "WKWebView+AFNetworking.m"; sourceTree = ""; }; + 323D83E4231D188400C5BFC6 /* AFWKWebViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFWKWebViewTests.m; sourceTree = ""; }; + 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = Equifax_Secure_Certificate_Authority_Root.cer; sourceTree = ""; }; + 5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "GeoTrust_Global_CA-cross.cer"; sourceTree = ""; }; + 5F4323B51BF63741003B8749 /* google.com.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = google.com.cer; sourceTree = ""; }; + 5F4323BA1BF63741003B8749 /* GoogleInternetAuthorityG2.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = GoogleInternetAuthorityG2.cer; sourceTree = ""; }; + 5F4323D41BF63CB0003B8749 /* GoogleComServerTrustChainPath1 */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GoogleComServerTrustChainPath1; sourceTree = ""; }; + 5F4323D81BF63CBA003B8749 /* GoogleComServerTrustChainPath2 */ = {isa = PBXFileReference; lastKnownFileType = folder; path = GoogleComServerTrustChainPath2; sourceTree = ""; }; + 5F4323DC1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GeoTrust_Global_CA_Root.cer; sourceTree = ""; }; + E2B10D8B233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Starfield Services Root Certificate Authority - G2.cer"; sourceTree = ""; }; + E2B10D8C233035100004E005 /* Amazon Root CA 1.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Amazon Root CA 1.cer"; sourceTree = ""; }; + E2B10D8D233035100004E005 /* Amazon.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = Amazon.cer; sourceTree = ""; }; + E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestSerializerTests.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2987B0A11BC408A200179A4C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2987B0AB1BC408A200179A4C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2987B0AF1BC408A200179A4C /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 298D7C381BC2C79500FD3B3E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 297824AB1BC2DB060041C395 /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 298D7C471BC2C7B200FD3B3E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 298D7C4F1BC2C7B200FD3B3E /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522351BBF104D00859F49 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522611BBF129200859F49 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522731BBF136400859F49 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 298D7C561BC2C88F00FD3B3E /* Tests */ = { + isa = PBXGroup; + children = ( + 298D7C671BC2C88F00FD3B3E /* Resources */, + 298D7C7F1BC2C88F00FD3B3E /* Tests */, + ); + path = Tests; + sourceTree = ""; + }; + 298D7C671BC2C88F00FD3B3E /* Resources */ = { + isa = PBXGroup; + children = ( + 298D7C681BC2C88F00FD3B3E /* ADN.net */, + 298D7C6D1BC2C88F00FD3B3E /* HTTPBin.org */, + 298D7C771BC2C88F00FD3B3E /* logo.png */, + 298D7C781BC2C88F00FD3B3E /* SelfSigned */, + 5F4323B21BF63741003B8749 /* Google.com */, + ); + path = Resources; + sourceTree = ""; + }; + 298D7C681BC2C88F00FD3B3E /* ADN.net */ = { + isa = PBXGroup; + children = ( + 297824A01BC2D69A0041C395 /* adn_0.cer */, + 297824A11BC2D69A0041C395 /* adn_1.cer */, + 297824A21BC2D69A0041C395 /* adn_2.cer */, + 298D7CDF1BC2CB5A00FD3B3E /* ADNNetServerTrustChain */, + ); + path = ADN.net; + sourceTree = ""; + }; + 298D7C6D1BC2C88F00FD3B3E /* HTTPBin.org */ = { + isa = PBXGroup; + children = ( + E2B10D8C233035100004E005 /* Amazon Root CA 1.cer */, + E2B10D8D233035100004E005 /* Amazon.cer */, + E2B10D8B233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer */, + 298D7CE21BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain */, + 31CBC006242D8DF200934333 /* httpbinorg_02182021.cer */, + ); + path = HTTPBin.org; + sourceTree = ""; + }; + 298D7C781BC2C88F00FD3B3E /* SelfSigned */ = { + isa = PBXGroup; + children = ( + 298D7C791BC2C88F00FD3B3E /* AltName.cer */, + 298D7C7A1BC2C88F00FD3B3E /* foobar.com.cer */, + 298D7C7B1BC2C88F00FD3B3E /* NoDomains.cer */, + ); + path = SelfSigned; + sourceTree = ""; + }; + 298D7C7F1BC2C88F00FD3B3E /* Tests */ = { + isa = PBXGroup; + children = ( + 298D7CD21BC2CAD500FD3B3E /* AFNetworking UIKit Tests */, + 298D7CD11BC2CABE00FD3B3E /* AFNetworking Tests */, + 298D7C8A1BC2C88F00FD3B3E /* AFTestCase.h */, + 298D7C8B1BC2C88F00FD3B3E /* AFTestCase.m */, + ); + path = Tests; + sourceTree = ""; + }; + 298D7CD11BC2CABE00FD3B3E /* AFNetworking Tests */ = { + isa = PBXGroup; + children = ( + 29D3413E1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m */, + 298D7C811BC2C88F00FD3B3E /* AFHTTPRequestSerializationTests.m */, + 298D7C821BC2C88F00FD3B3E /* AFHTTPResponseSerializationTests.m */, + 298D7C831BC2C88F00FD3B3E /* AFHTTPSessionManagerTests.m */, + 1BF9F95F1C87832B00F1F35A /* AFImageResponseSerializerTests.m */, + 298D7C851BC2C88F00FD3B3E /* AFJSONSerializationTests.m */, + 298D7C871BC2C88F00FD3B3E /* AFNetworkReachabilityManagerTests.m */, + E91164641DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m */, + 298D7C881BC2C88F00FD3B3E /* AFPropertyListResponseSerializerTests.m */, + 298D7C891BC2C88F00FD3B3E /* AFSecurityPolicyTests.m */, + 298D7C8F1BC2C88F00FD3B3E /* AFURLSessionManagerTests.m */, + 2D4563931DB11DDB00AE4812 /* AFXMLDocumentResponseSerializerTests.m */, + 2D45638F1DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m */, + ); + name = "AFNetworking Tests"; + sourceTree = ""; + }; + 298D7CD21BC2CAD500FD3B3E /* AFNetworking UIKit Tests */ = { + isa = PBXGroup; + children = ( + 298D7C801BC2C88F00FD3B3E /* AFAutoPurgingImageCacheTests.m */, + 298D7C841BC2C88F00FD3B3E /* AFImageDownloaderTests.m */, + 298D7C861BC2C88F00FD3B3E /* AFNetworkActivityManagerTests.m */, + 298D7C8C1BC2C88F00FD3B3E /* AFUIActivityIndicatorViewTests.m */, + 2960BAC21C1B2F1A00BA02F0 /* AFUIButtonTests.m */, + 298D7C8D1BC2C88F00FD3B3E /* AFUIImageViewTests.m */, + 298D7C8E1BC2C88F00FD3B3E /* AFUIRefreshControlTests.m */, + 323D83E4231D188400C5BFC6 /* AFWKWebViewTests.m */, + ); + name = "AFNetworking UIKit Tests"; + sourceTree = ""; + }; + 2995222F1BBF104D00859F49 = { + isa = PBXGroup; + children = ( + 299522451BBF125A00859F49 /* AFNetworking */, + 299522851BBF13C700859F49 /* UIKit+AFNetworking */, + 2995223B1BBF104D00859F49 /* Supporting Files */, + 298D7C561BC2C88F00FD3B3E /* Tests */, + 2995223A1BBF104D00859F49 /* Products */, + ); + indentWidth = 4; + sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + }; + 2995223A1BBF104D00859F49 /* Products */ = { + isa = PBXGroup; + children = ( + 299522391BBF104D00859F49 /* AFNetworking.framework */, + 299522651BBF129200859F49 /* AFNetworking.framework */, + 299522771BBF136400859F49 /* AFNetworking.framework */, + 298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */, + 298D7C4A1BC2C7B200FD3B3E /* AFNetworking macOS Tests.xctest */, + 2987B0A51BC408A200179A4C /* AFNetworking.framework */, + 2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 2995223B1BBF104D00859F49 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 2995223C1BBF104D00859F49 /* AFNetworking.h */, + 2995223E1BBF104D00859F49 /* Info.plist */, + ); + name = "Supporting Files"; + path = AFNetworking; + sourceTree = ""; + }; + 299522451BBF125A00859F49 /* AFNetworking */ = { + isa = PBXGroup; + children = ( + 1F083A4920364648004D80C7 /* AFCompatibilityMacros.h */, + 299522461BBF125A00859F49 /* AFHTTPSessionManager.h */, + 299522471BBF125A00859F49 /* AFHTTPSessionManager.m */, + 299522491BBF125A00859F49 /* AFNetworkReachabilityManager.h */, + 2995224A1BBF125A00859F49 /* AFNetworkReachabilityManager.m */, + 2995224B1BBF125A00859F49 /* AFSecurityPolicy.h */, + 2995224C1BBF125A00859F49 /* AFSecurityPolicy.m */, + 2995224D1BBF125A00859F49 /* AFURLRequestSerialization.h */, + 2995224E1BBF125A00859F49 /* AFURLRequestSerialization.m */, + 2995224F1BBF125A00859F49 /* AFURLResponseSerialization.h */, + 299522501BBF125A00859F49 /* AFURLResponseSerialization.m */, + 299522511BBF125A00859F49 /* AFURLSessionManager.h */, + 299522521BBF125A00859F49 /* AFURLSessionManager.m */, + ); + path = AFNetworking; + sourceTree = ""; + }; + 299522851BBF13C700859F49 /* UIKit+AFNetworking */ = { + isa = PBXGroup; + children = ( + 299522861BBF13C700859F49 /* AFAutoPurgingImageCache.h */, + 299522871BBF13C700859F49 /* AFAutoPurgingImageCache.m */, + 299522881BBF13C700859F49 /* AFImageDownloader.h */, + 299522891BBF13C700859F49 /* AFImageDownloader.m */, + 2995228A1BBF13C700859F49 /* AFNetworkActivityIndicatorManager.h */, + 2995228B1BBF13C700859F49 /* AFNetworkActivityIndicatorManager.m */, + 2995228C1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h */, + 2995228D1BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.m */, + 299522901BBF13C700859F49 /* UIButton+AFNetworking.h */, + 299522911BBF13C700859F49 /* UIButton+AFNetworking.m */, + 299522931BBF13C700859F49 /* UIImageView+AFNetworking.h */, + 299522941BBF13C700859F49 /* UIImageView+AFNetworking.m */, + 299522951BBF13C700859F49 /* UIKit+AFNetworking.h */, + 299522961BBF13C700859F49 /* UIProgressView+AFNetworking.h */, + 299522971BBF13C700859F49 /* UIProgressView+AFNetworking.m */, + 299522981BBF13C700859F49 /* UIRefreshControl+AFNetworking.h */, + 299522991BBF13C700859F49 /* UIRefreshControl+AFNetworking.m */, + 323D83E0231D185400C5BFC6 /* WKWebView+AFNetworking.h */, + 323D83E1231D185400C5BFC6 /* WKWebView+AFNetworking.m */, + ); + path = "UIKit+AFNetworking"; + sourceTree = ""; + }; + 5F4323B21BF63741003B8749 /* Google.com */ = { + isa = PBXGroup; + children = ( + 5F4323D41BF63CB0003B8749 /* GoogleComServerTrustChainPath1 */, + 5F4323D81BF63CBA003B8749 /* GoogleComServerTrustChainPath2 */, + 5F4323B31BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer */, + 5F4323DC1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer */, + 5F4323B41BF63741003B8749 /* GeoTrust_Global_CA-cross.cer */, + 5F4323BA1BF63741003B8749 /* GoogleInternetAuthorityG2.cer */, + 5F4323B51BF63741003B8749 /* google.com.cer */, + ); + path = Google.com; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 2987B0A21BC408A200179A4C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 29D96E881BCC3D7D00F571A5 /* AFHTTPSessionManager.h in Headers */, + 29D96E891BCC3D7D00F571A5 /* AFNetworkReachabilityManager.h in Headers */, + 29D96E8A1BCC3D7D00F571A5 /* AFSecurityPolicy.h in Headers */, + 29D96E8B1BCC3D7D00F571A5 /* AFURLRequestSerialization.h in Headers */, + 29D96E8C1BCC3D7D00F571A5 /* AFURLResponseSerialization.h in Headers */, + 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 */, + 29D96E991BCC406B00F571A5 /* UIImageView+AFNetworking.h in Headers */, + 29D96E9A1BCC406B00F571A5 /* UIProgressView+AFNetworking.h in Headers */, + 29D96E8E1BCC3D7D00F571A5 /* AFNetworking.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522361BBF104D00859F49 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2995225A1BBF125A00859F49 /* AFURLRequestSerialization.h in Headers */, + 299522531BBF125A00859F49 /* AFHTTPSessionManager.h in Headers */, + 2995229C1BBF13C700859F49 /* AFAutoPurgingImageCache.h in Headers */, + 299522581BBF125A00859F49 /* AFSecurityPolicy.h in Headers */, + 299522561BBF125A00859F49 /* AFNetworkReachabilityManager.h in Headers */, + 299522A91BBF13C700859F49 /* UIImageView+AFNetworking.h in Headers */, + 2995229E1BBF13C700859F49 /* AFImageDownloader.h in Headers */, + 2995225E1BBF125A00859F49 /* AFURLSessionManager.h in Headers */, + 323D83E2231D185400C5BFC6 /* WKWebView+AFNetworking.h in Headers */, + 2995225C1BBF125A00859F49 /* AFURLResponseSerialization.h in Headers */, + 299522A21BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.h in Headers */, + 1F96D2A4203649560085FC3F /* AFCompatibilityMacros.h in Headers */, + 2995223D1BBF104D00859F49 /* AFNetworking.h in Headers */, + 299522AC1BBF13C700859F49 /* UIProgressView+AFNetworking.h in Headers */, + 299522A61BBF13C700859F49 /* UIButton+AFNetworking.h in Headers */, + 299522A01BBF13C700859F49 /* AFNetworkActivityIndicatorManager.h in Headers */, + 299522AE1BBF13C700859F49 /* UIRefreshControl+AFNetworking.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522621BBF129200859F49 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + 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 */, + 29D96E801BCC3D6000F571A5 /* AFNetworking.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522741BBF136400859F49 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 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 */, + 29D96E871BCC3D7200F571A5 /* AFNetworking.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2987B0A41BC408A200179A4C /* AFNetworking tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2987B0BA1BC408A200179A4C /* Build configuration list for PBXNativeTarget "AFNetworking tvOS" */; + buildPhases = ( + 2987B0A01BC408A200179A4C /* Sources */, + 2987B0A11BC408A200179A4C /* Frameworks */, + 2987B0A21BC408A200179A4C /* Headers */, + 2987B0A31BC408A200179A4C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AFNetworking tvOS"; + productName = "AFNetworking tvOS"; + productReference = 2987B0A51BC408A200179A4C /* AFNetworking.framework */; + productType = "com.apple.product-type.framework"; + }; + 2987B0AD1BC408A200179A4C /* AFNetworking tvOS Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2987B0BB1BC408A200179A4C /* Build configuration list for PBXNativeTarget "AFNetworking tvOS Tests" */; + buildPhases = ( + 2987B0AA1BC408A200179A4C /* Sources */, + 2987B0AB1BC408A200179A4C /* Frameworks */, + 2987B0AC1BC408A200179A4C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2987B0B11BC408A200179A4C /* PBXTargetDependency */, + ); + name = "AFNetworking tvOS Tests"; + productName = "AFNetworking tvOSTests"; + productReference = 2987B0AE1BC408A200179A4C /* AFNetworking tvOS Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 298D7C3A1BC2C79500FD3B3E /* AFNetworking iOS Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 298D7C451BC2C79600FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking iOS Tests" */; + buildPhases = ( + 298D7C371BC2C79500FD3B3E /* Sources */, + 298D7C381BC2C79500FD3B3E /* Frameworks */, + 298D7C391BC2C79500FD3B3E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 298D7C421BC2C79500FD3B3E /* PBXTargetDependency */, + ); + name = "AFNetworking iOS Tests"; + productName = "AFNetworking iOS Tests"; + productReference = 298D7C3B1BC2C79500FD3B3E /* AFNetworking iOS Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 298D7C491BC2C7B200FD3B3E /* AFNetworking macOS Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking macOS Tests" */; + buildPhases = ( + 298D7C461BC2C7B200FD3B3E /* Sources */, + 298D7C471BC2C7B200FD3B3E /* Frameworks */, + 298D7C481BC2C7B200FD3B3E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */, + ); + name = "AFNetworking macOS Tests"; + productName = "AFNetworking Mac OS X Tests"; + productReference = 298D7C4A1BC2C7B200FD3B3E /* AFNetworking macOS Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 299522381BBF104D00859F49 /* AFNetworking iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 299522411BBF104D00859F49 /* Build configuration list for PBXNativeTarget "AFNetworking iOS" */; + buildPhases = ( + 299522341BBF104D00859F49 /* Sources */, + 299522351BBF104D00859F49 /* Frameworks */, + 299522361BBF104D00859F49 /* Headers */, + 299522371BBF104D00859F49 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AFNetworking iOS"; + productName = AFNetworking; + productReference = 299522391BBF104D00859F49 /* AFNetworking.framework */; + productType = "com.apple.product-type.framework"; + }; + 299522641BBF129200859F49 /* AFNetworking watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2995226A1BBF129200859F49 /* Build configuration list for PBXNativeTarget "AFNetworking watchOS" */; + buildPhases = ( + 299522601BBF129200859F49 /* Sources */, + 299522611BBF129200859F49 /* Frameworks */, + 299522621BBF129200859F49 /* Headers */, + 299522631BBF129200859F49 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AFNetworking watchOS"; + productName = "AFNetworking watchOS"; + productReference = 299522651BBF129200859F49 /* AFNetworking.framework */; + productType = "com.apple.product-type.framework"; + }; + 299522761BBF136400859F49 /* AFNetworking macOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking macOS" */; + buildPhases = ( + 299522721BBF136400859F49 /* Sources */, + 299522731BBF136400859F49 /* Frameworks */, + 299522741BBF136400859F49 /* Headers */, + 299522751BBF136400859F49 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AFNetworking macOS"; + productName = "AFNetworking OS X"; + productReference = 299522771BBF136400859F49 /* AFNetworking.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 299522301BBF104D00859F49 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1140; + ORGANIZATIONNAME = AFNetworking; + TargetAttributes = { + 2987B0A41BC408A200179A4C = { + CreatedOnToolsVersion = 7.1; + ProvisioningStyle = Automatic; + }; + 2987B0AD1BC408A200179A4C = { + CreatedOnToolsVersion = 7.1; + ProvisioningStyle = Automatic; + }; + 298D7C3A1BC2C79500FD3B3E = { + CreatedOnToolsVersion = 7.0.1; + ProvisioningStyle = Automatic; + }; + 298D7C491BC2C7B200FD3B3E = { + CreatedOnToolsVersion = 7.0.1; + ProvisioningStyle = Automatic; + }; + 299522381BBF104D00859F49 = { + CreatedOnToolsVersion = 7.0.1; + ProvisioningStyle = Automatic; + }; + 299522641BBF129200859F49 = { + CreatedOnToolsVersion = 7.0.1; + ProvisioningStyle = Automatic; + }; + 299522761BBF136400859F49 = { + CreatedOnToolsVersion = 7.0.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 299522331BBF104D00859F49 /* Build configuration list for PBXProject "AFNetworking" */; + compatibilityVersion = "Xcode 6.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 2995222F1BBF104D00859F49; + productRefGroup = 2995223A1BBF104D00859F49 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 299522381BBF104D00859F49 /* AFNetworking iOS */, + 299522641BBF129200859F49 /* AFNetworking watchOS */, + 299522761BBF136400859F49 /* AFNetworking macOS */, + 2987B0A41BC408A200179A4C /* AFNetworking tvOS */, + 298D7C3A1BC2C79500FD3B3E /* AFNetworking iOS Tests */, + 298D7C491BC2C7B200FD3B3E /* AFNetworking macOS Tests */, + 2987B0AD1BC408A200179A4C /* AFNetworking tvOS Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2987B0A31BC408A200179A4C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2987B0AC1BC408A200179A4C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2987B0DE1BC40AFB00179A4C /* foobar.com.cer in Resources */, + 2987B0D61BC40AEC00179A4C /* ADNNetServerTrustChain in Resources */, + E2B10D90233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer in Resources */, + 2987B0DF1BC40AFB00179A4C /* NoDomains.cer in Resources */, + 2987B0D41BC40AE900179A4C /* adn_1.cer in Resources */, + 2987B0DD1BC40AFB00179A4C /* AltName.cer in Resources */, + 2987B0D71BC40AF000179A4C /* HTTPBinOrgServerTrustChain in Resources */, + 2987B0D31BC40AE900179A4C /* adn_0.cer in Resources */, + 2987B0DC1BC40AF600179A4C /* logo.png in Resources */, + 2987B0D51BC40AE900179A4C /* adn_2.cer in Resources */, + 5F4323D71BF63CB0003B8749 /* GoogleComServerTrustChainPath1 in Resources */, + E2B10D96233035100004E005 /* Amazon.cer in Resources */, + 5F4323DB1BF63CBA003B8749 /* GoogleComServerTrustChainPath2 in Resources */, + 5F4323BD1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */, + 5F4323DF1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */, + E2B10D93233035100004E005 /* Amazon Root CA 1.cer in Resources */, + 31CBC009242D8DF200934333 /* httpbinorg_02182021.cer in Resources */, + 5F4323C01BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */, + 5F4323CF1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */, + 5F4323C31BF63741003B8749 /* google.com.cer in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 298D7C391BC2C79500FD3B3E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 298D7CBF1BC2CA9D00FD3B3E /* foobar.com.cer in Resources */, + 298D7CBA1BC2CA9800FD3B3E /* logo.png in Resources */, + E2B10D8E233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer in Resources */, + 297824A31BC2D69A0041C395 /* adn_0.cer in Resources */, + 298D7CE31BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */, + 297824A71BC2D69A0041C395 /* adn_2.cer in Resources */, + 297824A51BC2D69A0041C395 /* adn_1.cer in Resources */, + 298D7CC01BC2CA9D00FD3B3E /* NoDomains.cer in Resources */, + 298D7CE01BC2CB5A00FD3B3E /* ADNNetServerTrustChain in Resources */, + 298D7CBE1BC2CA9D00FD3B3E /* AltName.cer in Resources */, + 5F4323D51BF63CB0003B8749 /* GoogleComServerTrustChainPath1 in Resources */, + E2B10D94233035100004E005 /* Amazon.cer in Resources */, + 5F4323D91BF63CBA003B8749 /* GoogleComServerTrustChainPath2 in Resources */, + 5F4323BB1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */, + 5F4323DD1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */, + E2B10D91233035100004E005 /* Amazon Root CA 1.cer in Resources */, + 31CBC007242D8DF200934333 /* httpbinorg_02182021.cer in Resources */, + 5F4323BE1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */, + 5F4323CD1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */, + 5F4323C11BF63741003B8749 /* google.com.cer in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 298D7C481BC2C7B200FD3B3E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 298D7CBC1BC2CA9C00FD3B3E /* foobar.com.cer in Resources */, + 298D7CB91BC2CA9800FD3B3E /* logo.png in Resources */, + E2B10D8F233035100004E005 /* Starfield Services Root Certificate Authority - G2.cer in Resources */, + 297824A41BC2D69A0041C395 /* adn_0.cer in Resources */, + 298D7CE41BC2CB7C00FD3B3E /* HTTPBinOrgServerTrustChain in Resources */, + 297824A81BC2D69A0041C395 /* adn_2.cer in Resources */, + 297824A61BC2D69A0041C395 /* adn_1.cer in Resources */, + 298D7CBD1BC2CA9C00FD3B3E /* NoDomains.cer in Resources */, + 298D7CE11BC2CB5A00FD3B3E /* ADNNetServerTrustChain in Resources */, + 298D7CBB1BC2CA9C00FD3B3E /* AltName.cer in Resources */, + 5F4323D61BF63CB0003B8749 /* GoogleComServerTrustChainPath1 in Resources */, + E2B10D95233035100004E005 /* Amazon.cer in Resources */, + 5F4323DA1BF63CBA003B8749 /* GoogleComServerTrustChainPath2 in Resources */, + 5F4323BC1BF63741003B8749 /* Equifax_Secure_Certificate_Authority_Root.cer in Resources */, + 5F4323CE1BF63741003B8749 /* GoogleInternetAuthorityG2.cer in Resources */, + E2B10D92233035100004E005 /* Amazon Root CA 1.cer in Resources */, + 31CBC008242D8DF200934333 /* httpbinorg_02182021.cer in Resources */, + 5F4323DE1BF63CCC003B8749 /* GeoTrust_Global_CA_Root.cer in Resources */, + 5F4323BF1BF63741003B8749 /* GeoTrust_Global_CA-cross.cer in Resources */, + 5F4323C21BF63741003B8749 /* google.com.cer in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522371BBF104D00859F49 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522631BBF129200859F49 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522751BBF136400859F49 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2987B0A01BC408A200179A4C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2987B0BD1BC408D900179A4C /* AFNetworkReachabilityManager.m in Sources */, + 2987B0BE1BC408D900179A4C /* AFSecurityPolicy.m in Sources */, + 2987B0BC1BC408D900179A4C /* AFHTTPSessionManager.m in Sources */, + 2987B0C11BC408D900179A4C /* AFURLSessionManager.m in Sources */, + 2987B0C71BC408F900179A4C /* UIProgressView+AFNetworking.m in Sources */, + 2987B0BF1BC408D900179A4C /* AFURLRequestSerialization.m in Sources */, + 2987B0C21BC408F900179A4C /* AFAutoPurgingImageCache.m in Sources */, + 2987B0C51BC408F900179A4C /* UIButton+AFNetworking.m in Sources */, + 2987B0C41BC408F900179A4C /* UIActivityIndicatorView+AFNetworking.m in Sources */, + 2987B0C01BC408D900179A4C /* AFURLResponseSerialization.m in Sources */, + 2987B0C61BC408F900179A4C /* UIImageView+AFNetworking.m in Sources */, + 2987B0C31BC408F900179A4C /* AFImageDownloader.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2987B0AA1BC408A200179A4C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2987B0CC1BC40A7600179A4C /* AFHTTPSessionManagerTests.m in Sources */, + 2987B0E41BC40B0900179A4C /* AFUIImageViewTests.m in Sources */, + 2987B0D11BC40A7600179A4C /* AFURLSessionManagerTests.m in Sources */, + 2987B0E31BC40B0900179A4C /* AFUIActivityIndicatorViewTests.m in Sources */, + 2987B0D01BC40A7600179A4C /* AFSecurityPolicyTests.m in Sources */, + 2987B0CB1BC40A7600179A4C /* AFHTTPResponseSerializationTests.m in Sources */, + 1BF9F9621C87843300F1F35A /* AFImageResponseSerializerTests.m in Sources */, + 2987B0CE1BC40A7600179A4C /* AFNetworkReachabilityManagerTests.m in Sources */, + 2987B0E01BC40B0900179A4C /* AFAutoPurgingImageCacheTests.m in Sources */, + 2987B0CA1BC40A7600179A4C /* AFHTTPRequestSerializationTests.m in Sources */, + 29D341411C20D46400A7D266 /* AFCompoundResponseSerializerTests.m in Sources */, + 2987B0E11BC40B0900179A4C /* AFImageDownloaderTests.m in Sources */, + 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; + }; + 298D7C371BC2C79500FD3B3E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29D3413F1C20D46400A7D266 /* AFCompoundResponseSerializerTests.m in Sources */, + 2960BAC31C1B2F1A00BA02F0 /* AFUIButtonTests.m in Sources */, + 298D7C961BC2C94400FD3B3E /* AFTestCase.m in Sources */, + E91164651DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */, + 298D7CB11BC2CA6E00FD3B3E /* AFHTTPRequestSerializationTests.m in Sources */, + 297824AE1BC2DBD80041C395 /* AFUIActivityIndicatorViewTests.m in Sources */, + 297824AD1BC2DBA40041C395 /* AFNetworkActivityManagerTests.m in Sources */, + 1BF9F9601C87832B00F1F35A /* AFImageResponseSerializerTests.m in Sources */, + 298D7CDD1BC2CAF700FD3B3E /* AFSecurityPolicyTests.m in Sources */, + 298D7CD31BC2CAE800FD3B3E /* AFHTTPResponseSerializationTests.m in Sources */, + 297824B01BC2DC2D0041C395 /* AFUIImageViewTests.m in Sources */, + 297824AF1BC2DBEF0041C395 /* AFUIRefreshControlTests.m in Sources */, + 298D7CD91BC2CAF200FD3B3E /* AFNetworkReachabilityManagerTests.m in Sources */, + 297824AA1BC2DAD80041C395 /* AFAutoPurgingImageCacheTests.m in Sources */, + 298D7C981BC2CA2500FD3B3E /* AFURLSessionManagerTests.m in Sources */, + 323D83E5231D188400C5BFC6 /* AFWKWebViewTests.m in Sources */, + 297824AC1BC2DB450041C395 /* AFImageDownloaderTests.m in Sources */, + 2D4563901DB1179D00AE4812 /* AFXMLParserResponseSerializerTests.m in Sources */, + 298D7CD51BC2CAEC00FD3B3E /* AFHTTPSessionManagerTests.m in Sources */, + 298D7CD71BC2CAEF00FD3B3E /* AFJSONSerializationTests.m in Sources */, + 298D7CDB1BC2CAF500FD3B3E /* AFPropertyListResponseSerializerTests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 298D7C461BC2C7B200FD3B3E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 298D7CD41BC2CAE900FD3B3E /* AFHTTPResponseSerializationTests.m in Sources */, + 29D341401C20D46400A7D266 /* AFCompoundResponseSerializerTests.m in Sources */, + 298D7CB21BC2CA6E00FD3B3E /* AFHTTPRequestSerializationTests.m in Sources */, + E91164661DA6A7AE00DFFF56 /* AFPropertyListRequestSerializerTests.m in Sources */, + 298D7CDE1BC2CAF800FD3B3E /* AFSecurityPolicyTests.m in Sources */, + 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 */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522341BBF104D00859F49 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 299522AD1BBF13C700859F49 /* UIProgressView+AFNetworking.m in Sources */, + 299522571BBF125A00859F49 /* AFNetworkReachabilityManager.m in Sources */, + 299522AF1BBF13C700859F49 /* UIRefreshControl+AFNetworking.m in Sources */, + 299522AA1BBF13C700859F49 /* UIImageView+AFNetworking.m in Sources */, + 299522591BBF125A00859F49 /* AFSecurityPolicy.m in Sources */, + 299522A71BBF13C700859F49 /* UIButton+AFNetworking.m in Sources */, + 299522541BBF125A00859F49 /* AFHTTPSessionManager.m in Sources */, + 323D83E3231D185400C5BFC6 /* WKWebView+AFNetworking.m in Sources */, + 2995225F1BBF125A00859F49 /* AFURLSessionManager.m in Sources */, + 2995225B1BBF125A00859F49 /* AFURLRequestSerialization.m in Sources */, + 2995229D1BBF13C700859F49 /* AFAutoPurgingImageCache.m in Sources */, + 299522A31BBF13C700859F49 /* UIActivityIndicatorView+AFNetworking.m in Sources */, + 2995225D1BBF125A00859F49 /* AFURLResponseSerialization.m in Sources */, + 2995229F1BBF13C700859F49 /* AFImageDownloader.m in Sources */, + 299522A11BBF13C700859F49 /* AFNetworkActivityIndicatorManager.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522601BBF129200859F49 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 299522711BBF133400859F49 /* AFURLSessionManager.m in Sources */, + 2995226F1BBF133400859F49 /* AFURLRequestSerialization.m in Sources */, + 2995226E1BBF133400859F49 /* AFSecurityPolicy.m in Sources */, + 299522701BBF133400859F49 /* AFURLResponseSerialization.m in Sources */, + 2995226D1BBF133400859F49 /* AFHTTPSessionManager.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 299522721BBF136400859F49 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 299522801BBF13A100859F49 /* AFNetworkReachabilityManager.m in Sources */, + 299522811BBF13A100859F49 /* AFSecurityPolicy.m in Sources */, + 2995227F1BBF13A100859F49 /* AFHTTPSessionManager.m in Sources */, + 299522841BBF13A100859F49 /* AFURLSessionManager.m in Sources */, + 299522821BBF13A100859F49 /* AFURLRequestSerialization.m in Sources */, + 299522831BBF13A100859F49 /* AFURLResponseSerialization.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 2987B0B11BC408A200179A4C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2987B0A41BC408A200179A4C /* AFNetworking tvOS */; + targetProxy = 2987B0B01BC408A200179A4C /* PBXContainerItemProxy */; + }; + 298D7C421BC2C79500FD3B3E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 299522381BBF104D00859F49 /* AFNetworking iOS */; + targetProxy = 298D7C411BC2C79500FD3B3E /* PBXContainerItemProxy */; + }; + 298D7C511BC2C7B200FD3B3E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 299522761BBF136400859F49 /* AFNetworking macOS */; + targetProxy = 298D7C501BC2C7B200FD3B3E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 2987B0B61BC408A200179A4C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = marker; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Debug; + }; + 2987B0B71BC408A200179A4C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = bitcode; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Release; + }; + 2987B0B81BC408A200179A4C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = ./Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.afnetworking.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Debug; + }; + 2987B0B91BC408A200179A4C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = ./Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.afnetworking.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + }; + name = Release; + }; + 298D7C431BC2C79500FD3B3E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch"; + INFOPLIST_FILE = ./Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.afnetworking.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; + }; + name = Debug; + }; + 298D7C441BC2C79500FD3B3E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch"; + INFOPLIST_FILE = ./Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.afnetworking.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; + }; + name = Release; + }; + 298D7C531BC2C7B200FD3B3E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch"; + INFOPLIST_FILE = ./Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.afnetworking.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + }; + name = Debug; + }; + 298D7C541BC2C7B200FD3B3E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Tests/Tests-Prefix.pch"; + INFOPLIST_FILE = ./Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.afnetworking.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + }; + name = Release; + }; + 2995223F1BBF104D00859F49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_CODE_COVERAGE = YES; + 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; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + 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; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = "compiler-default"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MARKETING_VERSION = 4.0.1; + MODULEMAP_FILE = "$(PROJECT_DIR)/Framework/module.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TVOS_DEPLOYMENT_TARGET = 9.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = ( + "-Wall", + "-Wextra", + "-Wno-unused-parameter", + ); + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + 299522401BBF104D00859F49 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "compiler-default"; + CLANG_CXX_LIBRARY = "compiler-default"; + CLANG_ENABLE_CODE_COVERAGE = NO; + 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; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + 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; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = "compiler-default"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_STRICT_SELECTOR_MATCH = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VALUE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MACOSX_DEPLOYMENT_TARGET = 10.10; + MARKETING_VERSION = 4.0.1; + MODULEMAP_FILE = "$(PROJECT_DIR)/Framework/module.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TVOS_DEPLOYMENT_TARGET = 9.0; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + WARNING_CFLAGS = ( + "-Wall", + "-Wextra", + "-Wno-unused-parameter", + ); + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + 299522421BBF104D00859F49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = marker; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 299522431BBF104D00859F49 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = bitcode; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=macosx*]" = ""; + SKIP_INSTALL = YES; + }; + name = Release; + }; + 2995226B1BBF129200859F49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = marker; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.AFNetworking-watchOS"; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = Debug; + }; + 2995226C1BBF129200859F49 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = bitcode; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.AFNetworking-watchOS"; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + }; + name = Release; + }; + 2995227D1BBF136400859F49 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = marker; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 2995227E1BBF136400859F49 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + BITCODE_GENERATION_MODE = bitcode; + CLANG_ENABLE_OBJC_WEAK = YES; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = ./Framework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.alamofire.AFNetworking; + PRODUCT_NAME = AFNetworking; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = macosx; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2987B0BA1BC408A200179A4C /* Build configuration list for PBXNativeTarget "AFNetworking tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2987B0B61BC408A200179A4C /* Debug */, + 2987B0B71BC408A200179A4C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2987B0BB1BC408A200179A4C /* Build configuration list for PBXNativeTarget "AFNetworking tvOS Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2987B0B81BC408A200179A4C /* Debug */, + 2987B0B91BC408A200179A4C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 298D7C451BC2C79600FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking iOS Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 298D7C431BC2C79500FD3B3E /* Debug */, + 298D7C441BC2C79500FD3B3E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 298D7C521BC2C7B200FD3B3E /* Build configuration list for PBXNativeTarget "AFNetworking macOS Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 298D7C531BC2C7B200FD3B3E /* Debug */, + 298D7C541BC2C7B200FD3B3E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 299522331BBF104D00859F49 /* Build configuration list for PBXProject "AFNetworking" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2995223F1BBF104D00859F49 /* Debug */, + 299522401BBF104D00859F49 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 299522411BBF104D00859F49 /* Build configuration list for PBXNativeTarget "AFNetworking iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 299522421BBF104D00859F49 /* Debug */, + 299522431BBF104D00859F49 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2995226A1BBF129200859F49 /* Build configuration list for PBXNativeTarget "AFNetworking watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2995226B1BBF129200859F49 /* Debug */, + 2995226C1BBF129200859F49 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2995227C1BBF136400859F49 /* Build configuration list for PBXNativeTarget "AFNetworking macOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2995227D1BBF136400859F49 /* Debug */, + 2995227E1BBF136400859F49 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 299522301BBF104D00859F49 /* Project object */; +} diff --git a/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme new file mode 100644 index 0000000..264cb20 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme new file mode 100644 index 0000000..08a2cf7 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme new file mode 100644 index 0000000..9bd6a4c --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme new file mode 100644 index 0000000..2585216 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFCompatibilityMacros.h b/TwoNetworking/AFNetworking/AFNetworking/AFCompatibilityMacros.h new file mode 100644 index 0000000..1f0ab26 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFCompatibilityMacros.h @@ -0,0 +1,49 @@ +// AFCompatibilityMacros.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#ifndef AFCompatibilityMacros_h +#define AFCompatibilityMacros_h + +#ifdef API_AVAILABLE + #define AF_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) +#else + #define AF_API_AVAILABLE(...) +#endif // API_AVAILABLE + +#ifdef API_UNAVAILABLE + #define AF_API_UNAVAILABLE(...) API_UNAVAILABLE(__VA_ARGS__) +#else + #define AF_API_UNAVAILABLE(...) +#endif // API_UNAVAILABLE + +#if __has_warning("-Wunguarded-availability-new") + #define AF_CAN_USE_AT_AVAILABLE 1 +#else + #define AF_CAN_USE_AT_AVAILABLE 0 +#endif + +#if ((__IPHONE_OS_VERSION_MAX_ALLOWED && __IPHONE_OS_VERSION_MAX_ALLOWED < 100000) || (__MAC_OS_VERSION_MAX_ALLOWED && __MAC_OS_VERSION_MAX_ALLOWED < 101200) ||(__WATCH_OS_MAX_VERSION_ALLOWED && __WATCH_OS_MAX_VERSION_ALLOWED < 30000) ||(__TV_OS_MAX_VERSION_ALLOWED && __TV_OS_MAX_VERSION_ALLOWED < 100000)) + #define AF_CAN_INCLUDE_SESSION_TASK_METRICS 0 +#else + #define AF_CAN_INCLUDE_SESSION_TASK_METRICS 1 +#endif + +#endif /* AFCompatibilityMacros_h */ diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.h b/TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.h new file mode 100644 index 0000000..943fc22 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.h @@ -0,0 +1,285 @@ +// AFHTTPSessionManager.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#if !TARGET_OS_WATCH +#import +#endif +#import + +#import "AFURLSessionManager.h" + +/** + `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths. + + ## Subclassing Notes + + Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application. + + ## Methods to Override + + To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:`. + + ## Serialization + + Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to ``. + + Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `` + + ## URL Construction Using Relative Paths + + For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`. + + Below are a few examples of how `baseURL` and relative paths interact: + + NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; + [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz + [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo + [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo + [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ + [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ + + Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. + + @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface AFHTTPSessionManager : AFURLSessionManager + +/** + The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods. + */ +@property (readonly, nonatomic, strong, nullable) NSURL *baseURL; + +/** + Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies. + + @warning `requestSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPRequestSerializer * requestSerializer; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. A security policy configured with `AFSSLPinningModePublicKey` or `AFSSLPinningModeCertificate` can only be applied on a session manager initialized with a secure base URL (i.e. https). Applying a security policy with pinning enabled on an insecure session manager throws an `Invalid Security Policy` exception. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns an `AFHTTPSessionManager` object. + */ ++ (instancetype)manager; + +/** + Initializes an `AFHTTPSessionManager` object with the specified base URL. + + @param url The base URL for the HTTP client. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(nullable NSURL *)url; + +/** + Initializes an `AFHTTPSessionManager` object with the specified base URL. + + This is the designated initializer. + + @param url The base URL for the HTTP client. + @param configuration The configuration used to create the managed session. + + @return The newly-initialized HTTP client + */ +- (instancetype)initWithBaseURL:(nullable NSURL *)url + sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; + +///--------------------------- +/// @name Making HTTP Requests +///--------------------------- + +/** + Creates and runs an `NSURLSessionDataTask` with a `GET` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `HEAD` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + constructingBodyWithBlock:(nullable void (^)(id formData))block + progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `PUT` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `PATCH` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates and runs an `NSURLSessionDataTask` with a `DELETE` request. + + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:completionHandler: + */ +- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +/** + Creates an `NSURLSessionDataTask` with a custom `HTTPMethod` request. + + @param method The HTTPMethod string used to create the request. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded according to the client request serializer. + @param headers The headers appended to the default headers for this request. + @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer. + @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred. + + @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler: + */ +- (nullable NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress + downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; + +@end + +NS_ASSUME_NONNULL_END diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.m b/TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.m new file mode 100644 index 0000000..b4ab591 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFHTTPSessionManager.m @@ -0,0 +1,357 @@ +// AFHTTPSessionManager.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFHTTPSessionManager.h" + +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" + +#import +#import +#import + +#import +#import +#import +#import +#import + +#if TARGET_OS_IOS || TARGET_OS_TV +#import +#elif TARGET_OS_WATCH +#import +#endif + +@interface AFHTTPSessionManager () +@property (readwrite, nonatomic, strong) NSURL *baseURL; +@end + +@implementation AFHTTPSessionManager +@dynamic responseSerializer; + ++ (instancetype)manager { + return [[[self class] alloc] initWithBaseURL:nil]; +} + +- (instancetype)init { + return [self initWithBaseURL:nil]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url { + return [self initWithBaseURL:url sessionConfiguration:nil]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + return [self initWithBaseURL:nil sessionConfiguration:configuration]; +} + +- (instancetype)initWithBaseURL:(NSURL *)url + sessionConfiguration:(NSURLSessionConfiguration *)configuration +{ + self = [super initWithSessionConfiguration:configuration]; + if (!self) { + return nil; + } + + // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected + if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { + url = [url URLByAppendingPathComponent:@""]; + } + + self.baseURL = url; + + self.requestSerializer = [AFHTTPRequestSerializer serializer]; + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + return self; +} + +#pragma mark - + +- (void)setRequestSerializer:(AFHTTPRequestSerializer *)requestSerializer { + NSParameterAssert(requestSerializer); + + _requestSerializer = requestSerializer; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + NSParameterAssert(responseSerializer); + + [super setResponseSerializer:responseSerializer]; +} + +@dynamic securityPolicy; + +- (void)setSecurityPolicy:(AFSecurityPolicy *)securityPolicy { + if (securityPolicy.SSLPinningMode != AFSSLPinningModeNone && ![self.baseURL.scheme isEqualToString:@"https"]) { + NSString *pinningMode = @"Unknown Pinning Mode"; + switch (securityPolicy.SSLPinningMode) { + case AFSSLPinningModeNone: pinningMode = @"AFSSLPinningModeNone"; break; + case AFSSLPinningModeCertificate: pinningMode = @"AFSSLPinningModeCertificate"; break; + case AFSSLPinningModePublicKey: pinningMode = @"AFSSLPinningModePublicKey"; break; + } + NSString *reason = [NSString stringWithFormat:@"A security policy configured with `%@` can only be applied on a manager with a secure base URL (i.e. https)", pinningMode]; + @throw [NSException exceptionWithName:@"Invalid Security Policy" reason:reason userInfo:nil]; + } + + [super setSecurityPolicy:securityPolicy]; +} + +#pragma mark - + +- (NSURLSessionDataTask *)GET:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + progress:(nullable void (^)(NSProgress * _Nonnull))downloadProgress + success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure +{ + + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET" + URLString:URLString + parameters:parameters + headers:headers + uploadProgress:nil + downloadProgress:downloadProgress + success:success + failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)HEAD:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask * _Nonnull))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) { + if (success) { + success(task); + } + } failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters headers:headers uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)POST:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + constructingBodyWithBlock:(nullable void (^)(id _Nonnull))block + progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress + success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError]; + for (NSString *headerField in headers.keyEnumerator) { + [request setValue:headers[headerField] forHTTPHeaderField:headerField]; + } + if (serializationError) { + if (failure) { + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); + } + + return nil; + } + + __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + if (error) { + if (failure) { + failure(task, error); + } + } else { + if (success) { + success(task, responseObject); + } + } + }]; + + [task resume]; + + return task; +} + +- (NSURLSessionDataTask *)PUT:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)PATCH:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + +- (NSURLSessionDataTask *)DELETE:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + success:(nullable void (^)(NSURLSessionDataTask *task, id responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask *task, NSError *error))failure +{ + NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters headers:headers uploadProgress:nil downloadProgress:nil success:success failure:failure]; + + [dataTask resume]; + + return dataTask; +} + + +- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(nullable id)parameters + headers:(nullable NSDictionary *)headers + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress + success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success + failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure +{ + NSError *serializationError = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError]; + for (NSString *headerField in headers.keyEnumerator) { + [request setValue:headers[headerField] forHTTPHeaderField:headerField]; + } + if (serializationError) { + if (failure) { + dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{ + failure(nil, serializationError); + }); + } + + return nil; + } + + __block NSURLSessionDataTask *dataTask = nil; + dataTask = [self dataTaskWithRequest:request + uploadProgress:uploadProgress + downloadProgress:downloadProgress + completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) { + if (error) { + if (failure) { + failure(dataTask, error); + } + } else { + if (success) { + success(dataTask, responseObject); + } + } + }]; + + return dataTask; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.session, self.operationQueue]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))]; + NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; + if (!configuration) { + NSString *configurationIdentifier = [decoder decodeObjectOfClass:[NSString class] forKey:@"identifier"]; + if (configurationIdentifier) { + configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:configurationIdentifier]; + } + } + + self = [self initWithBaseURL:baseURL sessionConfiguration:configuration]; + if (!self) { + return nil; + } + + self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))]; + self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))]; + AFSecurityPolicy *decodedPolicy = [decoder decodeObjectOfClass:[AFSecurityPolicy class] forKey:NSStringFromSelector(@selector(securityPolicy))]; + if (decodedPolicy) { + self.securityPolicy = decodedPolicy; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))]; + if ([self.session.configuration conformsToProtocol:@protocol(NSCoding)]) { + [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"]; + } else { + [coder encodeObject:self.session.configuration.identifier forKey:@"identifier"]; + } + [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))]; + [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))]; + [coder encodeObject:self.securityPolicy forKey:NSStringFromSelector(@selector(securityPolicy))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration]; + + HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone]; + HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone]; + HTTPClient.securityPolicy = [self.securityPolicy copyWithZone:zone]; + return HTTPClient; +} + +@end diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h b/TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h new file mode 100644 index 0000000..21982a0 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.h @@ -0,0 +1,216 @@ +// AFNetworkReachabilityManager.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#if !TARGET_OS_WATCH +#import + +typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) { + AFNetworkReachabilityStatusUnknown = -1, + AFNetworkReachabilityStatusNotReachable = 0, + AFNetworkReachabilityStatusReachableViaWWAN = 1, + AFNetworkReachabilityStatusReachableViaWiFi = 2, +}; + +NS_ASSUME_NONNULL_BEGIN + +/** + `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. + + Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability. + + See Apple's Reachability Sample Code ( https://developer.apple.com/library/ios/samplecode/reachability/ ) + + @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined. + */ +@interface AFNetworkReachabilityManager : NSObject + +/** + The current network reachability status. + */ +@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; + +/** + Whether or not the network is currently reachable. + */ +@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable; + +/** + Whether or not the network is currently reachable via WWAN. + */ +@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN; + +/** + Whether or not the network is currently reachable via WiFi. + */ +@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Returns the shared network reachability manager. + */ ++ (instancetype)sharedManager; + +/** + Creates and returns a network reachability manager with the default socket address. + + @return An initialized network reachability manager, actively monitoring the default socket address. + */ ++ (instancetype)manager; + +/** + Creates and returns a network reachability manager for the specified domain. + + @param domain The domain used to evaluate network reachability. + + @return An initialized network reachability manager, actively monitoring the specified domain. + */ ++ (instancetype)managerForDomain:(NSString *)domain; + +/** + Creates and returns a network reachability manager for the socket address. + + @param address The socket address (`sockaddr_in6`) used to evaluate network reachability. + + @return An initialized network reachability manager, actively monitoring the specified socket address. + */ ++ (instancetype)managerForAddress:(const void *)address; + +/** + Initializes an instance of a network reachability manager from the specified reachability object. + + @param reachability The reachability object to monitor. + + @return An initialized network reachability manager, actively monitoring the specified reachability. + */ +- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER; + +/** + * Unavailable initializer + */ ++ (instancetype)new NS_UNAVAILABLE; + +/** + * Unavailable initializer + */ +- (instancetype)init NS_UNAVAILABLE; + +///-------------------------------------------------- +/// @name Starting & Stopping Reachability Monitoring +///-------------------------------------------------- + +/** + Starts monitoring for changes in network reachability status. + */ +- (void)startMonitoring; + +/** + Stops monitoring for changes in network reachability status. + */ +- (void)stopMonitoring; + +///------------------------------------------------- +/// @name Getting Localized Reachability Description +///------------------------------------------------- + +/** + Returns a localized string representation of the current network reachability status. + */ +- (NSString *)localizedNetworkReachabilityStatusString; + +///--------------------------------------------------- +/// @name Setting Network Reachability Change Callback +///--------------------------------------------------- + +/** + Sets a callback to be executed when the network availability of the `baseURL` host changes. + + @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. + */ +- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Network Reachability + + The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses. + + enum { + AFNetworkReachabilityStatusUnknown, + AFNetworkReachabilityStatusNotReachable, + AFNetworkReachabilityStatusReachableViaWWAN, + AFNetworkReachabilityStatusReachableViaWiFi, + } + + `AFNetworkReachabilityStatusUnknown` + The `baseURL` host reachability is not known. + + `AFNetworkReachabilityStatusNotReachable` + The `baseURL` host cannot be reached. + + `AFNetworkReachabilityStatusReachableViaWWAN` + The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS. + + `AFNetworkReachabilityStatusReachableViaWiFi` + The `baseURL` host can be reached via a Wi-Fi connection. + + ### Keys for Notification UserInfo Dictionary + + Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification. + + `AFNetworkingReachabilityNotificationStatusItem` + A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification. + The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status. + */ + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when network reachability changes. + This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability. + + @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). + */ +FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification; +FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem; + +///-------------------- +/// @name Functions +///-------------------- + +/** + Returns a localized string representation of an `AFNetworkReachabilityStatus` value. + */ +FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status); + +NS_ASSUME_NONNULL_END +#endif diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m b/TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m new file mode 100644 index 0000000..0322bf9 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFNetworkReachabilityManager.m @@ -0,0 +1,269 @@ +// AFNetworkReachabilityManager.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFNetworkReachabilityManager.h" +#if !TARGET_OS_WATCH + +#import +#import +#import +#import +#import + +NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change"; +NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem"; + +typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); +typedef AFNetworkReachabilityManager * (^AFNetworkReachabilityStatusCallback)(AFNetworkReachabilityStatus status); + +NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) { + switch (status) { + case AFNetworkReachabilityStatusNotReachable: + return NSLocalizedStringFromTable(@"Not Reachable", @"AFNetworking", nil); + case AFNetworkReachabilityStatusReachableViaWWAN: + return NSLocalizedStringFromTable(@"Reachable via WWAN", @"AFNetworking", nil); + case AFNetworkReachabilityStatusReachableViaWiFi: + return NSLocalizedStringFromTable(@"Reachable via WiFi", @"AFNetworking", nil); + case AFNetworkReachabilityStatusUnknown: + default: + return NSLocalizedStringFromTable(@"Unknown", @"AFNetworking", nil); + } +} + +static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) { + BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0); + BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0); + BOOL canConnectionAutomatically = (((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0)); + BOOL canConnectWithoutUserInteraction = (canConnectionAutomatically && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0); + BOOL isNetworkReachable = (isReachable && (!needsConnection || canConnectWithoutUserInteraction)); + + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown; + if (isNetworkReachable == NO) { + status = AFNetworkReachabilityStatusNotReachable; + } +#if TARGET_OS_IPHONE + else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) { + status = AFNetworkReachabilityStatusReachableViaWWAN; + } +#endif + else { + status = AFNetworkReachabilityStatusReachableViaWiFi; + } + + return status; +} + +/** + * Queue a status change notification for the main thread. + * + * This is done to ensure that the notifications are received in the same order + * as they are sent. If notifications are sent directly, it is possible that + * a queued notification (for an earlier status condition) is processed after + * the later update, resulting in the listener being left in the wrong state. + */ +static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusCallback block) { + AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); + dispatch_async(dispatch_get_main_queue(), ^{ + AFNetworkReachabilityManager *manager = nil; + if (block) { + manager = block(status); + } + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) }; + [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:manager userInfo:userInfo]; + }); +} + +static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { + AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusCallback)info); +} + + +static const void * AFNetworkReachabilityRetainCallback(const void *info) { + return Block_copy(info); +} + +static void AFNetworkReachabilityReleaseCallback(const void *info) { + if (info) { + Block_release(info); + } +} + +@interface AFNetworkReachabilityManager () +@property (readonly, nonatomic, assign) SCNetworkReachabilityRef networkReachability; +@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; +@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; +@end + +@implementation AFNetworkReachabilityManager + ++ (instancetype)sharedManager { + static AFNetworkReachabilityManager *_sharedManager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _sharedManager = [self manager]; + }); + + return _sharedManager; +} + ++ (instancetype)managerForDomain:(NSString *)domain { + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]); + + AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; + + CFRelease(reachability); + + return manager; +} + ++ (instancetype)managerForAddress:(const void *)address { + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address); + AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability]; + + CFRelease(reachability); + + return manager; +} + ++ (instancetype)manager +{ +#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) + struct sockaddr_in6 address; + bzero(&address, sizeof(address)); + address.sin6_len = sizeof(address); + address.sin6_family = AF_INET6; +#else + struct sockaddr_in address; + bzero(&address, sizeof(address)); + address.sin_len = sizeof(address); + address.sin_family = AF_INET; +#endif + return [self managerForAddress:&address]; +} + +- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability { + self = [super init]; + if (!self) { + return nil; + } + + _networkReachability = CFRetain(reachability); + self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; + + return self; +} + +- (instancetype)init +{ + @throw [NSException exceptionWithName:NSGenericException + reason:@"`-init` unavailable. Use `-initWithReachability:` instead" + userInfo:nil]; + return nil; +} + +- (void)dealloc { + [self stopMonitoring]; + + if (_networkReachability != NULL) { + CFRelease(_networkReachability); + } +} + +#pragma mark - + +- (BOOL)isReachable { + return [self isReachableViaWWAN] || [self isReachableViaWiFi]; +} + +- (BOOL)isReachableViaWWAN { + return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN; +} + +- (BOOL)isReachableViaWiFi { + return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi; +} + +#pragma mark - + +- (void)startMonitoring { + [self stopMonitoring]; + + if (!self.networkReachability) { + return; + } + + __weak __typeof(self)weakSelf = self; + AFNetworkReachabilityStatusCallback callback = ^(AFNetworkReachabilityStatus status) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + + strongSelf.networkReachabilityStatus = status; + if (strongSelf.networkReachabilityStatusBlock) { + strongSelf.networkReachabilityStatusBlock(status); + } + + return strongSelf; + }; + + SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL}; + SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context); + SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ + SCNetworkReachabilityFlags flags; + if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) { + AFPostReachabilityStatusChange(flags, callback); + } + }); +} + +- (void)stopMonitoring { + if (!self.networkReachability) { + return; + } + + SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes); +} + +#pragma mark - + +- (NSString *)localizedNetworkReachabilityStatusString { + return AFStringFromNetworkReachabilityStatus(self.networkReachabilityStatus); +} + +#pragma mark - + +- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block { + self.networkReachabilityStatusBlock = block; +} + +#pragma mark - NSKeyValueObserving + ++ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key { + if ([key isEqualToString:@"reachable"] || [key isEqualToString:@"reachableViaWWAN"] || [key isEqualToString:@"reachableViaWiFi"]) { + return [NSSet setWithObject:@"networkReachabilityStatus"]; + } + + return [super keyPathsForValuesAffectingValueForKey:key]; +} + +@end +#endif diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFNetworking.h b/TwoNetworking/AFNetworking/AFNetworking/AFNetworking.h new file mode 100644 index 0000000..e2fb2f4 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFNetworking.h @@ -0,0 +1,41 @@ +// AFNetworking.h +// +// Copyright (c) 2013 AFNetworking (http://afnetworking.com/) +// +// 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 +#import +#import + +#ifndef _AFNETWORKING_ + #define _AFNETWORKING_ + + #import "AFURLRequestSerialization.h" + #import "AFURLResponseSerialization.h" + #import "AFSecurityPolicy.h" + +#if !TARGET_OS_WATCH + #import "AFNetworkReachabilityManager.h" +#endif + + #import "AFURLSessionManager.h" + #import "AFHTTPSessionManager.h" + +#endif /* _AFNETWORKING_ */ diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.h b/TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.h new file mode 100644 index 0000000..9b966a5 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.h @@ -0,0 +1,161 @@ +// AFSecurityPolicy.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +typedef NS_ENUM(NSUInteger, AFSSLPinningMode) { + AFSSLPinningModeNone, + AFSSLPinningModePublicKey, + AFSSLPinningModeCertificate, +}; + +/** + `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections. + + Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface AFSecurityPolicy : NSObject + +/** + The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`. + */ +@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode; + +/** + The certificates used to evaluate server trust according to the SSL pinning mode. + + Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches. + + @see policyWithPinningMode:withPinnedCertificates: + */ +@property (nonatomic, strong, nullable) NSSet *pinnedCertificates; + +/** + Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`. + */ +@property (nonatomic, assign) BOOL allowInvalidCertificates; + +/** + Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`. + */ +@property (nonatomic, assign) BOOL validatesDomainName; + +///----------------------------------------- +/// @name Getting Certificates from the Bundle +///----------------------------------------- + +/** + Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`. + + @return The certificates included in the given bundle. + */ ++ (NSSet *)certificatesInBundle:(NSBundle *)bundle; + +///----------------------------------------- +/// @name Getting Specific Security Policies +///----------------------------------------- + +/** + Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys. + + @return The default security policy. + */ ++ (instancetype)defaultPolicy; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns a security policy with the specified pinning mode. + + Certificates with the `.cer` extension found in the main bundle will be pinned. If you want more control over which certificates are pinned, please use `policyWithPinningMode:withPinnedCertificates:` instead. + + @param pinningMode The SSL pinning mode. + + @return A new security policy. + + @see -policyWithPinningMode:withPinnedCertificates: + */ ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode; + +/** + Creates and returns a security policy with the specified pinning mode. + + @param pinningMode The SSL pinning mode. + @param pinnedCertificates The certificates to pin against. + + @return A new security policy. + + @see +certificatesInBundle: + @see -pinnedCertificates +*/ ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates; + +///------------------------------ +/// @name Evaluating Server Trust +///------------------------------ + +/** + Whether or not the specified server trust should be accepted, based on the security policy. + + This method should be used when responding to an authentication challenge from a server. + + @param serverTrust The X.509 certificate trust of the server. + @param domain The domain of serverTrust. If `nil`, the domain will not be validated. + + @return Whether or not to trust the server. + */ +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust + forDomain:(nullable NSString *)domain; + +@end + +NS_ASSUME_NONNULL_END + +///---------------- +/// @name Constants +///---------------- + +/** + ## SSL Pinning Modes + + The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes. + + enum { + AFSSLPinningModeNone, + AFSSLPinningModePublicKey, + AFSSLPinningModeCertificate, + } + + `AFSSLPinningModeNone` + Do not used pinned certificates to validate servers. + + `AFSSLPinningModePublicKey` + Validate host certificates against public keys of pinned certificates. + + `AFSSLPinningModeCertificate` + Validate host certificates against pinned certificates. +*/ diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.m b/TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.m new file mode 100644 index 0000000..da199aa --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFSecurityPolicy.m @@ -0,0 +1,341 @@ +// AFSecurityPolicy.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFSecurityPolicy.h" + +#import + +#if !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV +static NSData * AFSecKeyGetData(SecKeyRef key) { + CFDataRef data = NULL; + + __Require_noErr_Quiet(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out); + + return (__bridge_transfer NSData *)data; + +_out: + if (data) { + CFRelease(data); + } + + return nil; +} +#endif + +static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { +#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV + return [(__bridge id)key1 isEqual:(__bridge id)key2]; +#else + return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)]; +#endif +} + +static id AFPublicKeyForCertificate(NSData *certificate) { + id allowedPublicKey = nil; + SecCertificateRef allowedCertificate; + SecPolicyRef policy = nil; + SecTrustRef allowedTrust = nil; + SecTrustResultType result; + + allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate); + __Require_Quiet(allowedCertificate != NULL, _out); + + policy = SecPolicyCreateBasicX509(); + __Require_noErr_Quiet(SecTrustCreateWithCertificates(allowedCertificate, policy, &allowedTrust), _out); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out); +#pragma clang diagnostic pop + + allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust); + +_out: + if (allowedTrust) { + CFRelease(allowedTrust); + } + + if (policy) { + CFRelease(policy); + } + + if (allowedCertificate) { + CFRelease(allowedCertificate); + } + + return allowedPublicKey; +} + +static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) { + BOOL isValid = NO; + SecTrustResultType result; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + __Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out); +#pragma clang diagnostic pop + + isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed); + +_out: + return isValid; +} + +static NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) { + CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust); + NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount]; + + for (CFIndex i = 0; i < certificateCount; i++) { + SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i); + [trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]; + } + + return [NSArray arrayWithArray:trustChain]; +} + +static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) { + SecPolicyRef policy = SecPolicyCreateBasicX509(); + CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust); + NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount]; + for (CFIndex i = 0; i < certificateCount; i++) { + SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i); + + SecCertificateRef someCertificates[] = {certificate}; + CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL); + + SecTrustRef trust; + __Require_noErr_Quiet(SecTrustCreateWithCertificates(certificates, policy, &trust), _out); + SecTrustResultType result; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + __Require_noErr_Quiet(SecTrustEvaluate(trust, &result), _out); +#pragma clang diagnostic pop + [trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)]; + + _out: + if (trust) { + CFRelease(trust); + } + + if (certificates) { + CFRelease(certificates); + } + + continue; + } + CFRelease(policy); + + return [NSArray arrayWithArray:trustChain]; +} + +#pragma mark - + +@interface AFSecurityPolicy() +@property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode; +@property (readwrite, nonatomic, strong) NSSet *pinnedPublicKeys; +@end + +@implementation AFSecurityPolicy + ++ (NSSet *)certificatesInBundle:(NSBundle *)bundle { + NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; + + NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]]; + for (NSString *path in paths) { + NSData *certificateData = [NSData dataWithContentsOfFile:path]; + [certificates addObject:certificateData]; + } + + return [NSSet setWithSet:certificates]; +} + ++ (instancetype)defaultPolicy { + AFSecurityPolicy *securityPolicy = [[self alloc] init]; + securityPolicy.SSLPinningMode = AFSSLPinningModeNone; + + return securityPolicy; +} + ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode { + NSSet *defaultPinnedCertificates = [self certificatesInBundle:[NSBundle mainBundle]]; + return [self policyWithPinningMode:pinningMode withPinnedCertificates:defaultPinnedCertificates]; +} + ++ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates { + AFSecurityPolicy *securityPolicy = [[self alloc] init]; + securityPolicy.SSLPinningMode = pinningMode; + + [securityPolicy setPinnedCertificates:pinnedCertificates]; + + return securityPolicy; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.validatesDomainName = YES; + + return self; +} + +- (void)setPinnedCertificates:(NSSet *)pinnedCertificates { + _pinnedCertificates = pinnedCertificates; + + if (self.pinnedCertificates) { + NSMutableSet *mutablePinnedPublicKeys = [NSMutableSet setWithCapacity:[self.pinnedCertificates count]]; + for (NSData *certificate in self.pinnedCertificates) { + id publicKey = AFPublicKeyForCertificate(certificate); + if (!publicKey) { + continue; + } + [mutablePinnedPublicKeys addObject:publicKey]; + } + self.pinnedPublicKeys = [NSSet setWithSet:mutablePinnedPublicKeys]; + } else { + self.pinnedPublicKeys = nil; + } +} + +#pragma mark - + +- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust + forDomain:(NSString *)domain +{ + if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) { + // https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html + // According to the docs, you should only trust your provided certs for evaluation. + // Pinned certificates are added to the trust. Without pinned certificates, + // there is nothing to evaluate against. + // + // From Apple Docs: + // "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors). + // Instead, add your own (self-signed) CA certificate to the list of trusted anchors." + NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning."); + return NO; + } + + NSMutableArray *policies = [NSMutableArray array]; + if (self.validatesDomainName) { + [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)]; + } else { + [policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()]; + } + + SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies); + + if (self.SSLPinningMode == AFSSLPinningModeNone) { + return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust); + } else if (!self.allowInvalidCertificates && !AFServerTrustIsValid(serverTrust)) { + return NO; + } + + switch (self.SSLPinningMode) { + case AFSSLPinningModeCertificate: { + NSMutableArray *pinnedCertificates = [NSMutableArray array]; + for (NSData *certificateData in self.pinnedCertificates) { + [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)]; + } + SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates); + + if (!AFServerTrustIsValid(serverTrust)) { + return NO; + } + + // obtain the chain after being validated, which *should* contain the pinned certificate in the last position (if it's the Root CA) + NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust); + + for (NSData *trustChainCertificate in [serverCertificates reverseObjectEnumerator]) { + if ([self.pinnedCertificates containsObject:trustChainCertificate]) { + return YES; + } + } + + return NO; + } + case AFSSLPinningModePublicKey: { + NSUInteger trustedPublicKeyCount = 0; + NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust); + + for (id trustChainPublicKey in publicKeys) { + for (id pinnedPublicKey in self.pinnedPublicKeys) { + if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) { + trustedPublicKeyCount += 1; + } + } + } + return trustedPublicKeyCount > 0; + } + + default: + return NO; + } + + return NO; +} + +#pragma mark - NSKeyValueObserving + ++ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys { + return [NSSet setWithObject:@"pinnedCertificates"]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + + self = [self init]; + if (!self) { + return nil; + } + + self.SSLPinningMode = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(SSLPinningMode))] unsignedIntegerValue]; + self.allowInvalidCertificates = [decoder decodeBoolForKey:NSStringFromSelector(@selector(allowInvalidCertificates))]; + self.validatesDomainName = [decoder decodeBoolForKey:NSStringFromSelector(@selector(validatesDomainName))]; + self.pinnedCertificates = [decoder decodeObjectOfClass:[NSSet class] forKey:NSStringFromSelector(@selector(pinnedCertificates))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:[NSNumber numberWithUnsignedInteger:self.SSLPinningMode] forKey:NSStringFromSelector(@selector(SSLPinningMode))]; + [coder encodeBool:self.allowInvalidCertificates forKey:NSStringFromSelector(@selector(allowInvalidCertificates))]; + [coder encodeBool:self.validatesDomainName forKey:NSStringFromSelector(@selector(validatesDomainName))]; + [coder encodeObject:self.pinnedCertificates forKey:NSStringFromSelector(@selector(pinnedCertificates))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFSecurityPolicy *securityPolicy = [[[self class] allocWithZone:zone] init]; + securityPolicy.SSLPinningMode = self.SSLPinningMode; + securityPolicy.allowInvalidCertificates = self.allowInvalidCertificates; + securityPolicy.validatesDomainName = self.validatesDomainName; + securityPolicy.pinnedCertificates = [self.pinnedCertificates copyWithZone:zone]; + + return securityPolicy; +} + +@end diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.h b/TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.h new file mode 100644 index 0000000..b17e871 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.h @@ -0,0 +1,479 @@ +// AFURLRequestSerialization.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +#if TARGET_OS_IOS || TARGET_OS_TV +#import +#elif TARGET_OS_WATCH +#import +#endif + +NS_ASSUME_NONNULL_BEGIN + +/** + Returns a percent-escaped string following RFC 3986 for a query string key or value. + RFC 3986 states that the following characters are "reserved" characters. + - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + + In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + should be percent-escaped in the query string. + + @param string The string to be percent-escaped. + + @return The percent-escaped string. + */ +FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string); + +/** + A helper method to generate encoded url query parameters for appending to the end of a URL. + + @param parameters A dictionary of key/values to be encoded. + + @return A url encoded query string + */ +FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters); + +/** + The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary. + + For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`. + */ +@protocol AFURLRequestSerialization + +/** + Returns a request with the specified parameters encoded into a copy of the original request. + + @param request The original request. + @param parameters The parameters to be encoded. + @param error The error that occurred while attempting to encode the request parameters. + + @return A serialized request. + */ +- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(nullable id)parameters + error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; + +@end + +#pragma mark - + +/** + + */ +typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { + AFHTTPRequestQueryStringDefaultStyle = 0, +}; + +@protocol AFMultipartFormData; + +/** + `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation. + + Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior. + */ +@interface AFHTTPRequestSerializer : NSObject + +/** + The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default. + */ +@property (nonatomic, assign) NSStringEncoding stringEncoding; + +/** + Whether created requests can use the device’s cellular radio (if present). `YES` by default. + + @see NSMutableURLRequest -setAllowsCellularAccess: + */ +@property (nonatomic, assign) BOOL allowsCellularAccess; + +/** + The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default. + + @see NSMutableURLRequest -setCachePolicy: + */ +@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; + +/** + Whether created requests should use the default cookie handling. `YES` by default. + + @see NSMutableURLRequest -setHTTPShouldHandleCookies: + */ +@property (nonatomic, assign) BOOL HTTPShouldHandleCookies; + +/** + Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default + + @see NSMutableURLRequest -setHTTPShouldUsePipelining: + */ +@property (nonatomic, assign) BOOL HTTPShouldUsePipelining; + +/** + The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default. + + @see NSMutableURLRequest -setNetworkServiceType: + */ +@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType; + +/** + The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds. + + @see NSMutableURLRequest -setTimeoutInterval: + */ +@property (nonatomic, assign) NSTimeInterval timeoutInterval; + +///--------------------------------------- +/// @name Configuring HTTP Request Headers +///--------------------------------------- + +/** + Default HTTP header field values to be applied to serialized requests. By default, these include the following: + + - `Accept-Language` with the contents of `NSLocale +preferredLanguages` + - `User-Agent` with the contents of various bundle identifiers and OS designations + + @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`. + */ +@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; + +/** + Creates and returns a serializer with default configuration. + */ ++ (instancetype)serializer; + +/** + Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header. + + @param field The HTTP header to set a default value for + @param value The value set as default for the specified header, or `nil` + */ +- (void)setValue:(nullable NSString *)value +forHTTPHeaderField:(NSString *)field; + +/** + Returns the value for the HTTP headers set in the request serializer. + + @param field The HTTP header to retrieve the default value for + + @return The value set as default for the specified header, or `nil` + */ +- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; + +/** + Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. + + @param username The HTTP basic auth username + @param password The HTTP basic auth password + */ +- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username + password:(NSString *)password; + +/** + Clears any existing value for the "Authorization" HTTP header. + */ +- (void)clearAuthorizationHeader; + +///------------------------------------------------------- +/// @name Configuring Query String Parameter Serialization +///------------------------------------------------------- + +/** + HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default. + */ +@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; + +/** + Set the method of query string serialization according to one of the pre-defined styles. + + @param style The serialization style. + + @see AFHTTPRequestQueryStringSerializationStyle + */ +- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style; + +/** + Set the a custom method of query string serialization according to the specified block. + + @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request. + */ +- (void)setQueryStringSerializationWithBlock:(nullable NSString * _Nullable (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; + +///------------------------------- +/// @name Creating Request Objects +///------------------------------- + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string. + + If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. + + @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. + @param error The error that occurred while constructing the request. + + @return An `NSMutableURLRequest` object. + */ +- (nullable NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(nullable id)parameters + error:(NSError * _Nullable __autoreleasing *)error; + +/** + Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 + + Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream. + + @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`. + @param URLString The URL string used to create the request URL. + @param parameters The parameters to be encoded and set in the request HTTP body. + @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. + @param error The error that occurred while constructing the request. + + @return An `NSMutableURLRequest` object + */ +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(nullable NSDictionary *)parameters + constructingBodyWithBlock:(nullable void (^)(id formData))block + error:(NSError * _Nullable __autoreleasing *)error; + +/** + Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished. + + @param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`. + @param fileURL The file URL to write multipart form contents to. + @param handler A handler block to execute. + + @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request. + + @see https://github.com/AFNetworking/AFNetworking/issues/1398 + */ +- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request + writingStreamContentsToFile:(NSURL *)fileURL + completionHandler:(nullable void (^)(NSError * _Nullable error))handler; + +@end + +#pragma mark - + +/** + The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`. + */ +@protocol AFMultipartFormData + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. + + The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively. + + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended, otherwise `NO`. + */ +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * _Nullable __autoreleasing *)error; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. + + @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`. + @param mimeType The declared MIME type of the file data. This parameter must not be `nil`. + @param error If an error occurs, upon return contains an `NSError` object that describes the problem. + + @return `YES` if the file data was successfully appended otherwise `NO`. + */ +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType + error:(NSError * _Nullable __autoreleasing *)error; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. + + @param inputStream The input stream to be appended to the form data + @param name The name to be associated with the specified input stream. This parameter must not be `nil`. + @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`. + @param length The length of the specified input stream in bytes. + @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. + */ +- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream + name:(NSString *)name + fileName:(NSString *)fileName + length:(int64_t)length + mimeType:(NSString *)mimeType; + +/** + Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. + + @param data The data to be encoded and appended to the form data. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + @param fileName The filename to be associated with the specified data. This parameter must not be `nil`. + @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. + */ +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType; + +/** + Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. + + @param data The data to be encoded and appended to the form data. + @param name The name to be associated with the specified data. This parameter must not be `nil`. + */ + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name; + + +/** + Appends HTTP headers, followed by the encoded data and the multipart form boundary. + + @param headers The HTTP headers to be appended to the form data. + @param body The data to be encoded and appended to the form data. This parameter must not be `nil`. + */ +- (void)appendPartWithHeaders:(nullable NSDictionary *)headers + body:(NSData *)body; + +/** + Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream. + + When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth. + + @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb. + @param delay Duration of delay each time a packet is read. By default, no delay is set. + */ +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay; + +@end + +#pragma mark - + +/** + `AFJSONRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSJSONSerialization`, setting the `Content-Type` of the encoded request to `application/json`. + */ +@interface AFJSONRequestSerializer : AFHTTPRequestSerializer + +/** + Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default. + */ +@property (nonatomic, assign) NSJSONWritingOptions writingOptions; + +/** + Creates and returns a JSON serializer with specified reading and writing options. + + @param writingOptions The specified JSON writing options. + */ ++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions; + +@end + +#pragma mark - + +/** + `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`. + */ +@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer + +/** + The property list format. Possible values are described in "NSPropertyListFormat". + */ +@property (nonatomic, assign) NSPropertyListFormat format; + +/** + @warning The `writeOptions` property is currently unused. + */ +@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions; + +/** + Creates and returns a property list serializer with a specified format, read options, and write options. + + @param format The property list format. + @param writeOptions The property list write options. + + @warning The `writeOptions` property is currently unused. + */ ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + writeOptions:(NSPropertyListWriteOptions)writeOptions; + +@end + +#pragma mark - + +///---------------- +/// @name Constants +///---------------- + +/** + ## Error Domains + + The following error domain is predefined. + + - `NSString * const AFURLRequestSerializationErrorDomain` + + ### Constants + + `AFURLRequestSerializationErrorDomain` + AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. + */ +FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; + +/** + ## User info dictionary keys + + These keys may exist in the user info dictionary, in addition to those defined for NSError. + + - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey` + + ### Constants + + `AFNetworkingOperationFailingURLRequestErrorKey` + The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey; + +/** + ## Throttling Bandwidth for HTTP Request Input Streams + + @see -throttleBandwidthWithPacketSize:delay: + + ### Constants + + `kAFUploadStream3GSuggestedPacketSize` + Maximum packet size, in number of bytes. Equal to 16kb. + + `kAFUploadStream3GSuggestedDelay` + Duration of delay each time a packet is read. Equal to 0.2 seconds. + */ +FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize; +FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay; + +NS_ASSUME_NONNULL_END diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.m b/TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.m new file mode 100644 index 0000000..f60b6f9 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFURLRequestSerialization.m @@ -0,0 +1,1399 @@ +// AFURLRequestSerialization.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLRequestSerialization.h" + +#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV +#import +#else +#import +#endif + +NSString * const AFURLRequestSerializationErrorDomain = @"com.alamofire.error.serialization.request"; +NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofire.serialization.request.error.response"; + +typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error); + +/** + Returns a percent-escaped string following RFC 3986 for a query string key or value. + RFC 3986 states that the following characters are "reserved" characters. + - General Delimiters: ":", "#", "[", "]", "@", "?", "/" + - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "=" + + In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow + query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/" + should be percent-escaped in the query string. + - parameter string: The string to be percent-escaped. + - returns: The percent-escaped string. + */ +NSString * AFPercentEscapedStringFromString(NSString *string) { + static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4 + static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;="; + + NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; + [allowedCharacterSet removeCharactersInString:[kAFCharactersGeneralDelimitersToEncode stringByAppendingString:kAFCharactersSubDelimitersToEncode]]; + + // FIXME: https://github.com/AFNetworking/AFNetworking/pull/3028 + // return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; + + static NSUInteger const batchSize = 50; + + NSUInteger index = 0; + NSMutableString *escaped = @"".mutableCopy; + + while (index < string.length) { + NSUInteger length = MIN(string.length - index, batchSize); + NSRange range = NSMakeRange(index, length); + + // To avoid breaking up character sequences such as 👴🏻👮🏽 + range = [string rangeOfComposedCharacterSequencesForRange:range]; + + NSString *substring = [string substringWithRange:range]; + NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; + [escaped appendString:encoded]; + + index += range.length; + } + + return escaped; +} + +#pragma mark - + +@interface AFQueryStringPair : NSObject +@property (readwrite, nonatomic, strong) id field; +@property (readwrite, nonatomic, strong) id value; + +- (instancetype)initWithField:(id)field value:(id)value; + +- (NSString *)URLEncodedStringValue; +@end + +@implementation AFQueryStringPair + +- (instancetype)initWithField:(id)field value:(id)value { + self = [super init]; + if (!self) { + return nil; + } + + self.field = field; + self.value = value; + + return self; +} + +- (NSString *)URLEncodedStringValue { + if (!self.value || [self.value isEqual:[NSNull null]]) { + return AFPercentEscapedStringFromString([self.field description]); + } else { + return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedStringFromString([self.field description]), AFPercentEscapedStringFromString([self.value description])]; + } +} + +@end + +#pragma mark - + +FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); +FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); + +NSString * AFQueryStringFromParameters(NSDictionary *parameters) { + NSMutableArray *mutablePairs = [NSMutableArray array]; + for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { + [mutablePairs addObject:[pair URLEncodedStringValue]]; + } + + return [mutablePairs componentsJoinedByString:@"&"]; +} + +NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) { + return AFQueryStringPairsFromKeyAndValue(nil, dictionary); +} + +NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { + NSMutableArray *mutableQueryStringComponents = [NSMutableArray array]; + + NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)]; + + if ([value isKindOfClass:[NSDictionary class]]) { + NSDictionary *dictionary = value; + // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries + for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { + id nestedValue = dictionary[nestedKey]; + if (nestedValue) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; + } + } + } else if ([value isKindOfClass:[NSArray class]]) { + NSArray *array = value; + for (id nestedValue in array) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; + } + } else if ([value isKindOfClass:[NSSet class]]) { + NSSet *set = value; + for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { + [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)]; + } + } else { + [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]]; + } + + return mutableQueryStringComponents; +} + +#pragma mark - + +@interface AFStreamingMultipartFormData : NSObject +- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding; + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; +@end + +#pragma mark - + +static NSArray * AFHTTPRequestSerializerObservedKeyPaths() { + static NSArray *_AFHTTPRequestSerializerObservedKeyPaths = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _AFHTTPRequestSerializerObservedKeyPaths = @[NSStringFromSelector(@selector(allowsCellularAccess)), NSStringFromSelector(@selector(cachePolicy)), NSStringFromSelector(@selector(HTTPShouldHandleCookies)), NSStringFromSelector(@selector(HTTPShouldUsePipelining)), NSStringFromSelector(@selector(networkServiceType)), NSStringFromSelector(@selector(timeoutInterval))]; + }); + + return _AFHTTPRequestSerializerObservedKeyPaths; +} + +static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerObserverContext; + +@interface AFHTTPRequestSerializer () +@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths; +@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders; +@property (readwrite, nonatomic, strong) dispatch_queue_t requestHeaderModificationQueue; +@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle; +@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization; +@end + +@implementation AFHTTPRequestSerializer + ++ (instancetype)serializer { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = NSUTF8StringEncoding; + + self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary]; + self.requestHeaderModificationQueue = dispatch_queue_create("requestHeaderModificationQueue", DISPATCH_QUEUE_CONCURRENT); + + // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 + NSMutableArray *acceptLanguagesComponents = [NSMutableArray array]; + [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { + float q = 1.0f - (idx * 0.1f); + [acceptLanguagesComponents addObject:[NSString stringWithFormat:@"%@;q=%0.1g", obj, q]]; + *stop = q <= 0.5f; + }]; + [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"]; + + // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 + NSString *userAgent = nil; +#if TARGET_OS_IOS + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; +#elif TARGET_OS_TV + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; tvOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]]; +#elif TARGET_OS_WATCH + userAgent = [NSString stringWithFormat:@"%@/%@ (%@; watchOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[WKInterfaceDevice currentDevice] model], [[WKInterfaceDevice currentDevice] systemVersion], [[WKInterfaceDevice currentDevice] screenScale]]; +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) + userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]; +#endif + if (userAgent) { + if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) { + NSMutableString *mutableUserAgent = [userAgent mutableCopy]; + if (CFStringTransform((__bridge CFMutableStringRef)(mutableUserAgent), NULL, (__bridge CFStringRef)@"Any-Latin; Latin-ASCII; [:^ASCII:] Remove", false)) { + userAgent = mutableUserAgent; + } + } + [self setValue:userAgent forHTTPHeaderField:@"User-Agent"]; + } + + // HTTP Method Definitions; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html + self.HTTPMethodsEncodingParametersInURI = [NSSet setWithObjects:@"GET", @"HEAD", @"DELETE", nil]; + + self.mutableObservedChangedKeyPaths = [NSMutableSet set]; + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self respondsToSelector:NSSelectorFromString(keyPath)]) { + [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:AFHTTPRequestSerializerObserverContext]; + } + } + + return self; +} + +- (void)dealloc { + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self respondsToSelector:NSSelectorFromString(keyPath)]) { + [self removeObserver:self forKeyPath:keyPath context:AFHTTPRequestSerializerObserverContext]; + } + } +} + +#pragma mark - + +// Workarounds for crashing behavior using Key-Value Observing with XCTest +// See https://github.com/AFNetworking/AFNetworking/issues/2523 + +- (void)setAllowsCellularAccess:(BOOL)allowsCellularAccess { + [self willChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))]; + _allowsCellularAccess = allowsCellularAccess; + [self didChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))]; +} + +- (void)setCachePolicy:(NSURLRequestCachePolicy)cachePolicy { + [self willChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))]; + _cachePolicy = cachePolicy; + [self didChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))]; +} + +- (void)setHTTPShouldHandleCookies:(BOOL)HTTPShouldHandleCookies { + [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))]; + _HTTPShouldHandleCookies = HTTPShouldHandleCookies; + [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))]; +} + +- (void)setHTTPShouldUsePipelining:(BOOL)HTTPShouldUsePipelining { + [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))]; + _HTTPShouldUsePipelining = HTTPShouldUsePipelining; + [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))]; +} + +- (void)setNetworkServiceType:(NSURLRequestNetworkServiceType)networkServiceType { + [self willChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))]; + _networkServiceType = networkServiceType; + [self didChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))]; +} + +- (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval { + [self willChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))]; + _timeoutInterval = timeoutInterval; + [self didChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))]; +} + +#pragma mark - + +- (NSDictionary *)HTTPRequestHeaders { + NSDictionary __block *value; + dispatch_sync(self.requestHeaderModificationQueue, ^{ + value = [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders]; + }); + return value; +} + +- (void)setValue:(NSString *)value +forHTTPHeaderField:(NSString *)field +{ + dispatch_barrier_sync(self.requestHeaderModificationQueue, ^{ + [self.mutableHTTPRequestHeaders setValue:value forKey:field]; + }); +} + +- (NSString *)valueForHTTPHeaderField:(NSString *)field { + NSString __block *value; + dispatch_sync(self.requestHeaderModificationQueue, ^{ + value = [self.mutableHTTPRequestHeaders valueForKey:field]; + }); + return value; +} + +- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username + password:(NSString *)password +{ + NSData *basicAuthCredentials = [[NSString stringWithFormat:@"%@:%@", username, password] dataUsingEncoding:NSUTF8StringEncoding]; + NSString *base64AuthCredentials = [basicAuthCredentials base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0]; + [self setValue:[NSString stringWithFormat:@"Basic %@", base64AuthCredentials] forHTTPHeaderField:@"Authorization"]; +} + +- (void)clearAuthorizationHeader { + dispatch_barrier_sync(self.requestHeaderModificationQueue, ^{ + [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"]; + }); +} + +#pragma mark - + +- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style { + self.queryStringSerializationStyle = style; + self.queryStringSerialization = nil; +} + +- (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, id, NSError *__autoreleasing *))block { + self.queryStringSerialization = block; +} + +#pragma mark - + +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(method); + NSParameterAssert(URLString); + + NSURL *url = [NSURL URLWithString:URLString]; + + NSParameterAssert(url); + + NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url]; + mutableRequest.HTTPMethod = method; + + for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) { + if ([self.mutableObservedChangedKeyPaths containsObject:keyPath]) { + [mutableRequest setValue:[self valueForKeyPath:keyPath] forKey:keyPath]; + } + } + + mutableRequest = [[self requestBySerializingRequest:mutableRequest withParameters:parameters error:error] mutableCopy]; + + return mutableRequest; +} + +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + URLString:(NSString *)URLString + parameters:(NSDictionary *)parameters + constructingBodyWithBlock:(void (^)(id formData))block + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(method); + NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]); + + NSMutableURLRequest *mutableRequest = [self requestWithMethod:method URLString:URLString parameters:nil error:error]; + + __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:mutableRequest stringEncoding:NSUTF8StringEncoding]; + + if (parameters) { + for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { + NSData *data = nil; + if ([pair.value isKindOfClass:[NSData class]]) { + data = pair.value; + } else if ([pair.value isEqual:[NSNull null]]) { + data = [NSData data]; + } else { + data = [[pair.value description] dataUsingEncoding:self.stringEncoding]; + } + + if (data) { + [formData appendPartWithFormData:data name:[pair.field description]]; + } + } + } + + if (block) { + block(formData); + } + + return [formData requestByFinalizingMultipartFormData]; +} + +- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request + writingStreamContentsToFile:(NSURL *)fileURL + completionHandler:(void (^)(NSError *error))handler +{ + NSParameterAssert(request.HTTPBodyStream); + NSParameterAssert([fileURL isFileURL]); + + NSInputStream *inputStream = request.HTTPBodyStream; + NSOutputStream *outputStream = [[NSOutputStream alloc] initWithURL:fileURL append:NO]; + __block NSError *error = nil; + + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; + + [inputStream open]; + [outputStream open]; + + while ([inputStream hasBytesAvailable] && [outputStream hasSpaceAvailable]) { + uint8_t buffer[1024]; + + NSInteger bytesRead = [inputStream read:buffer maxLength:1024]; + if (inputStream.streamError || bytesRead < 0) { + error = inputStream.streamError; + break; + } + + NSInteger bytesWritten = [outputStream write:buffer maxLength:(NSUInteger)bytesRead]; + if (outputStream.streamError || bytesWritten < 0) { + error = outputStream.streamError; + break; + } + + if (bytesRead == 0 && bytesWritten == 0) { + break; + } + } + + [outputStream close]; + [inputStream close]; + + if (handler) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler(error); + }); + } + }); + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + mutableRequest.HTTPBodyStream = nil; + + return mutableRequest; +} + +#pragma mark - AFURLRequestSerialization + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + NSString *query = nil; + if (parameters) { + if (self.queryStringSerialization) { + NSError *serializationError; + query = self.queryStringSerialization(request, parameters, &serializationError); + + if (serializationError) { + if (error) { + *error = serializationError; + } + + return nil; + } + } else { + switch (self.queryStringSerializationStyle) { + case AFHTTPRequestQueryStringDefaultStyle: + query = AFQueryStringFromParameters(parameters); + break; + } + } + } + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + if (query && query.length > 0) { + mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]]; + } + } else { + // #2864: an empty string is a valid x-www-form-urlencoded payload + if (!query) { + query = @""; + } + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + } + [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]]; + } + + return mutableRequest; +} + +#pragma mark - NSKeyValueObserving + ++ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key { + if ([AFHTTPRequestSerializerObservedKeyPaths() containsObject:key]) { + return NO; + } + + return [super automaticallyNotifiesObserversForKey:key]; +} + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(__unused id)object + change:(NSDictionary *)change + context:(void *)context +{ + if (context == AFHTTPRequestSerializerObserverContext) { + if ([change[NSKeyValueChangeNewKey] isEqual:[NSNull null]]) { + [self.mutableObservedChangedKeyPaths removeObject:keyPath]; + } else { + [self.mutableObservedChangedKeyPaths addObject:keyPath]; + } + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [self init]; + if (!self) { + return nil; + } + + self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy]; + self.queryStringSerializationStyle = (AFHTTPRequestQueryStringSerializationStyle)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + dispatch_sync(self.requestHeaderModificationQueue, ^{ + [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))]; + }); + [coder encodeObject:@(self.queryStringSerializationStyle) forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init]; + dispatch_sync(self.requestHeaderModificationQueue, ^{ + serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone]; + }); + serializer.queryStringSerializationStyle = self.queryStringSerializationStyle; + serializer.queryStringSerialization = self.queryStringSerialization; + + return serializer; +} + +@end + +#pragma mark - + +static NSString * AFCreateMultipartFormBoundary() { + return [NSString stringWithFormat:@"Boundary+%08X%08X", arc4random(), arc4random()]; +} + +static NSString * const kAFMultipartFormCRLF = @"\r\n"; + +static inline NSString * AFMultipartFormInitialBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"--%@%@", boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFMultipartFormEncapsulationBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"%@--%@%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) { + return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF]; +} + +static inline NSString * AFContentTypeForPathExtension(NSString *extension) { + NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); + NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); + if (!contentType) { + return @"application/octet-stream"; + } else { + return contentType; + } +} + +NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; +NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; + +@interface AFHTTPBodyPart : NSObject +@property (nonatomic, assign) NSStringEncoding stringEncoding; +@property (nonatomic, strong) NSDictionary *headers; +@property (nonatomic, copy) NSString *boundary; +@property (nonatomic, strong) id body; +@property (nonatomic, assign) unsigned long long bodyContentLength; +@property (nonatomic, strong) NSInputStream *inputStream; + +@property (nonatomic, assign) BOOL hasInitialBoundary; +@property (nonatomic, assign) BOOL hasFinalBoundary; + +@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable; +@property (readonly, nonatomic, assign) unsigned long long contentLength; + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +@interface AFMultipartBodyStream : NSInputStream +@property (nonatomic, assign) NSUInteger numberOfBytesInPacket; +@property (nonatomic, assign) NSTimeInterval delay; +@property (nonatomic, strong) NSInputStream *inputStream; +@property (readonly, nonatomic, assign) unsigned long long contentLength; +@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty; + +- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding; +- (void)setInitialAndFinalBoundaries; +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; +@end + +#pragma mark - + +@interface AFStreamingMultipartFormData () +@property (readwrite, nonatomic, copy) NSMutableURLRequest *request; +@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; +@property (readwrite, nonatomic, copy) NSString *boundary; +@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream; +@end + +@implementation AFStreamingMultipartFormData + +- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding +{ + self = [super init]; + if (!self) { + return nil; + } + + self.request = urlRequest; + self.stringEncoding = encoding; + self.boundary = AFCreateMultipartFormBoundary(); + self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding]; + + return self; +} + +- (void)setRequest:(NSMutableURLRequest *)request +{ + _request = [request mutableCopy]; +} + +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); + + NSString *fileName = [fileURL lastPathComponent]; + NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]); + + return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error]; +} + +- (BOOL)appendPartWithFileURL:(NSURL *)fileURL + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType + error:(NSError * __autoreleasing *)error +{ + NSParameterAssert(fileURL); + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + if (![fileURL isFileURL]) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"Expected URL to be a file URL", @"AFNetworking", nil)}; + if (error) { + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"File URL not reachable.", @"AFNetworking", nil)}; + if (error) { + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; + } + + return NO; + } + + NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:error]; + if (!fileAttributes) { + return NO; + } + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.boundary = self.boundary; + bodyPart.body = fileURL; + bodyPart.bodyContentLength = [fileAttributes[NSFileSize] unsignedLongLongValue]; + [self.bodyStream appendHTTPBodyPart:bodyPart]; + + return YES; +} + +- (void)appendPartWithInputStream:(NSInputStream *)inputStream + name:(NSString *)name + fileName:(NSString *)fileName + length:(int64_t)length + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = mutableHeaders; + bodyPart.boundary = self.boundary; + bodyPart.body = inputStream; + + bodyPart.bodyContentLength = (unsigned long long)length; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)appendPartWithFileData:(NSData *)data + name:(NSString *)name + fileName:(NSString *)fileName + mimeType:(NSString *)mimeType +{ + NSParameterAssert(name); + NSParameterAssert(fileName); + NSParameterAssert(mimeType); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; + [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithFormData:(NSData *)data + name:(NSString *)name +{ + NSParameterAssert(name); + + NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; + [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"]; + + [self appendPartWithHeaders:mutableHeaders body:data]; +} + +- (void)appendPartWithHeaders:(NSDictionary *)headers + body:(NSData *)body +{ + NSParameterAssert(body); + + AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = headers; + bodyPart.boundary = self.boundary; + bodyPart.bodyContentLength = [body length]; + bodyPart.body = body; + + [self.bodyStream appendHTTPBodyPart:bodyPart]; +} + +- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes + delay:(NSTimeInterval)delay +{ + self.bodyStream.numberOfBytesInPacket = numberOfBytes; + self.bodyStream.delay = delay; +} + +- (NSMutableURLRequest *)requestByFinalizingMultipartFormData { + if ([self.bodyStream isEmpty]) { + return self.request; + } + + // Reset the initial and final boundaries to ensure correct Content-Length + [self.bodyStream setInitialAndFinalBoundaries]; + [self.request setHTTPBodyStream:self.bodyStream]; + + [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", self.boundary] forHTTPHeaderField:@"Content-Type"]; + [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"]; + + return self.request; +} + +@end + +#pragma mark - + +@interface NSStream () +@property (readwrite) NSStreamStatus streamStatus; +@property (readwrite, copy) NSError *streamError; +@end + +@interface AFMultipartBodyStream () +@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; +@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts; +@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator; +@property (readwrite, nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart; +@property (readwrite, nonatomic, strong) NSOutputStream *outputStream; +@property (readwrite, nonatomic, strong) NSMutableData *buffer; +@end + +@implementation AFMultipartBodyStream +#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100) +@synthesize delegate; +#endif +@synthesize streamStatus; +@synthesize streamError; + +- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding { + self = [super init]; + if (!self) { + return nil; + } + + self.stringEncoding = encoding; + self.HTTPBodyParts = [NSMutableArray array]; + self.numberOfBytesInPacket = NSIntegerMax; + + return self; +} + +- (void)setInitialAndFinalBoundaries { + if ([self.HTTPBodyParts count] > 0) { + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + bodyPart.hasInitialBoundary = NO; + bodyPart.hasFinalBoundary = NO; + } + + [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES]; + [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; + } +} + +- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart { + [self.HTTPBodyParts addObject:bodyPart]; +} + +- (BOOL)isEmpty { + return [self.HTTPBodyParts count] == 0; +} + +#pragma mark - NSInputStream + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + if ([self streamStatus] == NSStreamStatusClosed) { + return 0; + } + + NSInteger totalNumberOfBytesRead = 0; + + while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) { + if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) { + if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) { + break; + } + } else { + NSUInteger maxLength = MIN(length, self.numberOfBytesInPacket) - (NSUInteger)totalNumberOfBytesRead; + NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength]; + if (numberOfBytesRead == -1) { + self.streamError = self.currentHTTPBodyPart.inputStream.streamError; + break; + } else { + totalNumberOfBytesRead += numberOfBytesRead; + + if (self.delay > 0.0f) { + [NSThread sleepForTimeInterval:self.delay]; + } + } + } + } + + return totalNumberOfBytesRead; +} + +- (BOOL)getBuffer:(__unused uint8_t **)buffer + length:(__unused NSUInteger *)len +{ + return NO; +} + +- (BOOL)hasBytesAvailable { + return [self streamStatus] == NSStreamStatusOpen; +} + +#pragma mark - NSStream + +- (void)open { + if (self.streamStatus == NSStreamStatusOpen) { + return; + } + + self.streamStatus = NSStreamStatusOpen; + + [self setInitialAndFinalBoundaries]; + self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator]; +} + +- (void)close { + self.streamStatus = NSStreamStatusClosed; +} + +- (id)propertyForKey:(__unused NSString *)key { + return nil; +} + +- (BOOL)setProperty:(__unused id)property + forKey:(__unused NSString *)key +{ + return NO; +} + +- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop + forMode:(__unused NSString *)mode +{} + +- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop + forMode:(__unused NSString *)mode +{} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + length += [bodyPart contentLength]; + } + + return length; +} + +#pragma mark - Undocumented CFReadStream Bridged Methods + +- (void)_scheduleInCFRunLoop:(__unused CFRunLoopRef)aRunLoop + forMode:(__unused CFStringRef)aMode +{} + +- (void)_unscheduleFromCFRunLoop:(__unused CFRunLoopRef)aRunLoop + forMode:(__unused CFStringRef)aMode +{} + +- (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags + callback:(__unused CFReadStreamClientCallBack)inCallback + context:(__unused CFStreamClientContext *)inContext { + return NO; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; + + for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { + [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]]; + } + + [bodyStreamCopy setInitialAndFinalBoundaries]; + + return bodyStreamCopy; +} + +@end + +#pragma mark - + +typedef enum { + AFEncapsulationBoundaryPhase = 1, + AFHeaderPhase = 2, + AFBodyPhase = 3, + AFFinalBoundaryPhase = 4, +} AFHTTPBodyPartReadPhase; + +@interface AFHTTPBodyPart () { + AFHTTPBodyPartReadPhase _phase; + NSInputStream *_inputStream; + unsigned long long _phaseReadOffset; +} + +- (BOOL)transitionToNextPhase; +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +@implementation AFHTTPBodyPart + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + [self transitionToNextPhase]; + + return self; +} + +- (void)dealloc { + if (_inputStream) { + [_inputStream close]; + _inputStream = nil; + } +} + +- (NSInputStream *)inputStream { + if (!_inputStream) { + if ([self.body isKindOfClass:[NSData class]]) { + _inputStream = [NSInputStream inputStreamWithData:self.body]; + } else if ([self.body isKindOfClass:[NSURL class]]) { + _inputStream = [NSInputStream inputStreamWithURL:self.body]; + } else if ([self.body isKindOfClass:[NSInputStream class]]) { + _inputStream = self.body; + } else { + _inputStream = [NSInputStream inputStreamWithData:[NSData data]]; + } + } + + return _inputStream; +} + +- (NSString *)stringForHeaders { + NSMutableString *headerString = [NSMutableString string]; + for (NSString *field in [self.headers allKeys]) { + [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]]; + } + [headerString appendString:kAFMultipartFormCRLF]; + + return [NSString stringWithString:headerString]; +} + +- (unsigned long long)contentLength { + unsigned long long length = 0; + + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; + length += [encapsulationBoundaryData length]; + + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + length += [headersData length]; + + length += _bodyContentLength; + + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); + length += [closingBoundaryData length]; + + return length; +} + +- (BOOL)hasBytesAvailable { + // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer + if (_phase == AFFinalBoundaryPhase) { + return YES; + } + + switch (self.inputStream.streamStatus) { + case NSStreamStatusNotOpen: + case NSStreamStatusOpening: + case NSStreamStatusOpen: + case NSStreamStatusReading: + case NSStreamStatusWriting: + return YES; + case NSStreamStatusAtEnd: + case NSStreamStatusClosed: + case NSStreamStatusError: + default: + return NO; + } +} + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + NSInteger totalNumberOfBytesRead = 0; + + if (_phase == AFEncapsulationBoundaryPhase) { + NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; + totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + if (_phase == AFHeaderPhase) { + NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; + totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + if (_phase == AFBodyPhase) { + NSInteger numberOfBytesRead = 0; + + numberOfBytesRead = [self.inputStream read:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + if (numberOfBytesRead == -1) { + return -1; + } else { + totalNumberOfBytesRead += numberOfBytesRead; + + if ([self.inputStream streamStatus] >= NSStreamStatusAtEnd) { + [self transitionToNextPhase]; + } + } + } + + if (_phase == AFFinalBoundaryPhase) { + NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); + totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; + } + + return totalNumberOfBytesRead; +} + +- (NSInteger)readData:(NSData *)data + intoBuffer:(uint8_t *)buffer + maxLength:(NSUInteger)length +{ + NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length)); + [data getBytes:buffer range:range]; + + _phaseReadOffset += range.length; + + if (((NSUInteger)_phaseReadOffset) >= [data length]) { + [self transitionToNextPhase]; + } + + return (NSInteger)range.length; +} + +- (BOOL)transitionToNextPhase { + if (![[NSThread currentThread] isMainThread]) { + dispatch_sync(dispatch_get_main_queue(), ^{ + [self transitionToNextPhase]; + }); + return YES; + } + + switch (_phase) { + case AFEncapsulationBoundaryPhase: + _phase = AFHeaderPhase; + break; + case AFHeaderPhase: + [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; + [self.inputStream open]; + _phase = AFBodyPhase; + break; + case AFBodyPhase: + [self.inputStream close]; + _phase = AFFinalBoundaryPhase; + break; + case AFFinalBoundaryPhase: + default: + _phase = AFEncapsulationBoundaryPhase; + break; + } + _phaseReadOffset = 0; + + return YES; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; + + bodyPart.stringEncoding = self.stringEncoding; + bodyPart.headers = self.headers; + bodyPart.bodyContentLength = self.bodyContentLength; + bodyPart.body = self.body; + bodyPart.boundary = self.boundary; + + return bodyPart; +} + +@end + +#pragma mark - + +@implementation AFJSONRequestSerializer + ++ (instancetype)serializer { + return [self serializerWithWritingOptions:(NSJSONWritingOptions)0]; +} + ++ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions +{ + AFJSONRequestSerializer *serializer = [[self alloc] init]; + serializer.writingOptions = writingOptions; + + return serializer; +} + +#pragma mark - AFURLRequestSerialization + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + return [super requestBySerializingRequest:request withParameters:parameters error:error]; + } + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + } + + if (![NSJSONSerialization isValidJSONObject:parameters]) { + if (error) { + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"The `parameters` argument is not valid JSON.", @"AFNetworking", nil)}; + *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo]; + } + return nil; + } + + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]; + + if (!jsonData) { + return nil; + } + + [mutableRequest setHTTPBody:jsonData]; + } + + return mutableRequest; +} + +#pragma mark - NSSecureCoding + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.writingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writingOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.writingOptions) forKey:NSStringFromSelector(@selector(writingOptions))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFJSONRequestSerializer *serializer = [super copyWithZone:zone]; + serializer.writingOptions = self.writingOptions; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFPropertyListRequestSerializer + ++ (instancetype)serializer { + return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 writeOptions:0]; +} + ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + writeOptions:(NSPropertyListWriteOptions)writeOptions +{ + AFPropertyListRequestSerializer *serializer = [[self alloc] init]; + serializer.format = format; + serializer.writeOptions = writeOptions; + + return serializer; +} + +#pragma mark - AFURLRequestSerializer + +- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request + withParameters:(id)parameters + error:(NSError *__autoreleasing *)error +{ + NSParameterAssert(request); + + if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) { + return [super requestBySerializingRequest:request withParameters:parameters error:error]; + } + + NSMutableURLRequest *mutableRequest = [request mutableCopy]; + + [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { + if (![request valueForHTTPHeaderField:field]) { + [mutableRequest setValue:value forHTTPHeaderField:field]; + } + }]; + + if (parameters) { + if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) { + [mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"]; + } + + NSData *plistData = [NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]; + + if (!plistData) { + return nil; + } + + [mutableRequest setHTTPBody:plistData]; + } + + return mutableRequest; +} + +#pragma mark - NSSecureCoding + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))]; + [coder encodeObject:@(self.writeOptions) forKey:NSStringFromSelector(@selector(writeOptions))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone]; + serializer.format = self.format; + serializer.writeOptions = self.writeOptions; + + return serializer; +} + +@end diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.h b/TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.h new file mode 100644 index 0000000..56a4d28 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.h @@ -0,0 +1,313 @@ +// AFURLResponseSerialization.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + Recursively removes `NSNull` values from a JSON object. +*/ +FOUNDATION_EXPORT id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions); + +/** + The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data. + + For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object. + */ +@protocol AFURLResponseSerialization + +/** + The response object decoded from the data associated with a specified response. + + @param response The response to be processed. + @param data The response data to be decoded. + @param error The error that occurred while attempting to decode the response data. + + @return The object decoded from the specified response data. + */ +- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response + data:(nullable NSData *)data + error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; + +@end + +#pragma mark - + +/** + `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation. + + Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior. + */ +@interface AFHTTPResponseSerializer : NSObject + +- (instancetype)init; + +/** + Creates and returns a serializer with default configuration. + */ ++ (instancetype)serializer; + +///----------------------------------------- +/// @name Configuring Response Serialization +///----------------------------------------- + +/** + The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation. + + See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html + */ +@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes; + +/** + The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation. + */ +@property (nonatomic, copy, nullable) NSSet *acceptableContentTypes; + +/** + Validates the specified response and data. + + In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks. + + @param response The response to be validated. + @param data The data associated with the response. + @param error The error that occurred while attempting to validate the response. + + @return `YES` if the response is valid, otherwise `NO`. + */ +- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response + data:(nullable NSData *)data + error:(NSError * _Nullable __autoreleasing *)error; + +@end + +#pragma mark - + + +/** + `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses. + + By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types: + + - `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 + +- (instancetype)init; + +/** + Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default. + */ +@property (nonatomic, assign) NSJSONReadingOptions readingOptions; + +/** + Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`. + */ +@property (nonatomic, assign) BOOL removesKeysWithNullValues; + +/** + Creates and returns a JSON serializer with specified reading and writing options. + + @param readingOptions The specified JSON reading options. + */ ++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions; + +@end + +#pragma mark - + +/** + `AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects. + + By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: + + - `application/xml` + - `text/xml` + */ +@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer + +@end + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +/** + `AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects. + + By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: + + - `application/xml` + - `text/xml` + */ +@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer + +- (instancetype)init; + +/** + 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; + +/** + Creates and returns an XML document serializer with the specified options. + + @param mask The XML document options. + */ ++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask; + +@end + +#endif + +#pragma mark - + +/** + `AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects. + + By default, `AFPropertyListResponseSerializer` accepts the following MIME types: + + - `application/x-plist` + */ +@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer + +- (instancetype)init; + +/** + The property list format. Possible values are described in "NSPropertyListFormat". + */ +@property (nonatomic, assign) NSPropertyListFormat format; + +/** + The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions." + */ +@property (nonatomic, assign) NSPropertyListReadOptions readOptions; + +/** + Creates and returns a property list serializer with a specified format, read options, and write options. + + @param format The property list format. + @param readOptions The property list reading options. + */ ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + readOptions:(NSPropertyListReadOptions)readOptions; + +@end + +#pragma mark - + +/** + `AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses. + + By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage: + + - `image/tiff` + - `image/jpeg` + - `image/gif` + - `image/png` + - `image/ico` + - `image/x-icon` + - `image/bmp` + - `image/x-bmp` + - `image/x-xbitmap` + - `image/x-win-bitmap` + */ +@interface AFImageResponseSerializer : AFHTTPResponseSerializer + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH +/** + The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance. + */ +@property (nonatomic, assign) CGFloat imageScale; + +/** + Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default. + */ +@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage; +#endif + +@end + +#pragma mark - + +/** + `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer. + */ +@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer + +/** + The component response serializers. + */ +@property (readonly, nonatomic, copy) NSArray > *responseSerializers; + +/** + Creates and returns a compound serializer comprised of the specified response serializers. + + @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`. + */ ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray > *)responseSerializers; + +@end + +///---------------- +/// @name Constants +///---------------- + +/** + ## Error Domains + + The following error domain is predefined. + + - `NSString * const AFURLResponseSerializationErrorDomain` + + ### Constants + + `AFURLResponseSerializationErrorDomain` + AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`. + */ +FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain; + +/** + ## User info dictionary keys + + These keys may exist in the user info dictionary, in addition to those defined for NSError. + + - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey` + - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey` + + ### Constants + + `AFNetworkingOperationFailingURLResponseErrorKey` + The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. + + `AFNetworkingOperationFailingURLResponseDataErrorKey` + The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey; + +FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey; + +NS_ASSUME_NONNULL_END diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.m b/TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.m new file mode 100755 index 0000000..2715a1b --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFURLResponseSerialization.m @@ -0,0 +1,836 @@ +// AFURLResponseSerialization.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLResponseSerialization.h" + +#import + +#if TARGET_OS_IOS +#import +#elif TARGET_OS_WATCH +#import +#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) +#import +#endif + +NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response"; +NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response"; +NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey = @"com.alamofire.serialization.response.error.data"; + +static NSError * AFErrorWithUnderlyingError(NSError *error, NSError *underlyingError) { + if (!error) { + return underlyingError; + } + + if (!underlyingError || error.userInfo[NSUnderlyingErrorKey]) { + return error; + } + + NSMutableDictionary *mutableUserInfo = [error.userInfo mutableCopy]; + mutableUserInfo[NSUnderlyingErrorKey] = underlyingError; + + return [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:mutableUserInfo]; +} + +static BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger code, NSString *domain) { + if ([error.domain isEqualToString:domain] && error.code == code) { + return YES; + } else if (error.userInfo[NSUnderlyingErrorKey]) { + return AFErrorOrUnderlyingErrorHasCodeInDomain(error.userInfo[NSUnderlyingErrorKey], code, domain); + } + + return NO; +} + +id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) { + if ([JSONObject isKindOfClass:[NSArray class]]) { + NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]]; + for (id value in (NSArray *)JSONObject) { + if (![value isEqual:[NSNull null]]) { + [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)]; + } + } + + return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray]; + } else if ([JSONObject isKindOfClass:[NSDictionary class]]) { + NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject]; + for (id key in [(NSDictionary *)JSONObject allKeys]) { + id value = (NSDictionary *)JSONObject[key]; + if (!value || [value isEqual:[NSNull null]]) { + [mutableDictionary removeObjectForKey:key]; + } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) { + mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions); + } + } + + return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary]; + } + + return JSONObject; +} + +@implementation AFHTTPResponseSerializer + ++ (instancetype)serializer { + return [[self alloc] init]; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)]; + self.acceptableContentTypes = nil; + + return self; +} + +#pragma mark - + +- (BOOL)validateResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError * __autoreleasing *)error +{ + BOOL responseIsValid = YES; + NSError *validationError = nil; + + if ([response isKindOfClass:[NSHTTPURLResponse class]]) { + if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]] && + !([response MIMEType] == nil && [data length] == 0)) { + + if ([data length] > 0 && [response URL]) { + NSMutableDictionary *mutableUserInfo = [@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]], + NSURLErrorFailingURLErrorKey:[response URL], + AFNetworkingOperationFailingURLResponseErrorKey: response, + } mutableCopy]; + if (data) { + mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data; + } + + validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:mutableUserInfo], validationError); + } + + responseIsValid = NO; + } + + if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode] && [response URL]) { + NSMutableDictionary *mutableUserInfo = [@{ + NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode], + NSURLErrorFailingURLErrorKey:[response URL], + AFNetworkingOperationFailingURLResponseErrorKey: response, + } mutableCopy]; + + if (data) { + mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data; + } + + validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorBadServerResponse userInfo:mutableUserInfo], validationError); + + responseIsValid = NO; + } + } + + if (error && !responseIsValid) { + *error = validationError; + } + + return responseIsValid; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + [self validateResponse:(NSHTTPURLResponse *)response data:data error:error]; + + return data; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [self init]; + if (!self) { + return nil; + } + + self.acceptableStatusCodes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; + self.acceptableContentTypes = [decoder decodeObjectOfClass:[NSSet class] forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))]; + [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init]; + serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone]; + serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone]; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFJSONResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithReadingOptions:(NSJSONReadingOptions)0]; +} + ++ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions { + AFJSONResponseSerializer *serializer = [[self alloc] init]; + serializer.readingOptions = readingOptions; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization. + // See https://github.com/rails/rails/issues/1742 + BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]]; + + if (data.length == 0 || isSpace) { + return nil; + } + + NSError *serializationError = nil; + + id responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError]; + + if (!responseObject) + { + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + return nil; + } + + if (self.removesKeysWithNullValues) { + return AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions); + } + + return responseObject; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.readingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readingOptions))] unsignedIntegerValue]; + self.removesKeysWithNullValues = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))] boolValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.readingOptions) forKey:NSStringFromSelector(@selector(readingOptions))]; + [coder encodeObject:@(self.removesKeysWithNullValues) forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFJSONResponseSerializer *serializer = [super copyWithZone:zone]; + serializer.readingOptions = self.readingOptions; + serializer.removesKeysWithNullValues = self.removesKeysWithNullValues; + + return serializer; +} + +@end + +#pragma mark - + +@implementation AFXMLParserResponseSerializer + ++ (instancetype)serializer { + AFXMLParserResponseSerializer *serializer = [[self alloc] init]; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSHTTPURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + return [[NSXMLParser alloc] initWithData:data]; +} + +@end + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +@implementation AFXMLDocumentResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithXMLDocumentOptions:0]; +} + ++ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask { + AFXMLDocumentResponseSerializer *serializer = [[self alloc] init]; + serializer.options = mask; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + NSError *serializationError = nil; + NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError]; + + if (!document) + { + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + return nil; + } + + return document; +} + +#pragma mark - NSSecureCoding + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.options = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(options))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.options) forKey:NSStringFromSelector(@selector(options))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFXMLDocumentResponseSerializer *serializer = [super copyWithZone:zone]; + serializer.options = self.options; + + return serializer; +} + +@end + +#endif + +#pragma mark - + +@implementation AFPropertyListResponseSerializer + ++ (instancetype)serializer { + return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 readOptions:0]; +} + ++ (instancetype)serializerWithFormat:(NSPropertyListFormat)format + readOptions:(NSPropertyListReadOptions)readOptions +{ + AFPropertyListResponseSerializer *serializer = [[self alloc] init]; + serializer.format = format; + serializer.readOptions = readOptions; + + return serializer; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/x-plist", nil]; + + return self; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + + if (!data) { + return nil; + } + + NSError *serializationError = nil; + + id responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError]; + + if (!responseObject) + { + if (error) { + *error = AFErrorWithUnderlyingError(serializationError, *error); + } + return nil; + } + + return responseObject; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue]; + self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))]; + [coder encodeObject:@(self.readOptions) forKey:NSStringFromSelector(@selector(readOptions))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFPropertyListResponseSerializer *serializer = [super copyWithZone:zone]; + serializer.format = self.format; + serializer.readOptions = self.readOptions; + + return serializer; +} + +@end + +#pragma mark - + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH +#import +#import + +@interface UIImage (AFNetworkingSafeImageLoading) ++ (UIImage *)af_safeImageWithData:(NSData *)data; +@end + +static NSLock* imageLock = nil; + +@implementation UIImage (AFNetworkingSafeImageLoading) + ++ (UIImage *)af_safeImageWithData:(NSData *)data { + UIImage* image = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + imageLock = [[NSLock alloc] init]; + }); + + [imageLock lock]; + image = [UIImage imageWithData:data]; + [imageLock unlock]; + return image; +} + +@end + +static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) { + UIImage *image = [UIImage af_safeImageWithData:data]; + if (image.images) { + return image; + } + + return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation]; +} + +static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) { + if (!data || [data length] == 0) { + return nil; + } + + CGImageRef imageRef = NULL; + CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data); + + if ([response.MIMEType isEqualToString:@"image/png"]) { + imageRef = CGImageCreateWithPNGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault); + } else if ([response.MIMEType isEqualToString:@"image/jpeg"]) { + imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault); + + if (imageRef) { + CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef); + CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace); + + // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so fall back to AFImageWithDataAtScale + if (imageColorSpaceModel == kCGColorSpaceModelCMYK) { + CGImageRelease(imageRef); + imageRef = NULL; + } + } + } + + CGDataProviderRelease(dataProvider); + + UIImage *image = AFImageWithDataAtScale(data, scale); + if (!imageRef) { + if (image.images || !image) { + return image; + } + + imageRef = CGImageCreateCopy([image CGImage]); + if (!imageRef) { + return nil; + } + } + + size_t width = CGImageGetWidth(imageRef); + size_t height = CGImageGetHeight(imageRef); + size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef); + + if (width * height > 1024 * 1024 || bitsPerComponent > 8) { + CGImageRelease(imageRef); + + return image; + } + + // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate + size_t bytesPerRow = 0; + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace); + CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); + + if (colorSpaceModel == kCGColorSpaceModelRGB) { + uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wassign-enum" + if (alpha == kCGImageAlphaNone) { + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaNoneSkipFirst; + } else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) { + bitmapInfo &= ~kCGBitmapAlphaInfoMask; + bitmapInfo |= kCGImageAlphaPremultipliedFirst; + } +#pragma clang diagnostic pop + } + + CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo); + + CGColorSpaceRelease(colorSpace); + + if (!context) { + CGImageRelease(imageRef); + + return image; + } + + CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef); + CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context); + + CGContextRelease(context); + + UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation]; + + CGImageRelease(inflatedImageRef); + CGImageRelease(imageRef); + + return inflatedImage; +} +#endif + + +@implementation AFImageResponseSerializer + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + + self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; + +#if TARGET_OS_IOS || TARGET_OS_TV + self.imageScale = [[UIScreen mainScreen] scale]; + self.automaticallyInflatesResponseImage = YES; +#elif TARGET_OS_WATCH + self.imageScale = [[WKInterfaceDevice currentDevice] screenScale]; + self.automaticallyInflatesResponseImage = YES; +#endif + + return self; +} + +#pragma mark - AFURLResponseSerializer + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) { + if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) { + return nil; + } + } + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + if (self.automaticallyInflatesResponseImage) { + return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale); + } else { + return AFImageWithDataAtScale(data, self.imageScale); + } +#else + // Ensure that the image is set to it's correct pixel width and height + NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data]; + NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; + [image addRepresentation:bitimage]; + + return image; +#endif + + return nil; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))]; +#if CGFLOAT_IS_DOUBLE + self.imageScale = [imageScale doubleValue]; +#else + self.imageScale = [imageScale floatValue]; +#endif + + self.automaticallyInflatesResponseImage = [decoder decodeBoolForKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; +#endif + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))]; + [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))]; +#endif +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFImageResponseSerializer *serializer = [super copyWithZone:zone]; + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + serializer.imageScale = self.imageScale; + serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage; +#endif + + return serializer; +} + +@end + +#pragma mark - + +@interface AFCompoundResponseSerializer () +@property (readwrite, nonatomic, copy) NSArray *responseSerializers; +@end + +@implementation AFCompoundResponseSerializer + ++ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers { + AFCompoundResponseSerializer *serializer = [[self alloc] init]; + serializer.responseSerializers = responseSerializers; + + return serializer; +} + +#pragma mark - AFURLResponseSerialization + +- (id)responseObjectForResponse:(NSURLResponse *)response + data:(NSData *)data + error:(NSError *__autoreleasing *)error +{ + for (id serializer in self.responseSerializers) { + if (![serializer isKindOfClass:[AFHTTPResponseSerializer class]]) { + continue; + } + + NSError *serializerError = nil; + id responseObject = [serializer responseObjectForResponse:response data:data error:&serializerError]; + if (responseObject) { + if (error) { + *error = AFErrorWithUnderlyingError(serializerError, *error); + } + + return responseObject; + } + } + + return [super responseObjectForResponse:response data:data error:error]; +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + self = [super initWithCoder:decoder]; + if (!self) { + return nil; + } + + NSSet *classes = [NSSet setWithArray:@[[NSArray class], [AFHTTPResponseSerializer class]]]; + self.responseSerializers = [decoder decodeObjectOfClasses:classes forKey:NSStringFromSelector(@selector(responseSerializers))]; + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; + + [coder encodeObject:self.responseSerializers forKey:NSStringFromSelector(@selector(responseSerializers))]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + AFCompoundResponseSerializer *serializer = [super copyWithZone:zone]; + serializer.responseSerializers = self.responseSerializers; + + return serializer; +} + +@end diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.h b/TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.h new file mode 100644 index 0000000..88700c3 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.h @@ -0,0 +1,516 @@ +// AFURLSessionManager.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import + +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" +#import "AFSecurityPolicy.h" +#import "AFCompatibilityMacros.h" +#if !TARGET_OS_WATCH +#import "AFNetworkReachabilityManager.h" +#endif + +/** + `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. + + ## Subclassing Notes + + This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead. + + ## NSURLSession & NSURLSessionTask Delegate Methods + + `AFURLSessionManager` implements the following delegate methods: + + ### `NSURLSessionDelegate` + + - `URLSession:didBecomeInvalidWithError:` + - `URLSession:didReceiveChallenge:completionHandler:` + - `URLSessionDidFinishEventsForBackgroundURLSession:` + + ### `NSURLSessionTaskDelegate` + + - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:` + - `URLSession:task:didReceiveChallenge:completionHandler:` + - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` + - `URLSession:task:needNewBodyStream:` + - `URLSession:task:didCompleteWithError:` + + ### `NSURLSessionDataDelegate` + + - `URLSession:dataTask:didReceiveResponse:completionHandler:` + - `URLSession:dataTask:didBecomeDownloadTask:` + - `URLSession:dataTask:didReceiveData:` + - `URLSession:dataTask:willCacheResponse:completionHandler:` + + ### `NSURLSessionDownloadDelegate` + + - `URLSession:downloadTask:didFinishDownloadingToURL:` + - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:` + - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:` + + If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. + + ## Network Reachability Monitoring + + Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details. + + ## NSCoding Caveats + + - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`. + + ## NSCopying Caveats + + - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original. + - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied. + + @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance. + */ + +NS_ASSUME_NONNULL_BEGIN + +@interface AFURLSessionManager : NSObject + +/** + The managed session. + */ +@property (readonly, nonatomic, strong) NSURLSession *session; + +/** + The operation queue on which delegate callbacks are run. + */ +@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue; + +/** + Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`. + + @warning `responseSerializer` must not be `nil`. + */ +@property (nonatomic, strong) id responseSerializer; + +///------------------------------- +/// @name Managing Security Policy +///------------------------------- + +/** + The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified. + */ +@property (nonatomic, strong) AFSecurityPolicy *securityPolicy; + +#if !TARGET_OS_WATCH +///-------------------------------------- +/// @name Monitoring Network Reachability +///-------------------------------------- + +/** + The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default. + */ +@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager; +#endif + +///---------------------------- +/// @name Getting Session Tasks +///---------------------------- + +/** + The data, upload, and download tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *tasks; + +/** + The data tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *dataTasks; + +/** + The upload tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *uploadTasks; + +/** + The download tasks currently run by the managed session. + */ +@property (readonly, nonatomic, strong) NSArray *downloadTasks; + +///------------------------------- +/// @name Managing Callback Queues +///------------------------------- + +/** + The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used. + */ +@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue; + +/** + The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used. + */ +@property (nonatomic, strong, nullable) dispatch_group_t completionGroup; + +///--------------------- +/// @name Initialization +///--------------------- + +/** + Creates and returns a manager for a session created with the specified configuration. This is the designated initializer. + + @param configuration The configuration used to create the managed session. + + @return A manager for a newly-created session. + */ +- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER; + +/** + Invalidates the managed session, optionally canceling pending tasks and optionally resets given session. + + @param cancelPendingTasks Whether or not to cancel pending tasks. + @param resetSession Whether or not to reset the session of the manager. + */ +- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks resetSession:(BOOL)resetSession; + +///------------------------- +/// @name Running Data Tasks +///------------------------- + +/** + Creates an `NSURLSessionDataTask` with the specified request. + + @param request The HTTP request for the request. + @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock + downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; + +///--------------------------- +/// @name Running Upload Tasks +///--------------------------- + +/** + Creates an `NSURLSessionUploadTask` with the specified request for a local file. + + @param request The HTTP request for the request. + @param fileURL A URL to the local file to be uploaded. + @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + + @see `attemptsToRecreateUploadTasksForBackgroundSessions` + */ +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromFile:(NSURL *)fileURL + progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; + +/** + Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body. + + @param request The HTTP request for the request. + @param bodyData A data object containing the HTTP body to be uploaded. + @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromData:(nullable NSData *)bodyData + progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; + +/** + Creates an `NSURLSessionUploadTask` with the specified streaming request. + + @param request The HTTP request for the request. + @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue. + @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any. + */ +- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request + progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler; + +///----------------------------- +/// @name Running Download Tasks +///----------------------------- + +/** + Creates an `NSURLSessionDownloadTask` with the specified request. + + @param request The HTTP request for the request. + @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. + @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. + + @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method. + */ +- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request + progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock + destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler; + +/** + Creates an `NSURLSessionDownloadTask` with the specified resume data. + + @param resumeData The data used to resume downloading. + @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue. + @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL. + @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any. + */ +- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData + progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock + destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler; + +///--------------------------------- +/// @name Getting Progress for Tasks +///--------------------------------- + +/** + Returns the upload progress of the specified task. + + @param task The session task. Must not be `nil`. + + @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable. + */ +- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task; + +/** + Returns the download progress of the specified task. + + @param task The session task. Must not be `nil`. + + @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable. + */ +- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task; + +///----------------------------------------- +/// @name Setting Session Delegate Callbacks +///----------------------------------------- + +/** + Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`. + + @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation. + */ +- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block; + +/** + Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`. + + @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge. + + @warning Implementing a session authentication challenge handler yourself totally bypasses AFNetworking's security policy defined in `AFSecurityPolicy`. Make sure you fully understand the implications before implementing a custom session authentication challenge handler. If you do not want to bypass AFNetworking's security policy, use `setTaskDidReceiveAuthenticationChallengeBlock:` instead. + + @see -securityPolicy + @see -setTaskDidReceiveAuthenticationChallengeBlock: + */ +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block; + +///-------------------------------------- +/// @name Setting Task Delegate Callbacks +///-------------------------------------- + +/** + Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`. + + @param block A block object to be executed when a task requires a new request body stream. + */ +- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block; + +/** + Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`. + + @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response. + */ +- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * _Nullable (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block; + +/** + Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`. + + @param authenticationChallengeHandler A block object to be executed when a session task has received a request specific authentication challenge. + + When implementing an authentication challenge handler, you should check the authentication method first (`challenge.protectionSpace.authenticationMethod `) to decide if you want to handle the authentication challenge yourself or if you want AFNetworking to handle it. If you want AFNetworking to handle the authentication challenge, just return `@(NSURLSessionAuthChallengePerformDefaultHandling)`. For example, you certainly want AFNetworking to handle certificate validation (i.e. authentication method == `NSURLAuthenticationMethodServerTrust`) as defined by the security policy. If you want to handle the challenge yourself, you have four options: + + 1. Return `nil` from the authentication challenge handler. You **MUST** call the completion handler with a disposition and credentials yourself. Use this if you need to present a user interface to let the user enter their credentials. + 2. Return an `NSError` object from the authentication challenge handler. You **MUST NOT** call the completion handler when returning an `NSError `. The returned error will be reported in the completion handler of the task. Use this if you need to abort an authentication challenge with a specific error. + 3. Return an `NSURLCredential` object from the authentication challenge handler. You **MUST NOT** call the completion handler when returning an `NSURLCredential`. The returned credentials will be used to fulfil the challenge. Use this when you can get credentials without presenting a user interface. + 4. Return an `NSNumber` object wrapping an `NSURLSessionAuthChallengeDisposition`. Supported values are `@(NSURLSessionAuthChallengePerformDefaultHandling)`, `@(NSURLSessionAuthChallengeCancelAuthenticationChallenge)` and `@(NSURLSessionAuthChallengeRejectProtectionSpace)`. You **MUST NOT** call the completion handler when returning an `NSNumber`. + + If you return anything else from the authentication challenge handler, an exception will be thrown. + + For more information about how URL sessions handle the different types of authentication challenges, see [NSURLSession](https://developer.apple.com/reference/foundation/nsurlsession?language=objc) and [URL Session Programming Guide](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html). + + @see -securityPolicy + */ +- (void)setAuthenticationChallengeHandler:(id (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, void (^completionHandler)(NSURLSessionAuthChallengeDisposition , NSURLCredential * _Nullable)))authenticationChallengeHandler; + +/** + Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`. + + @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. + */ +- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block; + +/** + Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`. + + @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task. + */ +- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block; + +/** + Sets a block to be executed when metrics are finalized related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didFinishCollectingMetrics:`. + + @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any metrics that were collected in the process of executing the task. + */ +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +- (void)setTaskDidFinishCollectingMetricsBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSURLSessionTaskMetrics * _Nullable metrics))block AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)); +#endif +///------------------------------------------- +/// @name Setting Data Task Delegate Callbacks +///------------------------------------------- + +/** + Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`. + + @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response. + */ +- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block; + +/** + Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`. + + @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become. + */ +- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block; + +/** + Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue. + */ +- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block; + +/** + Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`. + + @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response. + */ +- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block; + +/** + Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`. + + @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 AF_API_UNAVAILABLE(macos); + +///----------------------------------------------- +/// @name Setting Download Task Delegate Callbacks +///----------------------------------------------- + +/** + Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`. + + @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error. + */ +- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * _Nullable (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block; + +/** + Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:`. + + @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue. + */ +- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block; + +/** + Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`. + + @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded. + */ +- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block; + +@end + +///-------------------- +/// @name Notifications +///-------------------- + +/** + Posted when a task resumes. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification; + +/** + Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification; + +/** + Posted when a task suspends its execution. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification; + +/** + Posted when a session is invalidated. + */ +FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification; + +/** + Posted when a session download task finished moving the temporary download file to a specified destination successfully. + */ +FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidMoveFileSuccessfullyNotification; + +/** + Posted when a session download task encountered an error when moving the temporary download file to a specified destination. + */ +FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification; + +/** + The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if response data exists for the task. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey; + +/** + The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the response was serialized. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey; + +/** + The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the task has an associated response serializer. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey; + +/** + The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an the response data has been stored directly to disk. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey; + +/** + Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an error exists. + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey; + +/** + The session task metrics taken from the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteSessionTaskMetrics` + */ +FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSessionTaskMetrics; + +NS_ASSUME_NONNULL_END diff --git a/TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.m b/TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.m new file mode 100644 index 0000000..c8b6810 --- /dev/null +++ b/TwoNetworking/AFNetworking/AFNetworking/AFURLSessionManager.m @@ -0,0 +1,1274 @@ +// AFURLSessionManager.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFURLSessionManager.h" +#import + +static dispatch_queue_t url_session_manager_processing_queue() { + static dispatch_queue_t af_url_session_manager_processing_queue; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_processing_queue = dispatch_queue_create("com.alamofire.networking.session.manager.processing", DISPATCH_QUEUE_CONCURRENT); + }); + + return af_url_session_manager_processing_queue; +} + +static dispatch_group_t url_session_manager_completion_group() { + static dispatch_group_t af_url_session_manager_completion_group; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + af_url_session_manager_completion_group = dispatch_group_create(); + }); + + return af_url_session_manager_completion_group; +} + +NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume"; +NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete"; +NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend"; +NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate"; +NSString * const AFURLSessionDownloadTaskDidMoveFileSuccessfullyNotification = @"com.alamofire.networking.session.download.file-manager-succeed"; +NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error"; + +NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse"; +NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer"; +NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata"; +NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error"; +NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath"; +NSString * const AFNetworkingTaskDidCompleteSessionTaskMetrics = @"com.alamofire.networking.complete.sessiontaskmetrics"; + +static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock"; + +typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error); +typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential); + +typedef NSURLRequest * (^AFURLSessionTaskWillPerformHTTPRedirectionBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request); +typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionTaskDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential); +typedef id (^AFURLSessionTaskAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, void (^completionHandler)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential)); +typedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSession *session); + +typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task); +typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend); +typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error); +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +typedef void (^AFURLSessionTaskDidFinishCollectingMetricsBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLSessionTaskMetrics * metrics) AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)); +#endif + +typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response); +typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask); +typedef void (^AFURLSessionDataTaskDidReceiveDataBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data); +typedef NSCachedURLResponse * (^AFURLSessionDataTaskWillCacheResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse); + +typedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location); +typedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite); +typedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes); +typedef void (^AFURLSessionTaskProgressBlock)(NSProgress *); + +typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error); + +#pragma mark - + +@interface AFURLSessionManagerTaskDelegate : NSObject +- (instancetype)initWithTask:(NSURLSessionTask *)task; +@property (nonatomic, weak) AFURLSessionManager *manager; +@property (nonatomic, strong) NSMutableData *mutableData; +@property (nonatomic, strong) NSProgress *uploadProgress; +@property (nonatomic, strong) NSProgress *downloadProgress; +@property (nonatomic, copy) NSURL *downloadFileURL; +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +@property (nonatomic, strong) NSURLSessionTaskMetrics *sessionTaskMetrics AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)); +#endif +@property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (nonatomic, copy) AFURLSessionTaskProgressBlock uploadProgressBlock; +@property (nonatomic, copy) AFURLSessionTaskProgressBlock downloadProgressBlock; +@property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler; +@end + +@implementation AFURLSessionManagerTaskDelegate + +- (instancetype)initWithTask:(NSURLSessionTask *)task { + self = [super init]; + if (!self) { + return nil; + } + + _mutableData = [NSMutableData data]; + _uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil]; + _downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil]; + + __weak __typeof__(task) weakTask = task; + for (NSProgress *progress in @[ _uploadProgress, _downloadProgress ]) + { + progress.totalUnitCount = NSURLSessionTransferSizeUnknown; + progress.cancellable = YES; + progress.cancellationHandler = ^{ + [weakTask cancel]; + }; + progress.pausable = YES; + progress.pausingHandler = ^{ + [weakTask suspend]; + }; +#if AF_CAN_USE_AT_AVAILABLE + if (@available(macOS 10.11, *)) +#else + if ([progress respondsToSelector:@selector(setResumingHandler:)]) +#endif + { + progress.resumingHandler = ^{ + [weakTask resume]; + }; + } + + [progress addObserver:self + forKeyPath:NSStringFromSelector(@selector(fractionCompleted)) + options:NSKeyValueObservingOptionNew + context:NULL]; + } + return self; +} + +- (void)dealloc { + [self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))]; + [self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))]; +} + +#pragma mark - NSProgress Tracking + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if ([object isEqual:self.downloadProgress]) { + if (self.downloadProgressBlock) { + self.downloadProgressBlock(object); + } + } + else if ([object isEqual:self.uploadProgress]) { + if (self.uploadProgressBlock) { + self.uploadProgressBlock(object); + } + } +} + +static const void * const AuthenticationChallengeErrorKey = &AuthenticationChallengeErrorKey; + +#pragma mark - NSURLSessionTaskDelegate + +- (void)URLSession:(__unused NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ + error = objc_getAssociatedObject(task, AuthenticationChallengeErrorKey) ?: error; + __strong AFURLSessionManager *manager = self.manager; + + __block id responseObject = nil; + + NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; + userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer; + + //Performance Improvement from #2672 + NSData *data = nil; + if (self.mutableData) { + data = [self.mutableData copy]; + //We no longer need the reference, so nil it out to gain back some memory. + self.mutableData = nil; + } + +#if AF_CAN_USE_AT_AVAILABLE && AF_CAN_INCLUDE_SESSION_TASK_METRICS + if (@available(iOS 10, macOS 10.12, watchOS 3, tvOS 10, *)) { + if (self.sessionTaskMetrics) { + userInfo[AFNetworkingTaskDidCompleteSessionTaskMetrics] = self.sessionTaskMetrics; + } + } +#endif + + if (self.downloadFileURL) { + userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL; + } else if (data) { + userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = data; + } + + if (error) { + userInfo[AFNetworkingTaskDidCompleteErrorKey] = error; + + dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{ + if (self.completionHandler) { + self.completionHandler(task.response, responseObject, error); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo]; + }); + }); + } else { + dispatch_async(url_session_manager_processing_queue(), ^{ + NSError *serializationError = nil; + responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:data error:&serializationError]; + + if (self.downloadFileURL) { + responseObject = self.downloadFileURL; + } + + if (responseObject) { + userInfo[AFNetworkingTaskDidCompleteSerializedResponseKey] = responseObject; + } + + if (serializationError) { + userInfo[AFNetworkingTaskDidCompleteErrorKey] = serializationError; + } + + dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{ + if (self.completionHandler) { + self.completionHandler(task.response, responseObject, serializationError); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo]; + }); + }); + }); + } +} + +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)) { + self.sessionTaskMetrics = metrics; +} +#endif + +#pragma mark - NSURLSessionDataDelegate + +- (void)URLSession:(__unused NSURLSession *)session + dataTask:(__unused NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + self.downloadProgress.totalUnitCount = dataTask.countOfBytesExpectedToReceive; + self.downloadProgress.completedUnitCount = dataTask.countOfBytesReceived; + + [self.mutableData appendData:data]; +} + +- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend{ + + self.uploadProgress.totalUnitCount = task.countOfBytesExpectedToSend; + self.uploadProgress.completedUnitCount = task.countOfBytesSent; +} + +#pragma mark - NSURLSessionDownloadDelegate + +- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask + didWriteData:(int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite{ + + self.downloadProgress.totalUnitCount = totalBytesExpectedToWrite; + self.downloadProgress.completedUnitCount = totalBytesWritten; +} + +- (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes{ + + self.downloadProgress.totalUnitCount = expectedTotalBytes; + self.downloadProgress.completedUnitCount = fileOffset; +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location +{ + self.downloadFileURL = nil; + + if (self.downloadTaskDidFinishDownloading) { + self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location); + if (self.downloadFileURL) { + NSError *fileManagerError = nil; + + if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError]) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo]; + } else { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidMoveFileSuccessfullyNotification object:downloadTask userInfo:nil]; + } + } + } +} + +@end + +#pragma mark - + +/** + * A workaround for issues related to key-value observing the `state` of an `NSURLSessionTask`. + * + * See: + * - https://github.com/AFNetworking/AFNetworking/issues/1477 + * - https://github.com/AFNetworking/AFNetworking/issues/2638 + * - https://github.com/AFNetworking/AFNetworking/pull/2702 + */ + +static inline void af_swizzleSelector(Class theClass, SEL originalSelector, SEL swizzledSelector) { + Method originalMethod = class_getInstanceMethod(theClass, originalSelector); + Method swizzledMethod = class_getInstanceMethod(theClass, swizzledSelector); + method_exchangeImplementations(originalMethod, swizzledMethod); +} + +static inline BOOL af_addMethod(Class theClass, SEL selector, Method method) { + return class_addMethod(theClass, selector, method_getImplementation(method), method_getTypeEncoding(method)); +} + +static NSString * const AFNSURLSessionTaskDidResumeNotification = @"com.alamofire.networking.nsurlsessiontask.resume"; +static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofire.networking.nsurlsessiontask.suspend"; + +@interface _AFURLSessionTaskSwizzling : NSObject + +@end + +@implementation _AFURLSessionTaskSwizzling + ++ (void)load { + /** + WARNING: Trouble Ahead + https://github.com/AFNetworking/AFNetworking/pull/2702 + */ + + if (NSClassFromString(@"NSURLSessionTask")) { + /** + iOS 7 and iOS 8 differ in NSURLSessionTask implementation, which makes the next bit of code a bit tricky. + Many Unit Tests have been built to validate as much of this behavior has possible. + Here is what we know: + - NSURLSessionTasks are implemented with class clusters, meaning the class you request from the API isn't actually the type of class you will get back. + - Simply referencing `[NSURLSessionTask class]` will not work. You need to ask an `NSURLSession` to actually create an object, and grab the class from there. + - On iOS 7, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `__NSCFURLSessionTask`. + - On iOS 8, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `NSURLSessionTask`. + - On iOS 7, `__NSCFLocalSessionTask` and `__NSCFURLSessionTask` are the only two classes that have their own implementations of `resume` and `suspend`, and `__NSCFLocalSessionTask` DOES NOT CALL SUPER. This means both classes need to be swizzled. + - On iOS 8, `NSURLSessionTask` is the only class that implements `resume` and `suspend`. This means this is the only class that needs to be swizzled. + - Because `NSURLSessionTask` is not involved in the class hierarchy for every version of iOS, its easier to add the swizzled methods to a dummy class and manage them there. + + Some Assumptions: + - No implementations of `resume` or `suspend` call super. If this were to change in a future version of iOS, we'd need to handle it. + - No background task classes override `resume` or `suspend` + + The current solution: + 1) Grab an instance of `__NSCFLocalDataTask` by asking an instance of `NSURLSession` for a data task. + 2) Grab a pointer to the original implementation of `af_resume` + 3) Check to see if the current class has an implementation of resume. If so, continue to step 4. + 4) Grab the super class of the current class. + 5) Grab a pointer for the current class to the current implementation of `resume`. + 6) Grab a pointer for the super class to the current implementation of `resume`. + 7) If the current class implementation of `resume` is not equal to the super class implementation of `resume` AND the current implementation of `resume` is not equal to the original implementation of `af_resume`, THEN swizzle the methods + 8) Set the current class to the super class, and repeat steps 3-8 + */ + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration]; + NSURLSession *session = [NSURLSession sessionWithConfiguration:configuration]; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" + NSURLSessionDataTask *localDataTask = [session dataTaskWithURL:nil]; +#pragma clang diagnostic pop + IMP originalAFResumeIMP = method_getImplementation(class_getInstanceMethod([self class], @selector(af_resume))); + Class currentClass = [localDataTask class]; + + while (class_getInstanceMethod(currentClass, @selector(resume))) { + Class superClass = [currentClass superclass]; + IMP classResumeIMP = method_getImplementation(class_getInstanceMethod(currentClass, @selector(resume))); + IMP superclassResumeIMP = method_getImplementation(class_getInstanceMethod(superClass, @selector(resume))); + if (classResumeIMP != superclassResumeIMP && + originalAFResumeIMP != classResumeIMP) { + [self swizzleResumeAndSuspendMethodForClass:currentClass]; + } + currentClass = [currentClass superclass]; + } + + [localDataTask cancel]; + [session finishTasksAndInvalidate]; + } +} + ++ (void)swizzleResumeAndSuspendMethodForClass:(Class)theClass { + Method afResumeMethod = class_getInstanceMethod(self, @selector(af_resume)); + Method afSuspendMethod = class_getInstanceMethod(self, @selector(af_suspend)); + + if (af_addMethod(theClass, @selector(af_resume), afResumeMethod)) { + af_swizzleSelector(theClass, @selector(resume), @selector(af_resume)); + } + + if (af_addMethod(theClass, @selector(af_suspend), afSuspendMethod)) { + af_swizzleSelector(theClass, @selector(suspend), @selector(af_suspend)); + } +} + +- (NSURLSessionTaskState)state { + NSAssert(NO, @"State method should never be called in the actual dummy class"); + return NSURLSessionTaskStateCanceling; +} + +- (void)af_resume { + NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state"); + NSURLSessionTaskState state = [self state]; + [self af_resume]; + + if (state != NSURLSessionTaskStateRunning) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self]; + } +} + +- (void)af_suspend { + NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state"); + NSURLSessionTaskState state = [self state]; + [self af_suspend]; + + if (state != NSURLSessionTaskStateSuspended) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidSuspendNotification object:self]; + } +} +@end + +#pragma mark - + +@interface AFURLSessionManager () +@property (readwrite, nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration; +@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue; +@property (readwrite, nonatomic, strong) NSURLSession *session; +@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableTaskDelegatesKeyedByTaskIdentifier; +@property (readonly, nonatomic, copy) NSString *taskDescriptionForSessionTasks; +@property (readwrite, nonatomic, strong) NSLock *lock; +@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid; +@property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge; +@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession AF_API_UNAVAILABLE(macos); +@property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection; +@property (readwrite, nonatomic, copy) AFURLSessionTaskAuthenticationChallengeBlock authenticationChallengeHandler; +@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData; +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete; +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +@property (readwrite, nonatomic, copy) AFURLSessionTaskDidFinishCollectingMetricsBlock taskDidFinishCollectingMetrics AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)); +#endif +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData; +@property (readwrite, nonatomic, copy) AFURLSessionDataTaskWillCacheResponseBlock dataTaskWillCacheResponse; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidWriteDataBlock downloadTaskDidWriteData; +@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidResumeBlock downloadTaskDidResume; +@end + +@implementation AFURLSessionManager + +- (instancetype)init { + return [self initWithSessionConfiguration:nil]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + self = [super init]; + if (!self) { + return nil; + } + + if (!configuration) { + configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + } + + self.sessionConfiguration = configuration; + + self.operationQueue = [[NSOperationQueue alloc] init]; + self.operationQueue.maxConcurrentOperationCount = 1; + + self.responseSerializer = [AFJSONResponseSerializer serializer]; + + self.securityPolicy = [AFSecurityPolicy defaultPolicy]; + +#if !TARGET_OS_WATCH + self.reachabilityManager = [AFNetworkReachabilityManager sharedManager]; +#endif + + self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init]; + + self.lock = [[NSLock alloc] init]; + self.lock.name = AFURLSessionManagerLockName; + + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + for (NSURLSessionDataTask *task in dataTasks) { + [self addDelegateForDataTask:task uploadProgress:nil downloadProgress:nil completionHandler:nil]; + } + + for (NSURLSessionUploadTask *uploadTask in uploadTasks) { + [self addDelegateForUploadTask:uploadTask progress:nil completionHandler:nil]; + } + + for (NSURLSessionDownloadTask *downloadTask in downloadTasks) { + [self addDelegateForDownloadTask:downloadTask progress:nil destination:nil completionHandler:nil]; + } + }]; + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +#pragma mark - + +- (NSURLSession *)session { + + @synchronized (self) { + if (!_session) { + _session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration delegate:self delegateQueue:self.operationQueue]; + } + } + return _session; +} + +#pragma mark - + + +- (NSString *)taskDescriptionForSessionTasks { + return [NSString stringWithFormat:@"%p", self]; +} + +- (void)taskDidResume:(NSNotification *)notification { + NSURLSessionTask *task = notification.object; + if ([task respondsToSelector:@selector(taskDescription)]) { + if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidResumeNotification object:task]; + }); + } + } +} + +- (void)taskDidSuspend:(NSNotification *)notification { + NSURLSessionTask *task = notification.object; + if ([task respondsToSelector:@selector(taskDescription)]) { + if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidSuspendNotification object:task]; + }); + } + } +} + +#pragma mark - + +- (AFURLSessionManagerTaskDelegate *)delegateForTask:(NSURLSessionTask *)task { + NSParameterAssert(task); + + AFURLSessionManagerTaskDelegate *delegate = nil; + [self.lock lock]; + delegate = self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)]; + [self.lock unlock]; + + return delegate; +} + +- (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate + forTask:(NSURLSessionTask *)task +{ + NSParameterAssert(task); + NSParameterAssert(delegate); + + [self.lock lock]; + self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate; + [self addNotificationObserverForTask:task]; + [self.lock unlock]; +} + +- (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:dataTask]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + dataTask.taskDescription = self.taskDescriptionForSessionTasks; + [self setDelegate:delegate forTask:dataTask]; + + delegate.uploadProgressBlock = uploadProgressBlock; + delegate.downloadProgressBlock = downloadProgressBlock; +} + +- (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:uploadTask]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + uploadTask.taskDescription = self.taskDescriptionForSessionTasks; + + [self setDelegate:delegate forTask:uploadTask]; + + delegate.uploadProgressBlock = uploadProgressBlock; +} + +- (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask + progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] initWithTask:downloadTask]; + delegate.manager = self; + delegate.completionHandler = completionHandler; + + if (destination) { + delegate.downloadTaskDidFinishDownloading = ^NSURL * (NSURLSession * __unused session, NSURLSessionDownloadTask *task, NSURL *location) { + return destination(location, task.response); + }; + } + + downloadTask.taskDescription = self.taskDescriptionForSessionTasks; + + [self setDelegate:delegate forTask:downloadTask]; + + delegate.downloadProgressBlock = downloadProgressBlock; +} + +- (void)removeDelegateForTask:(NSURLSessionTask *)task { + NSParameterAssert(task); + + [self.lock lock]; + [self removeNotificationObserverForTask:task]; + [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)]; + [self.lock unlock]; +} + +#pragma mark - + +- (NSArray *)tasksForKeyPath:(NSString *)keyPath { + __block NSArray *tasks = nil; + dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); + [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(dataTasks))]) { + tasks = dataTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(uploadTasks))]) { + tasks = uploadTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(downloadTasks))]) { + tasks = downloadTasks; + } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(tasks))]) { + tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@"@unionOfArrays.self"]; + } + + dispatch_semaphore_signal(semaphore); + }]; + + dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER); + + return tasks; +} + +- (NSArray *)tasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)dataTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)uploadTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +- (NSArray *)downloadTasks { + return [self tasksForKeyPath:NSStringFromSelector(_cmd)]; +} + +#pragma mark - + +- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks resetSession:(BOOL)resetSession { + if (cancelPendingTasks) { + [self.session invalidateAndCancel]; + } else { + [self.session finishTasksAndInvalidate]; + } + if (resetSession) { + self.session = nil; + } +} + +#pragma mark - + +- (void)setResponseSerializer:(id )responseSerializer { + NSParameterAssert(responseSerializer); + + _responseSerializer = responseSerializer; +} + +#pragma mark - +- (void)addNotificationObserverForTask:(NSURLSessionTask *)task { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:task]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:task]; +} + +- (void)removeNotificationObserverForTask:(NSURLSessionTask *)task { + [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidSuspendNotification object:task]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidResumeNotification object:task]; +} + +#pragma mark - + +- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request + uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock + downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock + completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler { + + NSURLSessionDataTask *dataTask = [self.session dataTaskWithRequest:request]; + + [self addDelegateForDataTask:dataTask uploadProgress:uploadProgressBlock downloadProgress:downloadProgressBlock completionHandler:completionHandler]; + + return dataTask; +} + +#pragma mark - + +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromFile:(NSURL *)fileURL + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + NSURLSessionUploadTask *uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL]; + + if (uploadTask) { + [self addDelegateForUploadTask:uploadTask + progress:uploadProgressBlock + completionHandler:completionHandler]; + } + + return uploadTask; +} + +- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request + fromData:(NSData *)bodyData + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + NSURLSessionUploadTask *uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData]; + + [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler]; + + return uploadTask; +} + +- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request + progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock + completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler +{ + NSURLSessionUploadTask *uploadTask = [self.session uploadTaskWithStreamedRequest:request]; + + [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler]; + + return uploadTask; +} + +#pragma mark - + +- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request + progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + NSURLSessionDownloadTask *downloadTask = [self.session downloadTaskWithRequest:request]; + + [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler]; + + return downloadTask; +} + +- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData + progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock + destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination + completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler +{ + NSURLSessionDownloadTask *downloadTask = [self.session downloadTaskWithResumeData:resumeData]; + + [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler]; + + return downloadTask; +} + +#pragma mark - +- (NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task { + return [[self delegateForTask:task] uploadProgress]; +} + +- (NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task { + return [[self delegateForTask:task] downloadProgress]; +} + +#pragma mark - + +- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block { + self.sessionDidBecomeInvalid = block; +} + +- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block { + self.sessionDidReceiveAuthenticationChallenge = block; +} + +#if !TARGET_OS_OSX +- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block { + self.didFinishEventsForBackgroundURLSession = block; +} +#endif + +#pragma mark - + +- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block { + self.taskNeedNewBodyStream = block; +} + +- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block { + self.taskWillPerformHTTPRedirection = block; +} + +- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block { + self.taskDidSendBodyData = block; +} + +- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block { + self.taskDidComplete = block; +} + +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +- (void)setTaskDidFinishCollectingMetricsBlock:(void (^)(NSURLSession * _Nonnull, NSURLSessionTask * _Nonnull, NSURLSessionTaskMetrics * _Nullable))block AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)) { + self.taskDidFinishCollectingMetrics = block; +} +#endif + +#pragma mark - + +- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block { + self.dataTaskDidReceiveResponse = block; +} + +- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block { + self.dataTaskDidBecomeDownloadTask = block; +} + +- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block { + self.dataTaskDidReceiveData = block; +} + +- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block { + self.dataTaskWillCacheResponse = block; +} + +#pragma mark - + +- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block { + self.downloadTaskDidFinishDownloading = block; +} + +- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block { + self.downloadTaskDidWriteData = block; +} + +- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block { + self.downloadTaskDidResume = block; +} + +#pragma mark - NSObject + +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %p, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, self.session, self.operationQueue]; +} + +- (BOOL)respondsToSelector:(SEL)selector { + if (selector == @selector(URLSession:didReceiveChallenge:completionHandler:)) { + return self.sessionDidReceiveAuthenticationChallenge != nil; + } else if (selector == @selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)) { + return self.taskWillPerformHTTPRedirection != nil; + } else if (selector == @selector(URLSession:dataTask:didReceiveResponse:completionHandler:)) { + return self.dataTaskDidReceiveResponse != nil; + } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) { + return self.dataTaskWillCacheResponse != nil; + } +#if !TARGET_OS_OSX + else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) { + return self.didFinishEventsForBackgroundURLSession != nil; + } +#endif + + return [[self class] instancesRespondToSelector:selector]; +} + +#pragma mark - NSURLSessionDelegate + +- (void)URLSession:(NSURLSession *)session +didBecomeInvalidWithError:(NSError *)error +{ + if (self.sessionDidBecomeInvalid) { + self.sessionDidBecomeInvalid(session, error); + } + + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session]; +} + +- (void)URLSession:(NSURLSession *)session +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler +{ + NSAssert(self.sessionDidReceiveAuthenticationChallenge != nil, @"`respondsToSelector:` implementation forces `URLSession:didReceiveChallenge:completionHandler:` to be called only if `self.sessionDidReceiveAuthenticationChallenge` is not nil"); + + NSURLCredential *credential = nil; + NSURLSessionAuthChallengeDisposition disposition = self.sessionDidReceiveAuthenticationChallenge(session, challenge, &credential); + + if (completionHandler) { + completionHandler(disposition, credential); + } +} + +#pragma mark - NSURLSessionTaskDelegate + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)response + newRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLRequest *))completionHandler +{ + NSURLRequest *redirectRequest = request; + + if (self.taskWillPerformHTTPRedirection) { + redirectRequest = self.taskWillPerformHTTPRedirection(session, task, response, request); + } + + if (completionHandler) { + completionHandler(redirectRequest); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge + completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler +{ + BOOL evaluateServerTrust = NO; + NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling; + NSURLCredential *credential = nil; + + if (self.authenticationChallengeHandler) { + id result = self.authenticationChallengeHandler(session, task, challenge, completionHandler); + if (result == nil) { + return; + } else if ([result isKindOfClass:NSError.class]) { + objc_setAssociatedObject(task, AuthenticationChallengeErrorKey, result, OBJC_ASSOCIATION_RETAIN); + disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + } else if ([result isKindOfClass:NSURLCredential.class]) { + credential = result; + disposition = NSURLSessionAuthChallengeUseCredential; + } else if ([result isKindOfClass:NSNumber.class]) { + disposition = [result integerValue]; + NSAssert(disposition == NSURLSessionAuthChallengePerformDefaultHandling || disposition == NSURLSessionAuthChallengeCancelAuthenticationChallenge || disposition == NSURLSessionAuthChallengeRejectProtectionSpace, @""); + evaluateServerTrust = disposition == NSURLSessionAuthChallengePerformDefaultHandling && [challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]; + } else { + @throw [NSException exceptionWithName:@"Invalid Return Value" reason:@"The return value from the authentication challenge handler must be nil, an NSError, an NSURLCredential or an NSNumber." userInfo:nil]; + } + } else { + evaluateServerTrust = [challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]; + } + + if (evaluateServerTrust) { + if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) { + disposition = NSURLSessionAuthChallengeUseCredential; + credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]; + } else { + objc_setAssociatedObject(task, AuthenticationChallengeErrorKey, + [self serverTrustErrorForServerTrust:challenge.protectionSpace.serverTrust url:task.currentRequest.URL], + OBJC_ASSOCIATION_RETAIN); + disposition = NSURLSessionAuthChallengeCancelAuthenticationChallenge; + } + } + + if (completionHandler) { + completionHandler(disposition, credential); + } +} + +- (nonnull NSError *)serverTrustErrorForServerTrust:(nullable SecTrustRef)serverTrust url:(nullable NSURL *)url +{ + NSBundle *CFNetworkBundle = [NSBundle bundleWithIdentifier:@"com.apple.CFNetwork"]; + NSString *defaultValue = @"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “%@” which could put your confidential information at risk."; + NSString *descriptionFormat = NSLocalizedStringWithDefaultValue(@"Err-1202.w", nil, CFNetworkBundle, defaultValue, @"") ?: defaultValue; + NSString *localizedDescription = [descriptionFormat componentsSeparatedByString:@"%@"].count <= 2 ? [NSString localizedStringWithFormat:descriptionFormat, url.host] : descriptionFormat; + NSMutableDictionary *userInfo = [@{ + NSLocalizedDescriptionKey: localizedDescription + } mutableCopy]; + + if (serverTrust) { + userInfo[NSURLErrorFailingURLPeerTrustErrorKey] = (__bridge id)serverTrust; + } + + if (url) { + userInfo[NSURLErrorFailingURLErrorKey] = url; + + if (url.absoluteString) { + userInfo[NSURLErrorFailingURLStringErrorKey] = url.absoluteString; + } + } + + return [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorServerCertificateUntrusted userInfo:userInfo]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler +{ + NSInputStream *inputStream = nil; + + if (self.taskNeedNewBodyStream) { + inputStream = self.taskNeedNewBodyStream(session, task); + } else if (task.originalRequest.HTTPBodyStream && [task.originalRequest.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) { + inputStream = [task.originalRequest.HTTPBodyStream copy]; + } + + if (completionHandler) { + completionHandler(inputStream); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task + didSendBodyData:(int64_t)bytesSent + totalBytesSent:(int64_t)totalBytesSent +totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend +{ + + int64_t totalUnitCount = totalBytesExpectedToSend; + if (totalUnitCount == NSURLSessionTransferSizeUnknown) { + NSString *contentLength = [task.originalRequest valueForHTTPHeaderField:@"Content-Length"]; + if (contentLength) { + totalUnitCount = (int64_t) [contentLength longLongValue]; + } + } + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + + if (delegate) { + [delegate URLSession:session task:task didSendBodyData:bytesSent totalBytesSent:totalBytesSent totalBytesExpectedToSend:totalBytesExpectedToSend]; + } + + if (self.taskDidSendBodyData) { + self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount); + } +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + + // delegate may be nil when completing a task in the background + if (delegate) { + [delegate URLSession:session task:task didCompleteWithError:error]; + + [self removeDelegateForTask:task]; + } + + if (self.taskDidComplete) { + self.taskDidComplete(session, task, error); + } +} + +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics AF_API_AVAILABLE(ios(10), macosx(10.12), watchos(3), tvos(10)) +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task]; + // Metrics may fire after URLSession:task:didCompleteWithError: is called, delegate may be nil + if (delegate) { + [delegate URLSession:session task:task didFinishCollectingMetrics:metrics]; + } + + if (self.taskDidFinishCollectingMetrics) { + self.taskDidFinishCollectingMetrics(session, task, metrics); + } +} +#endif + +#pragma mark - NSURLSessionDataDelegate + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler +{ + NSURLSessionResponseDisposition disposition = NSURLSessionResponseAllow; + + if (self.dataTaskDidReceiveResponse) { + disposition = self.dataTaskDidReceiveResponse(session, dataTask, response); + } + + if (completionHandler) { + completionHandler(disposition); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask +didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; + if (delegate) { + [self removeDelegateForTask:dataTask]; + [self setDelegate:delegate forTask:downloadTask]; + } + + if (self.dataTaskDidBecomeDownloadTask) { + self.dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + didReceiveData:(NSData *)data +{ + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask]; + [delegate URLSession:session dataTask:dataTask didReceiveData:data]; + + if (self.dataTaskDidReceiveData) { + self.dataTaskDidReceiveData(session, dataTask, data); + } +} + +- (void)URLSession:(NSURLSession *)session + dataTask:(NSURLSessionDataTask *)dataTask + willCacheResponse:(NSCachedURLResponse *)proposedResponse + completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler +{ + NSCachedURLResponse *cachedResponse = proposedResponse; + + if (self.dataTaskWillCacheResponse) { + cachedResponse = self.dataTaskWillCacheResponse(session, dataTask, proposedResponse); + } + + if (completionHandler) { + completionHandler(cachedResponse); + } +} + +#if !TARGET_OS_OSX +- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session { + if (self.didFinishEventsForBackgroundURLSession) { + dispatch_async(dispatch_get_main_queue(), ^{ + self.didFinishEventsForBackgroundURLSession(session); + }); + } +} +#endif + +#pragma mark - NSURLSessionDownloadDelegate + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location +{ + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + if (self.downloadTaskDidFinishDownloading) { + NSURL *fileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location); + if (fileURL) { + delegate.downloadFileURL = fileURL; + NSError *error = nil; + + if (![[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error]) { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo]; + } else { + [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidMoveFileSuccessfullyNotification object:downloadTask userInfo:nil]; + } + + return; + } + } + + if (delegate) { + [delegate URLSession:session downloadTask:downloadTask didFinishDownloadingToURL:location]; + } +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didWriteData:(int64_t)bytesWritten + totalBytesWritten:(int64_t)totalBytesWritten +totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite +{ + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + + if (delegate) { + [delegate URLSession:session downloadTask:downloadTask didWriteData:bytesWritten totalBytesWritten:totalBytesWritten totalBytesExpectedToWrite:totalBytesExpectedToWrite]; + } + + if (self.downloadTaskDidWriteData) { + self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); + } +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + didResumeAtOffset:(int64_t)fileOffset +expectedTotalBytes:(int64_t)expectedTotalBytes +{ + + AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask]; + + if (delegate) { + [delegate URLSession:session downloadTask:downloadTask didResumeAtOffset:fileOffset expectedTotalBytes:expectedTotalBytes]; + } + + if (self.downloadTaskDidResume) { + self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes); + } +} + +#pragma mark - NSSecureCoding + ++ (BOOL)supportsSecureCoding { + return YES; +} + +- (instancetype)initWithCoder:(NSCoder *)decoder { + NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"]; + + self = [self initWithSessionConfiguration:configuration]; + if (!self) { + return nil; + } + + return self; +} + +- (void)encodeWithCoder:(NSCoder *)coder { + [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"]; +} + +#pragma mark - NSCopying + +- (instancetype)copyWithZone:(NSZone *)zone { + return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration]; +} + +@end diff --git a/TwoNetworking/AFNetworking/CHANGELOG.md b/TwoNetworking/AFNetworking/CHANGELOG.md new file mode 100644 index 0000000..4bc56a2 --- /dev/null +++ b/TwoNetworking/AFNetworking/CHANGELOG.md @@ -0,0 +1,2244 @@ +# Change Log +All notable changes to this project will be documented in this file. +`AFNetworking` adheres to [Semantic Versioning](https://semver.org/). + +--- + +## [4.0.1]((https://github.com/AFNetworking/AFNetworking/releases/tag/4.0.0) (04/19/2020) +Release on Sunday, April 19, 2020. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/milestone/20?closed=1). + +#### Updated +* Project templates and integrations. + * Implemented by Kaspik in [#4531](https://github.com/AFNetworking/AFNetworking/pull/4531). +* Various CocoaPods podspec settings. + * Implemented by ElfSundae in [#4528](https://github.com/AFNetworking/AFNetworking/pull/4528), [#4532](https://github.com/AFNetworking/AFNetworking/pull/4532), and [#4533](https://github.com/AFNetworking/AFNetworking/pull/4533). + +#### Fixed +* Crash during authentication delegate method. + * Implemented by Kaspik, ElfSundae, and jshier in [#4542](https://github.com/AFNetworking/AFNetworking/pull/4542), [#4552](https://github.com/AFNetworking/AFNetworking/pull/4552), and [#4553](https://github.com/AFNetworking/AFNetworking/pull/4553). +* SPM integration. + * Implemented by jshier in [#4554](https://github.com/AFNetworking/AFNetworking/pull/4554). +* Improper update instead of replacement of header values. + * Implemented by ElfSundae in [#4550](https://github.com/AFNetworking/AFNetworking/pull/4550). +* Nullability of some methods. + * Implemented by ElfSundae in [#4551](https://github.com/AFNetworking/AFNetworking/pull/4551). +* Typos in CHANGELOG. + * Implemented by ElfSundae in [#4537](https://github.com/AFNetworking/AFNetworking/pull/4537). +* Missing tvOS compatibility for some methods. + * Implemented by ElfSundae in [#4536](https://github.com/AFNetworking/AFNetworking/pull/4536). +* Missing `FOUNDATION_EXPORT` for `AFJSONObjectByRemovingKeysWithNullValues`. + * Implemented by ElfSundae in [#4529](https://github.com/AFNetworking/AFNetworking/pull/4529). + +#### Removed +* Unused UIImage+AFNetworking.h file. + * Implemented by ElfSundae in [#4535](https://github.com/AFNetworking/AFNetworking/pull/4535). + +## [4.0.0](https://github.com/AFNetworking/AFNetworking/releases/tag/4.0.0) (03/29/2020) +Released on Sunday, March 29, 2020. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/milestone/16?closed=1). + +#### Added +* Notificate when a downloaded file has been moved successfully. + * Implemented by xingheng in [#4393](https://github.com/AFNetworking/AFNetworking/pull/4393). +* Specific error for certificate pinning failure. + * Implemented by 0xced in [#3425](https://github.com/AFNetworking/AFNetworking/pull/3425). +* `WKWebView` extensions. + * Implemented by tjanela in [#4439](https://github.com/AFNetworking/AFNetworking/pull/4439). +* Automatic location of certificates in the main bundle for certificate pinning. + * Implemented by 0xced in [#3752](https://github.com/AFNetworking/AFNetworking/pull/3752). +* User-Agent support for tvOS. + * Implemented by ghking in [#4014](https://github.com/AFNetworking/AFNetworking/pull/4014). +* Ability for `AFHTTPSessionManager` to recreate its underlying `NSURLSession`. + * Implemented by Kaspik in [#4256](https://github.com/AFNetworking/AFNetworking/pull/4256). +* Ability to set HTTP headers per request. + * Implemented by stnslw in [#4113](https://github.com/AFNetworking/AFNetworking/pull/4113). +* Ability to capture `NSURLSessionTaskMetrics`. + * Implemented by Caelink in [#4237](https://github.com/AFNetworking/AFNetworking/pull/4237). + +#### Updated +* `dataTaskWithHTTPMethod` to be public. + * Implemented by smartinspereira in [#4007](https://github.com/AFNetworking/AFNetworking/pull/4007). +* Reachability notification to include the instance which issued the notification. + * Implemented by LMsgSendNilSelf in [#4051](https://github.com/AFNetworking/AFNetworking/pull/4051). +* `AFJSONObjectByRemovingKeysWithNullValues` to be public. + * Implemented by ashfurrow in [#4051](https://github.com/AFNetworking/AFNetworking/pull/4051). +* `AFJSONObjectByRemovingKeysWithNullValues` to remove `NSNull` values from `NSArray`s. + * Implemented by ashfurrow in [#4052](https://github.com/AFNetworking/AFNetworking/pull/4052). + +#### Changed +* Automated CI to GitHub Actions. + * Implemented by jshier in [#4523](https://github.com/AFNetworking/AFNetworking/pull/4523). + +#### Fixed +* Explicit `NSSecureCoding` support. + * Implemented by jshier in [#4523](https://github.com/AFNetworking/AFNetworking/pull/4523). +* Deprecated API usage on Catalyst. + * Implemented by jshier in [#4523](https://github.com/AFNetworking/AFNetworking/pull/4523). +* Nullability annotations. + * Implemented by jshier in [#4523](https://github.com/AFNetworking/AFNetworking/pull/4523). +* `AFImageDownloader` to more accurately cancel downloads. + * Implemented by kinarobin in [#4407](https://github.com/AFNetworking/AFNetworking/pull/4407). +* Double KVO notifications in `AFNetworkActivityManager`. + * Implemented by kinarobin in [#4406](https://github.com/AFNetworking/AFNetworking/pull/4406). +* Availability annotations around `NSURLSessionTaskMetrics`. + * Implemented by ElfSundae in [#4516](https://github.com/AFNetworking/AFNetworking/pull/4516). +* Issues with `associated_object` and subclasses. + * Implemented by welcommand in [#3872](https://github.com/AFNetworking/AFNetworking/pull/3872). +* Memory leak in example application. + * Implemented by svoit in [#4196](https://github.com/AFNetworking/AFNetworking/pull/4196). +* Crashes in multithreaded scenarios and `dispatch_barrier`. + * Implemented by streeter in [#4474](https://github.com/AFNetworking/AFNetworking/pull/4474). +* Issues with `NSSecureCoding`. + * Implemented by ElfSudae in [#4409](https://github.com/AFNetworking/AFNetworking/pull/4409). +* Code style issues. + * Implemented by svoit in [#4200](https://github.com/AFNetworking/AFNetworking/pull/4200). +* Race condition in `AFImageDownloader`. + * Implemented by bbeversdorf in [#4246](https://github.com/AFNetworking/AFNetworking/pull/4246). +* Coding style issues. + * Implemented by LeeHongHwa in [#4002](https://github.com/AFNetworking/AFNetworking/pull/4002). + +#### Removed +* Support for iOS < 9, macOS < 10.10. + * Implemented by jshier in [#4523](https://github.com/AFNetworking/AFNetworking/pull/4523). +* All previously deprecated APIs. + * Implemented by jshier in [#4523](https://github.com/AFNetworking/AFNetworking/pull/4523). +* Unnecessary `__block` capture. + * Implemented by kinarobin in [#4526](https://github.com/AFNetworking/AFNetworking/pull/4526). +* Workaround for `NSURLSessionUploadTask` creation on iOS 7. + * Implemented by kinarobin in [#4525](https://github.com/AFNetworking/AFNetworking/pull/4525). +* Workaround for safe `NSURLSessionTask` creation on iOS < 8. + * Implemented by kinarobin in [#4401](https://github.com/AFNetworking/AFNetworking/pull/4401). +* `UIWebView` extensions. + * Implemented by tjanela in [#4439](https://github.com/AFNetworking/AFNetworking/pull/4439). + +--- + +## [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). + +#### Added +* Improved `AFImageResponseSerializer` test coverage + * Implemented by quellish in [#3367](https://github.com/AFNetworking/AFNetworking/pull/3367). +* Exposed `AFQueryStringFromParameters` and `AFPercentEscapedStringFromString` for public use. + * Implemented by Kevin Harwood in [#3160](https://github.com/AFNetworking/AFNetworking/pull/3160). + +#### Updated +* Updated Test Suite to run on Xcode 7.3 + * Implemented by Kevin Harwood in [#3418](https://github.com/AFNetworking/AFNetworking/pull/3418). +* Added white space to URLs in code comment to allow Xcode to properly parse them + * Implemented by Draveness in [#3384](https://github.com/AFNetworking/AFNetworking/pull/3384). +* Updated documentation to match method names and correct compiler warnings + * Implemented by Hakon Hanesand in [#3369](https://github.com/AFNetworking/AFNetworking/pull/3369). +* Use `NSKeyValueChangeNewKey` constant in change dictionary rather than hardcoded string. + * Implemented by Wenbin Zhang in [#3360](https://github.com/AFNetworking/AFNetworking/pull/3360). +* Resolved compiler warnings for documentation errors + * Implemented by Ricardo Santos in [#3336](https://github.com/AFNetworking/AFNetworking/pull/3336). + +#### Changed +* Reverted `NSURLSessionAuthChallengeDisposition` to `NSURLSessionAuthChallengeCancelAuthenticationChallenge` for SSL Pinning + * Implemented by Kevin Harwood in [#3417](https://github.com/AFNetworking/AFNetworking/pull/3417). + +#### Fixed +* Removed trailing question mark in query string if parameters are empty + * Implemented by Kevin Harwood in [#3386](https://github.com/AFNetworking/AFNetworking/pull/3386). +* Fixed crash if bad URL was passed into the image downloader + * Implemented by Christian Wen and Kevin Harwood in [#3385](https://github.com/AFNetworking/AFNetworking/pull/3385). +* Fixed image memory calculation + * Implemented by 周明宇 in [#3344](https://github.com/AFNetworking/AFNetworking/pull/3344). +* Fixed issue where UIButton image downloading called wrong cancel method + * Implemented by duanhong in [#3332](https://github.com/AFNetworking/AFNetworking/pull/3332). +* Fixed image downloading cancellation race condition + * Implemented by Kevin Harwood in [#3325](https://github.com/AFNetworking/AFNetworking/pull/3325). +* Fixed static analyzer warnings on AFNetworkReachabilityManager + * Implemented by Jeff Kelley in [#3315](https://github.com/AFNetworking/AFNetworking/pull/3315). +* Fixed issue where download progress would not be reported in iOS 7 + * Implemented by zwm in [#3294](https://github.com/AFNetworking/AFNetworking/pull/3294). +* Fixed status code 204/205 handling + * Implemented by Kevin Harwood in [#3292](https://github.com/AFNetworking/AFNetworking/pull/3292). +* Fixed crash when passing nil/null for progress in UIWebView extension + * Implemented by Kevin Harwood in [#3289](https://github.com/AFNetworking/AFNetworking/pull/3289). + +#### Removed +* Removed workaround for NSJSONSerialization bug that was fixed in iOS 7 + * Implemented by Cédric Luthi in [#3253](https://github.com/AFNetworking/AFNetworking/pull/3253). + + +## [3.0.4](https://github.com/AFNetworking/AFNetworking/releases/tag/3.0.4) (12/18/2015) +Released on Friday, December 18, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.0.4+is%3Aclosed). + +#### Fixed +* Fixed issue where `AFNSURLSessionTaskDidResumeNotification` was removed twice + * Implemented by Kevin Harwood in [#3236](https://github.com/AFNetworking/AFNetworking/pull/3236). + + +## [3.0.3](https://github.com/AFNetworking/AFNetworking/releases/tag/3.0.3) (12/16/2015) +Released on Wednesday, December 16, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.0.3+is%3Aclosed). + +#### Added +* Added tests for response serializers to increase test coverage + * Implemented by Kevin Harwood in [#3233](https://github.com/AFNetworking/AFNetworking/pull/3233). + +#### Fixed +* Fixed `AFImageResponseSerializer` serialization macros on watchOS and tvOS + * Implemented by Charles Joseph in [#3229](https://github.com/AFNetworking/AFNetworking/pull/3229). + + +## [3.0.2](https://github.com/AFNetworking/AFNetworking/releases/tag/3.0.2) (12/14/2015) +Released on Monday, December 14, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.0.2+is%3Aclosed). + +#### Fixed +* Fixed a crash in `AFURLSessionManager` when resuming download tasks + * Implemented by Chongyu Zhu in [#3222](https://github.com/AFNetworking/AFNetworking/pull/3222). +* Fixed issue where background button image would not be updated + * Implemented by eofs in [#3220](https://github.com/AFNetworking/AFNetworking/pull/3220). + + +## [3.0.1](https://github.com/AFNetworking/AFNetworking/releases/tag/3.0.1) (12/11/2015) +Released on Friday, December 11, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.0.1+is%3Aclosed). + +#### Added +* Added Xcode 7.2 support to Travis + * Implemented by Kevin Harwood in [#3216](https://github.com/AFNetworking/AFNetworking/pull/3216). + +#### Fixed +* Fixed race condition with ImageView/Button image downloading when starting/cancelling/starting the same request + * Implemented by Kevin Harwood in [#3215](https://github.com/AFNetworking/AFNetworking/pull/3215). + + +## [3.0.0](https://github.com/AFNetworking/AFNetworking/releases/tag/3.0.0) (12/10/2015) +Released on Thursday, December 10, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.0.0+is%3Aclosed). + +For detailed information about migrating to AFNetworking 3.0.0, please reference the [migration guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-3.0-Migration-Guide). All 3.0.0 beta changes will be tracked with this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A3.0.0+is%3Aclosed). + +#### Added +* Added support for older versions of Xcode to Travis + * Implemented by Kevin Harwood in [#3209](https://github.com/AFNetworking/AFNetworking/pull/3209). +* Added support for [Codecov.io](https://codecov.io/github/AFNetworking/AFNetworking/AFNetworking?branch=master#sort=coverage&dir=desc) + * Implemented by Cédric Luthi and Kevin Harwood in [#3196](https://github.com/AFNetworking/AFNetworking/pull/3196). + * * **Please help us increase overall coverage by submitting a pull request!** +* Added support for IPv6 to Reachability + * Implemented by SAMUKEI and Kevin Harwood in [#3174](https://github.com/AFNetworking/AFNetworking/pull/3174). +* Added support for Objective-C light weight generics + * Implemented by Kevin Harwood in [#3166](https://github.com/AFNetworking/AFNetworking/pull/3166). +* Added nullability attributes to response object in success block + * Implemented by Nathan Racklyeft in [#3154](https://github.com/AFNetworking/AFNetworking/pull/3154). +* Migrated to Fastlane for CI and Deployment + * Implemented by Kevin Harwood in [#3148](https://github.com/AFNetworking/AFNetworking/pull/3148). +* Added support for tvOS + * Implemented by Kevin Harwood in [#3128](https://github.com/AFNetworking/AFNetworking/issues/3128). +* New image downloading architecture + * Implemented by Kevin Harwood in [#3122](https://github.com/AFNetworking/AFNetworking/issues/3122). +* Added Carthage Support + * Implemented by Kevin Harwood in [#3121](https://github.com/AFNetworking/AFNetworking/issues/3121). +* Added a method to create a unique reachability manager + * Implemented by Mo Bitar in [#3111](https://github.com/AFNetworking/AFNetworking/pull/3111). +* Added a initial delay to the network indicator per the Apple HIG + * Implemented by Kevin Harwood in [#3094](https://github.com/AFNetworking/AFNetworking/pull/3094). + +#### Updated +* Improved testing reliability for continuous integration + * Implemented by Kevin Harwood in [#3124](https://github.com/AFNetworking/AFNetworking/pull/3124). +* Example project now consumes AFNetworking as a library. + * Implemented by Kevin Harwood in [#3068](https://github.com/AFNetworking/AFNetworking/pull/3068). +* Migrated to using `instancetype` where applicable + * Implemented by Kyle Fuller in [#3064](https://github.com/AFNetworking/AFNetworking/pull/3064). +* Tweaks to project to support Framework Project + * Implemented by Christian Noon in [#3062](https://github.com/AFNetworking/AFNetworking/pull/3062). + +#### Changed +* Split the iOS and OS X AppDelegate classes in the Example Project + * Implemented by Cédric Luthi in [#3193](https://github.com/AFNetworking/AFNetworking/pull/3193). +* Changed SSL Pinning Error to be `NSURLErrorServerCertificateUntrusted` + * Implemented by Cédric Luthi and Kevin Harwood in [#3191](https://github.com/AFNetworking/AFNetworking/pull/3191). +* New Progress Reporting API using `NSProgress` + * Implemented by Kevin Harwood in [#3187](https://github.com/AFNetworking/AFNetworking/pull/3187). +* Changed `pinnedCertificates` type in `AFSecurityPolicy` from `NSArray` to `NSSet` + * Implemented by Cédric Luthi in [#3164](https://github.com/AFNetworking/AFNetworking/pull/3164). + +#### Fixed +* Improved task creation performance for iOS 8+ + * Implemented by nikitahils, Nikita G and Kevin Harwood in [#3208](https://github.com/AFNetworking/AFNetworking/pull/3208). +* Fixed certificate validation for servers providing incomplete chains + * Implemented by André Pacheco Neves in [#3159](https://github.com/AFNetworking/AFNetworking/pull/3159). +* Fixed bug in `AFMultipartBodyStream` that may cause the input stream to read more bytes than required. + * Implemented by bang in [#3153](https://github.com/AFNetworking/AFNetworking/pull/3153). +* Fixed race condition crash from Resume/Suspend task notifications + * Implemented by Kevin Harwood in [#3152](https://github.com/AFNetworking/AFNetworking/pull/3152). +* Fixed `AFImageDownloader` stalling after numerous failures + * Implemented by Rick Silva in [#3150](https://github.com/AFNetworking/AFNetworking/pull/3150). +* Fixed warnings generated in UIWebView category + * Implemented by Kevin Harwood in [#3126](https://github.com/AFNetworking/AFNetworking/pull/3126). + +#### Removed +* Removed AFBase64EncodedStringFromString static function + * Implemented by Cédric Luthi in [#3188](https://github.com/AFNetworking/AFNetworking/pull/3188). +* Removed code supporting conditional compilation for unsupported development configurations. + * Implemented by Cédric Luthi in [#3177](https://github.com/AFNetworking/AFNetworking/pull/3177). +* Removed deprecated methods, properties, and notifications from AFN 2.x + * Implemented by Kevin Harwood in [#3168](https://github.com/AFNetworking/AFNetworking/pull/3168). +* Removed support for `NSURLConnection` + * Implemented by Kevin Harwood in [#3120](https://github.com/AFNetworking/AFNetworking/issues/3120). +* Removed `UIAlertView` category support since it is now deprecated + * Implemented by Kevin Harwood in [#3034](https://github.com/AFNetworking/AFNetworking/pull/3034). + + +## [2.6.3](https://github.com/AFNetworking/AFNetworking/releases/tag/2.6.3) (11/11/2015) +Released on Wednesday, November 11, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A2.6.3+is%3Aclosed). + +#### Fixed +* Fixed clang analyzer warning suppression that prevented building under some project configurations + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3142](https://github.com/AFNetworking/AFNetworking/pull/3142). +* Restored Xcode 6 compatibility + * Fixed by [jcayzac](https://github.com/jcayzac) in [#3139](https://github.com/AFNetworking/AFNetworking/pull/3139). + + +## [2.6.2](https://github.com/AFNetworking/AFNetworking/releases/tag/2.6.2) (11/06/2015) +Released on Friday, November 06, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A2.6.2+is%3Aclosed). + +### Important Upgrade Note for Swift +* [#3130](https://github.com/AFNetworking/AFNetworking/pull/3130) fixes a swift interop error that does have a breaking API change if you are using Swift. This was [identified](https://github.com/AFNetworking/AFNetworking/issues/3137) after 2.6.2 was released. It changes the method from `throws` to an error pointer, since that method does return an object and also handles an error pointer, which does not play nicely with the Swift/Objective-C error conversion. See [#2810](https://github.com/AFNetworking/AFNetworking/issues/2810) for additional notes. This affects `AFURLRequestionSerializer` and `AFURLResponseSerializer`. + +#### Added +* `AFHTTPSessionManager` now copies its `securityPolicy` + * Fixed by [mohamede1945](https://github.com/mohamede1945) in [#2887](https://github.com/AFNetworking/AFNetworking/pull/2887). + +#### Updated +* Updated travis to run on 7.1 + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3132](https://github.com/AFNetworking/AFNetworking/pull/3132). +* Simplifications of if and return statements in `AFSecurityPolicy` + * Fixed by [TorreyBetts](https://github.com/TorreyBetts) in [#3063](https://github.com/AFNetworking/AFNetworking/pull/3063). + +#### Fixed +* Fixed swift interop issue that prevented returning a nil NSURL for a download task + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3133](https://github.com/AFNetworking/AFNetworking/pull/3133). +* Suppressed false positive memory leak warning in Reachability Manager + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3131](https://github.com/AFNetworking/AFNetworking/pull/3131). +* Fixed swift interop issue with throws and Request/Response serialization. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3130](https://github.com/AFNetworking/AFNetworking/pull/3130). +* Fixed race condition in reachability callback delivery + * Fixed by [MichaelHackett](https://github.com/MichaelHackett) in [#3117](https://github.com/AFNetworking/AFNetworking/pull/3117). +* Fixed URLs that were redirecting in the README + * Fixed by [frankenbot](https://github.com/frankenbot) in [#3109](https://github.com/AFNetworking/AFNetworking/pull/3109). +* Fixed Project Warnings + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3102](https://github.com/AFNetworking/AFNetworking/pull/3102). +* Fixed README link to WWDC session + * Fixed by [wrtsprt](https://github.com/wrtsprt) in [#3099](https://github.com/AFNetworking/AFNetworking/pull/3099). +* Switched from `OS_OBJECT_HAVE_OBJC_SUPPORT` to `OS_OBJECT_USE_OBJC` for watchOS 2 support. + * Fixed by [kylef](https://github.com/kylef) in [#3065](https://github.com/AFNetworking/AFNetworking/pull/3065). +* Added missing __nullable attributes to failure blocks in `AFHTTPRequestOperationManager` and `AFHTTPSessionManager` + * Fixed by [hoppenichu](https://github.com/hoppenichu) in [#3057](https://github.com/AFNetworking/AFNetworking/pull/3057). +* Fixed memory leak in NSURLSession handling + * Fixed by [olegnaumenko](https://github.com/olegnaumenko) in [#2794](https://github.com/AFNetworking/AFNetworking/pull/2794). + + +## [2.6.1](https://github.com/AFNetworking/AFNetworking/releases/tag/2.6.1) (10-13-2015) +Released on Tuesday, October 13th, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A2.6.1+is%3Aclosed). + +### Future Compatibility Note +Note that AFNetworking 3.0 will soon be released, and will drop support for all `NSURLConnection` based API's (`AFHTTPRequestOperationManager`, `AFHTTPRequestOperation`, and `AFURLConnectionOperation`. If you have not already migrated to `NSURLSession` based API's, please do so soon. For more information, please see the [3.0 migration guide](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-3.0-Migration-Guide). + +#### Fixed +* Fixed a bug that prevented empty x-www-form-urlencoded bodies. + * Fixed by [Julien Cayzac](https://github.com/jcayzac) in [#2868](https://github.com/AFNetworking/AFNetworking/pull/2868). +* Fixed bug that prevented AFNetworking from being installed for watchOS via Cocoapods. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2909](https://github.com/AFNetworking/AFNetworking/issues/2909). +* Added missing nullable attributes to `AFURLRequestSerialization` and `AFURLSessionManager`. + * Fixed by [andrewtoth](https://github.com/andrewtoth) in [#2911](https://github.com/AFNetworking/AFNetworking/pull/2911). +* Migrated to `OS_OBJECT_USE_OBJC`. + * Fixed by [canius](https://github.com/canius) in [#2930](https://github.com/AFNetworking/AFNetworking/pull/2930). +* Added missing nullable tags to UIKit extensions. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3000](https://github.com/AFNetworking/AFNetworking/pull/3000). +* Fixed potential infinite recursion loop if multiple versions of AFNetworking are loaded in a target. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2743](https://github.com/AFNetworking/AFNetworking/issues/2743). +* Updated Travis CI test script + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#3032](https://github.com/AFNetworking/AFNetworking/issues/3032). +* Migrated to `FOUNDATION_EXPORT` from `extern`. + * Fixed by [Andrey Mikhaylov](https://github.com/pronebird) in [#3041](https://github.com/AFNetworking/AFNetworking/pull/3041). +* Fixed issue where `AFURLConnectionOperation` could get stuck in an infinite loop. + * Fixed by [Mattt Thompson](https://github.com/mattt) in [#2496](https://github.com/AFNetworking/AFNetworking/pull/2496). +* Fixed regression where URL request serialization would crash on iOS 8 for long URLs. + * Fixed by [softenhard](https://github.com/softenhard) in [#3028](https://github.com/AFNetworking/AFNetworking/pull/3028). + +## [2.6.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.6.0) (08-19-2015) +Released on Wednesday, August 19th, 2015. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A2.6.0+is%3Aclosed). + +### Important Upgrade Notes +Please note the following API/project changes have been made: + +* iOS 6 and OS X 10.8 support has been dropped from the project to facilitate support for watchOS 2. The final release supporting iOS 6 and OS X 10.8 is 2.5.4. +* **Full Certificate Chain Validation has been removed** from `AFSecurityPolicy`. As discussed in [#2744](https://github.com/AFNetworking/AFNetworking/issues/2744), there was no documented security advantage to pinning against an entire certificate chain. If you were using full certificate chain, please determine and select the most ideal certificate in your chain to pin against. + * Implemented by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2856](https://github.com/AFNetworking/AFNetworking/pull/2856). +* **The request url will now be returned by the `UIImageView` category if the image is returned from cache.** In previous releases, both the request and the response were nil. Going forward, only the response will be nil. + * Implemented by [Chris Gibbs](https://github.com/chrisgibbs) in [#2771](https://github.com/AFNetworking/AFNetworking/pull/2771). +* **Support for App Extension Targets is now baked in using `NS_EXTENSION_UNAVAILABLE_IOS`.** You no longer need to define `AF_APP_EXTENSIONS` in order to include code in a extension target. + * Implemented by [bnickel](https://github.com/bnickel) in [#2737](https://github.com/AFNetworking/AFNetworking/pull/2737). +* This release now supports watchOS 2.0, which relys on target conditionals that are only present in Xcode 7 and iOS 9/watchOS 2.0/OS X 10.10. If you install the library using CocoaPods, AFNetworking will define these target conditionals for on older platforms, allowing your code to compile. If you do not use Cocoapods, you will need to add the following code your to PCH file. + +``` +#ifndef TARGET_OS_IOS + #define TARGET_OS_IOS TARGET_OS_IPHONE +#endif +#ifndef TARGET_OS_WATCH + #define TARGET_OS_WATCH 0 +#endif +``` +* This release migrates query parameter serialization to model AlamoFire and adhere to RFC standards. Note that `/` and `?` are no longer encoded by default. + * Implemented by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2908](https://github.com/AFNetworking/AFNetworking/pull/2908). + + + +**Note** that support for `NSURLConnection` based API's will be removed in a future update. If you have not already done so, it is recommended that you transition to the `NSURLSession` APIs in the very near future. + +#### Added +* Added watchOS 2.0 support. `AFNetworking` can now be added to watchOS targets using CocoaPods. + * Added by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2837](https://github.com/AFNetworking/AFNetworking/issues/2837). +* Added nullability annotations to all of the header files to improve Swift interoperability. + * Added by [Frank LSF](https://github.com/franklsf95) and [Kevin Harwood](https://github.com/Kevin Harwood) in [#2814](https://github.com/AFNetworking/AFNetworking/pull/2814). +* Converted source to Modern Objective-C Syntax. + * Implemented by [Matt Shedlick](https://github.com/mattshedlick) and [Kevin Harwood](https://github.com/Kevin Harwood) in [#2688](https://github.com/AFNetworking/AFNetworking/pull/2688). +* Improved memory performance when download large objects. + * Fixed by [Gabe Zabrino](https://github.com/gfzabarino) and [Kevin Harwood](https://github.com/Kevin Harwood) in [#2672](https://github.com/AFNetworking/AFNetworking/pull/2672). + +#### Fixed +* Fixed a crash related for objects that observe notifications but don't properly unregister. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) and [bnickle](https://github.com/bnickel) in [#2741](https://github.com/AFNetworking/AFNetworking/pull/2741). +* Fixed a race condition crash that occured with `AFImageResponseSerialization`. + * Fixed by [Paulo Ferreria](https://github.com/paulosotu) and [Kevin Harwood](https://github.com/Kevin Harwood) in [#2815](https://github.com/AFNetworking/AFNetworking/pull/2815). +* Fixed an issue where tests failed to run on CI due to unavailable simulators. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2834](https://github.com/AFNetworking/AFNetworking/pull/2834). +* Fixed "method override not found" warnings in Xcode 7 Betas + * Fixed by [Ben Guo](https://github.com/benzguo) in [#2822](https://github.com/AFNetworking/AFNetworking/pull/2822) +* Removed Duplicate Import and UIKit Header file. + * Fixed by [diehardest](https://github.com/diehardest) in [#2813](https://github.com/AFNetworking/AFNetworking/pull/2813) +* Removed the ability to include duplicate certificates in the pinned certificate chain. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2756](https://github.com/AFNetworking/AFNetworking/pull/2756). +* Fixed potential memory leak in `AFNetworkReachabilityManager`. + * Fixed by [Julien Cayzac](https://github.com/jcayzac) in [#2867](https://github.com/AFNetworking/AFNetworking/pull/2867). + +#### Documentation Improvements +* Clarified best practices for Reachability per Apple recommendations. + * Fixed by [Steven Fisher](https://github.com/tewha) in [#2704](https://github.com/AFNetworking/AFNetworking/pull/2704). +* Added `startMonitoring` call to the Reachability section of the README + * Added by [Jawwad Ahmad](https://github.com/jawwad) in [#2831](https://github.com/AFNetworking/AFNetworking/pull/2831). +* Fixed documentation error around how `baseURL` is used for reachability monitoring. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2761](https://github.com/AFNetworking/AFNetworking/pull/2761). +* Numerous spelling corrections in the documentation. + * Fixed by [Antoine Cœur](https://github.com/Coeur) in [#2732](https://github.com/AFNetworking/AFNetworking/pull/2732) and [#2898](https://github.com/AFNetworking/AFNetworking/pull/2898). + +## [2.5.4](https://github.com/AFNetworking/AFNetworking/releases/tag/2.5.4) (2015-05-14) +Released on 2015-05-14. All issues associated with this milestone can be found using this [filter](https://github.com/AFNetworking/AFNetworking/issues?q=milestone%3A2.5.4+is%3Aclosed). + +#### Updated +* Updated the CI test script to run iOS tests on all versions of iOS that are installed on the build machine. + * Updated by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2716](https://github.com/AFNetworking/AFNetworking/pull/2716). + +#### Fixed + +* Fixed an issue where `AFNSURLSessionTaskDidResumeNotification` and `AFNSURLSessionTaskDidSuspendNotification` were not being properly called due to implementation differences in `NSURLSessionTask` in iOS 7 and iOS 8, which also affects the `AFNetworkActivityIndicatorManager`. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2702](https://github.com/AFNetworking/AFNetworking/pull/2702). +* Fixed an issue where the OS X test linker would throw a warning during tests. + * Fixed by [Christian Noon](https://github.com/cnoon) in [#2719](https://github.com/AFNetworking/AFNetworking/pull/2719). +* Fixed an issue where tests would randomly fail due to mocked objects not being cleaned up. + * Fixed by [Kevin Harwood](https://github.com/Kevin Harwood) in [#2717](https://github.com/AFNetworking/AFNetworking/pull/2717). + + +## [2.5.3](https://github.com/AFNetworking/AFNetworking/releases/tag/2.5.3) (2015-04-20) + +* Add security policy tests for default policy + +* Add network reachability tests + +* Change `validatesDomainName` property to default to `YES` under all * security policies + +* Fix `NSURLSession` subspec compatibility with iOS 6 / OS X 10.8 + +* Fix leak of data task used in `NSURLSession` swizzling + +* Fix leak for observers from `addObserver:...:withBlock:` + +* Fix issue with network reachability observation on domain name + +## [2.5.2](https://github.com/AFNetworking/AFNetworking/releases/tag/2.5.2) (2015-03-26) +**NOTE** This release contains a security vulnerabilty. **All users should upgrade to a 2.5.3 or greater**. Please reference this [statement](https://gist.github.com/AlamofireSoftwareFoundation/f784f18f949b95ab733a) if you have any further questions about this release. + +* Add guards for unsupported features in iOS 8 App Extensions + +* Add missing delegate callbacks to `UIWebView` category + +* Add test and implementation of strict default certificate validation + +* Add #define for `NS_DESIGNATED_INITIALIZER` for unsupported versions of Xcode + +* Fix `AFNetworkActivityIndicatorManager` for iOS 7 + +* Fix `AFURLRequestSerialization` property observation + +* Fix `testUploadTasksProgressBecomesPartOfCurrentProgress` + +* Fix warnings from Xcode 6.3 Beta + +* Fix `AFImageWithDataAtScale` handling of animated images + +* Remove `AFNetworkReachabilityAssociation` enumeration + +* Update to conditional use assign semantics for GCD properties based on `OS_OBJECT_HAVE_OBJC_SUPPORT` for better Swift support + +## [2.5.1](https://github.com/AFNetworking/AFNetworking/releases/tag/2.5.1) (2015-02-09) +**NOTE** This release contains a security vulnerabilty. **All users should upgrade to a 2.5.3 or greater**. Please reference this [statement](https://gist.github.com/AlamofireSoftwareFoundation/f784f18f949b95ab733a) if you have any further questions about this release. + + * Add `NS_DESIGNATED_INITIALIZER` macros. (Samir Guerdah) + + * Fix and clarify documentation for `stringEncoding` property. (Mattt +Thompson) + + * Fix for NSProgress bug where two child NSProgress instances are added to a +parent NSProgress. (Edward Povazan) + + * Fix incorrect file names in headers. (Steven Fisher) + + * Fix KVO issue when running testing target caused by lack of +`automaticallyNotifiesObserversForKey:` implementation. (Mattt Thompson) + + * Fix use of variable arguments for UIAlertView category. (Kenta Tokumoto) + + * Fix `genstrings` warning for `NSLocalizedString` usage in +`UIAlertView+AFNetworking`. (Adar Porat) + + * Fix `NSURLSessionManager` task observation for network activity indicator +manager. (Phil Tang) + + * Fix `UIButton` category method caching of background image (Fernanda G. +Geraissate) + + * Fix `UIButton` category method failure handling. (Maxim Zabelin) + + * Update multipart upload method requirements to ensure `request.HTTPBody` +is non-nil. (Mattt Thompson) + + * Update to use builtin `__Require` macros from AssertMacros.h. (Cédric +Luthi) + + * Update `parameters` parameter to accept `id` for custom serialization +block. (@mooosu) + +## [2.5.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.5.0) (2014-11-17) + + * Add documentation for expected background session manager usage (Aaron +Brager) + + * Add missing documentation for `AFJSONRequestSerializer` and +`AFPropertyListSerializer` (Mattt Thompson) + + * Add tests for requesting HTTPS endpoints (Mattt Thompson) + + * Add `init` method declarations of `AFURLResponseSerialization` classes for +Swift compatibility (Allen Rohner) + + * Change default User-Agent to use the version number instead of the build +number (Tim Watson) + + * Change `validatesDomainName` to readonly property (Mattt Thompson, Brian +King) + + * Fix checks when observing `AFHTTPRequestSerializerObservedKeyPaths` (Jacek +Suliga) + + * Fix crash caused by attempting to set nil `NSURLResponse -URL` as key for +`userInfo` dictionary (Elvis Nuñez) + + * Fix crash for multipart streaming requests in XPC services (Mattt Thompson) + + * Fix minor aspects of response serializer documentation (Mattt Thompson) + + * Fix potential race condition for `AFURLConnectionOperation -description` + + * Fix widespread crash related to key-value observing of `NSURLSessionTask +-state` (Phil Tang) + + * Fix `UIButton` category associated object keys (Kristian Bauer, Mattt +Thompson) + + * Remove `charset` parameter from Content-Type HTTP header field values for +`AFJSONRequestSerializer` and `AFPropertyListSerializer` (Mattt Thompson) + + * Update CocoaDocs color scheme (@Orta) + + * Update Podfile to explicitly define sources (Kyle Fuller) + + * Update to relay `downloadFileURL` to the delegate if the manager picks a +`fileURL` (Brian King) + + * Update `AFSSLPinningModeNone` to not validate domain name (Brian King) + + * Update `UIButton` category to cache images in `sharedImageCache` (John +Bushnell) + + * Update `UIRefreshControl` category to set control state to current state +of request (Elvis Nuñez) + +## [2.4.1](https://github.com/AFNetworking/AFNetworking/releases/tag/2.4.1) (2014-09-04) + + * Fix compiler warning generated on 32-bit architectures (John C. Daub) + + * Fix potential crash caused by failed validation with nil responseData + (Mattt Thompson) + + * Fix to suppress compiler warnings for out-of-range enumerated type + value assignment (Mattt Thompson) + +## [2.4.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.4.0) (2014-09-03) + + * Add CocoaDocs color scheme (Orta) + + * Add image cache to `UIButton` category (Kristian Bauer, Mattt Thompson) + + * Add test for success block on 204 response (Mattt Thompson) + + * Add tests for encodable and re-encodable query string parameters (Mattt +Thompson) + + * Add `AFHTTPRequestSerializer -valueForHTTPHeaderField:` (Kyle Fuller) + + * Add `AFNetworkingOperationFailingURLResponseDataErrorKey` key to user info +of serialization error (Yannick Heinrich) + + * Add `imageResponseSerializer` property to `UIButton` category (Kristian +Bauer, Mattt Thompson) + + * Add `removesKeysWithNullValues` setting to serialization and copying (Jon +Shier) + + * Change request and response serialization tests to be factored out into +separate files (Mattt Thompson) + + * Change signature of success parameters in `UIButton` category methods to +match those in `UIImageView` (Mattt Thompson) + + * Change to remove charset parameter from +`application/x-www-form-urlencoded` content type (Mattt Thompson) + + * Change `AFImageCache` to conform to `NSObject` protocol ( Marcelo Fabri) + + * Change `AFMaximumNumberOfToRecreateBackgroundSessionUploadTask` to +`AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask` (Mattt +Thompson) + + * Fix documentation error for NSSecureCoding (Robert Ryan) + + * Fix documentation for `URLSessionDidFinishEventsForBackgroundURLSession` +delegate method (Mattt Thompson) + + * Fix expired ADN certificate in example project (Carson McDonald) + + * Fix for interoperability within Swift project (Stephan Krusche) + + * Fix for potential deadlock due to KVO subscriptions within a lock +(Alexander Skvortsov) + + * Fix iOS 7 bug where session tasks can have duplicate identifiers if +created from different threads (Mattt Thompson) + + * Fix iOS 8 bug by adding explicit synthesis for `delegate` of +`AFMultipartBodyStream` (Mattt Thompson) + + * Fix issue caused by passing `nil` as body of multipart form part (Mattt +Thompson) + + * Fix issue caused by passing `nil` as destination in download task method +(Mattt Thompson) + + * Fix issue with `AFHTTPRequestSerializer` returning a request and silently +handling an error from a `queryStringSerialization` block (Kyle Fuller, Mattt +Thompson) + + * Fix potential issues by ensuring `invalidateSessionCancelingTasks` only +executes on main thread (Mattt Thompson) + + * Fix potential memory leak caused by deferred opening of output stream +(James Tomson) + + * Fix properties on session managers such that default values will not trump +values set in the session configuration (Mattt Thompson) + + * Fix README to include explicit call to start reachability manager (Mattt +Thompson) + + * Fix request serialization error handling in `AFHTTPSessionManager` +convenience methods (Kyle Fuller, Lars Anderson, Mattt Thompson) + + * Fix stray localization macro (Devin McKaskle) + + * Fix to ensure connection operation `-copyWithZone:` calls super +implementation (Chris Streeter) + + * Fix `UIButton` category to only cancel request for specified state +(@xuzhe, Mattt Thompson) + +## [2.3.1](https://github.com/AFNetworking/AFNetworking/releases/tag/2.3.1) (2014-06-13) + + * Fix issue with unsynthesized `streamStatus` & `streamError` properties +on `AFMultipartBodyStream` (Mattt Thompson) + +## [2.3.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.3.0) (2014-06-11) + + * Add check for `AF_APP_EXTENSIONS` macro to conditionally compile +background method that makes API call unavailable to App Extensions in iOS 8 +/ OS X 10.10 + + * Add further explanation for network reachability in documentation (Steven +Fisher) + + * Add notification for initial change from +`AFNetworkReachabilityStatusUnknown` to any other state (Jason Pepas, +Sebastian S.A., Mattt Thompson) + + * Add tests for AFNetworkActivityIndicatorManager (Dave Weston, Mattt +Thompson) + + * Add tests for AFURLSessionManager task progress (Ullrich Schäfer) + + * Add `attemptsToRecreateUploadTasksForBackgroundSessions` property, which +attempts Apple's recommendation of retrying a failed upload task if initial +creation did not succeed (Mattt Thompson) + + * Add `completionQueue` and `completionGroup` properties to +`AFHTTPRequestOperationManager` (Robert Ryan) + + * Change deprecating `AFErrorDomain` in favor of +`AFRequestSerializerErrorDomain` & `AFResponseSerializerErrorDomain` (Mattt +Thompson) + + * Change serialization tests to be split over two different files (Mattt +Thompson) + + * Change to make NSURLSession subspec not depend on NSURLConnection subspec +(Mattt Thompson) + + * Change to make Serialization subspec not depend on NSURLConnection subspec +(Nolan Waite, Mattt Thompson) + + * Change `completionHandler` of +`application:handleEventsForBackgroundURLSession:completion:` to be run on +main thread (Padraig Kennedy) + + * Change `UIImageView` category to accept any object conforming to +`AFURLResponseSerialization`, rather than just `AFImageResponseSerializer` +(Romans Karpelcevs) + + * Fix calculation and behavior of `NSProgress` (Padraig Kennedy, Ullrich +Schäfer) + + * Fix deprecation warning for `backgroundSessionConfiguration:` in iOS 8 / +OS X 10.10 (Mattt Thompson) + + * Fix implementation of `copyWithZone:` in serializer subclasses (Chris +Streeter) + + * Fix issue in Xcode 6 caused by implicit synthesis of overridden `NSStream` +properties (Clay Bridges, Johan Attali) + + * Fix KVO handling for `NSURLSessionTask` on iOS 8 / OS X 10.10 (Mattt +Thompson) + + * Fix KVO leak for `NSURLSessionTask` (@Zyphrax) + + * Fix potential crash caused by attempting to use non-existent error of +failing requests due to URLs exceeding a certain length (Boris Bügling) + + * Fix to check existence of `uploadProgress` block inside a referencing +`dispatch_async` to avoid potential race condition (Kyungkoo Kang) + + * Fix `UIImageView` category race conditions (Sunny) + + * Remove unnecessary default operation response serializer setters (Mattt +Thompson) + +## [2.2.4](https://github.com/AFNetworking/AFNetworking/releases/tag/2.2.4) (2014-05-13) + + * Add NSSecureCoding support to all AFNetworking classes (Kyle Fuller, Mattt +Thompson) + + * Change behavior of request operation `NSOutputStream` property to only nil +out if `responseData` is non-nil, meaning that no custom object was set +(Mattt Thompson) + + * Fix data tasks to not attempt to track progress, and rare related crash +(Padraig Kennedy) + + * Fix issue with `-downloadTaskDidFinishDownloading:` not being called +(Andrej Mihajlov) + + * Fix KVO leak on invalidated session tasks (Mattt Thompson) + + * Fix missing import of `UIRefreshControl+AFNetworking" (@BB9z) + + * Fix potential compilation errors on Mac OS X, caused by import order of +``, which signaled an incorrect deprecation warning (Mattt +Thompson) + + * Fix race condition in UIImageView+AFNetworking when making several image +requests in quick succession (Alexander Crettenand) + + * Update documentation for `-downloadTaskWithRequest:` to warn about blocks +being disassociated on app termination and backgrounding (Robert Ryan) + +## [2.2.3](https://github.com/AFNetworking/AFNetworking/releases/tag/2.2.3) (2014-04-18) + + * Fix `AFErrorOrUnderlyingErrorHasCodeInDomain` function declaration for +AFXMLDocumentResponseSerializer (Mattt Thompson) + + * Fix error domain check in `AFErrorOrUnderlyingErrorHasCodeInDomain` +(Mattt Thompson) + + * Fix `UIImageView` category to only `nil` out request operation properties +belonging to completed request (Mattt Thompson) + + * Fix `removesKeysWithNullValues` to respect +`NSJSONReadingMutableContainers` option (Mattt Thompson) + + * Change `removesKeysWithNullValues` property to recursively remove null +values from dictionaries nested in arrays (@jldagon) + + * Change to not override `Content-Type` header field values set by +`HTTPRequestHeaders` property (Aaron Brager, Mattt Thompson) + +## [2.2.2](https://github.com/AFNetworking/AFNetworking/releases/tag/2.2.2) (2014-04-15) + + * Add `removesKeysWithNullValues` property to `AFJSONResponsSerializer` to +automatically remove `NSNull` values in dictionaries serialized from JSON +(Mattt Thompson) + + * Add unit test for checking content type (Diego Torres) + + * Add `boundary` property to `AFHTTPBodyPart -copyWithZone:` + + * Change to accept `id` parameter type in HTTP manager convenience methods +(Mattt Thompson) + + * Change to deprecate `setAuthorizationHeaderFieldWithToken:`, in favor of +users specifying an `Authorization` header field value themselves (Mattt +Thompson) + + * Change to use `long long` type to prevent a difference in stream size +caps on 32-bit and 64-bit architectures (Yung-Luen Lan, Cédric Luthi) + + * Fix calculation of Content-Length in `taskDidSendBodyData` (Christos +Vasilakis) + + * Fix for comparison of image view request operations (Mattt Thompson) + + * Fix for SSL certificate validation to check status codes at runtime (Dave +Anderson) + + * Fix to add missing call to delegate in +`URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:` + + * Fix to call `taskDidComplete` if delegate is missing (Jeff Ward) + + * Fix to implement `respondsToSelector:` for `NSURLSession` delegate +methods to conditionally respond to conditionally respond to optional +selectors if and only if a custom block has been set (Mattt Thompson) + + * Fix to prevent illegal state values from being assigned for +`AFURLConnectionOperation` (Kyle Fuller) + + * Fix to re-establish `AFNetworkingURLSessionTaskDelegate` objects after +restoring from a background configuration (Jeff Ward) + + * Fix to reduce memory footprint by `nil`-ing out request operation +`outputStream` after closing, as well as image view request operation after +setting image (Teun van Run, Mattt Thompson) + + * Remove unnecessary call in class constructor (Bernhard Loibl) + + * Remove unnecessary check for `respondsToSelector:` for `UIScreen scale` +in User-Agent string (Samuel Goodwin) + + * Update App.net certificate and API base URL (Cédric Luthi) + + * Update examples in README (@petard, @orta, Mattt Thompson) + + * Update Travis CI icon to use SVG format (Maximilian Tagher) + +## [2.2.1](https://github.com/AFNetworking/AFNetworking/releases/tag/2.2.1) (2014-03-14) + + * Fix `-Wsign-conversion` warning in AFURLConnectionOperation (Jesse Collis) + + * Fix `-Wshorten-64-to-32` warning (Jesse Collis) + + * Remove unnecessary #imports in `UIImageView` & `UIWebView` categories +(Jesse Collis) + + * Fix call to `CFStringTransform()` by checking return value before setting +as `User-Agent` (Kevin Cassidy Jr) + + * Update `AFJSONResponseSerializer` adding `@autorelease` to relieve memory +pressure (Mattt Thompson, Michal Pietras) + + * Update `AFJSONRequestSerializer` to accept `id` (Daren Desjardins) + + * Fix small documentation bug (@jkoepcke) + + * Fix behavior of SSL pinning. In case of `validatesDomainName == YES`, it +now explicitly uses `SecPolicyCreateSSL`, which also validates the domain +name. Otherwise, `SecPolicyCreateBasicX509` is used. +`AFSSLPinningModeCertificate` now uses `SecTrustSetAnchorCertificates`, which +allows explicit specification of all trusted certificates. For +`AFSSLPinningModePublicKey`, the number of trusted public keys determines if +the server should be trusted. (Oliver Letterer, Eric Allam) + +## [2.2.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.2.0) (2014-02-25) + + * Add default initializer to make `AFHTTPRequestOperationManager` +consistent with `AFHTTPSessionManager` (Marcelo Fabri) + + * Add documentation about `UIWebView` category and implementing +`UIWebViewDelegate` (Mattt Thompson) + + * Add missing `NSCoding` and `NSCopying` implementations for +`AFJSONRequestSerializer` (Mattt Thompson) + + * Add note about use of `-startMonitoring` in +`AFNetworkReachabilityManager` (Mattt Thompson) + + * Add setter for needsNewBodyStream block (Carmen Cerino) + + * Add support for specifying a response serializer on a per-instance of +`AFURLSessionManagerTaskDelegate` (Blake Watters) + + * Add `AFHTTPRequestSerializer +-requestWithMultipartFormRequest:writingStreamContentsToFile:completionHandler +:` as a workaround for a bug in NSURLSession that removes the Content-Length +header from streamed requests (Mattt Thompson) + + * Add `NSURLRequest` factory properties on `AFHTTPRequestSerializer` (Mattt +Thompson) + + * Add `UIRefreshControl+AFNetworking` (Mattt Thompson) + + * Change example project to enable certificate pinning (JP Simard) + + * Change to allow self-signed certificates (Frederic Jacobs) + + * Change to make `reachabilityManager` property readwrite (Mattt Thompson) + + * Change to sort `NSSet` members during query string parameter +serialization (Mattt Thompson) + + * Change to use case sensitive compare when sorting keys in query string +serialization (Mattt Thompson) + + * Change to use xcpretty instead of xctool for automated testing (Kyle +Fuller, Marin Usalj, Carson McDonald) + + * Change to use `@selector` values as keys for associated objects (Mattt +Thompson) + + * Change `setImageWithURL:placeholder:`, et al. to only set placeholder +image if not `nil` (Alejandro Martinez) + + * Fix auto property synthesis warnings (Oliver Letterer) + + * Fix domain name validation for SSL certificates (Oliver Letterer) + + * Fix issue with session task delegate KVO observation (Kyle Fuller) + + * Fix placement of `baseURL` method declaration (Oliver Letterer) + + * Fix podspec linting error (Ari Braginsky) + + * Fix potential concurrency issues by adding lock around setting +`isFinished` state in `AFURLConnectionOperation` (Mattt Thompson) + + * Fix potential vulnerability caused by hard-coded multipart form data +boundary (Mathias Bynens, Tom Van Goethem, Mattt Thompson) + + * Fix protocol name in #pragma mark declaration (@sevntine) + + * Fix regression causing inflated images to have incorrect orientation +(Mattt Thompson) + + * Fix to `AFURLSessionManager` `NSCoding` implementation, to accommodate +`NSURLSessionConfiguration` no longer conforming to `NSCoding`. + + * Fix Travis CI integration (Kyle Fuller, Marin Usalj, Carson McDonald) + + * Fix various static analyzer warnings (Philippe Casgrain, Jim Young, +Steven Fisher, Mattt Thompson) + + * Fix with download progress calculation of completion units (Kyle Fuller) + + * Fix Xcode 5.1 compiler warnings (Nick Banks) + + * Fix `AFHTTPRequestOperationManager` to default +`shouldUseCredentialStorage` to `YES`, as documented (Mattt Thompson) + + * Remove Unused format property in `AFJSONRequestSerializer` (Mattt +Thompson) + + * Remove unused `acceptablePathExtensions` class method in +`AFJSONRequestSerializer` (Mattt Thompson) + + * Update #ifdef declarations in UIKit categories to be simpler (Mattt +Thompson) + + * Update podspec to includ social_media_url (Kyle Fuller) + + * Update types for 64 bit architecture (Bruno Tortato Furtado, Mattt +Thompson) + +## [2.1.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.1.0) (2014-01-16) + + * Add CONTRIBUTING (Kyle Fuller) + + * Add domain name verification for SSL certificates (Oliver Letterer) + + * Add leaf certificate checking (Alex Leverington, Carson McDonald, Mattt +Thompson) + + * Add test case for stream failure handling (Kyle Fuller) + + * Add underlying error properties to response serializers to forward errors +to subsequent validation steps (Mattt Thompson) + + * Add `AFImageCache` protocol, to allow for custom image caches to be +specified for `UIImageView` (Mattt Thompson) + + * Add `error` out parameter for request serializer, deprecating existing +request constructor methods (Adam Becevello) + + * Change request serializer protocol to take id type for parameters (Mattt +Thompson) + + * Change to add validation of download task responses (Mattt Thompson) + + * Change to force upload progress, by using original request Content-Length +(Mateusz Malczak) + + * Change to use `NSDictionary` object literals for `NSError` `userInfo` +construction (Mattt Thompson) + + * Fix #pragma declaration to be NSURLConnectionDataDelegate, rather than +NSURLConnectionDelegate (David Paschich) + + * Fix a bug when appending a file part to multipart request from a URL +(Kyle Fuller) + + * Fix analyzer warning about weak receiver being set to nil, capture strong +reference (Stewart Gleadow) + + * Fix appending file part to multipart request to use suggested file name, +rather than temporary one (Kyle Fuller) + + * Fix availability macros for network activity indicator (Mattt Thompson) + + * Fix crash in iOS 6.1 caused by KVO on `isCancelled` property of +`AFURLConnectionOperation` (Sam Page) + + * Fix dead store issues in `AFSecurityPolicy` (Andrew Hershberger) + + * Fix incorrect documentation for `-HTTPRequestOperationWithRequest:...` +(Kyle Fuller) + + * Fix issue in reachability callbacks, where reachability managers created +for a particular domain would initially report no reachability (Mattt +Thompson) + + * Fix logic for handling data task turning into download task (Kyle Fuller) + + * Fix property list response serializer to handle 204 response (Kyle Fuller) + + * Fix README multipart example (Johan Forssell) + + * Fix to add check for non-nil delegate in +`URLSession:didCompleteWithError:` (Kaom Te) + + * Fix to dramatically improve creation of images in +`AFInflatedImageFromResponseWithDataAtScale`, including handling of CMYK, 16 +/ 32 bpc images, and colorspace alpha settings (Robert Ryan) + + * Fix Travis CI integration and unit testing (Kyle Fuller, Carson McDonald) + + * Fix typo in comments (@palringo) + + * Fix UIWebView category to use supplied success callback (Mattt Thompson) + + * Fix various static analyzer warnings (Kyle Fuller, Jesse Collis, Mattt +Thompson) + + * Fix `+batchOfRequestOperations:...` completion block to execute in +`dispatch_async` (Mattt Thompson) + + * Remove synchronous `SCNetworkReachabilityGetFlags` call when initializing +managers, which had the potential to block in certain network conditions +(Yury Korolev, Mattt Thompson) + + * Remove unnecessary check for completionHandler in HTTP manager (Mattt +Thompson) + + * Remove unused conditional clauses (Luka Bratos) + + * Update documentation for `AFCompoundResponseSerializer` (Mattt Thompson) + + * Update httpbin certificates (Carson McDonald) + + * Update notification constant names to be consistent with `NSURLSession` +terminology (Mattt Thompson) + +## [2.0.3](https://github.com/AFNetworking/AFNetworking/releases/tag/2.0.3) (2013-11-18) + + * Fix a bug where `AFURLConnectionOperation -pause` did not correctly reset +the state of `AFURLConnectionOperation`, causing the Network Thread to enter +an infinite loop (Erik Chen) + + * Fix a bug where `AFURLConnectionOperation -cancel` does not set the +appropriate error on the `NSOperation` (Erik Chen) + + * Fix to post `AFNetworkingTaskDidFinishNotification` only on main queue +(Jakub Hladik) + + * Fix issue where the query string serialization block was not used (Kevin +Harwood) + + * Fix project file and repository directory items (Andrew Newdigate) + + * Fix `NSURLSession` subspec (Mattt Thompson) + + * Fix to session task delegate KVO by moving observer removal to +`-didCompleteWithError:` (Mattt Thompson) + + * Add AFNetworking 1.x behavior for image construction in inflation to +ensure correct orientation (Mattt Thompson) + + * Add `NSParameterAssert` for internal task constructors in order to catch +invalid constructions early (Mattt Thompson) + + * Update replacing `NSParameterAssert` with early `nil` return if session +was unable to create a task (Mattt Thompson) + + * Update `AFHTTPRequestOperationManager` and `AFHTTPSessionManager` to use +relative `self class` to create class constructor instances (Bogdan +Poplauschi) + + * Update to break out of loop if output stream does not have space to write +bytes (Mattt Thompson) + + * Update documentation and README with various fixes (Max Goedjen, Mattt +Thompson) + + * Remove unnecessary willChangeValueForKey and didChangeValueForKey method +calls (Mindaugas Vaičiūnas) + + * Remove deletion of all task delegates in +`URLSessionDidFinishEventsForBackgroundURLSession:` (Jeremy Mailen) + + * Remove empty, unused `else` branch (Luka Bratos) + +## [2.0.2](https://github.com/AFNetworking/AFNetworking/releases/tag/2.0.2) (2013-10-29) + + * Add `UIWebView + -loadRequest:MIMEType:textEncodingName:progress:success:failure:` (Mattt + Thompson) + + * Fix iOS 6 compatibility in `AFHTTPSessionManager` & + `UIProgressView+AFNetworking` (Olivier Halligon, Mattt Thompson) + + * Fix issue writing partial data to output stream (Kyle Fuller) + + * Fix behavior for `nil` response in request operations (Marcelo Fabri) + + * Fix implementation of + batchOfRequestOperations:progressBlock:completionBlock: for nil when passed + empty operations parameter (Mattt Thompson) + + * Update `AFHTTPSessionManager` to allow `-init` and `initWithConfig:` to + work (Ben Scheirman) + + * Update `AFRequestOperation` to default to `AFHTTPResponseSerializer` (Jiri + Techet) + + * Update `AFHTTPResponseSerializer` to remove check for nonzero responseData + length (Mattt Thompson) + + * Update `NSCoding` methods to use NSStringFromSelector(@selector()) pattern + instead of `NSString` literals (Mattt Thompson) + + * Update multipart form stream to set Content-Length after setting request + stream (Mattt Thompson) + + * Update documentation with outdated references to `AFHTTPSerializer` (Bruno + Koga) + + * Update documentation and README with various fixes (Jon Chambers, Mattt + Thompson) + + * Update files to remove executable privilege (Kyle Fuller) + +## [2.0.1](https://github.com/AFNetworking/AFNetworking/releases/tag/2.0.1) (2013-10-10) + + * Fix iOS 6 compatibility (Matt Baker, Mattt Thompson) + + * Fix example applications (Sam Soffes, Kyle Fuller) + + * Fix usage of `NSSearchPathForDirectoriesInDomains` in README (Leo Lou) + + * Fix names of exposed private methods `downloadProgress` and +`uploadProgress` (Hermes Pique) + + * Fix initial upload/download task progress updates (Vlas Voloshin) + + * Fix podspec to include `AFNetworking.h` `#import` (@haikusw) + + * Fix request serializers to not override existing header field values with +defaults (Mattt Thompson) + + * Fix unused format string placeholder (Thorsten Lockert) + + * Fix `AFHTTPRequestOperation -initWithCoder:` to call `super` (Josh Avant) + + * Fix `UIProgressView` selector name (Allen Tu) + + * Fix `UIButton` response serializer (Sam Grossberg) + + * Fix `setPinnedCertificates:` and pinned public keys (Kyle Fuller) + + * Fix timing of batched operation completion block (Denys Telezhkin) + + * Fix `GCC_WARN_ABOUT_MISSING_NEWLINE` compiler warning (Chuck Shnider) + + * Fix a format string missing argument issue in tests (Kyle Fuller) + + * Fix location of certificate chain bundle location (Kyle Fuller) + + * Fix memory leaks in AFSecurityPolicyTests (Kyle Fuller) + + * Fix potential concurrency issues in `AFURLSessionManager` by adding locks +around access to mutiple delegates dictionary (Mattt Thompson) + + * Fix unused variable compiler warnings by wrapping `OSStatus` and +`NSCAssert` with NS_BLOCK_ASSERTIONS macro (Mattt Thompson) + + * Fix compound serializer error handling (Mattt Thompson) + + * Fix string encoding for responseString (Juan Enrique) + + * Fix `UIImageView -setBackgroundImageWithRequest:` (Taichiro Yoshida) + + * Fix regressions nested multipart parameters (Mattt Thompson) + + * Add `responseObject` property to `AFHTTPRequestOperation` (Mattt Thompson) + + * Add support for automatic network reachability monitoring for request +operation and session managers (Mattt Thompson) + + * Update documentation and README with various corrections and fixes +(@haikusw, Chris Hellmuth, Dave Caunt, Mattt Thompson) + + * Update default User-Agent such that only ASCII character set is used +(Maximillian Dornseif) + + * Update SSL pinning mode to have default pinned certificates by default +(Kevin Harwood) + + * Update `AFSecurityPolicy` to use default authentication handling unless a +credential exists for the server trust (Mattt Thompson) + + * Update Prefix.pch (Steven Fisher) + + * Update minimum iOS test target to iOS 6 + + * Remove unused protection space block type (Kyle Fuller) + + * Remove unnecessary Podfile.lock (Kyle Fuller) + +## [2.0.0](https://github.com/AFNetworking/AFNetworking/releases/tag/2.0.0) (2013-09-27) + +* Initial 2.0.0 Release + +==================== +#AFNetworking 1.0 Change Log +-- + +## [1.3.4](https://github.com/AFNetworking/AFNetworking/releases/tag/1.3.4) (2014-04-15) + + * Fix `AFHTTPMultipartBodyStream` to randomly generate form boundary, to +prevent attack based on a known value (Mathias Bynens, Tom Van Goethem, Mattt +Thompson) + + * Fix potential non-terminating loop in `connection:didReceiveData:` (Mattt +Thompson) + + * Fix SSL certificate validation to provide a human readable Warning when +SSL Pinning fails (Maximillian Dornseif) + + * Fix SSL certificate validation to assert that no impossible pinning +configuration exists (Maximillian Dornseif) + + * Fix to check `CFStringTransform()` call for success before using result +(Kevin Cassidy Jr) + + * Fix to prevent unused assertion results with macros (Indragie Karunaratne) + + * Fix to call call `SecTrustEvaluate` before calling +`SecTrustGetCertificateCount` in SSL certificate validation (Josh Chung) + + * Fix to add explicit cast to `NSUInteger` in format string (Alexander +Kempgen) + + * Remove unused variable `kAFStreamToStreamBufferSize` (Alexander Kempgen) + +## [1.3.3](https://github.com/AFNetworking/AFNetworking/releases/tag/1.3.3) (2013-09-25) + + * Add stream error handling to `AFMultipartBodyStream` (Nicolas Bachschmidt, +Mattt Thompson) + + * Add stream error handling to `AFURLConnectionOperation +-connection:didReceiveData:` (Ian Duggan, Mattt Thompson) + + * Fix parameter query string encoding of square brackets according to RFC +3986 (Kra Larivain) + + * Fix AFHTTPBodyPart determination of end of input stream data (Brian Croom) + + * Fix unit test timeouts (Carson McDonald) + + * Fix truncated `User-Agent` header field when app contained non-ASCII +characters (Diego Torres) + + * Fix outdated link in documentation (Jonas Schmid) + + * Fix `AFHTTPRequestOperation` `HTTPError` property to be thread-safe +(Oliver Letterer, Mattt Thompson) + + * Fix API compatibility with iOS 5 (Blake Watters, Mattt Thompson) + + * Fix potential race condition in `AFURLConnectionOperation +-cancelConnection` (@mm-jkolb, Mattt Thompson) + + * Remove implementation of `connection:needNewBodyStream:` delegate method +in `AFURLConnectionOperation`, which fixes stream errors on authentication +challenges (Mattt Thompson) + + * Fix calculation of network reachability from flags (Tracy Pesin, Mattt +Thompson) + + * Update AFHTTPClient documentation to clarify scope of `parameterEncoding` +property (Thomas Catterall) + + * Update `UIImageView` category to allow for nested calls to +`setImageWithURLRequest:` (Philippe Converset) + + * Change `UIImageView` category to accept invalid SSL certificates when +`_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` is defined (Flávio Caetano) + + * Change to replace #pragma clang with cast (Cédric Luthi) + +## [1.3.2](https://github.com/AFNetworking/AFNetworking/releases/tag/1.3.2) (2013-08-08) + + * Add return status checks when building list of pinned public keys (Sylvain +Guillope) + + * Add return status checks when handling connection authentication challenges +(Sylvain Guillope) + + * Add tests around `AFHTTPClient initWithBaseURL:` (Kyle Fuller) + + * Change to remove all `_AFNETWORKING_PIN_SSL_CERTIFICATES_` conditional +compilation (Dustin Barker) + + * Change to allow fallback to generic image loading when PNG/JPEG data +provider methods fail (Darryl H. Thomas) + + * Change to only set placeholder image if not `nil` (Mattt Thompson) + + * Change to use `response.MIMEType` rather than (potentially nonexistent) +Content-Type headers to determine image data provider (Mattt Thompson) + + * Fix image request test endpoint (Carson McDonald) + + * Fix compiler warning caused by `size_t` value defaulted to `NULL` (Darryl H. +Thomas) + + * Fix mutable headers property in `AFHTTPClient -copyWithZone:` (Oliver +Letterer) + + * Fix documentation and asset references in README (Romain Pouclet, Peter +Goldsmith) + + * Fix bug in examples always using `AFSSLPinningModeNone` (Dustin Barker) + + * Fix execution of tests under Travis (Blake Watters) + + * Fix static analyzer warnings about CFRelease calls to NULL pointer (Mattt +Thompson) + + * Change to return early in `AFGetMediaTypeAndSubtypeWithString` if string is +`nil` (Mattt Thompson) + + * Change to opimize network thread creation (Mattt Thompson) + +## [1.3.1](https://github.com/AFNetworking/AFNetworking/releases/tag/1.3.1) (2013-06-18) + + * Add `automaticallyInflatesResponseImage` property to +`AFImageRequestOperation`, which when enabled, offers significant performance +improvements for drawing images loaded through `UIImageView+AFNetworking` by +inflating compressed image data in the background (Mattt Thompson, Peter +Steinberger) + + * Add `NSParameterAssert` check for `nil` `urlRequest` parameter in +`AFURLConnectionOperation` initializer (Kyle Fuller) + + * Fix reachability to detect the case where a connection is required but can +be automatically established (Joshua Vickery) + + * Fix to Test target Podfile (Kyle Fuller) + +## [1.3.0](https://github.com/AFNetworking/AFNetworking/releases/tag/1.3.0) (2013-06-01) + + * Change in `AFURLConnectionOperation` `NSURLConnection` authentication +delegate methods and associated block setters. If +`_AFNETWORKING_PIN_SSL_CERTIFICATES_` is defined, +`-setWillSendRequestForAuthenticationChallengeBlock:` will be available, and +`-connection:willSendRequestForAuthenticationChallenge:` will be implemented. +Otherwise, `-setAuthenticationAgainstProtectionSpaceBlock:` & +`-setAuthenticationChallengeBlock:` will be available, and +`-connection:canAuthenticateAgainstProtectionSpace:` & +`-connection:didReceiveAuthenticationChallenge:` will be implemented instead +(Oliver Letterer) + + * Change in AFNetworking podspec to include Security framework (Kevin Harwood, +Oliver Letterer, Sam Soffes) + + * Change in AFHTTPClient to @throw exception when non-designated intializer is +used (Kyle Fuller) + + * Change in behavior of connection:didReceiveAuthenticationChallenge: to not +use URL-encoded credentials, which should already have been applied (@xjdrew) + + * Change to set AFJSONRequestOperation error when unable to decode response +string (Chris Pickslay, Geoff Nix) + + * Change AFURLConnectionOperation to lazily initialize outputStream property +(@fumoboy007) + + * Change instances of (CFStringRef)NSRunLoopCommonModes to +kCFRunLoopCommonModes + + * Change #warning to #pragma message for dynamic framework linking warnings +(@michael_r_may) + + * Add unit testing and continuous integration system (Blake Watters, Oliver +Letterer, Kevin Harwood, Cédric Luthi, Adam Fraser, Carson McDonald, Mattt +Thompson) + + * Fix multipart input stream implementation (Blake Watters, OliverLetterer, +Aleksey Kononov, @mattyohe, @mythodeia, @JD-) + + * Fix implementation of authentication delegate methods (Oliver Letterer, +Kevin Harwood) + + * Fix implementation of AFSSLPinningModePublicKey on Mac OS X (Oliver Letterer) + + * Fix error caused by loading file:// requests with AFHTTPRequestOperation +subclasses (Dave Anderson, Oliver Letterer) + + * Fix threading-related crash in AFNetworkActivityIndicatorManager (Dave Keck) + + * Fix to suppress GNU expression and enum assignment warnings from Clang +(Henrik Hartz) + + * Fix leak caused by CFStringConvertEncodingToIANACharSetName in AFHTTPClient +-requestWithMethod:path:parameters: (Daniel Demiss) + + * Fix missing __bridge casts in AFHTTPClient (@apouche, Mattt Thompson) + + * Fix Objective-C++ compatibility (Audun Holm Ellertsen) + + * Fix to not escape tildes (@joein3d) + + * Fix warnings caused by unsynthesized properties (Jeff Hunter) + + * Fix to network reachability calls to provide correct status on +initialization (@djmadcat, Mattt Thompson) + + * Fix to suppress warnings about implicit signedness conversion (Matt Rubin) + + * Fix AFJSONRequestOperation -responseJSON failing cases (Andrew Vyazovoy, +Mattt Thompson) + + * Fix use of object subscripting to avoid incompatibility with iOS < 6 and OS +X < 10.8 (Paul Melnikow) + + * Various fixes to reverted multipart stream provider implementation (Yaron +Inger, Alex Burgel) + +## [1.2.1](https://github.com/AFNetworking/AFNetworking/releases/tag/1.2.1) (2013-04-18) + + * Add `allowsInvalidSSLCertificate` property to `AFURLConnectionOperation` and +`AFHTTPClient`, replacing `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` macro +(Kevin Harwood) + + * Add SSL pinning mode to example project (Kevin Harwood) + + * Add name to AFNetworking network thread (Peter Steinberger) + + * Change pinned certificates to trust all derived certificates (Oliver +Letterer) + + * Fix documentation about SSL pinning (Kevin Harwood, Mattt Thompson) + + * Fix certain enumerated loops to use fast enumeration, resulting in better +performance (Oliver Letterer) + + * Fix macro to work correctly under Mac OS X 10.7 and iOS 4 SDK (Paul Melnikow) + + * Fix documentation, removing unsupported `@discussion` tags (Michele Titolo) + + * Fix `SecTrustCreateWithCertificates` expecting an array as first argument +(Oliver Letterer) + + * Fix to use `errSecSuccess` instead of `noErr` for Security frameworks +OSStatus (Oliver Letterer) + + * Fix `AFImageRequestOperation` to use `[self alloc]` instead of explicit +class, which allows for subclassing (James Clarke) + + * Fix for `numberOfFinishedOperations` calculations (Rune Madsen) + + * Fix calculation of data length in `-connection:didReceiveData:` +(Jean-Francois Morin) + + * Fix to encode JSON only with UTF-8, following recommendation of +`NSJSONSerialiation` (Sebastian Utz) + +## [1.2.0](https://github.com/AFNetworking/AFNetworking/releases/tag/1.2.0) (2013-03-24) + + * Add `SSLPinningMode` property to `AFHTTPClient` (Oliver Letterer, Kevin +Harwood, Adam Becevello, Dustin Barker, Mattt Thompson) + + * Add single quote ("'"), comma (","), and asterix ("*") to escaped URL +encoding characters (Eric Florenzano, Marc Nijdam, Garrett Murray) + + * Add `credential` property to `AFURLConnectionOperation` (Mattt Thompson) + + * Add `-setDefaultCredential:` to `AFHTTPClient` + + * Add `shouldUseCredentialStorage` property to `AFURLConnectionOperation` +(Mattt Thompson) + + * Add support for repeated key value pairs in `AFHTTPClient` URL query string +(Nick Dawson) + + * Add `AFMultipartFormData - +appendPartWithFileURL:name:fileName:mimeType:error` (Daniel Rodríguez Troitiño) + + * Add `AFMultipartFormData - +appendPartWithInputStream:name:fileName:mimeType:` (@joein3d) + + * Change SSL pinning to be runtime property on `AFURLConnectionOperation` +rather than defined by macro (Oliver Letterer) + + * Change `AFMultipartBodyStream` to `AFMultipartBodyStreamProvider`, vending +one side of a bound CFStream pair rather than subclassing `NSInputStream` (Mike +Ash) + + * Change default `Accept-Language` header in `AFHTTPClient` (@therigu, Mattt +Thompson) + + * Change `AFHTTPClient` operation cancellation to be based on request URL path +rather than absolute URL string (Mattt Thompson) + + * Change request operation subclass processing queues to use +`DISPATCH_QUEUE_CONCURRENT` (Mattt Thompson) + + * Change `UIImageView+AFNetworking` to resolve asymmetry in cached image case +between success block provided and not provided (@Eveets, Mattt Thompson) + + * Change `UIImageView+AFNetworking` to compare `NSURLRequest` instead of +`NSURL` to determine if previous request was equivalent (Cédric Luthi) + + * Change `UIImageView+AFNetworking` to only set image if non-`nil` (Sean +Kovacs) + + * Change indentation settings to four spaces at the project level (Cédric +Luthi) + + * Change `AFNetworkActivityIndicatorManager` to only update if requests have a +non-`nil` URL (Cédric Luthi) + + * Change `UIImageView+AFNetworking` to not do `setHTTPShouldHandleCookies` +(Konstantinos Vaggelakos) + + * Fix request stream exhaustion error on authentication challenges (Alex +Burgel) + + * Fix implementation to use `NSURL` methods instead of `CFURL` functions where +applicable (Cédric Luthi) + + * Fix race condition in `UIImageView+AFNetworking` (Peyman) + + * Fix `responseJSON`, `responseString`, and `responseStringEncoding` to be +threadsafe (Jon Parise, Mattt Thompson) + + * Fix `AFContentTypeForPathExtension` to ensure non-`NULL` content return +value (Zach Waugh) + + * Fix documentation for `appendPartWithFileURL:name:error:` + (Daniel Rodríguez Troitiño) + + * Fix request operation subclass processing queues to initialize with +`dispatch_once` (Sasmito Adibowo) + + * Fix posting of `AFNetworkingOperationDidStartNotification` and +`AFNetworkingOperationDidFinishNotification` to avoid crashes when logging in +response to notifications (Blake Watters) + + * Fix ordering of registered operation consultation in `AFHTTPClient` (Joel +Parsons) + + * Fix warning: multiple methods named 'postNotificationName:object:' found +[-Wstrict-selector-match] (Oliver Jones) + + * Fix warning: multiple methods named 'objectForKey:' found +[-Wstrict-selector-match] (Oliver Jones) + + * Fix warning: weak receiver may be unpredictably set to nil +[-Wreceiver-is-weak] (Oliver Jones) + + * Fix missing #pragma clang diagnostic pop (Steven Fisher) + +## [1.1.0](https://github.com/AFNetworking/AFNetworking/releases/tag/1.1.0) (2012-12-27) + + * Add optional SSL certificate pinning with `#define +_AFNETWORKING_PIN_SSL_CERTIFICATES_` (Dustin Barker) + + * Add `responseStringEncoding` property to `AFURLConnectionOperation` (Mattt +Thompson) + + * Add `userInfo` property to `AFURLConnectionOperation` (Mattt Thompson, +Steven Fisher) + + * Change behavior to cause a failure when an operation is cancelled (Daniel +Tull) + + * Change return type of class constructors to `instancetype` (@guykogus) + + * Change notifications to always being posted on an asynchronously-dispatched +block run on the main queue (Evadne Wu, Mattt Thompson) + + * Change from NSLocalizedString to NSLocalizedStringFromTable with +AFNetworking.strings table for localized strings (Cédric Luthi) + + * Change `-appendPartWithHeaders:body:` to add assertion handler for existence +of body data parameter (Jonathan Beilin) + + * Change `AFHTTPRequestOperation -responseString` to follow guidelines from +RFC 2616 regarding the use of string encoding when none is specified in the +response (Jorge Bernal) + + * Change AFHTTPClient parameter serialization dictionary keys with +`caseInsensitiveCompare:` to ensure + deterministic ordering of query string parameters, which may otherwise + cause ambiguous representations of nested parameters (James Coleman, + Mattt Thompson) + + * Fix -Wstrict-selector-match warnings raised by Xcode 4.6DP3 (Jesse Collis, +Cédric Luthi) + + * Fix NSJSONSerialization crash with Unicode character escapes in JSON +response (Mathijs Kadijk) + + * Fix issue with early return in -startMonitoringNetworkReachability if +network reachability object could not be created (i.e. invalid hostnames) +(Basil Shkara) + + * Fix retain cycles in AFImageRequestOperation.m and AFHTTPClient.m caused by +strong references within blocks (Nick Forge) + + * Fix issue caused by Rails behavior of returning a single space in head :ok +responses, which is interpreted as invalid (Sebastian Ludwig) + + * Fix issue in streaming multipart upload, where final encapsulation boundary +would not be appended if it was larger than the available buffer, causing a +potential timeout (Tomohisa Takaoka, David Kasper) + + * Fix memory leak of network reachability callback block (Mattt Thompson) + + * Fix `-initWithCoder:` for `AFURLConnectionOperation` and `AFHTTPClient` to +cast scalar types (Mattt Thompson) + + * Fix bug in `-enqueueBatchOfHTTPRequestOperations:...` to by using +`addOperations:waitUntilFinished:` instead of adding each operation +individually. (Mattt Thompson) + + * Change `#warning` messages of checks for `CoreServices` and +`MobileCoreServices` to message according to the build target platform (Mattt +Thompson) + + * Change `AFQueryStringFromParametersWithEncoding` to create keys string +representations using the description method as specified in documentation +(Cédric Luthi) + + * Fix __unused keywords for better Xcode indexing (Christian Rasmussen) + + * Fix warning: unused parameter 'x' [-Werror,-Wunused-parameter] (Oliver Jones) + + * Fix warning: property is assumed atomic by default +[-Werror,-Wimplicit-atomic-properties] (Oliver Jones) + + * Fix warning: weak receiver may be unpredictably null in ARC mode +[-Werror,-Wreceiver-is-weak] (Oliver Jones) + + * Fix warning: multiple methods named 'selector' found +[-Werror,-Wstrict-selector-match] (Oliver Jones) + + * Fix warning: 'macro' is not defined, evaluates to 0 (Oliver Jones) + + * Fix warning: atomic by default property 'X' has a user (Oliver Jones)defined +getter (property should be marked 'atomic' if this is intended) [-Werror, +-Wcustom-atomic-properties] (Oliver Jones) + + * Fix warning: 'response' was marked unused but was used +[-Werror,-Wused-but-marked-unused] (Oliver Jones) + + * Fix warning: enumeration value 'AFFinalBoundaryPhase' not explicitly handled +in switch [-Werror,-Wswitch-enum] (Oliver Jones) + +## [1.0.1](https://github.com/AFNetworking/AFNetworking/releases/tag/1.0.1) / 2012-11-01 + + * Fix error in multipart upload streaming, where byte range at boundaries +was not correctly calculated (Stan Chang Khin Boon) + + * If a success block is specified to `UIImageView -setImageWithURLRequest: +placeholderImage:success:failure`:, it is now the responsibility of the +block to set the image of the image view (Mattt Thompson) + + * Add `JSONReadingOptions` property to `AFJSONRequestOperation` (Jeremy + Foo, Mattt Thompson) + + * Using __weak self / __strong self pattern to break retain cycles in + background task and network reachability blocks (Jerry Beers, Dan Weeks) + + * Fix parameter encoding to leave period (`.`) unescaped (Diego Torres) + + * Fixing last file component in multipart form part creation (Sylver + Bruneau) + + * Remove executable permission on AFHTTPClient source files (Andrew + Sardone) + + * Fix warning (error with -Werror) on implicit 64 to 32 conversion (Dan + Weeks) + + * Add GitHub's .gitignore file (Nate Stedman) + + * Updates to README (@ckmcc) + +## [1.0](https://github.com/AFNetworking/AFNetworking/releases/tag/1.0) / 2012-10-15 + + * AFNetworking now requires iOS 5 / Mac OSX 10.7 or higher (Mattt Thompson) + + * AFNetworking now uses Automatic Reference Counting (ARC) (Mattt Thompson) + + * AFNetworking raises compiler warnings for missing features when +SystemConfiguration or CoreServices / MobileCoreServices frameworks are not +included in the project and imported in the precompiled headers (Mattt +Thompson) + + * AFNetworking now raises compiler error when not compiled with ARC (Steven +Fisher) + + * Add `NSCoding` and `NSCopying` protocol conformance to +`AFURLConnectionOperation` and `AFHTTPClient` (Mattt Thompson) + + * Add substantial improvements HTTP multipart streaming support, having +files streamed directly from disk and read sequentially from a custom input +stream (Max Lansing, Stan Chang Khin Boon, Mattt Thompson) + + * Add `AFMultipartFormData -throttleBandwidthWithPacketSize:delay:` as +workaround to issues when uploading over 3G (Mattt Thompson) + + * Add request and response to `userInfo` of errors returned from failing +`AFHTTPRequestOperation` (Mattt Thompson) + + * Add `userInfo` dictionary with current status in reachability changes +(Mattt Thompson) + + * Add `Accept` header for image requests in `UIImageView` category (Bratley +Lower) + + * Add explicit declaration of `NSURLConnection` delegate methods so that +they can be overridden in subclasses (Mattt Thompson, Evan Grim) + + * Add parameter validation to match conditions specified in documentation +(Jason Brennan, Mattt Thompson) + + * Add import to `UIKit` to avoid build errors from `UIDevice` references in +`User-Agent` default header (Blake Watters) + + * Remove `AFJSONUtilities` in favor of `NSJSONSerialization` (Mattt Thompson) + + * Remove `extern` declaration of `AFURLEncodedStringFromStringWithEncoding` +function (`CFURLCreateStringByAddingPercentEscapes` should be used instead) +(Mattt Thompson) + + * Remove `setHTTPShouldHandleCookies:NO` from `AFHTTPClient` (@phamsonha, +Mattt Thompson) + + * Remove `dispatch_retain` / `dispatch_release` with ARC in iOS 6 (Benoit +Bourdon) + + * Fix threading issue with `AFNetworkActivityIndicatorManager` (Eric Patey) + + * Fix issue where `AFNetworkActivityIndicatorManager` count could become +negative (@ap4y) + + * Fix properties to explicitly set options to suppress warnings (Wen-Hao +Lue, Mattt Thompson) + + * Fix compiler warning caused by mismatched types in upload / download +progress blocks (Gareth du Plooy, tomas.a) + + * Fix weak / strong variable relationships in `completionBlock` (Peter +Steinberger) + + * Fix string formatting syntax warnings caused by type mismatch (David +Keegan, Steven Fisher, George Cox) + + * Fix minor potential security vulnerability by explicitly using string +format in NSError localizedDescription value in userInfo (Steven Fisher) + + * Fix `AFURLConnectionOperation -pause` by adding state checks to prevent +likely memory issues when resuming (Mattt Thompson) + + * Fix warning caused by miscast of type when +`CLANG_WARN_IMPLICIT_SIGN_CONVERSION` is set (Steven Fisher) + + * Fix incomplete implementation warning in example code (Steven Fisher) + + * Fix warning caused by using `==` comparator on floats (Steven Fisher) + + * Fix iOS 4 bug where file URLs return `NSURLResponse` rather than +`NSHTTPURLResponse` objects (Leo Lobato) + + * Fix calculation of finished operations in batch operation progress +callback (Mattt Thompson) + + * Fix documentation typos (Steven Fisher, Matthias Wessendorf, +jorge@miv.uk.com) + + * Fix `hasAcceptableStatusCode` to return true after a network failure (Tony +Million) + + * Fix warning about missing prototype for private static method (Stephan +Diederich) + + * Fix issue where `nil` content type resulted in unacceptable content type +(Mattt Thompson) + + * Fix bug related to setup and scheduling of output stream (Stephen Tramer) + + * Fix AFContentTypesFromHTTPHeader to correctly handle comma-delimited +content types (Peyman, Mattt Thompson, @jsm174) + + * Fix crash caused by `_networkReachability` not being set to `NULL` after +releasing (Blake Watters) + + * Fix Podspec to correctly import required headers and use ARC (Eloy Durán, +Blake Watters) + + * Fix query string parameter escaping to leave square brackets unescaped +(Mattt Thompson) + + * Fix query string parameter encoding of `NSNull` values (Daniel Rinser) + + * Fix error caused by referencing `__IPHONE_OS_VERSION_MIN_REQUIRED` without +importing `Availability.h` (Blake Watters) + + * Update example to use App.net API, as Twitter shut off its unauthorized +access to the public timeline (Mattt Thompson) + + * Update `AFURLConnectionOperation` to replace `NSAutoReleasePool` with +`@autoreleasepool` (Mattt Thompson) + + * Update `AFHTTPClient` operation queue to specify +`NSOperationQueueDefaultMaxConcurrentOperationCount` rather than +previously-defined constant (Mattt Thompson) + + * Update `AFHTTPClient -initWithBaseURL` to automatically append trailing +slash, so as to fix common issue where default path is not respected without +trailing slash (Steven Fisher) + + * Update default `AFHTTPClient` `User-Agent` header strings (Mattt Thompson, +Steven Fisher) + + * Update icons for iOS example application (Mattt Thompson) + + * Update `numberOfCompletedOperations` variable in progress block to be +renamed to `numberOfFinishedOperations` (Mattt Thompson) + + +## [0.10.0](https://github.com/AFNetworking/AFNetworking/releases/tag/0.10.0) / 2012-06-26 + + * Add Twitter Mac Example application (Mattt Thompson) + + * Add note in README about how to set `-fno-objc-arc` flag for multiple files + at once (Pål Brattberg) + + * Add note in README about 64-bit architecture requirement (@rmuginov, Mattt + Thompson) + + * Add note in `AFNetworkActivityIndicatorManager` about not having to manually + manage animation state (Mattt Thompson) + + * Add missing block parameter name for `imageProcessingBlock` (Francois + Lambert) + + * Add NextiveJson to list of supported JSON libraries (Mattt Thompson) + + * Restore iOS 4.0 compatibility with `addAcceptableStatusCodes:` and + `addAcceptableContentTypes:` (Zachary Waldowski) + + * Update `AFHTTPClient` to use HTTP pipelining for `GET` and `HEAD` requests by + default (Mattt Thompson) + + * Remove @private ivar declaration in headers (Peter Steinberger, Mattt + Thompson) + + * Fix potential premature deallocation of _skippedCharacterSet (Tom Wanielista, + Mattt Thompson) + + * Fix potential issue in `setOutputStream` by closing any existing + `outputStream` (Mattt Thompson) + + * Fix filename in AFHTTPClient header (Steven Fisher) + + * Fix documentation for UIImageView+AFNetworking (Mattt Thompson) + + * Fix HTTP multipart form format, which caused issues with Tornado web server + (Matt Chen) + + * Fix `AFHTTPClient` to not append empty data into multipart form data (Jon + Parise) + + * Fix URL encoding normalization to not conditionally escape percent-encoded + strings (João Prado Maia, Kendall Helmstetter Gelner, @cysp, Mattt Thompson) + + * Fix `AFHTTPClient` documentation reference of + `HTTPRequestOperationWithRequest:success:failure` (Shane Vitarana) + + * Add `AFURLRequestOperation -setRedirectResponseBlock:` (Kevin Harwood) + + * Fix `AFURLConnectionOperation` compilation error by conditionally importing + UIKit framework (Steven Fisher) + + * Fix issue where image processing block is not called correctly with success + block in `AFImageRequestOperation` (Sergey Gavrilyuk) + + * Fix leaked dispatch group in batch operations (@andyegorov, Mattt Thompson) + + * Fix support for non-LLVM compilers in `AFNetworkActivityIndicatorManager` + (Abraham Vegh, Bill Williams, Mattt Thompson) + + * Fix AFHTTPClient to not add unnecessary data when constructing multipart form + request with nil parameters (Taeho Kim) + +## [1.0RC1](https://github.com/AFNetworking/AFNetworking/releases/tag/1.0RC1) / 2012-04-25 + + * Add `AFHTTPRequestOperation +addAcceptableStatusCodes / ++addAcceptableContentTypes` to dynamically add acceptable status codes and +content types on the class level (Mattt Thompson) + + * Add support for compound and complex `Accept` headers that include multiple +content types and / or specify a particular character encoding (Mattt Thompson) + + * Add `AFURLConnectionOperation +-setShouldExecuteAsBackgroundTaskWithExpirationHandler:` to have operations +finish once an app becomes inactive (Mattt Thompson) + + * Add support for pausing / resuming request operations (Peter Steinberger, +Mattt Thompson) + + * Improve network reachability functionality in `AFHTTPClient`, including a +distinction between WWan and WiFi reachability (Kevin Harwood, Mattt Thompson) + + +## [0.9.2](https://github.com/AFNetworking/AFNetworking/releases/tag/0.9.2) / 2012-04-25 + + * Add thread safety to `AFNetworkActivityIndicator` (Peter Steinberger, Mattt +Thompson) + + * Document requirement of available JSON libraries for decoding responses in +`AFJSONRequestOperation` and parameter encoding in `AFHTTPClient` (Mattt +Thompson) + + * Fix `AFHTTPClient` parameter encoding (Mattt Thompson) + + * Fix `AFJSONEncode` and `AFJSONDecode` to use `SBJsonWriter` and +`SBJsonParser` instead of `NSObject+SBJson` (Oliver Eikemeier) + + * Fix bug where `AFJSONDecode` does not return errors (Alex Michaud) + + * Fix compiler warning for undeclared +`AFQueryStringComponentFromKeyAndValueWithEncoding` function (Mattt Thompson) + + * Fix cache policy for URL requests (Peter Steinberger) + + * Fix race condition bug in `UIImageView+AFNetworking` caused by incorrectly +nil-ing request operations (John Wu) + + * Fix reload button in Twitter example (Peter Steinberger) + + * Improve batched operation by deferring execution of batch completion block +until all component request completion blocks have finished (Patrick Hernandez, +Kevin Harwood, Mattt Thompson) + + * Improve performance of image request decoding by dispatching to background + queue (Mattt Thompson) + + * Revert `AFImageCache` to cache image objects rather than `NSPurgeableData` +(Tony Million, Peter Steinberger, Mattt Thompson) + + * Remove unnecessary KVO `willChangeValueForKey:` / `didChangeValueForKey:` +calls (Peter Steinberger) + + * Remove unnecessary @private ivar declarations in headers (Peter Steinberger, +Mattt Thompson) + + * Remove @try-@catch block wrapping network thread entry point (Charles T. Ahn) + + +## [0.9.1](https://github.com/AFNetworking/AFNetworking/releases/tag/0.9.1) / 2012-03-19 + + * Create Twitter example application (Mattt Thompson) + + * Add support for nested array and dictionary parameters for query string and +form-encoded requests (Mathieu Hausherr, Josh Chung, Mattt Thompson) + + * Add `AFURLConnectionOperation -setCacheResponseBlock:`, which allows the +behavior of the `NSURLConnectionDelegate` method +`-connection:willCacheResponse:` to be overridden without subclassing (Mattt +Thompson) + + * Add `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` macros for +NSURLConnection authentication delegate methods (Mattt Thompson) + + * Add properties for custom success / failure callback queues (Peter +Steinberger) + + * Add notifications for network reachability changes to `AFHTTPClient` (Mattt +Thompson) + + * Add `AFHTTPClient -patchPath:` convenience method (Mattt Thompson) + + * Add support for NextiveJson (Adrian Kosmaczewski) + + * Improve network reachability checks (C. Bess) + + * Improve NSIndexSet formatting in error strings (Jon Parise) + + * Document crashing behavior in iOS 4 loading a file:// URL (Mattt Thompson) + + * Fix crash caused by `AFHTTPClient -cancelAllHTTPOperationsWithMethod:` not +checking operation to be instance of `AFHTTPRequestOperation` (Mattt Thompson) + + * Fix crash caused by passing `nil` URL in requests (Sam Soffes) + + * Fix errors caused by connection property not being nil'd out after an +operation finishes (Kevin Harwood, @zdzisiekpu) + + * Fix crash caused by passing `NULL` error pointer when setting `NSInvocation` +in `AFJSONEncode` and `AFJSONDecode` (Tyler Stromberg) + + * Fix batch operation completion block returning on background thread (Patrick +Hernandez) + + * Fix documentation for UIImageView+AFNetworking (Dominic Dagradi) + + * Fix race condition caused by `AFURLConnectionOperation` being cancelled on +main thread, rather than network thread (Erik Olsson) + + * Fix `AFURLEncodedStringFromStringWithEncoding` to correctly handle cases +where % is used as a literal rather than as part of a percent escape code +(Mattt Thompson) + + * Fix missing comma in `+defaultAcceptableContentTypes` for +`AFImageRequestOperation` (Michael Schneider) + + +## [0.9.0](https://github.com/AFNetworking/AFNetworking/releases/tag/0.9.0) / 2012-01-23 + + * Add thread-safe behavior to `AFURLConnectionOperation` (Mattt Thompson) + + * Add batching of operations for `AFHTTPClient` (Mattt Thompson) + + * Add authentication challenge callback block to override default + implementation of `connection:didReceiveAuthenticationChallenge:` in + `AFURLConnectionOperation` (Mattt Thompson) + + * Add `_AFNETWORKING_PREFER_NSJSONSERIALIZATION_`, which, when defined, + short-circuits the standard preference ordering used in `AFJSONEncode` and + `AFJSONDecode` to use `NSJSONSerialization` when available, falling back on + third-party-libraries. (Mattt Thompson, Shane Vitarana) + + * Add custom `description` for `AFURLConnectionOperation` and `AFHTTPClient` + (Mattt Thompson) + + * Add `text/javascript` to default acceptable content types for + `AFJSONRequestOperation` (Jake Boxer) + + * Add `imageScale` property to change resolution of images constructed from + cached data (Štěpán Petrů) + + * Add note about third party JSON libraries in README (David Keegan) + + * `AFQueryStringFromParametersWithEncoding` formats `NSArray` values in the + form `key[]=value1&key[]=value2` instead of `key=(value1,value2)` (Dan Thorpe) + + * `AFImageRequestOperation -responseImage` on OS X uses `NSBitmapImageRep` to + determine the correct pixel dimensions of the image (David Keegan) + + * `AFURLConnectionOperation` `connection` has memory management policy `assign` + to avoid retain cycles caused by `NSURLConnection` retaining its delegate + (Mattt Thompson) + + * `AFURLConnectionOperation` calls super implementation for `-isReady`, + following the guidelines for `NSOperation` subclasses (Mattt Thompson) + + * `UIImageView -setImageWithURL:` and related methods call success callback + after setting image (Cameron Boehmer) + + * Cancel request if an authentication challenge has no suitable credentials in + `AFURLConnectionOperation -connection:didReceiveAuthenticationChallenge:` + (Jorge Bernal) + + * Remove exception from + `multipartFormRequestWithMethod:path:parameters:constructing BodyWithBlock:` + raised when certain HTTP methods are used. (Mattt Thompson) + + * Remove `AFImageCache` from public API, moving it into private implementation + of `UIImageView+AFNetworking` (Mattt Thompson) + + * Mac example application makes better use of AppKit technologies and + conventions (Mattt Thompson) + + * Fix issue with multipart form boundaries in `AFHTTPClient + -multipartFormRequestWithMethod:path:parameters:constructing BodyWithBlock:` + (Ray Morgan, Mattt Thompson, Sam Soffes) + + * Fix "File Upload with Progress Callback" code snippet in README (Larry +Legend) + + * Fix to SBJSON invocations in `AFJSONEncode` and `AFJSONDecode` (Matthias + Tretter, James Frye) + + * Fix documentation for `AFHTTPClient requestWithMethod:path:parameters:` + (Michael Parker) + + * Fix `Content-Disposition` headers used for multipart form construction + (Michael Parker) + + * Add network reachability status change callback property to `AFHTTPClient`. + (Mattt Thompson, Kevin Harwood) + + * Fix exception handling in `AFJSONEncode` and `AFJSONDecode` (David Keegan) + + * Fix `NSData` initialization with string in `AFBase64EncodedStringFromString` + (Adam Ernst, Mattt Thompson) + + * Fix error check in `appendPartWithFileURL:name:error:` (Warren Moore, + Baldoph, Mattt Thompson) + + * Fix compiler warnings for certain configurations (Charlie Williams) + + * Fix bug caused by passing zero-length `responseData` to response object + initializers (Mattt Thompson, Serge Paquet) diff --git a/TwoNetworking/AFNetworking/CONTRIBUTING.md b/TwoNetworking/AFNetworking/CONTRIBUTING.md new file mode 100644 index 0000000..9bb98ea --- /dev/null +++ b/TwoNetworking/AFNetworking/CONTRIBUTING.md @@ -0,0 +1,96 @@ +# Contributing Guidelines + +This document contains information and guidelines about contributing to this project. +Please read it before you start participating. + +**Topics** + +* [Asking Questions](#asking-questions) +* [Reporting Security Issues](#reporting-security-issues) +* [Reporting Issues](#reporting-other-issues) +* [Submitting Pull Requests](#submitting-pull-requests) +* [Developers Certificate of Origin](#developers-certificate-of-origin) +* [Code of Conduct](#code-of-conduct) + +## Asking Questions + +We don't use GitHub as a support forum. +For any usage questions that are not specific to the project itself, +please ask on [Stack Overflow](https://stackoverflow.com) instead. +By doing so, you'll be more likely to quickly solve your problem, +and you'll allow anyone else with the same question to find the answer. +This also allows maintainers to focus on improving the project for others. + +## Reporting Security Issues + +The Alamofire Software Foundation takes security seriously. +If you discover a security issue, please bring it to our attention right away! + +Please **DO NOT** file a public issue, +instead send your report privately to . +This will help ensure that any vulnerabilities that _are_ found +can be [disclosed responsibly](http://en.wikipedia.org/wiki/Responsible_disclosure) +to any affected parties. + +## Reporting Other Issues + +A great way to contribute to the project +is to send a detailed issue when you encounter an problem. +We always appreciate a well-written, thorough bug report. + +Check that the project issues database +doesn't already include that problem or suggestion before submitting an issue. +If you find a match, add a quick "+1" or "I have this problem too." +Doing this helps prioritize the most common problems and requests. + +When reporting issues, please include the following: + +* The version of Xcode you're using +* The version of iOS or OS X you're targeting +* The full output of any stack trace or compiler error +* A code snippet that reproduces the described behavior, if applicable +* Any other details that would be useful in understanding the problem + +This information will help us review and fix your issue faster. + +## Submitting Pull Requests + +Pull requests are welcome, and greatly encouraged. When submitting a pull request, please create proper test cases demonstrating the issue to be fixed or the new feature. + +## Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +- (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +- (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +- (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +- (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Code of Conduct + +The Code of Conduct governs how we behave in public or in private +whenever the project will be judged by our actions. +We expect it to be honored by everyone who contributes to this project. + +See [CONDUCT.md](https://github.com/Alamofire/Foundation/blob/master/CONDUCT.md) for details. + +--- + +*Some of the ideas and wording for the statements above were based on work by the [Docker](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) and [Linux](http://elinux.org/Developer_Certificate_Of_Origin) communities. We commend them for their efforts to facilitate collaboration in their projects.* diff --git a/TwoNetworking/AFNetworking/CONTRIBUTING_CH.md b/TwoNetworking/AFNetworking/CONTRIBUTING_CH.md new file mode 100644 index 0000000..165da75 --- /dev/null +++ b/TwoNetworking/AFNetworking/CONTRIBUTING_CH.md @@ -0,0 +1,97 @@ +# 贡献指南 +本文档包含有关为此项目做出贡献的信息和指南。 +请在开始参加之前阅读。 + +**主题** + +* [提问](#提问) +* [报告安全问题](#报告安全问题) +* [报告其他问题](#报告其他问题) +* [提交拉取请求](#提交拉取请求) +* [开发人员原产地证书](#开发人员原产地证书-1.1) +* [行为守则](#行为守则) + +## 提问 + +我们不使用GitHub的论坛发表问题 +对于任何非特定于项目本身的使用问题, +请直接在[Stack Overflow](https://stackoverflow.com)上询问。 +通过此方法,你可以快速解决您的问题, +并且任何有相同问题的人可以找到答案。 +这也使维护人员能够专注于为其他人改进项目。 + +## 报告安全问题 + +Alamofire Software Foundation 认真对待安全问题。 +如果您发现任何关于安全的问题,请立即通知我们! + +请**不要**公然公开发布问题, +而是将您的问题私下发送到。 +这将有于帮助确保发现的任何漏洞 +可以[披露制度](http://en.wikipedia.org/wiki/Responsible_disclosure) +对任何受影响的各方 + +## 报告其他问题 + +为此项目贡献的方法 +是当遇到问题时,请发送一篇详细的错误报告。 +我们会感谢您写出的一份精心编写的详尽错误报告。 + +在提交问题之前,请检查项目里的问题数据库是否已存在此问题。 +如果您找到匹配项,请添加“+1”或“我也遇到此问题”。 +这样做有助于确定最常见问题和请求的优先级。 + +报告问题时,请包含以下内容: + +* 您正在使用的Xcode版本 +* 您的iOS或OS X版本 +* 任何堆栈轨迹或编译器错误的完整输出 +* 如果代码段可再现所描述的行为 +* 任何其他有助于理解问题的细节 + +此信息有助于我们更快地查看和修复您的问题。 + +## 提交拉取请求 + +大力鼓励和欢迎拉取请求。在提交拉取请求时,请创建适当的测试用例,说明修复的问题或新功能。 + +## 开发人员原产地证书 1.1 + +为了项目做出贡献,我保证: + +- (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +- (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +- (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +- (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## 行为守则 + +该项目采取贡献者公约为准则。 + +这项目的成果将会被我们的行为或行动影响。 + +我们期望每个为此项目做出贡献的人都会对此表示敬意。 + +详情请阅读 [CONDUCT.md](https://github.com/Alamofire/Foundation/blob/master/CONDUCT.md)。 + +---- + +*上述陈述的一些想法和措辞是基于 [Docker](https://github.com/docker/docker/blob/master/CONTRIBUTING.md) 和 [Linux](http://elinux.org/Developer_Certificate_Of_Origin) 社区. +我们表彰和感激他们为促进项目合作所做的付出。* diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.entitlements b/TwoNetworking/AFNetworking/Example/AFNetworking Example.entitlements new file mode 100644 index 0000000..7a2230d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/project.pbxproj b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/project.pbxproj new file mode 100644 index 0000000..5ccf69a --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/project.pbxproj @@ -0,0 +1,1401 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 291BFDC61BB9E85500FFB029 /* watchOS Example Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 291BFDD51BB9E85500FFB029 /* watchOS Example.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 291BFDB91BB9E85400FFB029 /* watchOS Example.app */; }; + 291BFDEE1BB9E8C700FFB029 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 291BFDED1BB9E8C700FFB029 /* main.m */; }; + 291BFDF31BB9E8C700FFB029 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 291BFDF21BB9E8C700FFB029 /* Assets.xcassets */; }; + 291BFDFD1BB9E8E500FFB029 /* Post.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19A1BB9DD7300A4466C /* Post.m */; }; + 291BFDFE1BB9E8E900FFB029 /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19C1BB9DD7300A4466C /* User.m */; }; + 291BFDFF1BB9E8EC00FFB029 /* AFAppDotNetAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */; }; + 291BFE0D1BB9EB3400FFB029 /* GlobalTimelineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 291BFE091BB9EB3400FFB029 /* GlobalTimelineViewController.m */; }; + 291BFE0E1BB9EB3400FFB029 /* PostTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 291BFE0C1BB9EB3400FFB029 /* PostTableViewCell.m */; }; + 291BFE101BB9EC4900FFB029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 291BFE0F1BB9EC4900FFB029 /* MainMenu.xib */; }; + 291BFE181BB9ECEE00FFB029 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291BFE171BB9ECEE00FFB029 /* AppDelegate.swift */; }; + 291BFE1A1BB9ECEE00FFB029 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291BFE191BB9ECEE00FFB029 /* ViewController.swift */; }; + 291BFE1D1BB9ECEE00FFB029 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 291BFE1B1BB9ECEE00FFB029 /* Main.storyboard */; }; + 291BFE1F1BB9ECEE00FFB029 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 291BFE1E1BB9ECEE00FFB029 /* Assets.xcassets */; }; + 291BFE351BB9ED7F00FFB029 /* Gravatar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291BFE341BB9ED7F00FFB029 /* Gravatar.swift */; }; + 291BFE371BB9EDD700FFB029 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 291BFE361BB9EDD700FFB029 /* UIKit.framework */; }; + 293206F41BD14AB50019EB9E /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293206F31BD14AB50019EB9E /* AFNetworking.framework */; }; + 293206F51BD14AF50019EB9E /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293206F31BD14AB50019EB9E /* AFNetworking.framework */; }; + 293206F61BD14B480019EB9E /* AFAppDotNetAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */; }; + 293206F71BD14B5C0019EB9E /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293206F31BD14AB50019EB9E /* AFNetworking.framework */; }; + 29A3A1891BD14B8B00BB357F /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293206F31BD14AB50019EB9E /* AFNetworking.framework */; }; + 29A3A18A1BD14BAA00BB357F /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 293206F31BD14AB50019EB9E /* AFNetworking.framework */; }; + 29E6F17A1BB9DCB500A4466C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F1791BB9DCB500A4466C /* main.m */; }; + 29E6F1A41BB9DD7300A4466C /* Post.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19A1BB9DD7300A4466C /* Post.m */; }; + 29E6F1A51BB9DD7300A4466C /* User.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19C1BB9DD7300A4466C /* User.m */; }; + 29E6F1A61BB9DD7300A4466C /* AFAppDotNetAPIClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */; }; + 29E6F1AC1BB9DDB600A4466C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29E6F1AB1BB9DDB600A4466C /* Assets.xcassets */; }; + 29E6F1E11BB9E03600A4466C /* Launchscreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29E6F1E01BB9E03600A4466C /* Launchscreen.storyboard */; }; + 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 /* 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 */; }; + C2BFE0281C11872D00BB258D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C2BFE0271C11872D00BB258D /* AppDelegate.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 291BFDC71BB9E85500FFB029 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29E6F16B1BB9DA2E00A4466C /* Project object */; + proxyType = 1; + remoteGlobalIDString = 291BFDC41BB9E85500FFB029; + remoteInfo = "watchOS Example Extension"; + }; + 291BFDD31BB9E85500FFB029 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29E6F16B1BB9DA2E00A4466C /* Project object */; + proxyType = 1; + remoteGlobalIDString = 291BFDB81BB9E85400FFB029; + remoteInfo = "watchOS Example"; + }; + 29E6F1F21BB9E37200A4466C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29E6F16B1BB9DA2E00A4466C /* Project object */; + proxyType = 1; + remoteGlobalIDString = 29E6F1E51BB9E37200A4466C; + remoteInfo = "Today Extension Example"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 291BFDD91BB9E85500FFB029 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 291BFDC61BB9E85500FFB029 /* watchOS Example Extension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1F81BB9E37200A4466C /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 29E6F1F41BB9E37200A4466C /* iOS Today Extension Example.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F2321BB9E76B00A4466C /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + 291BFDD51BB9E85500FFB029 /* watchOS Example.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* 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 /* 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 = ""; }; + 291BFDF21BB9E8C700FFB029 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 291BFDF71BB9E8C700FFB029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 291BFE081BB9EB3400FFB029 /* GlobalTimelineViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalTimelineViewController.h; sourceTree = ""; }; + 291BFE091BB9EB3400FFB029 /* GlobalTimelineViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GlobalTimelineViewController.m; sourceTree = ""; }; + 291BFE0B1BB9EB3400FFB029 /* PostTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostTableViewCell.h; sourceTree = ""; }; + 291BFE0C1BB9EB3400FFB029 /* PostTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostTableViewCell.m; sourceTree = ""; }; + 291BFE0F1BB9EC4900FFB029 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = ""; }; + 291BFE151BB9ECEE00FFB029 /* tvOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tvOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 291BFE171BB9ECEE00FFB029 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 291BFE191BB9ECEE00FFB029 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 291BFE1C1BB9ECEE00FFB029 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 291BFE1E1BB9ECEE00FFB029 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 291BFE201BB9ECEE00FFB029 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 291BFE241BB9ED1500FFB029 /* AFNetworking tvOS Example-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AFNetworking tvOS Example-Bridging-Header.h"; sourceTree = ""; }; + 291BFE341BB9ED7F00FFB029 /* Gravatar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Gravatar.swift; sourceTree = ""; }; + 291BFE361BB9EDD700FFB029 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS9.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 293206F31BD14AB50019EB9E /* AFNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AFNetworking.framework; path = "../../../Library/Developer/Xcode/DerivedData/AFNetworking-hbehydqutbohligoayuglkztxayp/Build/Products/Debug-iphoneos/AFNetworking.framework"; sourceTree = ""; }; + 29E6F1751BB9DCB500A4466C /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 29E6F1791BB9DCB500A4466C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../main.m; sourceTree = ""; }; + 29E6F1991BB9DD7300A4466C /* Post.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Post.h; sourceTree = ""; }; + 29E6F19A1BB9DD7300A4466C /* Post.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Post.m; sourceTree = ""; }; + 29E6F19B1BB9DD7300A4466C /* User.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = User.h; sourceTree = ""; }; + 29E6F19C1BB9DD7300A4466C /* User.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = User.m; sourceTree = ""; }; + 29E6F19E1BB9DD7300A4466C /* AFAppDotNetAPIClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFAppDotNetAPIClient.h; sourceTree = ""; }; + 29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFAppDotNetAPIClient.m; sourceTree = ""; }; + 29E6F1AB1BB9DDB600A4466C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 29E6F1E01BB9E03600A4466C /* Launchscreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Launchscreen.storyboard; path = "iOS Example/Launchscreen.storyboard"; sourceTree = SOURCE_ROOT; }; + 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 = ""; }; + 29E6F1EC1BB9E37200A4466C /* TodayViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TodayViewController.m; sourceTree = ""; }; + 29E6F1EF1BB9E37200A4466C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; + 29E6F1F11BB9E37200A4466C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 29E6F20B1BB9E5FC00A4466C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 29E6F2111BB9E76A00A4466C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; + 29E6F2131BB9E76A00A4466C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 29E6F2151BB9E76A00A4466C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 29E6F21F1BB9E76A00A4466C /* InterfaceController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InterfaceController.h; sourceTree = ""; }; + 29E6F2201BB9E76A00A4466C /* InterfaceController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InterfaceController.m; sourceTree = ""; }; + 29E6F2221BB9E76A00A4466C /* ExtensionDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtensionDelegate.h; sourceTree = ""; }; + 29E6F2231BB9E76A00A4466C /* ExtensionDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ExtensionDelegate.m; sourceTree = ""; }; + 29E6F2251BB9E76A00A4466C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 29E6F2271BB9E76B00A4466C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C2BFE0231C11870800BB258D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + C2BFE0241C11870800BB258D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + C2BFE0261C11872D00BB258D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + C2BFE0271C11872D00BB258D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 291BFDC21BB9E85500FFB029 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 293206F71BD14B5C0019EB9E /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFDE41BB9E8C700FFB029 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 29A3A1891BD14B8B00BB357F /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFE121BB9ECEE00FFB029 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 29A3A18A1BD14BAA00BB357F /* AFNetworking.framework in Frameworks */, + 291BFE371BB9EDD700FFB029 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1721BB9DCB500A4466C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 293206F41BD14AB50019EB9E /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1E31BB9E37200A4466C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 29E6F1E91BB9E37200A4466C /* NotificationCenter.framework in Frameworks */, + 293206F51BD14AF50019EB9E /* AFNetworking.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 291BFDE81BB9E8C700FFB029 /* macOS Example */ = { + isa = PBXGroup; + children = ( + C2BFE0231C11870800BB258D /* AppDelegate.h */, + C2BFE0241C11870800BB258D /* AppDelegate.m */, + 291BFE0F1BB9EC4900FFB029 /* MainMenu.xib */, + 291BFDF21BB9E8C700FFB029 /* Assets.xcassets */, + 291BFDF71BB9E8C700FFB029 /* Info.plist */, + 291BFDEC1BB9E8C700FFB029 /* Supporting Files */, + ); + path = "macOS Example"; + sourceTree = ""; + }; + 291BFDEC1BB9E8C700FFB029 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 291BFDED1BB9E8C700FFB029 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 291BFE071BB9EB3400FFB029 /* Controllers */ = { + isa = PBXGroup; + children = ( + 291BFE081BB9EB3400FFB029 /* GlobalTimelineViewController.h */, + 291BFE091BB9EB3400FFB029 /* GlobalTimelineViewController.m */, + ); + path = Controllers; + sourceTree = ""; + }; + 291BFE0A1BB9EB3400FFB029 /* Views */ = { + isa = PBXGroup; + children = ( + 291BFE0B1BB9EB3400FFB029 /* PostTableViewCell.h */, + 291BFE0C1BB9EB3400FFB029 /* PostTableViewCell.m */, + ); + path = Views; + sourceTree = ""; + }; + 291BFE161BB9ECEE00FFB029 /* tvOS Example */ = { + isa = PBXGroup; + children = ( + 291BFE341BB9ED7F00FFB029 /* Gravatar.swift */, + 291BFE241BB9ED1500FFB029 /* AFNetworking tvOS Example-Bridging-Header.h */, + 291BFE171BB9ECEE00FFB029 /* AppDelegate.swift */, + 291BFE191BB9ECEE00FFB029 /* ViewController.swift */, + 291BFE1B1BB9ECEE00FFB029 /* Main.storyboard */, + 291BFE1E1BB9ECEE00FFB029 /* Assets.xcassets */, + 291BFE201BB9ECEE00FFB029 /* Info.plist */, + ); + path = "tvOS Example"; + sourceTree = ""; + }; + 29E6F16A1BB9DA2E00A4466C = { + isa = PBXGroup; + children = ( + 29E6F1AB1BB9DDB600A4466C /* Assets.xcassets */, + 29E6F1941BB9DD7300A4466C /* Classes */, + 29E6F1771BB9DCB500A4466C /* iOS Example */, + 29E6F1EA1BB9E37200A4466C /* Today Extension Example */, + 29E6F20F1BB9E76A00A4466C /* watchOS Example */, + 29E6F21E1BB9E76A00A4466C /* watchOS Example Extension */, + 291BFDE81BB9E8C700FFB029 /* macOS Example */, + 291BFE161BB9ECEE00FFB029 /* tvOS Example */, + 29E6F1E71BB9E37200A4466C /* Frameworks */, + 29E6F1761BB9DCB500A4466C /* Products */, + ); + indentWidth = 4; + sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + }; + 29E6F1761BB9DCB500A4466C /* Products */ = { + isa = PBXGroup; + children = ( + 29E6F1751BB9DCB500A4466C /* iOS Example.app */, + 29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */, + 291BFDB91BB9E85400FFB029 /* watchOS Example.app */, + 291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */, + 291BFDE71BB9E8C700FFB029 /* macOS Example.app */, + 291BFE151BB9ECEE00FFB029 /* tvOS Example.app */, + ); + name = Products; + sourceTree = ""; + }; + 29E6F1771BB9DCB500A4466C /* iOS Example */ = { + isa = PBXGroup; + children = ( + C2BFE0261C11872D00BB258D /* AppDelegate.h */, + C2BFE0271C11872D00BB258D /* AppDelegate.m */, + 291BFE071BB9EB3400FFB029 /* Controllers */, + 291BFE0A1BB9EB3400FFB029 /* Views */, + 29E6F1781BB9DCB500A4466C /* Supporting Files */, + ); + path = "iOS Example"; + sourceTree = ""; + }; + 29E6F1781BB9DCB500A4466C /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 29E6F20B1BB9E5FC00A4466C /* Info.plist */, + 29E6F1791BB9DCB500A4466C /* main.m */, + 29E6F1E01BB9E03600A4466C /* Launchscreen.storyboard */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 29E6F1941BB9DD7300A4466C /* Classes */ = { + isa = PBXGroup; + children = ( + 29E6F1981BB9DD7300A4466C /* Models */, + 29E6F19D1BB9DD7300A4466C /* Networking Extensions */, + ); + path = Classes; + sourceTree = ""; + }; + 29E6F1981BB9DD7300A4466C /* Models */ = { + isa = PBXGroup; + children = ( + 29E6F1991BB9DD7300A4466C /* Post.h */, + 29E6F19A1BB9DD7300A4466C /* Post.m */, + 29E6F19B1BB9DD7300A4466C /* User.h */, + 29E6F19C1BB9DD7300A4466C /* User.m */, + ); + path = Models; + sourceTree = ""; + }; + 29E6F19D1BB9DD7300A4466C /* Networking Extensions */ = { + isa = PBXGroup; + children = ( + 29E6F19E1BB9DD7300A4466C /* AFAppDotNetAPIClient.h */, + 29E6F19F1BB9DD7300A4466C /* AFAppDotNetAPIClient.m */, + ); + path = "Networking Extensions"; + sourceTree = ""; + }; + 29E6F1E71BB9E37200A4466C /* Frameworks */ = { + isa = PBXGroup; + children = ( + 293206F31BD14AB50019EB9E /* AFNetworking.framework */, + 291BFE361BB9EDD700FFB029 /* UIKit.framework */, + 29E6F1E81BB9E37200A4466C /* NotificationCenter.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 29E6F1EA1BB9E37200A4466C /* Today Extension Example */ = { + isa = PBXGroup; + children = ( + 29E6F1EB1BB9E37200A4466C /* TodayViewController.h */, + 29E6F1EC1BB9E37200A4466C /* TodayViewController.m */, + 29E6F1EE1BB9E37200A4466C /* MainInterface.storyboard */, + 29E6F1F11BB9E37200A4466C /* Info.plist */, + ); + path = "Today Extension Example"; + sourceTree = ""; + }; + 29E6F20F1BB9E76A00A4466C /* watchOS Example */ = { + isa = PBXGroup; + children = ( + 29E6F2101BB9E76A00A4466C /* Interface.storyboard */, + 29E6F2131BB9E76A00A4466C /* Assets.xcassets */, + 29E6F2151BB9E76A00A4466C /* Info.plist */, + ); + path = "watchOS Example"; + sourceTree = ""; + }; + 29E6F21E1BB9E76A00A4466C /* watchOS Example Extension */ = { + isa = PBXGroup; + children = ( + 29E6F21F1BB9E76A00A4466C /* InterfaceController.h */, + 29E6F2201BB9E76A00A4466C /* InterfaceController.m */, + 29E6F2221BB9E76A00A4466C /* ExtensionDelegate.h */, + 29E6F2231BB9E76A00A4466C /* ExtensionDelegate.m */, + 29E6F2251BB9E76A00A4466C /* Assets.xcassets */, + 29E6F2271BB9E76B00A4466C /* Info.plist */, + ); + path = "watchOS Example Extension"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 291BFDB81BB9E85400FFB029 /* watchOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 291BFDDA1BB9E85500FFB029 /* Build configuration list for PBXNativeTarget "watchOS Example" */; + buildPhases = ( + 291BFDB71BB9E85400FFB029 /* Resources */, + 291BFDD91BB9E85500FFB029 /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 291BFDC81BB9E85500FFB029 /* PBXTargetDependency */, + ); + name = "watchOS Example"; + productName = "watchOS Example"; + productReference = 291BFDB91BB9E85400FFB029 /* watchOS Example.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + 291BFDC41BB9E85500FFB029 /* watchOS Example Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 291BFDD61BB9E85500FFB029 /* Build configuration list for PBXNativeTarget "watchOS Example Extension" */; + buildPhases = ( + 291BFDC11BB9E85500FFB029 /* Sources */, + 291BFDC21BB9E85500FFB029 /* Frameworks */, + 291BFDC31BB9E85500FFB029 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "watchOS Example Extension"; + productName = "watchOS Example Extension"; + productReference = 291BFDC51BB9E85500FFB029 /* watchOS Example Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; + 291BFDE61BB9E8C700FFB029 /* macOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "macOS Example" */; + buildPhases = ( + 291BFDE31BB9E8C700FFB029 /* Sources */, + 291BFDE41BB9E8C700FFB029 /* Frameworks */, + 291BFDE51BB9E8C700FFB029 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "macOS Example"; + productName = "OS X Example"; + productReference = 291BFDE71BB9E8C700FFB029 /* macOS Example.app */; + productType = "com.apple.product-type.application"; + }; + 291BFE141BB9ECEE00FFB029 /* tvOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 291BFE211BB9ECEE00FFB029 /* Build configuration list for PBXNativeTarget "tvOS Example" */; + buildPhases = ( + 291BFE111BB9ECEE00FFB029 /* Sources */, + 291BFE121BB9ECEE00FFB029 /* Frameworks */, + 291BFE131BB9ECEE00FFB029 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "tvOS Example"; + productName = "tvOS Example1"; + productReference = 291BFE151BB9ECEE00FFB029 /* tvOS Example.app */; + productType = "com.apple.product-type.application"; + }; + 29E6F1741BB9DCB500A4466C /* iOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29E6F18C1BB9DCB500A4466C /* Build configuration list for PBXNativeTarget "iOS Example" */; + buildPhases = ( + 29E6F1711BB9DCB500A4466C /* Sources */, + 29E6F1721BB9DCB500A4466C /* Frameworks */, + 29E6F1731BB9DCB500A4466C /* Resources */, + 29E6F1F81BB9E37200A4466C /* Embed App Extensions */, + 29E6F2321BB9E76B00A4466C /* Embed Watch Content */, + ); + buildRules = ( + ); + dependencies = ( + 29E6F1F31BB9E37200A4466C /* PBXTargetDependency */, + 291BFDD41BB9E85500FFB029 /* PBXTargetDependency */, + ); + name = "iOS Example"; + productName = "iOS Example"; + productReference = 29E6F1751BB9DCB500A4466C /* iOS Example.app */; + productType = "com.apple.product-type.application"; + }; + 29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "iOS Today Extension Example" */; + buildPhases = ( + 29E6F1E21BB9E37200A4466C /* Sources */, + 29E6F1E31BB9E37200A4466C /* Frameworks */, + 29E6F1E41BB9E37200A4466C /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "iOS Today Extension Example"; + productName = "Today Extension Example"; + productReference = 29E6F1E61BB9E37200A4466C /* iOS Today Extension Example.appex */; + productType = "com.apple.product-type.app-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29E6F16B1BB9DA2E00A4466C /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0930; + TargetAttributes = { + 291BFDB81BB9E85400FFB029 = { + CreatedOnToolsVersion = 7.1; + }; + 291BFDC41BB9E85500FFB029 = { + CreatedOnToolsVersion = 7.1; + }; + 291BFDE61BB9E8C700FFB029 = { + CreatedOnToolsVersion = 7.1; + }; + 291BFE141BB9ECEE00FFB029 = { + CreatedOnToolsVersion = 7.1; + LastSwiftMigration = 0800; + }; + 29E6F1741BB9DCB500A4466C = { + CreatedOnToolsVersion = 7.1; + }; + 29E6F1E51BB9E37200A4466C = { + CreatedOnToolsVersion = 7.1; + }; + }; + }; + buildConfigurationList = 29E6F16E1BB9DA2E00A4466C /* Build configuration list for PBXProject "AFNetworking Example" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 29E6F16A1BB9DA2E00A4466C; + productRefGroup = 29E6F1761BB9DCB500A4466C /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 29E6F1741BB9DCB500A4466C /* iOS Example */, + 29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */, + 291BFDB81BB9E85400FFB029 /* watchOS Example */, + 291BFDC41BB9E85500FFB029 /* watchOS Example Extension */, + 291BFDE61BB9E8C700FFB029 /* macOS Example */, + 291BFE141BB9ECEE00FFB029 /* tvOS Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 291BFDB71BB9E85400FFB029 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFDC31BB9E85500FFB029 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFDE51BB9E8C700FFB029 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 291BFDF31BB9E8C700FFB029 /* Assets.xcassets in Resources */, + 291BFE101BB9EC4900FFB029 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFE131BB9ECEE00FFB029 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 291BFE1F1BB9ECEE00FFB029 /* Assets.xcassets in Resources */, + 291BFE1D1BB9ECEE00FFB029 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1731BB9DCB500A4466C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29E6F1AC1BB9DDB600A4466C /* Assets.xcassets in Resources */, + 29E6F1E11BB9E03600A4466C /* Launchscreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1E41BB9E37200A4466C /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29E6F1F01BB9E37200A4466C /* MainInterface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 291BFDC11BB9E85500FFB029 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFDE31BB9E8C700FFB029 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 291BFDFF1BB9E8EC00FFB029 /* AFAppDotNetAPIClient.m in Sources */, + C2BFE0251C11870800BB258D /* AppDelegate.m in Sources */, + 291BFDFE1BB9E8E900FFB029 /* User.m in Sources */, + 291BFDFD1BB9E8E500FFB029 /* Post.m in Sources */, + 291BFDEE1BB9E8C700FFB029 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 291BFE111BB9ECEE00FFB029 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 291BFE1A1BB9ECEE00FFB029 /* ViewController.swift in Sources */, + 291BFE181BB9ECEE00FFB029 /* AppDelegate.swift in Sources */, + 291BFE351BB9ED7F00FFB029 /* Gravatar.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1711BB9DCB500A4466C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29E6F1A41BB9DD7300A4466C /* Post.m in Sources */, + 291BFE0D1BB9EB3400FFB029 /* GlobalTimelineViewController.m in Sources */, + 291BFE0E1BB9EB3400FFB029 /* PostTableViewCell.m in Sources */, + 29E6F1A51BB9DD7300A4466C /* User.m in Sources */, + 29E6F17A1BB9DCB500A4466C /* main.m in Sources */, + 29E6F1A61BB9DD7300A4466C /* AFAppDotNetAPIClient.m in Sources */, + C2BFE0281C11872D00BB258D /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 29E6F1E21BB9E37200A4466C /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 293206F61BD14B480019EB9E /* AFAppDotNetAPIClient.m in Sources */, + 29E6F1ED1BB9E37200A4466C /* TodayViewController.m in Sources */, + 29E6F1F91BB9E56200A4466C /* Post.m in Sources */, + 29E6F1FA1BB9E56500A4466C /* User.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 291BFDC81BB9E85500FFB029 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 291BFDC41BB9E85500FFB029 /* watchOS Example Extension */; + targetProxy = 291BFDC71BB9E85500FFB029 /* PBXContainerItemProxy */; + }; + 291BFDD41BB9E85500FFB029 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 291BFDB81BB9E85400FFB029 /* watchOS Example */; + targetProxy = 291BFDD31BB9E85500FFB029 /* PBXContainerItemProxy */; + }; + 29E6F1F31BB9E37200A4466C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 29E6F1E51BB9E37200A4466C /* iOS Today Extension Example */; + targetProxy = 29E6F1F21BB9E37200A4466C /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 291BFE1B1BB9ECEE00FFB029 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 291BFE1C1BB9ECEE00FFB029 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 29E6F1EE1BB9E37200A4466C /* MainInterface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 29E6F1EF1BB9E37200A4466C /* Base */, + ); + name = MainInterface.storyboard; + sourceTree = ""; + }; + 29E6F2101BB9E76A00A4466C /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 29E6F2111BB9E76A00A4466C /* Base */, + ); + name = Interface.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 291BFDD71BB9E85500FFB029 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "watchOS Example Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example.watchkitapp.watchkitextension"; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + 291BFDD81BB9E85500FFB029 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "watchOS Example Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example.watchkitapp.watchkitextension"; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + 291BFDDB1BB9E85500FFB029 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IBSC_MODULE = watchOS_Example_Extension; + INFOPLIST_FILE = "watchOS Example/Info.plist"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example.watchkitapp"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Debug; + }; + 291BFDDC1BB9E85500FFB029 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IBSC_MODULE = watchOS_Example_Extension; + INFOPLIST_FILE = "watchOS Example/Info.plist"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example.watchkitapp"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + VALIDATE_PRODUCT = YES; + WATCHOS_DEPLOYMENT_TARGET = 2.0; + }; + name = Release; + }; + 291BFDF91BB9E8C700FFB029 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "macOS Example/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.macOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Debug; + }; + 291BFDFA1BB9E8C700FFB029 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COMBINE_HIDPI_IMAGES = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "macOS Example/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.macOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + }; + name = Release; + }; + 291BFE221BB9ECEE00FFB029 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "tvOS Example/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.tvOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + 291BFE231BB9ECEE00FFB029 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "tvOS Example/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.tvOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 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; + }; + 29E6F18A1BB9DCB500A4466C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "$(PROJECT_DIR)/iOS Example/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 29E6F18B1BB9DCB500A4466C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "$(PROJECT_DIR)/iOS Example/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 29E6F1F61BB9E37200A4466C /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "$(PROJECT_DIR)/Today Extension Example/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example.Today-Extension-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 29E6F1F71BB9E37200A4466C /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + 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; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = "$(PROJECT_DIR)/Today Extension Example/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.1; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.iOS-Example.Today-Extension-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 291BFDD61BB9E85500FFB029 /* Build configuration list for PBXNativeTarget "watchOS Example Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 291BFDD71BB9E85500FFB029 /* Debug */, + 291BFDD81BB9E85500FFB029 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 291BFDDA1BB9E85500FFB029 /* Build configuration list for PBXNativeTarget "watchOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 291BFDDB1BB9E85500FFB029 /* Debug */, + 291BFDDC1BB9E85500FFB029 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 291BFDF81BB9E8C700FFB029 /* Build configuration list for PBXNativeTarget "macOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 291BFDF91BB9E8C700FFB029 /* Debug */, + 291BFDFA1BB9E8C700FFB029 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 291BFE211BB9ECEE00FFB029 /* Build configuration list for PBXNativeTarget "tvOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 291BFE221BB9ECEE00FFB029 /* Debug */, + 291BFE231BB9ECEE00FFB029 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29E6F16E1BB9DA2E00A4466C /* Build configuration list for PBXProject "AFNetworking Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29E6F16F1BB9DA2E00A4466C /* Debug */, + 29E6F1701BB9DA2E00A4466C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29E6F18C1BB9DCB500A4466C /* Build configuration list for PBXNativeTarget "iOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29E6F18A1BB9DCB500A4466C /* Debug */, + 29E6F18B1BB9DCB500A4466C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29E6F1F51BB9E37200A4466C /* Build configuration list for PBXNativeTarget "iOS Today Extension Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29E6F1F61BB9E37200A4466C /* Debug */, + 29E6F1F71BB9E37200A4466C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29E6F16B1BB9DA2E00A4466C /* Project object */; +} diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme new file mode 100644 index 0000000..af3dda8 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme new file mode 100644 index 0000000..0efa6c9 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme new file mode 100644 index 0000000..528b143 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme new file mode 100644 index 0000000..c0bf75f --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme new file mode 100644 index 0000000..0abc443 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj b/TwoNetworking/AFNetworking/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a2ecb47 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj @@ -0,0 +1,438 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 29C4E0C71BB4599400D6B073 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E0C61BB4599400D6B073 /* AppDelegate.swift */; }; + 29C4E0C91BB4599400D6B073 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E0C81BB4599400D6B073 /* ViewController.swift */; }; + 29C4E0CC1BB4599400D6B073 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 29C4E0CA1BB4599400D6B073 /* Main.storyboard */; }; + 29C4E0CE1BB4599400D6B073 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 29C4E0CD1BB4599400D6B073 /* Assets.xcassets */; }; + 29C4E1041BB46BF400D6B073 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1031BB46BF400D6B073 /* AFSecurityPolicy.m */; }; + 29C4E1091BB46BFC00D6B073 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1061BB46BFC00D6B073 /* AFURLRequestSerialization.m */; }; + 29C4E10A1BB46BFC00D6B073 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1081BB46BFC00D6B073 /* AFURLResponseSerialization.m */; }; + 29C4E10E1BB46C6200D6B073 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E10D1BB46C6200D6B073 /* AFNetworkReachabilityManager.m */; }; + 29C4E1141BB46C8300D6B073 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1111BB46C8300D6B073 /* AFHTTPSessionManager.m */; }; + 29C4E1151BB46C8300D6B073 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1131BB46C8300D6B073 /* AFURLSessionManager.m */; }; + 29C4E1451BB47DBC00D6B073 /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1231BB46D3F00D6B073 /* UIImageView+AFNetworking.m */; }; + 29C4E14F1BB480F400D6B073 /* Gravatar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E14E1BB480F400D6B073 /* Gravatar.swift */; }; + 29C4E1521BB489B600D6B073 /* AFAutoPurgingImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1511BB489B600D6B073 /* AFAutoPurgingImageCache.m */; }; + 29C4E1581BB48C2D00D6B073 /* AFImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 29C4E1571BB48C2D00D6B073 /* AFImageDownloader.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 29C4E0C31BB4599400D6B073 /* AFNetworking tvOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AFNetworking tvOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 29C4E0C61BB4599400D6B073 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 29C4E0C81BB4599400D6B073 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 29C4E0CB1BB4599400D6B073 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 29C4E0CD1BB4599400D6B073 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 29C4E0CF1BB4599400D6B073 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 29C4E0F41BB45C5500D6B073 /* AFNetworking tvOS Example-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "AFNetworking tvOS Example-Bridging-Header.h"; sourceTree = ""; }; + 29C4E1021BB46BF400D6B073 /* AFSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFSecurityPolicy.h; path = ../../AFNetworking/AFSecurityPolicy.h; sourceTree = ""; }; + 29C4E1031BB46BF400D6B073 /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFSecurityPolicy.m; path = ../../AFNetworking/AFSecurityPolicy.m; sourceTree = ""; }; + 29C4E1051BB46BFC00D6B073 /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLRequestSerialization.h; path = ../../AFNetworking/AFURLRequestSerialization.h; sourceTree = ""; }; + 29C4E1061BB46BFC00D6B073 /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLRequestSerialization.m; path = ../../AFNetworking/AFURLRequestSerialization.m; sourceTree = ""; }; + 29C4E1071BB46BFC00D6B073 /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLResponseSerialization.h; path = ../../AFNetworking/AFURLResponseSerialization.h; sourceTree = ""; }; + 29C4E1081BB46BFC00D6B073 /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLResponseSerialization.m; path = ../../AFNetworking/AFURLResponseSerialization.m; sourceTree = ""; }; + 29C4E10C1BB46C6200D6B073 /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFNetworkReachabilityManager.h; path = ../../AFNetworking/AFNetworkReachabilityManager.h; sourceTree = ""; }; + 29C4E10D1BB46C6200D6B073 /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFNetworkReachabilityManager.m; path = ../../AFNetworking/AFNetworkReachabilityManager.m; sourceTree = ""; }; + 29C4E1101BB46C8300D6B073 /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFHTTPSessionManager.h; path = ../../AFNetworking/AFHTTPSessionManager.h; sourceTree = ""; }; + 29C4E1111BB46C8300D6B073 /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFHTTPSessionManager.m; path = ../../AFNetworking/AFHTTPSessionManager.m; sourceTree = ""; }; + 29C4E1121BB46C8300D6B073 /* AFURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFURLSessionManager.h; path = ../../AFNetworking/AFURLSessionManager.h; sourceTree = ""; }; + 29C4E1131BB46C8300D6B073 /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFURLSessionManager.m; path = ../../AFNetworking/AFURLSessionManager.m; sourceTree = ""; }; + 29C4E1161BB46C8B00D6B073 /* AFNetworking.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AFNetworking.h; path = ../../AFNetworking/AFNetworking.h; sourceTree = ""; }; + 29C4E1191BB46D3F00D6B073 /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFNetworkActivityIndicatorManager.h; path = "../../UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h"; sourceTree = ""; }; + 29C4E11A1BB46D3F00D6B073 /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFNetworkActivityIndicatorManager.m; path = "../../UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m"; sourceTree = ""; }; + 29C4E11B1BB46D3F00D6B073 /* UIActivityIndicatorView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIActivityIndicatorView+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h"; sourceTree = ""; }; + 29C4E11C1BB46D3F00D6B073 /* UIActivityIndicatorView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIActivityIndicatorView+AFNetworking.m"; path = "../../UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m"; sourceTree = ""; }; + 29C4E11D1BB46D3F00D6B073 /* UIAlertView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIAlertView+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIAlertView+AFNetworking.h"; sourceTree = ""; }; + 29C4E11E1BB46D3F00D6B073 /* UIAlertView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIAlertView+AFNetworking.m"; path = "../../UIKit+AFNetworking/UIAlertView+AFNetworking.m"; sourceTree = ""; }; + 29C4E11F1BB46D3F00D6B073 /* UIButton+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIButton+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIButton+AFNetworking.h"; sourceTree = ""; }; + 29C4E1201BB46D3F00D6B073 /* UIButton+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIButton+AFNetworking.m"; path = "../../UIKit+AFNetworking/UIButton+AFNetworking.m"; sourceTree = ""; }; + 29C4E1211BB46D3F00D6B073 /* UIImage+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImage+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIImage+AFNetworking.h"; sourceTree = ""; }; + 29C4E1221BB46D3F00D6B073 /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIImageView+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIImageView+AFNetworking.h"; sourceTree = ""; }; + 29C4E1231BB46D3F00D6B073 /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIImageView+AFNetworking.m"; path = "../../UIKit+AFNetworking/UIImageView+AFNetworking.m"; sourceTree = ""; }; + 29C4E1241BB46D3F00D6B073 /* UIKit+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIKit+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIKit+AFNetworking.h"; sourceTree = ""; }; + 29C4E1251BB46D3F00D6B073 /* UIProgressView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIProgressView+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIProgressView+AFNetworking.h"; sourceTree = ""; }; + 29C4E1261BB46D3F00D6B073 /* UIProgressView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIProgressView+AFNetworking.m"; path = "../../UIKit+AFNetworking/UIProgressView+AFNetworking.m"; sourceTree = ""; }; + 29C4E1271BB46D3F00D6B073 /* UIRefreshControl+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIRefreshControl+AFNetworking.h"; path = "../../UIKit+AFNetworking/UIRefreshControl+AFNetworking.h"; sourceTree = ""; }; + 29C4E1281BB46D3F00D6B073 /* UIRefreshControl+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIRefreshControl+AFNetworking.m"; path = "../../UIKit+AFNetworking/UIRefreshControl+AFNetworking.m"; sourceTree = ""; }; + 29C4E14E1BB480F400D6B073 /* Gravatar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Gravatar.swift; sourceTree = ""; }; + 29C4E1501BB489B600D6B073 /* AFAutoPurgingImageCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFAutoPurgingImageCache.h; path = "../../UIKit+AFNetworking/AFAutoPurgingImageCache.h"; sourceTree = ""; }; + 29C4E1511BB489B600D6B073 /* AFAutoPurgingImageCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFAutoPurgingImageCache.m; path = "../../UIKit+AFNetworking/AFAutoPurgingImageCache.m"; sourceTree = ""; }; + 29C4E1561BB48C2D00D6B073 /* AFImageDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AFImageDownloader.h; path = "../../UIKit+AFNetworking/AFImageDownloader.h"; sourceTree = ""; }; + 29C4E1571BB48C2D00D6B073 /* AFImageDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AFImageDownloader.m; path = "../../UIKit+AFNetworking/AFImageDownloader.m"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 29C4E0C01BB4599400D6B073 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 29C4E0BA1BB4599400D6B073 = { + isa = PBXGroup; + children = ( + 29C4E0C51BB4599400D6B073 /* AFNetworking tvOS Example */, + 29C4E0C41BB4599400D6B073 /* Products */, + ); + sourceTree = ""; + }; + 29C4E0C41BB4599400D6B073 /* Products */ = { + isa = PBXGroup; + children = ( + 29C4E0C31BB4599400D6B073 /* AFNetworking tvOS Example.app */, + ); + name = Products; + sourceTree = ""; + }; + 29C4E0C51BB4599400D6B073 /* AFNetworking tvOS Example */ = { + isa = PBXGroup; + children = ( + 29C4E14E1BB480F400D6B073 /* Gravatar.swift */, + 29C4E0F41BB45C5500D6B073 /* AFNetworking tvOS Example-Bridging-Header.h */, + 29C4E0D51BB459C400D6B073 /* Vendor */, + 29C4E0C61BB4599400D6B073 /* AppDelegate.swift */, + 29C4E0C81BB4599400D6B073 /* ViewController.swift */, + 29C4E0CA1BB4599400D6B073 /* Main.storyboard */, + 29C4E0CD1BB4599400D6B073 /* Assets.xcassets */, + 29C4E0CF1BB4599400D6B073 /* Info.plist */, + ); + name = "AFNetworking tvOS Example"; + path = "tvOS Example"; + sourceTree = ""; + }; + 29C4E0D51BB459C400D6B073 /* Vendor */ = { + isa = PBXGroup; + children = ( + 29C4E1181BB46D2800D6B073 /* UIKit+AFNetworking */, + 29C4E1171BB46D1300D6B073 /* AFNetworking */, + ); + name = Vendor; + sourceTree = ""; + }; + 29C4E0F31BB45C3F00D6B073 /* Security */ = { + isa = PBXGroup; + children = ( + 29C4E1021BB46BF400D6B073 /* AFSecurityPolicy.h */, + 29C4E1031BB46BF400D6B073 /* AFSecurityPolicy.m */, + ); + name = Security; + sourceTree = ""; + }; + 29C4E0F81BB45CB500D6B073 /* Serialization */ = { + isa = PBXGroup; + children = ( + 29C4E1051BB46BFC00D6B073 /* AFURLRequestSerialization.h */, + 29C4E1061BB46BFC00D6B073 /* AFURLRequestSerialization.m */, + 29C4E1071BB46BFC00D6B073 /* AFURLResponseSerialization.h */, + 29C4E1081BB46BFC00D6B073 /* AFURLResponseSerialization.m */, + ); + name = Serialization; + sourceTree = ""; + }; + 29C4E10B1BB46C5400D6B073 /* Reachability */ = { + isa = PBXGroup; + children = ( + 29C4E10C1BB46C6200D6B073 /* AFNetworkReachabilityManager.h */, + 29C4E10D1BB46C6200D6B073 /* AFNetworkReachabilityManager.m */, + ); + name = Reachability; + sourceTree = ""; + }; + 29C4E10F1BB46C7000D6B073 /* NSURLSession */ = { + isa = PBXGroup; + children = ( + 29C4E1101BB46C8300D6B073 /* AFHTTPSessionManager.h */, + 29C4E1111BB46C8300D6B073 /* AFHTTPSessionManager.m */, + 29C4E1121BB46C8300D6B073 /* AFURLSessionManager.h */, + 29C4E1131BB46C8300D6B073 /* AFURLSessionManager.m */, + ); + name = NSURLSession; + sourceTree = ""; + }; + 29C4E1171BB46D1300D6B073 /* AFNetworking */ = { + isa = PBXGroup; + children = ( + 29C4E1161BB46C8B00D6B073 /* AFNetworking.h */, + 29C4E10F1BB46C7000D6B073 /* NSURLSession */, + 29C4E10B1BB46C5400D6B073 /* Reachability */, + 29C4E0F81BB45CB500D6B073 /* Serialization */, + 29C4E0F31BB45C3F00D6B073 /* Security */, + ); + name = AFNetworking; + sourceTree = ""; + }; + 29C4E1181BB46D2800D6B073 /* UIKit+AFNetworking */ = { + isa = PBXGroup; + children = ( + 29C4E1561BB48C2D00D6B073 /* AFImageDownloader.h */, + 29C4E1571BB48C2D00D6B073 /* AFImageDownloader.m */, + 29C4E1501BB489B600D6B073 /* AFAutoPurgingImageCache.h */, + 29C4E1511BB489B600D6B073 /* AFAutoPurgingImageCache.m */, + 29C4E1241BB46D3F00D6B073 /* UIKit+AFNetworking.h */, + 29C4E1191BB46D3F00D6B073 /* AFNetworkActivityIndicatorManager.h */, + 29C4E11A1BB46D3F00D6B073 /* AFNetworkActivityIndicatorManager.m */, + 29C4E11B1BB46D3F00D6B073 /* UIActivityIndicatorView+AFNetworking.h */, + 29C4E11C1BB46D3F00D6B073 /* UIActivityIndicatorView+AFNetworking.m */, + 29C4E11D1BB46D3F00D6B073 /* UIAlertView+AFNetworking.h */, + 29C4E11E1BB46D3F00D6B073 /* UIAlertView+AFNetworking.m */, + 29C4E11F1BB46D3F00D6B073 /* UIButton+AFNetworking.h */, + 29C4E1201BB46D3F00D6B073 /* UIButton+AFNetworking.m */, + 29C4E1211BB46D3F00D6B073 /* UIImage+AFNetworking.h */, + 29C4E1221BB46D3F00D6B073 /* UIImageView+AFNetworking.h */, + 29C4E1231BB46D3F00D6B073 /* UIImageView+AFNetworking.m */, + 29C4E1251BB46D3F00D6B073 /* UIProgressView+AFNetworking.h */, + 29C4E1261BB46D3F00D6B073 /* UIProgressView+AFNetworking.m */, + 29C4E1271BB46D3F00D6B073 /* UIRefreshControl+AFNetworking.h */, + 29C4E1281BB46D3F00D6B073 /* UIRefreshControl+AFNetworking.m */, + ); + name = "UIKit+AFNetworking"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 29C4E0C21BB4599400D6B073 /* AFNetworking tvOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29C4E0D21BB4599400D6B073 /* Build configuration list for PBXNativeTarget "AFNetworking tvOS Example" */; + buildPhases = ( + 29C4E0BF1BB4599400D6B073 /* Sources */, + 29C4E0C01BB4599400D6B073 /* Frameworks */, + 29C4E0C11BB4599400D6B073 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "AFNetworking tvOS Example"; + productName = "AFNetworking tvOS Example"; + productReference = 29C4E0C31BB4599400D6B073 /* AFNetworking tvOS Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29C4E0BB1BB4599400D6B073 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0710; + ORGANIZATIONNAME = Alamofire; + TargetAttributes = { + 29C4E0C21BB4599400D6B073 = { + CreatedOnToolsVersion = 7.1; + }; + }; + }; + buildConfigurationList = 29C4E0BE1BB4599400D6B073 /* Build configuration list for PBXProject "AFNetworking tvOS Example" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + English, + en, + Base, + ); + mainGroup = 29C4E0BA1BB4599400D6B073; + productRefGroup = 29C4E0C41BB4599400D6B073 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 29C4E0C21BB4599400D6B073 /* AFNetworking tvOS Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 29C4E0C11BB4599400D6B073 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29C4E0CE1BB4599400D6B073 /* Assets.xcassets in Resources */, + 29C4E0CC1BB4599400D6B073 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 29C4E0BF1BB4599400D6B073 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 29C4E0C91BB4599400D6B073 /* ViewController.swift in Sources */, + 29C4E1151BB46C8300D6B073 /* AFURLSessionManager.m in Sources */, + 29C4E1041BB46BF400D6B073 /* AFSecurityPolicy.m in Sources */, + 29C4E0C71BB4599400D6B073 /* AppDelegate.swift in Sources */, + 29C4E1091BB46BFC00D6B073 /* AFURLRequestSerialization.m in Sources */, + 29C4E10E1BB46C6200D6B073 /* AFNetworkReachabilityManager.m in Sources */, + 29C4E1521BB489B600D6B073 /* AFAutoPurgingImageCache.m in Sources */, + 29C4E1451BB47DBC00D6B073 /* UIImageView+AFNetworking.m in Sources */, + 29C4E1141BB46C8300D6B073 /* AFHTTPSessionManager.m in Sources */, + 29C4E14F1BB480F400D6B073 /* Gravatar.swift in Sources */, + 29C4E10A1BB46BFC00D6B073 /* AFURLResponseSerialization.m in Sources */, + 29C4E1581BB48C2D00D6B073 /* AFImageDownloader.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 29C4E0CA1BB4599400D6B073 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 29C4E0CB1BB4599400D6B073 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 29C4E0D01BB4599400D6B073 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + }; + name = Debug; + }; + 29C4E0D11BB4599400D6B073 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 29C4E0D31BB4599400D6B073 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; + GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Prefix.pch"; + INFOPLIST_FILE = "$(PROJECT_DIR)/tvOS Example/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.AFNetworking-tvOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 29C4E0D41BB4599400D6B073 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ENABLE_MODULES = YES; + GCC_PREFIX_HEADER = "$(PROJECT_DIR)/Prefix.pch"; + INFOPLIST_FILE = "$(PROJECT_DIR)/tvOS Example/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.alamofire.AFNetworking-tvOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 29C4E0BE1BB4599400D6B073 /* Build configuration list for PBXProject "AFNetworking tvOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29C4E0D01BB4599400D6B073 /* Debug */, + 29C4E0D11BB4599400D6B073 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29C4E0D21BB4599400D6B073 /* Build configuration list for PBXNativeTarget "AFNetworking tvOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 29C4E0D31BB4599400D6B073 /* Debug */, + 29C4E0D41BB4599400D6B073 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29C4E0BB1BB4599400D6B073 /* Project object */; +} diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2a9dea2 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "size" : "24x24", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "27.5x27.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "44x44", + "idiom" : "watch", + "scale" : "2x", + "role" : "longLook", + "subtype" : "42mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard b/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard new file mode 100644 index 0000000..5f52cb6 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Info.plist b/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Info.plist new file mode 100644 index 0000000..6c4f88c --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/AFNetworking watchOS/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + AFNetworking iOS Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + com.alamofire.AFNetworking-iOS-Example + WKWatchKitApp + + + diff --git a/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..f2c3885 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,110 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-Small@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-60@3x.png", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-Small@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "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" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40.png new file mode 100644 index 0000000000000000000000000000000000000000..3cf6c5dd6fa26c713bff76d6af9ab2b2b10c1a5e GIT binary patch literal 5051 zcmV;s6GZHZP)4Tx0C=38mUmQC*A|D*y?1({%`g-xL+`x}AiX!K(nMjH8DJ;_4l^{dA)*2i zMMMM@L4qO%jD{kyB8r88V8I@cAfUux6j4!mGqP56<>kGXm){>}eQTe+_dRFteb%}F zki7l5ymVL!fHa~vAmcQ z7uoQ$&mudEnVrUCi&%W-40ak@%snFBnkD3j81WZzQ5KhzE#g}u)=U+qaYg)A9Gk{r zW&(gBiR}UoD@nwrA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|4GKFT8#!E7EWFkVQE)&bI{;X;A+a`w2)V&{Y0y0 z_vbQJf&fg21s)n#N-LIYcOks&E5TV8XgNlL>g6L@yBbN6np&Y=<3uYJ$~45Uy_~Fh zF_?Ct|6o19sA8k~4+iAApT^a8T9iznU7v;L&JSlVpiC}%^F5~h#N6_Sz$UYJdHSkl zsmm6FP2-ar&FCqJ6W!ODS$w-4|HbsYCBgLbioaL}fLeyYOTVI_12v{Do(dOZVOk@tVZivAg(_Z^AiBXLMgDkwL1?t$Ve&^qB8X6Z6R`o2mWvukfKs-eQfckkSAAPcuQAfqky(0YdeQZ83D}6p{{iv`s6!%X RYrp^i002ovPDHLkV1g@=$r}Iw literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9e573ac695c188372685e06997e30032ccdf30e3 GIT binary patch literal 8649 zcmV;)AvWHLP)4Tx0C=38mUmQC*A|D*y?1({%`g-xL+`x}AiX!K(nMjH8DJ;_4l^{dA)*2i zMMMM@L4qO%jD{kyB8r88V8I@cAfUux6j4!mGqP56<>kGXm){>}eQTe+_dRFteb%}F zki7l5ymVL!fHa~vAmcQ z7uoQ$&mudEnVrUCi&%W-40ak@%snFBnkD3j81WZzQ5KhzE#g}u)=U+qaYg)A9Gk{r zW&(gBiR}UoD@nwrA|~;}Lfk~W6aXA4@hgu1iUph;f%sBx=^43vZeo&vuFKM+o7vhj z=-!;{RE|Jk6vSkuF!^k{TY6dsla~v?;+;QBMqFFEsL0l4w$|20=Ei1U73#lk{!NK{ zyGXBsKlcox^?kAZm0x;20E}5tZFYRI#qR~6V>1Bq_rKUQ4+0=5>RbE3SNEZb=OsxX z$gndp$O~ z2}Gii1cZ;QLyD0~q#kKOx{zMvCNhFdBkxcc6a_^`8KLY^-l*j$7HTzW9jX*njXHvA zNA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yq1T|N1p+)irX_>ajV|7tS)Qx#e^@WBD94wmWxyMlN16^1Nv6bnbj4TDUTN z=T%cG!g55iF7}x}8RJ?La~3#r7Kk}N4R`JmO$(iS9~W~*?I=jGq`mnbY`zD^l)@l* z{%MNE#(a?+c$7$6S8aCg{_OCLmMs^qjCC#!cfH{~^G{^iqPaou*&e?7Z`3kZWU6~V z&1j$RnWOec6Q+(zGXR=gfv1W}R7qT#xEYDE2X8t+!wNNB1F$NZC*p2SK!V2MIN{ z8IeA+pS5QS{n5eqWo~fd(J)N+30T%xI|YDHFl@Sy>3#12H0pL8=|dlovdc@xi^gVi z;z;oPcfc&_n*gxU=FCYjl{dkf1`IIGXojO~Hk(W)r?PO^gui&c`1gNmjvpMQa*k=G zH8~C?>Pd~GAi!b3xdG@1B%lIAq3~MCZ8oSj`7(* zNQx!NjRQ0~F}$lfBf@*Vc+qv zn4Bh+PBG{6`5LlLa|8Oo`{u;2Ds#&uAj@X2WO}>m9S(Hqpyp(ki=mYOpw5!oQ zBHN*4ic6Z$oa88)c)-jQPf;Q@oDDMspImuoT7%QL1awy$U*}Tyha^mcj%+dXo z&4Y<3mLN9)QA=eQA&TIY5Y=i8sA;VAFbLoMS@6HTnD!7{}ocy zPr3b|lvFpJA4-p-GJvu-FP^LxD^7Wr)@0cee51AG7m`H8(UJXjA&bV=>6;U&cs!2s zhcmX*j3|uWdDZ*&SHnHKL~9F|i>QV&`(}C8^94esE|It{74H0LwDo?geLmDQf*~G{ zt5c^=O(>&H@9FT>ANbEasgLXznFfRgtjiUUmBzE7g8bscFaTzQSej3sEdAqOy7_{- jdJ8#|Z%W0S&*%R?=vdi@ZM|;~00000NkvXXu0mjfV=9A= literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e647adb1fa40c213b21e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zBHN*4ic6Z$oa88)c)-jQPf;Q@oDDMspImuoT7%QL1awy$U*}Tyha^mcj%+dXo z&4Y<3mLN9)QA=eQA&TIY5Y=i8sA;VAFbLoMS@6HTnD!7{}ocy zPr3b|lvFpJA4-p-GJvu-FP^LxD^7Wr)@0cee51AG7m`H8(UJXjA&bV=>6;U&cs!2s zhcmX*j3|uWdDZ*&SHnHKL~9F|i>QV&`(}C8^94esE|It{74H0LwDo?geLmDQf*~G{ zt5c^=O(>&H@9FT>ANbEasgLXznFfRgtjiUUmBzE7g8bscFaTzQSej3sEdAqOy7_{- jdJ8#|Z%W0S&*%R?=vdi@ZM|;~00000NkvXXu0mjfV=9A= literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..bf024e75490a2c84ab1e9a93854a023ebbb3f970 GIT binary patch literal 18908 zcmV)4Tx0C=38mUmQC*A|D*y?1({%`g-xL+`x}AiX!K(nMjH8DJ;_4l^{dA)*2i zMMMM@L4qO%jD{kyB8r88V8I@cAfUux6j4!mGqP56<>kGXm){>}eQTe+_dRFteb%}F zki7l5ymVL!fHa~vAmcQ z7uoQ$&mudEnVrUCi&%W-40ak@%snFBnkD3j81WZzQ5KhzE#g}u)=U+qaYg)A9Gk{r zW&(gBiR}UoD@nwrA|~;}Lfk~W6aXA4@hgu1iUph;f%sBx=^43vZeo&vuFKM+o7vhj z=-!;{RE|Jk6vSkuF!^k{TY6dsla~v?;+;QBMqFFEsL0l4w$|20=Ei1U73#lk{!NK{ zyGXBsKlcox^?kAZm0x;20E}5tZFYRI#qR~6V>1Bq_rKUQ4+0=5>RbE3SNEZb=OsxX z$gndp$O~ z2}Gii1cZ;QLyD0~q#kKOx{zMvCNhFdBkxcc6a_^`8KLY^-l*j$7HTzW9jX*njXHvA zNA;j?qDE0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mqUF@;WhP>&l-=kM;;7DBC2dxUb4~F4T4{1?WaNsghS!PN zp;U&lSy*vbN94wAHBmZ4sSIhazQ#_1A5H8gN2OW?7L6hiup-Z=d=bnwkEjS~AJ#}% zc4H@MFCzkG%H%0XXpQBwrUW9y7S-y?_FZd0kmk&>>d*eI9lJt)hP1x1Di;APX`ga8 z%9cucXND-DOn!mku@FQM27$6o%bHS>Ox2}W)gJ9ZYXPDlLknWb z6OGy!_e~I%*tpRvZggk`ERjy7Qfe9Wl0EuP{PIuY-~F2W45iXDh5hHe)lxcP1xlZI zxibsjRElwBcUv-{dfAsJP>M1cd*-M;dDz?k>~*i12c=XhmD0u-=NvEf4knh;q`P=J ze(k5x?|);5uW)M{Si{YTZB~2_Sib+w!nF=0a+#dHa^8LLdu-jy{aYxNS&nziIp>_y zV`F2fRLWbTrnyW{+Ox-^U;It{`Y+wc6)v`bcqXwesev{pRQ^+}05h6Q1PHP+dX?UN rBhsnhd;fwvdlxG0dWhpV48#8)Yj<(SX^Sh400000NkvXXu0mjfSEK|& literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/TwoNetworking/AFNetworking/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small.png new file mode 100644 index 0000000000000000000000000000000000000000..c4003bfd557e50db5b3c53275f55e3d7d2e541be GIT binary patch literal 4195 zcmV-p5S;IcP)4Tx0C=38mUmQC*A|D*y?1({%`g-xL+`x}AiX!K(nMjH8DJ;_4l^{dA)*2i zMMMM@L4qO%jD{kyB8r88V8I@cAfUux6j4!mGqP56<>kGXm){>}eQTe+_dRFteb%}F zki7l5ymVL!fHa~vAmcQ z7uoQ$&mudEnVrUCi&%W-40ak@%snFBnkD3j81WZzQ5KhzE#g}u)=U+qaYg)A9Gk{r zW&(gBiR}UoD@nwrA|~;}Lfk~W6aXA4@hgu1iUph;f%sBx=^43vZeo&vuFKM+o7vhj z=-!;{RE|Jk6vSkuF!^k{TY6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con.appiconset/Icon-Small@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..d7ea8401ca6690bbc7b4bb8c2298a05f42ec6bdb GIT binary patch literal 9300 zcmV-aB&*wrP)4Tx0C=38mUmQC*A|D*y?1({%`g-xL+`x}AiX!K(nMjH8DJ;_4l^{dA)*2i zMMMM@L4qO%jD{kyB8r88V8I@cAfUux6j4!mGqP56<>kGXm){>}eQTe+_dRFteb%}F zki7l5ymVL!fHa~vAmcQ z7uoQ$&mudEnVrUCi&%W-40ak@%snFBnkD3j81WZzQ5KhzE#g}u)=U+qaYg)A9Gk{r zW&(gBiR}UoD@nwrA|~;}Lfk~W6aXA4@hgu1iUph;f%sBx=^43vZeo&vuFKM+o7vhj z=-!;{RE|Jk6vSkuF!^k{TY6dsla~v?;+;QBMqFFEsL0l4w$|20=Ei1U73#lk{!NK{ zyGXBsKlcox^?kAZm0x;20E}5tZFYRI#qR~6V>1Bq_rKUQ4+0=5>RbE3SNEZb=OsxX z$gndp$O~ z2}Gii1cZ;QLyD0~q#kKOx{zMvCNhFdBkxcc6a_^`8KLY^-l*j$7HTzW9jX*njXHvA zNA;j?qDE0Os847zS_y4{wnO`%BhiWIY;+O265WVyLtjGQMvtT4U@#aOMh9bq@y0}9 zk}+#ArI`JgR?K_yPPlex4vr&>=Vw!U)NPjf5&f z3*i#sA>kE~NK_}<5`&3c;s#Leh59VbXchJ<=;OnXFBA zCP$M6>atgt3H=1Y2UgM2$qd#E`@bNxY<%q>JP#$vnwQ$&-=;lG9Rn zDQzh?DW=pqsT!$MQo~ZS(iCYk=|Jf;=~C&V(pRM?Ww0{ZG9EH)nL?REG8bjWC@3{{8fLrtcZP`{)0Q)gslWG!XGWpiX}WY5Ts&=8t7&4-psE2EvD z-J!jgQfv(`8kfN|tp+n)3B1%zTF<3EM z@qpqb#pxx~CH6~LONy7ASaM$pR?=4rQCg#PNU2Y0R#`>aOF2V%ukuCZX%(7^vr4i` zh00l#DOHN9qbgUmLiL>LGrBC@g`P^Uq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c9hHtKk!}&>rB?9n9@li5%kr!KoK-Vp5A6LfmC-d>TqmDhRQa2K5GDu@S z{A{z(xKOn*)2ju%@S6|XO^{>XgmQaM zJKbw78C6D_Qo)V!SghlNM*0t@_4${AC9jD+WWV&)z?6AOBRNJ|jyD%E#TTkVdEn*u z=2o>_J+lf;YQAB&dAxc-0eLmH;B!kwx6JSmmKT=7{hW3vjlC&vQuqEv@UWnED|kkh zbrtg>6v%F;%2)b<2^u(vkIXGH_No>AQhMT%=yIhPl6R1B?_gRrtPAoW8V_5k(r3lS ziiz6TzGeh#uh(mAm}Q*{Gf*q<_njfm*zed2Ll7v^<2(4j()OFiD^ewJ60WkDoa}$^ zGh_+LHXtDd-V7;a``B*huAZ043yf9%KZn)NLp))Pj_1&|>SpQoX_DD>zF6AF)1g3i z355Vsh49-1m?#k(t{?qOlqjU&Tk?vJvz1~r$#CoMqF)^QCBg=Q2`c~+-vM4N|Nh^s zBhc9f+Q9zinB{~lEU M{FW88&cq|(9~Fd4w*UYD literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Certificates/adn.cer b/TwoNetworking/AFNetworking/Example/Certificates/adn.cer new file mode 100644 index 0000000000000000000000000000000000000000..5cbf610fe652c33dab0c2f549e601ea2beb2133e GIT binary patch literal 1321 zcmXqLVpTP0V&PrD%*4pVB*5L(@Y3#O{b8vMhc`%ceT_8WW#iOp^Jx3d%gD&e%3zRY z$Zf#M#vIDRCd?EXY$$3V4B~JJ^SETDXF8`Al_+@TB^yc_h=YW=g$2sX%k@%#QprFm zz2y8{LsbK1kQB493|xmtW_pH#V{vh5QDR<<3ziM!u8p+Ps?OPR7gikGq)G; zu1Hh4nD@AP(YYhJv%7-2_vf%4$Yg9iu|>8!dzn<;s*Cf^Hb#clEK6`@W@tI)bo`mv{s z@V@J9MiGG(Wmz#FrGKW~%VEjeP$jB+xU%kQn(=&%S*Poa1>(;qMQ)z2`gY2%2W+|R ztao^L92DzusX*q+g6bnoa6>Bm;VSNHF28t z1u!`@)+smLxi{yZyT z{ubz;_molL%Du{&9?jpuF(AvwBE}-}?$4=%MRspl&2!f53%B@}Cs3s243QRO0mfhx zA`Y6^VUfWHGM=B2@jnX-GZX6qh;mhsayAZaHef(23?dA)7HBL` zYg5T6DJihh*H13WF-A$A`pJpLy6Hw1dO#UWwI;aLI)SWEV6ir^G%#o5Olb39Z2OzT z$Y`KtpaF9T6Qh_6$lhY0#pu~W-#H-IpcJWYWvnUH{=|*R>~$7rQ>n*uU3uy=Ci?faV9? z8{daWojCmG-d9!bCtsRY-{sh_WxG$+H&Z1GTe0o!mM(|)C^uZsmr(D0A#M|Ed{+Ml LSE!%Gvt}Lu*zU_* literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Certificates/digicert_ca_3.cer b/TwoNetworking/AFNetworking/Example/Certificates/digicert_ca_3.cer new file mode 100644 index 0000000000000000000000000000000000000000..683d5ff30ac23b7f8ef3ceacf01f82f08c278102 GIT binary patch literal 1628 zcmbtUdr*{B6u)=B-DLrRg%$9DumUnXl)VdxMv5$pK%&MY5H%LJj|D#6SG!9L$T+z= zOF4kSG%3W;PD+v^HX@>wfPzM*(rZi0d_)g5Lujl-@zJ>=j@I}`(>HS;=XZYR+~0kC zhggNV#41RzGd#@WiCywNmock-Ykj{Qb}&_oo+WNV=Wtu9?WP;X0s$ggxhruNGTD5g zgqNKq_a+i*xJV`?aYdX`W3ot})3fra#FxUZ5^-s1X=DMoSa3zM2Aw>Dgi#kG349ch z$`ut$6=rjZNv&r!(#1K_OoPE9RVs+TuN#?9Vn~!ciomzZ*DWdv%xG$WNech3npq@h zT#et;)F>5mqKOp;K7J5bfEX+GK!CgOtQeynwM&>dKy@!>UWRDYe=KlF-R}WYNWLlZ7T1^83TfLdxsEuIbY~Z&$S* zURc|^a=j{6dnD^KB#Md`7vzd1T>qr&jfolPmLTbR@IZOMP?cwwSIZ6WKm5w&9G<@G zm%Jkl+6~T4mot-=h~t8Odb@-9prx^W^*fHV*1D>J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z6SghtsIkZ15c52JPg{pGxu~Grt3PNWbcjs{jTI}#X&BV;ez_>WsAklyi z7{#*ujEw(TSb)i@&43@o7Y6ZJ4VZzHfh)yU1V#fRgNzj0^gGw*%(v-CW8(-{yshZ|Lo0pNehH&82Z8W| zU7xFN3a0j%{+jp4b?dyFK8D^qCcbdi>Dyd!?)Ky0%ED_;6{j%X3T>aIlJc!9?aaM7 z=4V%!Y|Nakd}3aOl6Haf<4||QM9KFNM_cv%48AQe6jMI&{86fy@#+0i(hF>VoQmr< z>`vh5)a7A|3EF<-C)bRNqVe;E_SKjrTkLgNQvXCvo9oE*Ox~A0j}8cg?>JE=G%@s( zN9K(^T1?UWE>{!`Z-3cUpcXqJVcs5ZaZdd$r{$b8PO_^XycF~OmEz6}p*c2l_Rss% i5HmaZ>>Kx0s_N+r%s(?U)rMSO`QxRY@Z$0p@?HQubYDLJ literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Example/Classes/Models/Post.h b/TwoNetworking/AFNetworking/Example/Classes/Models/Post.h new file mode 100644 index 0000000..2f1c381 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Classes/Models/Post.h @@ -0,0 +1,41 @@ +// Post.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@class User; + +@interface Post : NSObject + +@property (nonatomic, assign) NSUInteger postID; +@property (nonatomic, strong) NSString *text; + +@property (nonatomic, strong) User *user; + +- (instancetype)initWithAttributes:(NSDictionary *)attributes; + ++ (NSURLSessionDataTask *)globalTimelinePostsWithBlock:(void (^)(NSArray *posts, NSError *error))block; + +@end + +@interface Post (NSCoding) +@end diff --git a/TwoNetworking/AFNetworking/Example/Classes/Models/Post.m b/TwoNetworking/AFNetworking/Example/Classes/Models/Post.m new file mode 100644 index 0000000..d922f3f --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Classes/Models/Post.m @@ -0,0 +1,92 @@ +// Post.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "Post.h" +#import "User.h" + +#import "AFAppDotNetAPIClient.h" + +@implementation Post + +- (instancetype)initWithAttributes:(NSDictionary *)attributes { + self = [super init]; + if (!self) { + return nil; + } + + self.postID = (NSUInteger)[[attributes valueForKeyPath:@"id"] integerValue]; + self.text = [attributes valueForKeyPath:@"text"]; + + self.user = [[User alloc] initWithAttributes:[attributes valueForKeyPath:@"user"]]; + + return self; +} + +#pragma mark - + ++ (NSURLSessionDataTask *)globalTimelinePostsWithBlock:(void (^)(NSArray *posts, NSError *error))block { + return [[AFAppDotNetAPIClient sharedClient] GET:@"stream/0/posts/stream/global" parameters:nil headers: nil progress:nil success:^(NSURLSessionDataTask * __unused task, id JSON) { + NSArray *postsFromResponse = [JSON valueForKeyPath:@"data"]; + NSMutableArray *mutablePosts = [NSMutableArray arrayWithCapacity:[postsFromResponse count]]; + for (NSDictionary *attributes in postsFromResponse) { + Post *post = [[Post alloc] initWithAttributes:attributes]; + [mutablePosts addObject:post]; + } + + if (block) { + block([NSArray arrayWithArray:mutablePosts], nil); + } + } failure:^(NSURLSessionDataTask *__unused task, NSError *error) { + if (block) { + block([NSArray array], error); + } + }]; +} + +@end + +@implementation Post (NSCoding) + +- (void)encodeWithCoder:(NSCoder *)aCoder { + [aCoder encodeInteger:(NSInteger)self.postID forKey:@"AF.postID"]; + [aCoder encodeObject:self.text forKey:@"AF.text"]; + [aCoder encodeObject:self.user forKey:@"AF.user"]; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder { + self = [super init]; + if (!self) { + return nil; + } + + self.postID = (NSUInteger)[aDecoder decodeIntegerForKey:@"AF.postID"]; + self.text = [aDecoder decodeObjectOfClass:[NSString class] forKey:@"AF.text"]; + self.user = [aDecoder decodeObjectOfClass:[User class] forKey:@"AF.user"]; + + return self; +} + ++ (BOOL)supportsSecureCoding { + return YES; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/Classes/Models/User.h b/TwoNetworking/AFNetworking/Example/Classes/Models/User.h new file mode 100644 index 0000000..2b1e733 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Classes/Models/User.h @@ -0,0 +1,42 @@ +// User.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +extern NSString * const kUserProfileImageDidLoadNotification; + +@interface User : NSObject + +@property (readonly, nonatomic, assign) NSUInteger userID; +@property (readonly, nonatomic, copy) NSString *username; +@property (readonly, nonatomic, unsafe_unretained) NSURL *avatarImageURL; + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +@property (nonatomic, strong) NSImage *profileImage; +#endif + +- (instancetype)initWithAttributes:(NSDictionary *)attributes; + +@end + +@interface User (NSCoding) +@end diff --git a/TwoNetworking/AFNetworking/Example/Classes/Models/User.m b/TwoNetworking/AFNetworking/Example/Classes/Models/User.m new file mode 100644 index 0000000..5565b71 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Classes/Models/User.m @@ -0,0 +1,130 @@ +// User.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "User.h" +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +//#import "AFHTTPRequestOperation.h" +#endif + +NSString * const kUserProfileImageDidLoadNotification = @"com.alamofire.user.profile-image.loaded"; + +@interface User () +@property (readwrite, nonatomic, assign) NSUInteger userID; +@property (readwrite, nonatomic, copy) NSString *username; +@property (readwrite, nonatomic, copy) NSString *avatarImageURLString; + +//#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +//@property (readwrite, nonatomic, strong) AFHTTPRequestOperation *avatarImageRequestOperation; +//#endif +@end + +@implementation User + +- (instancetype)initWithAttributes:(NSDictionary *)attributes { + self = [super init]; + if (!self) { + return nil; + } + + self.userID = (NSUInteger)[[attributes valueForKeyPath:@"id"] integerValue]; + self.username = [attributes valueForKeyPath:@"username"]; + self.avatarImageURLString = [attributes valueForKeyPath:@"avatar_image.url"]; + + return self; +} + +- (NSURL *)avatarImageURL { + return [NSURL URLWithString:self.avatarImageURLString]; +} + +#pragma mark - + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED + +//+ (NSOperationQueue *)sharedProfileImageRequestOperationQueue { +// static NSOperationQueue *_sharedProfileImageRequestOperationQueue = nil; +// static dispatch_once_t onceToken; +// dispatch_once(&onceToken, ^{ +// _sharedProfileImageRequestOperationQueue = [[NSOperationQueue alloc] init]; +// [_sharedProfileImageRequestOperationQueue setMaxConcurrentOperationCount:8]; +// }); +// +// return _sharedProfileImageRequestOperationQueue; +//} + +- (NSImage *)profileImage { + return nil; +// if (!_profileImage && !_avatarImageRequestOperation) { +// NSMutableURLRequest *mutableRequest = [NSMutableURLRequest requestWithURL:self.avatarImageURL]; +// [mutableRequest setValue:@"image/*" forHTTPHeaderField:@"Accept"]; +// AFHTTPRequestOperation *imageRequestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:mutableRequest]; +// imageRequestOperation.responseSerializer = [AFImageResponseSerializer serializer]; +// [imageRequestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, NSImage *responseImage) { +// self.profileImage = responseImage; +// +// _avatarImageRequestOperation = nil; +// +// [[NSNotificationCenter defaultCenter] postNotificationName:kUserProfileImageDidLoadNotification object:self userInfo:nil]; +// } failure:nil]; +// +// [imageRequestOperation setCacheResponseBlock:^NSCachedURLResponse *(NSURLConnection *connection, NSCachedURLResponse *cachedResponse) { +// return [[NSCachedURLResponse alloc] initWithResponse:cachedResponse.response data:cachedResponse.data userInfo:cachedResponse.userInfo storagePolicy:NSURLCacheStorageAllowed]; +// }]; +// +// _avatarImageRequestOperation = imageRequestOperation; +// +// [[[self class] sharedProfileImageRequestOperationQueue] addOperation:_avatarImageRequestOperation]; +// } +// +// return _profileImage; +} + +#endif + +@end + +@implementation User (NSCoding) + +- (void)encodeWithCoder:(NSCoder *)aCoder { + [aCoder encodeInteger:(NSInteger)self.userID forKey:@"AF.userID"]; + [aCoder encodeObject:self.username forKey:@"AF.username"]; + [aCoder encodeObject:self.avatarImageURLString forKey:@"AF.avatarImageURLString"]; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder { + self = [super init]; + if (!self) { + return nil; + } + + self.userID = (NSUInteger)[aDecoder decodeIntegerForKey:@"AF.userID"]; + self.username = [aDecoder decodeObjectOfClass:[NSString class] forKey:@"AF.username"]; + self.avatarImageURLString = [aDecoder decodeObjectOfClass:[User class] forKey:@"AF.avatarImageURLString"]; + + return self; +} + ++ (BOOL)supportsSecureCoding { + return YES; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h b/TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h new file mode 100644 index 0000000..7dbe92d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h @@ -0,0 +1,30 @@ +// AFAppDotNetAPIClient.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +@import AFNetworking; + +@interface AFAppDotNetAPIClient : AFHTTPSessionManager + ++ (instancetype)sharedClient; + +@end diff --git a/TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m b/TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m new file mode 100644 index 0000000..658a1f6 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m @@ -0,0 +1,40 @@ +// AFAppDotNetAPIClient.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFAppDotNetAPIClient.h" + +static NSString * const AFAppDotNetAPIBaseURLString = @"https://api.app.net/"; + +@implementation AFAppDotNetAPIClient + ++ (instancetype)sharedClient { + static AFAppDotNetAPIClient *_sharedClient = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _sharedClient = [[AFAppDotNetAPIClient alloc] initWithBaseURL:[NSURL URLWithString:AFAppDotNetAPIBaseURLString]]; + _sharedClient.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; + }); + + return _sharedClient; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/Prefix.pch b/TwoNetworking/AFNetworking/Example/Prefix.pch new file mode 100644 index 0000000..241af5d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Prefix.pch @@ -0,0 +1,21 @@ +#import + +#if __IPHONE_OS_VERSION_MIN_REQUIRED + #ifndef __IPHONE_6_0 + #warning "This project uses features only available in iPhone SDK 6.0 and later." + #endif + + #ifdef __OBJC__ + #import + #import + #import + #import + #endif +#else + #ifdef __OBJC__ + #import + #import + #import + #import + #endif +#endif diff --git a/TwoNetworking/AFNetworking/Example/Today Extension Example/Base.lproj/MainInterface.storyboard b/TwoNetworking/AFNetworking/Example/Today Extension Example/Base.lproj/MainInterface.storyboard new file mode 100644 index 0000000..d72de0f --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Today Extension Example/Base.lproj/MainInterface.storyboard @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/Today Extension Example/Info.plist b/TwoNetworking/AFNetworking/Example/Today Extension Example/Info.plist new file mode 100644 index 0000000..9574242 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Today Extension Example/Info.plist @@ -0,0 +1,48 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + Today Extension Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSExtension + + NSExtensionMainStoryboard + MainInterface + NSExtensionPointIdentifier + com.apple.widget-extension + + NSAppTransportSecurity + + NSExceptionDomains + + cloudfront.net + + NSIncludesSubdomains + + NSThirdPartyExceptionMinimumTLSVersion + TLSv1.0 + NSThirdPartyExceptionRequiresForwardSecrecy + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.h b/TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.h new file mode 100644 index 0000000..26e472f --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.h @@ -0,0 +1,27 @@ +// TodayViewController.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface TodayViewController : UIViewController + +@end diff --git a/TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.m b/TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.m new file mode 100644 index 0000000..0aa96f8 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/Today Extension Example/TodayViewController.m @@ -0,0 +1,106 @@ +// TodayViewController.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "TodayViewController.h" +#import "Post.h" +#import "User.h" +@import AFNetworking; + +@interface TodayViewController () +@property (strong, nonatomic) IBOutlet UIImageView *imageView; +@property (strong, nonatomic) IBOutlet UILabel *titleLabel; +@property (strong, nonatomic) IBOutlet UILabel *bodyLabel; +@property (nonatomic, strong) Post *post; +@end + +@implementation TodayViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; + [NSURLCache setSharedURLCache:URLCache]; + self.post = [self loadSavedPost]; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; +} + +- (void)widgetPerformUpdateWithCompletionHandler:(void (^)(NCUpdateResult))completionHandler { + [Post globalTimelinePostsWithBlock:^(NSArray *posts, NSError *error) { + if (!error) { + self.post = posts.firstObject; + [self savePost:self.post]; + + if (completionHandler) { + completionHandler(self.post != nil ? NCUpdateResultNewData : NCUpdateResultNoData); + } + + } else { + if (completionHandler) { + completionHandler(NCUpdateResultFailed); + } + } + }]; +} + +- (void)setPost:(Post *)post { + _post = post; + + self.titleLabel.hidden = post == nil; + self.bodyLabel.hidden = post == nil; + self.imageView.hidden = post == nil; + + if (post == nil) { + return; + } + + self.titleLabel.text = _post.user.username; + self.bodyLabel.text = _post.text; + [self.imageView setImageWithURL:_post.user.avatarImageURL placeholderImage:[UIImage imageNamed:@"profile-image-placeholder"]]; +} + +- (void)savePost:(Post *)post { + + if (post == nil) { + [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"AF.post"]; + [[NSUserDefaults standardUserDefaults] synchronize]; + return; + } + + NSData *postData = [NSKeyedArchiver archivedDataWithRootObject:post]; + [[NSUserDefaults standardUserDefaults] setObject:postData forKey:@"AF.post"]; + [[NSUserDefaults standardUserDefaults] synchronize]; +} + +- (Post *)loadSavedPost { + NSData *postData = [[NSUserDefaults standardUserDefaults] objectForKey:@"AF.post"]; + if (postData == nil || ![postData isKindOfClass:[NSData class]]) { + return nil; + } + + return [NSKeyedUnarchiver unarchiveObjectWithData:postData]; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/en.lproj/MainMenu.xib b/TwoNetworking/AFNetworking/Example/en.lproj/MainMenu.xib new file mode 100644 index 0000000..1285ad3 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/en.lproj/MainMenu.xib @@ -0,0 +1,4587 @@ + + + + 1070 + 11C42 + 1938 + 1138.17 + 567.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + NSWindowTemplate + NSView + NSMenu + NSMenuItem + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + AFNetworking-Mac-Example + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + AFNetworking-Mac-Example + + + + About AFNetworking-Mac-Example + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide AFNetworking-Mac-Example + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit AFNetworking-Mac-Example + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save… + s + 1048576 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find and Replace… + f + 1572864 + 2147483647 + + + 12 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + + + Show Spelling and Grammar + : + 1048576 + 2147483647 + + + + + + Check Document Now + ; + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + Correct Spelling Automatically + + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + + + Show Substitutions + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Dashes + + 2147483647 + + + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + Text Replacement + + 2147483647 + + + + + + + + + Transformations + + 2147483647 + + + submenuAction: + + Transformations + + + + Make Upper Case + + 2147483647 + + + + + + Make Lower Case + + 2147483647 + + + + + + Capitalize + + 2147483647 + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + + + Font + + 2147483647 + + + submenuAction: + + Font + + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligature + + 2147483647 + + + submenuAction: + + Ligature + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Writing Direction + + 2147483647 + + + submenuAction: + + Writing Direction + + + + YES + Paragraph + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + YES + Selection + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + + + AFNetworking-Mac-Example Help + ? + 1048576 + 2147483647 + + + + + _NSHelpMenu + + + + _NSMainMenu + + + 15 + 2 + {{335, 390}, {480, 360}} + 1954021376 + AFNetworking-Mac-Example + NSWindow + + + + + 256 + {480, 360} + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + AppDelegate + + + NSFontManager + + + + + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 495 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + saveDocument: + + + + 362 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + toggleAutomaticSpellingCorrection: + + + + 456 + + + + orderFrontSubstitutionsPanel: + + + + 458 + + + + toggleAutomaticDashSubstitution: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + uppercaseWord: + + + + 464 + + + + capitalizeWord: + + + + 467 + + + + lowercaseWord: + + + + 468 + + + + pasteAsPlainText: + + + + 486 + + + + performFindPanelAction: + + + + 487 + + + + performFindPanelAction: + + + + 488 + + + + performFindPanelAction: + + + + 489 + + + + showHelp: + + + + 493 + + + + alignCenter: + + + + 518 + + + + pasteRuler: + + + + 519 + + + + toggleRuler: + + + + 520 + + + + alignRight: + + + + 521 + + + + copyRuler: + + + + 522 + + + + alignJustified: + + + + 523 + + + + alignLeft: + + + + 524 + + + + makeBaseWritingDirectionNatural: + + + + 525 + + + + makeBaseWritingDirectionLeftToRight: + + + + 526 + + + + makeBaseWritingDirectionRightToLeft: + + + + 527 + + + + makeTextWritingDirectionNatural: + + + + 528 + + + + makeTextWritingDirectionLeftToRight: + + + + 529 + + + + makeTextWritingDirectionRightToLeft: + + + + 530 + + + + performFindPanelAction: + + + + 535 + + + + addFontTrait: + + + + 421 + + + + addFontTrait: + + + + 422 + + + + modifyFont: + + + + 423 + + + + orderFrontFontPanel: + + + + 424 + + + + modifyFont: + + + + 425 + + + + window + + + + 532 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + + + + + 19 + + + + + + + + 56 + + + + + + + + 217 + + + + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + + + 75 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + + + + + + 126 + + + + + 205 + + + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + + + + + + 216 + + + + + + + + 200 + + + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 57 + + + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + + + + + + 296 + + + + + + + + + 297 + + + + + 298 + + + + + 211 + + + + + + + + 212 + + + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + + + + + + 349 + + + + + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + + + + + + 372 + + + + + 375 + + + + + + + + 376 + + + + + + + + + 377 + + + + + + + + 388 + + + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + + + + + + 398 + + + + + + + + 399 + + + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 420 + + + + + 450 + + + + + + + + 451 + + + + + + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 457 + + + + + 459 + + + + + 460 + + + + + 462 + + + + + 465 + + + + + 466 + + + + + 485 + + + + + 490 + + + + + + + + 491 + + + + + + + + 492 + + + + + 494 + + + + + 496 + + + + + + + + 497 + + + + + + + + + + + + + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + 503 + + + + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + 508 + + + + + + + + + + + + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 517 + + + + + 534 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{380, 496}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 535 + + + + + ABCardController + NSObject + + id + id + id + id + id + id + id + + + + addCardViewField: + id + + + copy: + id + + + cut: + id + + + doDelete: + id + + + find: + id + + + paste: + id + + + saveChanges: + id + + + + ABCardView + NSButton + NSManagedObjectContext + NSSearchField + NSTextField + NSWindow + + + + mCardView + ABCardView + + + mEditButton + NSButton + + + mManagedObjectContext + NSManagedObjectContext + + + mSearchField + NSSearchField + + + mStatusTextField + NSTextField + + + mWindow + NSWindow + + + + IBProjectSource + ./Classes/ABCardController.h + + + + ABCardView + NSView + + id + id + + + + commitAndSave: + id + + + statusImageClicked: + id + + + + NSImageView + NSView + ABNameFrameView + NSView + NSImage + ABImageView + + + + mBuddyStatusImage + NSImageView + + + mHeaderView + NSView + + + mNameView + ABNameFrameView + + + mNextKeyView + NSView + + + mUserImage + NSImage + + + mUserImageView + ABImageView + + + + IBProjectSource + ./Classes/ABCardView.h + + + + ABImageView + NSImageView + + id + id + id + id + + + + copy: + id + + + cut: + id + + + delete: + id + + + paste: + id + + + + IBProjectSource + ./Classes/ABImageView.h + + + + DVTAutoLayoutView + NSView + + IBProjectSource + ./Classes/DVTAutoLayoutView.h + + + + DVTBorderedView + DVTAutoLayoutView + + contentView + NSView + + + contentView + + contentView + NSView + + + + IBProjectSource + ./Classes/DVTBorderedView.h + + + + DVTDelayedMenuButton + NSButton + + IBProjectSource + ./Classes/DVTDelayedMenuButton.h + + + + DVTGradientImageButton + NSButton + + IBProjectSource + ./Classes/DVTGradientImageButton.h + + + + DVTImageAndTextCell + NSTextFieldCell + + IBProjectSource + ./Classes/DVTImageAndTextCell.h + + + + DVTImageAndTextColumn + NSTableColumn + + IBProjectSource + ./Classes/DVTImageAndTextColumn.h + + + + DVTOutlineView + NSOutlineView + + IBProjectSource + ./Classes/DVTOutlineView.h + + + + DVTSplitView + NSSplitView + + IBProjectSource + ./Classes/DVTSplitView.h + + + + DVTStackView + DVTAutoLayoutView + + IBProjectSource + ./Classes/DVTStackView.h + + + + DVTViewController + NSViewController + + IBProjectSource + ./Classes/DVTViewController.h + + + + HFController + NSObject + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFController.h + + + + HFRepresenterTextView + NSView + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFRepresenterTextView.h + + + + IBEditor + NSObject + + id + id + id + + + + changeFont: + id + + + selectAll: + id + + + sizeSelectionToFit: + id + + + + IBProjectSource + ./Classes/IBEditor.h + + + + IDECapsuleListView + DVTStackView + + dataSource + id + + + dataSource + + dataSource + id + + + + IBProjectSource + ./Classes/IDECapsuleListView.h + + + + IDEDMArrayController + NSArrayController + + IBProjectSource + ./Classes/IDEDMArrayController.h + + + + IDEDMEditor + IDEEditor + + DVTBorderedView + NSView + IDEDMEditorSourceListController + DVTSplitView + + + + bottomToolbarBorderView + DVTBorderedView + + + sourceListSplitViewPane + NSView + + + sourceListViewController + IDEDMEditorSourceListController + + + splitView + DVTSplitView + + + + IBProjectSource + ./Classes/IDEDMEditor.h + + + + IDEDMEditorController + IDEViewController + + IBProjectSource + ./Classes/IDEDMEditorController.h + + + + IDEDMEditorSourceListController + IDEDMEditorController + + DVTBorderedView + IDEDMEditor + DVTImageAndTextColumn + DVTOutlineView + NSTreeController + + + + borderedView + DVTBorderedView + + + parentEditor + IDEDMEditor + + + primaryColumn + DVTImageAndTextColumn + + + sourceListOutlineView + DVTOutlineView + + + sourceListTreeController + NSTreeController + + + + IBProjectSource + ./Classes/IDEDMEditorSourceListController.h + + + + IDEDMHighlightImageAndTextCell + DVTImageAndTextCell + + IBProjectSource + ./Classes/IDEDMHighlightImageAndTextCell.h + + + + IDEDataModelBrowserEditor + IDEDMEditorController + + IDEDataModelPropertiesTableController + IDECapsuleListView + NSArrayController + IDEDataModelPropertiesTableController + IDEDataModelEntityContentsEditor + IDEDataModelPropertiesTableController + + + + attributesTableViewController + IDEDataModelPropertiesTableController + + + capsuleView + IDECapsuleListView + + + entityArrayController + NSArrayController + + + fetchedPropertiesTableViewController + IDEDataModelPropertiesTableController + + + parentEditor + IDEDataModelEntityContentsEditor + + + relationshipsTableViewController + IDEDataModelPropertiesTableController + + + + IBProjectSource + ./Classes/IDEDataModelBrowserEditor.h + + + + IDEDataModelConfigurationEditor + IDEDMEditorController + + IDECapsuleListView + IDEDataModelEditor + IDEDataModelConfigurationTableController + + + + capsuleListView + IDECapsuleListView + + + parentEditor + IDEDataModelEditor + + + tableController + IDEDataModelConfigurationTableController + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationEditor.h + + + + IDEDataModelConfigurationTableController + IDEDMEditorController + + NSArrayController + NSArrayController + IDEDataModelConfigurationEditor + XDTableView + + + + configurationsArrayController + NSArrayController + + + entitiesArrayController + NSArrayController + + + parentEditor + IDEDataModelConfigurationEditor + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationTableController.h + + + + IDEDataModelDiagramEditor + IDEDMEditorController + + XDDiagramView + IDEDataModelEntityContentsEditor + + + + diagramView + XDDiagramView + + + parentEditor + IDEDataModelEntityContentsEditor + + + + IBProjectSource + ./Classes/IDEDataModelDiagramEditor.h + + + + IDEDataModelEditor + IDEDMEditor + + DVTDelayedMenuButton + DVTDelayedMenuButton + NSSegmentedControl + IDEDataModelConfigurationEditor + IDEDataModelEntityContentsEditor + IDEDataModelFetchRequestEditor + NSSegmentedControl + NSTabView + + + + addEntityButton + DVTDelayedMenuButton + + + addPropertyButton + DVTDelayedMenuButton + + + browserDiagramSegmentControl + NSSegmentedControl + + + configurationViewController + IDEDataModelConfigurationEditor + + + entityContentsViewController + IDEDataModelEntityContentsEditor + + + fetchRequestViewController + IDEDataModelFetchRequestEditor + + + hierarchySegmentControl + NSSegmentedControl + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEditor.h + + + + IDEDataModelEntityContentsEditor + IDEDMEditorController + + IDEDataModelBrowserEditor + IDEDataModelDiagramEditor + IDEDataModelEditor + NSTabView + + + + browserViewController + IDEDataModelBrowserEditor + + + diagramViewController + IDEDataModelDiagramEditor + + + parentEditor + IDEDataModelEditor + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEntityContentsEditor.h + + + + IDEDataModelFetchRequestEditor + IDEDMEditorController + + NSArrayController + IDEDataModelEditor + IDECapsuleListView + + + + entityController + NSArrayController + + + parentEditor + IDEDataModelEditor + + + tableView + IDECapsuleListView + + + + IBProjectSource + ./Classes/IDEDataModelFetchRequestEditor.h + + + + IDEDataModelPropertiesTableController + IDEDMEditorController + + IDEDMArrayController + NSTableColumn + NSArrayController + IDEDataModelBrowserEditor + IDEDMHighlightImageAndTextCell + XDTableView + + + + arrayController + IDEDMArrayController + + + entitiesColumn + NSTableColumn + + + entityArrayController + NSArrayController + + + parentEditor + IDEDataModelBrowserEditor + + + propertyNameAndImageCell + IDEDMHighlightImageAndTextCell + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelPropertiesTableController.h + + + + IDEDocSetOutlineView + NSOutlineView + + IBProjectSource + ./Classes/IDEDocSetOutlineView.h + + + + IDEDocSetOutlineViewController + NSObject + + id + id + id + id + id + + + + getDocSetAction: + id + + + showProblemInfoForUpdate: + id + + + subscribeToPublisherAction: + id + + + unsubscribeFromPublisher: + id + + + updateDocSetAction: + id + + + + docSetOutlineView + IDEDocSetOutlineView + + + docSetOutlineView + + docSetOutlineView + IDEDocSetOutlineView + + + + IBProjectSource + ./Classes/IDEDocSetOutlineViewController.h + + + + IDEDocViewingPrefPaneController + IDEViewController + + id + id + id + id + id + id + id + id + id + + + + addSubscription: + id + + + checkForAndInstallUpdatesNow: + id + + + minimumFontSizeComboBoxAction: + id + + + minimumFontSizeEnabledAction: + id + + + showHelp: + id + + + showSubscriptionSheet: + id + + + subscriptionCancelAction: + id + + + toggleAutoCheckForAndInstallUpdates: + id + + + toggleDocSetInfo: + id + + + + DVTGradientImageButton + DVTGradientImageButton + DVTGradientImageButton + NSSplitView + NSView + NSView + DVTBorderedView + DVTBorderedView + NSButton + NSTextView + IDEDocSetOutlineViewController + NSComboBox + NSTextField + NSButton + NSTextField + NSWindow + NSButton + + + + _addButton + DVTGradientImageButton + + + _deleteButton + DVTGradientImageButton + + + _showInfoAreaButton + DVTGradientImageButton + + + _splitView + NSSplitView + + + _splitViewDocSetInfoSubview + NSView + + + _splitViewDocSetsListSubview + NSView + + + borderedViewAroundSplitView + DVTBorderedView + + + borderedViewBelowTable + DVTBorderedView + + + checkAndInstallNowButton + NSButton + + + docSetInfoTextView + NSTextView + + + docSetOutlineViewController + IDEDocSetOutlineViewController + + + minimumFontSizeControl + NSComboBox + + + noUpdatesAvailableMessage + NSTextField + + + showInfoButton + NSButton + + + subscriptionTextField + NSTextField + + + subscriptionWindow + NSWindow + + + validateAddSubscriptionButton + NSButton + + + + IBProjectSource + ./Classes/IDEDocViewingPrefPaneController.h + + + + IDEEditor + IDEViewController + + IBProjectSource + ./Classes/IDEEditor.h + + + + IDEViewController + DVTViewController + + IBProjectSource + ./Classes/IDEViewController.h + + + + IKImageView + + id + id + id + id + + + + copy: + id + + + crop: + id + + + cut: + id + + + paste: + id + + + + IBProjectSource + ./Classes/IKImageView.h + + + + NSDocument + + id + id + id + id + id + id + + + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + IBProjectSource + ./Classes/NSDocument.h + + + + QLPreviewBubble + NSObject + + id + id + + + + hide: + id + + + show: + id + + + + parentWindow + NSWindow + + + parentWindow + + parentWindow + NSWindow + + + + IBProjectSource + ./Classes/QLPreviewBubble.h + + + + QTMovieView + + id + id + id + id + id + + + + showAll: + id + + + showCustomButton: + id + + + toggleLoops: + id + + + zoomIn: + id + + + zoomOut: + id + + + + IBProjectSource + ./Classes/QTMovieView.h + + + + WebView + + id + id + id + id + + + + reloadFromOrigin: + id + + + resetPageZoom: + id + + + zoomPageIn: + id + + + zoomPageOut: + id + + + + IBProjectSource + ./Classes/WebView.h + + + + XDDiagramView + NSView + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + _graphLayouterMenuItemAction: + id + + + _zoomPopUpButtonAction: + id + + + alignBottomEdges: + id + + + alignCentersHorizontallyInContainer: + id + + + alignCentersVerticallyInContainer: + id + + + alignHorizontalCenters: + id + + + alignLeftEdges: + id + + + alignRightEdges: + id + + + alignTopEdges: + id + + + alignVerticalCenters: + id + + + bringToFront: + id + + + collapseAllCompartments: + id + + + copy: + id + + + cut: + id + + + delete: + id + + + deleteBackward: + id + + + deleteForward: + id + + + deselectAll: + id + + + diagramZoomIn: + id + + + diagramZoomOut: + id + + + expandAllCompartments: + id + + + flipHorizontally: + id + + + flipVertically: + id + + + layoutGraphicsConcentrically: + id + + + layoutGraphicsHierarchically: + id + + + lock: + id + + + makeSameHeight: + id + + + makeSameWidth: + id + + + moveDown: + id + + + moveDownAndModifySelection: + id + + + moveLeft: + id + + + moveLeftAndModifySelection: + id + + + moveRight: + id + + + moveRightAndModifySelection: + id + + + moveUp: + id + + + moveUpAndModifySelection: + id + + + paste: + id + + + rollDownAllCompartments: + id + + + rollUpAllCompartments: + id + + + selectAll: + id + + + sendToBack: + id + + + sizeToFit: + id + + + toggleGridShown: + id + + + toggleHiddenGraphicsShown: + id + + + togglePageBreaksShown: + id + + + toggleRuler: + id + + + toggleSnapsToGrid: + id + + + unlock: + id + + + + _diagramController + IDEDataModelDiagramEditor + + + _diagramController + + _diagramController + IDEDataModelDiagramEditor + + + + IBProjectSource + ./Classes/XDDiagramView.h + + + + XDTableView + NSTableView + + showAllTableColumns: + id + + + showAllTableColumns: + + showAllTableColumns: + id + + + + IBProjectSource + ./Classes/XDTableView.h + + + + AppDelegate + NSObject + + id + id + + + + applicationShouldTerminate: + id + + + applicationWillFinishLaunching: + id + + + + IBProjectSource + ./Classes/AppDelegate.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + YES + 3 + + {9, 8} + {7, 2} + + YES + + diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.h b/TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.h new file mode 100644 index 0000000..36bab42 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.h @@ -0,0 +1,30 @@ +// AppDelegate.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface AppDelegate : NSObject + +@property (nonatomic, strong) UIWindow *window; +@property (nonatomic, strong) UINavigationController *navigationController; + +@end diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.m b/TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.m new file mode 100644 index 0000000..8ee01eb --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/AppDelegate.m @@ -0,0 +1,49 @@ +// AppDelegate.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AppDelegate.h" +@import AFNetworking; + +#import "GlobalTimelineViewController.h" + +@implementation AppDelegate + +- (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(__unused NSDictionary *)launchOptions +{ + NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; + [NSURLCache setSharedURLCache:URLCache]; + + [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; + + UITableViewController *viewController = [[GlobalTimelineViewController alloc] initWithStyle:UITableViewStylePlain]; + self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; + self.navigationController.navigationBar.tintColor = [UIColor darkGrayColor]; + + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window.backgroundColor = [UIColor whiteColor]; + self.window.rootViewController = self.navigationController; + [self.window makeKeyAndVisible]; + + return YES; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.h b/TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.h new file mode 100644 index 0000000..7f56649 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.h @@ -0,0 +1,27 @@ +// GlobalTimelineViewController.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface GlobalTimelineViewController : UITableViewController + +@end diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.m b/TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.m new file mode 100644 index 0000000..ec41e89 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/Controllers/GlobalTimelineViewController.m @@ -0,0 +1,103 @@ +// GlobalTimelineViewController.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "GlobalTimelineViewController.h" + +#import "Post.h" + +#import "PostTableViewCell.h" + +@import AFNetworking; + +@interface GlobalTimelineViewController () +@property (readwrite, nonatomic, strong) NSArray *posts; +@end + +@implementation GlobalTimelineViewController + +- (void)reload:(__unused id)sender { + self.navigationItem.rightBarButtonItem.enabled = NO; + + NSURLSessionTask *task = [Post globalTimelinePostsWithBlock:^(NSArray *posts, NSError *error) { + if (!error) { + self.posts = posts; + [self.tableView reloadData]; + } + }]; + + [self.refreshControl setRefreshingWithStateOfTask:task]; +} + +#pragma mark - UIViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.title = NSLocalizedString(@"AFNetworking", nil); + + self.refreshControl = [[UIRefreshControl alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.frame.size.width, 100.0f)]; + [self.refreshControl addTarget:self action:@selector(reload:) forControlEvents:UIControlEventValueChanged]; + [self.tableView.tableHeaderView addSubview:self.refreshControl]; + + self.tableView.rowHeight = 70.0f; + + [self reload:nil]; +} + +#pragma mark - UITableViewDataSource + +- (NSInteger)tableView:(__unused UITableView *)tableView + numberOfRowsInSection:(__unused NSInteger)section +{ + return (NSInteger)[self.posts count]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView + cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *CellIdentifier = @"Cell"; + + PostTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + if (!cell) { + cell = [[PostTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; + } + + cell.post = self.posts[(NSUInteger)indexPath.row]; + + return cell; +} + +#pragma mark - UITableViewDelegate + +- (CGFloat)tableView:(__unused UITableView *)tableView +heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return [PostTableViewCell heightForCellWithPost:self.posts[(NSUInteger)indexPath.row]]; +} + +- (void)tableView:(UITableView *)tableView +didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/Info.plist b/TwoNetworking/AFNetworking/Example/iOS Example/Info.plist new file mode 100644 index 0000000..0d2fa5c --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/Info.plist @@ -0,0 +1,68 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + AFNetworking + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIconFiles + + Icon.png + Icon@2x.png + + CFBundleIcons + + CFBundleIcons~ipad + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0.0 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSExceptionDomains + + cloudfront.net + + NSIncludesSubdomains + + NSThirdPartyExceptionMinimumTLSVersion + TLSv1.0 + NSThirdPartyExceptionRequiresForwardSecrecy + + + + + UIBackgroundModes + + fetch + + UILaunchStoryboardName + Launchscreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + + diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/Launchscreen.storyboard b/TwoNetworking/AFNetworking/Example/iOS Example/Launchscreen.storyboard new file mode 100644 index 0000000..1295c8c --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/Launchscreen.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.h b/TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.h new file mode 100644 index 0000000..1b58f21 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.h @@ -0,0 +1,33 @@ +// TweetTableViewCell.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@class Post; + +@interface PostTableViewCell : UITableViewCell + +@property (nonatomic, strong) Post *post; + ++ (CGFloat)heightForCellWithPost:(Post *)post; + +@end diff --git a/TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.m b/TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.m new file mode 100644 index 0000000..42ce04f --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/iOS Example/Views/PostTableViewCell.m @@ -0,0 +1,82 @@ +// TweetTableViewCell.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "PostTableViewCell.h" + +#import "Post.h" +#import "User.h" + +@import AFNetworking; + +@implementation PostTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style + reuseIdentifier:(NSString *)reuseIdentifier +{ + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (!self) { + return nil; + } + + self.textLabel.adjustsFontSizeToFitWidth = YES; + self.textLabel.textColor = [UIColor darkGrayColor]; + self.detailTextLabel.font = [UIFont systemFontOfSize:12.0f]; + self.detailTextLabel.numberOfLines = 0; + self.selectionStyle = UITableViewCellSelectionStyleGray; + + return self; +} + +- (void)setPost:(Post *)post { + _post = post; + + self.textLabel.text = _post.user.username; + self.detailTextLabel.text = _post.text; + [self.imageView setImageWithURL:_post.user.avatarImageURL placeholderImage:[UIImage imageNamed:@"profile-image-placeholder"]]; + + [self setNeedsLayout]; +} + ++ (CGFloat)heightForCellWithPost:(Post *)post { + return (CGFloat)fmaxf(70.0f, (float)[self detailTextHeight:post.text] + 45.0f); +} + ++ (CGFloat)detailTextHeight:(NSString *)text { + CGRect rectToFit = [text boundingRectWithSize:CGSizeMake(240.0f, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:12.0f]} context:nil]; + return rectToFit.size.height; +} + +#pragma mark - UIView + +- (void)layoutSubviews { + [super layoutSubviews]; + + self.imageView.frame = CGRectMake(10.0f, 10.0f, 50.0f, 50.0f); + self.textLabel.frame = CGRectMake(70.0f, 6.0f, 240.0f, 20.0f); + + CGRect detailTextLabelFrame = CGRectOffset(self.textLabel.frame, 0.0f, 25.0f); + CGFloat calculatedHeight = [[self class] detailTextHeight:self.post.text]; + detailTextLabelFrame.size.height = calculatedHeight; + self.detailTextLabel.frame = detailTextLabelFrame; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.h b/TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.h new file mode 100644 index 0000000..01c995f --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.h @@ -0,0 +1,31 @@ +// AppDelegate.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface AppDelegate : NSObject + +@property (strong) IBOutlet NSWindow *window; +@property (strong) IBOutlet NSTableView *tableView; +@property (strong) IBOutlet NSArrayController *postsArrayController; + +@end diff --git a/TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.m b/TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.m new file mode 100644 index 0000000..d4658db --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/macOS Example/AppDelegate.m @@ -0,0 +1,64 @@ +// AppDelegate.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AppDelegate.h" +@import AFNetworking; + +#import "Post.h" +#import "User.h" + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)notification { + NSURLCache *URLCache = [[NSURLCache alloc] initWithMemoryCapacity:4 * 1024 * 1024 diskCapacity:20 * 1024 * 1024 diskPath:nil]; + [NSURLCache setSharedURLCache:URLCache]; + + [self.window makeKeyAndOrderFront:self]; + + [Post globalTimelinePostsWithBlock:^(NSArray *posts, NSError *error) { + if (error) { + NSAlert *alert = [[NSAlert alloc] init]; + alert.messageText = NSLocalizedString(@"Error", nil); + alert.informativeText = error.localizedDescription; + [alert addButtonWithTitle:NSLocalizedString(@"OK", nil)]; + [alert runModal]; + } + + self.postsArrayController.content = posts; + }]; + + __weak __typeof(self)weakSelf = self; + [[NSNotificationCenter defaultCenter] addObserverForName:kUserProfileImageDidLoadNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + [strongSelf.tableView reloadData]; + }]; +} + +- (BOOL)applicationShouldHandleReopen:(NSApplication *)application + hasVisibleWindows:(BOOL)flag +{ + [self.window makeKeyAndOrderFront:self]; + + return YES; +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/TwoNetworking/AFNetworking/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/macOS Example/Info.plist b/TwoNetworking/AFNetworking/Example/macOS Example/Info.plist new file mode 100644 index 0000000..d872f1e --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/macOS Example/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/TwoNetworking/AFNetworking/Example/macOS Example/MainMenu.xib b/TwoNetworking/AFNetworking/Example/macOS Example/MainMenu.xib new file mode 100644 index 0000000..407b43c --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/macOS Example/MainMenu.xib @@ -0,0 +1,292 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad mi. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/macOS Example/main.m b/TwoNetworking/AFNetworking/Example/macOS Example/main.m new file mode 100644 index 0000000..0d0c93c --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/macOS Example/main.m @@ -0,0 +1,26 @@ +// main.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +int main(int argc, const char * argv[]) { + return NSApplicationMain(argc, argv); +} diff --git a/TwoNetworking/AFNetworking/Example/main.m b/TwoNetworking/AFNetworking/Example/main.m new file mode 100644 index 0000000..74e3fdf --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/main.m @@ -0,0 +1,38 @@ +// main.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#if TARGET_OS_IOS || TARGET_OS_TV + #import + + int main(int argc, char *argv[]) { + @autoreleasepool { + int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"AppDelegate"); + return retVal; + } + } +#else + #import + + int main(int argc, char *argv[]) { + return NSApplicationMain(argc, (const char **)argv); + } +#endif diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h b/TwoNetworking/AFNetworking/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h new file mode 100644 index 0000000..a719231 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h @@ -0,0 +1,6 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + +#import +@import AFNetworking; \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/AppDelegate.swift b/TwoNetworking/AFNetworking/Example/tvOS Example/AppDelegate.swift new file mode 100644 index 0000000..1058766 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/AppDelegate.swift @@ -0,0 +1,59 @@ +// AppDelegate.swift +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json new file mode 100644 index 0000000..8bf75d9 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json new file mode 100644 index 0000000..8bf75d9 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 0000000..dea6e49 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - Large.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "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", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..16a370d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + }, + { + "idiom" : "tv", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..d746a60 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "orientation" : "landscape", + "idiom" : "tv", + "extent" : "full-screen", + "minimum-system-version" : "11.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "tv", + "extent" : "full-screen", + "minimum-system-version" : "9.0", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Base.lproj/Main.storyboard b/TwoNetworking/AFNetworking/Example/tvOS Example/Base.lproj/Main.storyboard new file mode 100644 index 0000000..d620005 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Base.lproj/Main.storyboard @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Gravatar.swift b/TwoNetworking/AFNetworking/Example/tvOS Example/Gravatar.swift new file mode 100644 index 0000000..4b5304b --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Gravatar.swift @@ -0,0 +1,113 @@ +// Gravatar.swift +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import Foundation +import UIKit + +private extension String { + var md5_hash: String { + let trimmedString = lowercased().trimmingCharacters(in: CharacterSet.whitespaces) + let utf8String = trimmedString.cString(using: String.Encoding.utf8)! + let stringLength = CC_LONG(trimmedString.lengthOfBytes(using: String.Encoding.utf8)) + let digestLength = Int(CC_MD5_DIGEST_LENGTH) + let result = UnsafeMutablePointer.allocate(capacity: digestLength) + + CC_MD5(utf8String, stringLength, result) + + var hash = "" + + for i in 0.. Foundation.URL { + let URL = Gravatar.baseURL.appendingPathComponent(email.md5_hash) + var components = URLComponents(url: URL, resolvingAgainstBaseURL: false)! + + var queryItems = [defaultImage.queryItem, rating.queryItem] + queryItems.append(URLQueryItem(name: "f", value: forceDefault ? "y" : "n")) + queryItems.append(URLQueryItem(name: "s", value: String(format: "%.0f",size * scale))) + + components.queryItems = queryItems + + return components.url! + } +} diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/Info.plist b/TwoNetworking/AFNetworking/Example/tvOS Example/Info.plist new file mode 100644 index 0000000..4f33860 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + + diff --git a/TwoNetworking/AFNetworking/Example/tvOS Example/ViewController.swift b/TwoNetworking/AFNetworking/Example/tvOS Example/ViewController.swift new file mode 100644 index 0000000..c56f475 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/tvOS Example/ViewController.swift @@ -0,0 +1,79 @@ +// ViewController.swift +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import UIKit + +class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate { + + @IBOutlet var collectionView: UICollectionView! + var gravatars: [Gravatar] = [] + + override func viewDidLoad() { + super.viewDidLoad() + + for _ in 1...100 { + let gravatar = Gravatar( + emailAddress: UUID().uuidString, + defaultImage: Gravatar.DefaultImage.Identicon, + forceDefault: true + ) + + gravatars.append(gravatar) + } + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { + return gravatars.count + } + + func numberOfSections(in collectionView: UICollectionView) -> Int { + return 1 + } + + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "CollectionViewCell", for: indexPath) as! CollectionViewCell + cell.update(forGravatar: gravatars[(indexPath as NSIndexPath).item]) + return cell + } + + func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool { + return true + } + +} + +class CollectionViewCell : UICollectionViewCell { + @IBOutlet var avatarView: UIImageView! + + override func prepareForReuse() { + self.avatarView.image = nil + } + + func update(forGravatar gravatar:Gravatar) { + self.avatarView.setImageWith(gravatar.URL(size: self.bounds.size.width) as URL) + } +} + diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ new file mode 100644 index 0000000..b601d38 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ @@ -0,0 +1 @@ +Did you know that git does not support storing empty directories? diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.h b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.h new file mode 100644 index 0000000..8c3167b --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.h @@ -0,0 +1,26 @@ +// ExtensionDelegate.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface ExtensionDelegate : NSObject + +@end diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.m b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.m new file mode 100644 index 0000000..cbae379 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/ExtensionDelegate.m @@ -0,0 +1,39 @@ +// ExtensionDelegate.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "ExtensionDelegate.h" + +@implementation ExtensionDelegate + +- (void)applicationDidFinishLaunching { + // Perform any final initialization of your application. +} + +- (void)applicationDidBecomeActive { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillResignActive { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, etc. +} + +@end diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example Extension/Info.plist b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/Info.plist new file mode 100644 index 0000000..c45a46e --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + watchOS Example Extension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + com.alamofire.iOS-Example.watchkitapp + + NSExtensionPointIdentifier + com.apple.watchkit + + RemoteInterfacePrincipalClass + InterfaceController + WKExtensionDelegateClassName + ExtensionDelegate + + diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.h b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.h new file mode 100644 index 0000000..3d040b5 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.h @@ -0,0 +1,27 @@ +// InterfaceController.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +@interface InterfaceController : WKInterfaceController + +@end diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.m b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.m new file mode 100644 index 0000000..a14d85d --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example Extension/InterfaceController.m @@ -0,0 +1,51 @@ +// InterfaceController.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "InterfaceController.h" + + +@interface InterfaceController() + +@end + + +@implementation InterfaceController + +- (void)awakeWithContext:(id)context { + [super awakeWithContext:context]; + + // Configure interface objects here. +} + +- (void)willActivate { + // This method is called when watch view controller is about to be visible to user + [super willActivate]; +} + +- (void)didDeactivate { + // This method is called when watch view controller is no longer visible + [super didDeactivate]; +} + +@end + + + diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/TwoNetworking/AFNetworking/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2a9dea2 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,62 @@ +{ + "images" : [ + { + "size" : "24x24", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "27.5x27.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "44x44", + "idiom" : "watch", + "scale" : "2x", + "role" : "longLook", + "subtype" : "42mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example/Base.lproj/Interface.storyboard b/TwoNetworking/AFNetworking/Example/watchOS Example/Base.lproj/Interface.storyboard new file mode 100644 index 0000000..5f52cb6 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example/Base.lproj/Interface.storyboard @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/TwoNetworking/AFNetworking/Example/watchOS Example/Info.plist b/TwoNetworking/AFNetworking/Example/watchOS Example/Info.plist new file mode 100644 index 0000000..6935147 --- /dev/null +++ b/TwoNetworking/AFNetworking/Example/watchOS Example/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + iOS Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + com.alamofire.iOS-Example + WKWatchKitApp + + + diff --git a/TwoNetworking/AFNetworking/Framework/AFNetworking.h b/TwoNetworking/AFNetworking/Framework/AFNetworking.h new file mode 100644 index 0000000..65f3fcf --- /dev/null +++ b/TwoNetworking/AFNetworking/Framework/AFNetworking.h @@ -0,0 +1,66 @@ +// AFNetworking.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +//! Project version number for AFNetworking. +FOUNDATION_EXPORT double AFNetworkingVersionNumber; + +//! Project version string for AFNetworking. +FOUNDATION_EXPORT const unsigned char AFNetworkingVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import + +#ifndef _AFNETWORKING_ +#define _AFNETWORKING_ + +#import +#import +#import +#import + +#if !TARGET_OS_WATCH +#import +#endif + +#import +#import + +#if TARGET_OS_IOS || TARGET_OS_TV +#import +#import +#import +#import +#import +#import +#endif + +#if TARGET_OS_IOS +#import +#import +#import +#endif + + +#endif /* _AFNETWORKING_ */ diff --git a/TwoNetworking/AFNetworking/Framework/Info.plist b/TwoNetworking/AFNetworking/Framework/Info.plist new file mode 100644 index 0000000..36e4285 --- /dev/null +++ b/TwoNetworking/AFNetworking/Framework/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(MARKETING_VERSION) + NSPrincipalClass + + + diff --git a/TwoNetworking/AFNetworking/Framework/module.modulemap b/TwoNetworking/AFNetworking/Framework/module.modulemap new file mode 100644 index 0000000..a9200e1 --- /dev/null +++ b/TwoNetworking/AFNetworking/Framework/module.modulemap @@ -0,0 +1,5 @@ +framework module AFNetworking { + umbrella header "AFNetworking.h" + export * + module * { export * } +} \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Gemfile b/TwoNetworking/AFNetworking/Gemfile new file mode 100644 index 0000000..a43c93a --- /dev/null +++ b/TwoNetworking/AFNetworking/Gemfile @@ -0,0 +1,5 @@ +source "https://rubygems.org" + +gem "fastlane" +gem "cocoapods" +gem "xcode-install" \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/Gemfile.lock b/TwoNetworking/AFNetworking/Gemfile.lock new file mode 100644 index 0000000..b589bde --- /dev/null +++ b/TwoNetworking/AFNetworking/Gemfile.lock @@ -0,0 +1,248 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.2) + activesupport (4.2.11.1) + i18n (~> 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + algoliasearch (1.27.1) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + aws-eventstream (1.1.0) + aws-partitions (1.298.0) + aws-sdk-core (3.94.0) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.239.0) + aws-sigv4 (~> 1.1) + jmespath (~> 1.0) + aws-sdk-kms (1.30.0) + aws-sdk-core (~> 3, >= 3.71.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.61.2) + aws-sdk-core (~> 3, >= 3.83.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.1) + aws-sigv4 (1.1.2) + aws-eventstream (~> 1.0, >= 1.0.2) + babosa (1.0.3) + claide (1.0.3) + cocoapods (1.9.1) + activesupport (>= 4.0.2, < 5) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.9.1) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 1.2.2, < 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-stats (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.4.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.6.6) + nap (~> 1.0) + ruby-macho (~> 1.4) + xcodeproj (>= 1.14.0, < 2.0) + cocoapods-core (1.9.1) + activesupport (>= 4.0.2, < 6) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.4) + cocoapods-downloader (1.3.0) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.0) + cocoapods-stats (1.1.0) + cocoapods-trunk (1.4.1) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander-fastlane (4.4.6) + highline (~> 1.7.2) + concurrent-ruby (1.1.6) + declarative (0.0.10) + declarative-option (0.1.0) + digest-crc (0.5.1) + domain_name (0.5.20190701) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.7.5) + emoji_regex (1.0.1) + escape (0.0.4) + ethon (0.12.0) + ffi (>= 1.3.0) + excon (0.73.0) + faraday (0.17.3) + multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) + faraday_middleware (0.13.1) + faraday (>= 0.7.4, < 1.0) + fastimage (2.1.7) + fastlane (2.145.0) + CFPropertyList (>= 2.3, < 4.0.0) + addressable (>= 2.3, < 3.0.0) + aws-sdk-s3 (~> 1.0) + babosa (>= 1.0.2, < 2.0.0) + bundler (>= 1.12.0, < 3.0.0) + colored + commander-fastlane (>= 4.4.6, < 5.0.0) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 2.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 0.17) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 0.13.1) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.2, < 2.0.0) + google-api-client (>= 0.29.2, < 0.37.0) + google-cloud-storage (>= 1.15.0, < 2.0.0) + highline (>= 1.7.2, < 2.0.0) + json (< 3.0.0) + jwt (~> 2.1.0) + mini_magick (>= 4.9.4, < 5.0.0) + multi_xml (~> 0.5) + multipart-post (~> 2.0.0) + plist (>= 3.1.0, < 4.0.0) + public_suffix (~> 2.0.0) + rubyzip (>= 1.3.0, < 2.0.0) + security (= 0.1.3) + simctl (~> 1.6.3) + slack-notifier (>= 2.0.0, < 3.0.0) + terminal-notifier (>= 2.0.0, < 3.0.0) + terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (>= 0.6.3, < 1.0.0) + tty-spinner (>= 0.8.0, < 1.0.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + ffi (1.12.2) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + google-api-client (0.36.4) + addressable (~> 2.5, >= 2.5.1) + googleauth (~> 0.9) + httpclient (>= 2.8.1, < 3.0) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.0) + signet (~> 0.12) + google-cloud-core (1.5.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.3.1) + faraday (>= 0.17.3, < 2.0) + google-cloud-errors (1.0.0) + google-cloud-storage (1.26.0) + addressable (~> 2.5) + digest-crc (~> 0.4) + google-api-client (~> 0.33) + google-cloud-core (~> 1.2) + googleauth (~> 0.9) + mini_mime (~> 1.0) + googleauth (0.12.0) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.4, < 3.0) + memoist (~> 0.16) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (~> 0.14) + highline (1.7.10) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + jmespath (1.4.0) + json (2.3.0) + jwt (2.1.0) + memoist (0.16.2) + mini_magick (4.10.1) + mini_mime (1.0.2) + minitest (5.14.0) + molinillo (0.6.6) + multi_json (1.14.1) + multi_xml (0.6.0) + multipart-post (2.0.0) + nanaimo (0.2.6) + nap (1.1.0) + naturally (2.2.0) + netrc (0.11.0) + os (1.1.0) + plist (3.5.0) + public_suffix (2.0.5) + representable (3.0.4) + declarative (< 0.1.0) + declarative-option (< 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rouge (2.0.7) + ruby-macho (1.4.0) + rubyzip (1.3.0) + security (0.1.3) + signet (0.14.0) + addressable (~> 2.3) + faraday (>= 0.17.3, < 2.0) + jwt (>= 1.5, < 3.0) + multi_json (~> 1.10) + simctl (1.6.8) + CFPropertyList + naturally + slack-notifier (2.3.2) + terminal-notifier (2.0.0) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) + tty-cursor (0.7.1) + tty-screen (0.7.1) + tty-spinner (0.9.3) + tty-cursor (~> 0.7) + typhoeus (1.3.1) + ethon (>= 0.9.0) + tzinfo (1.2.7) + thread_safe (~> 0.1) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) + unicode-display_width (1.7.0) + word_wrap (1.0.0) + xcode-install (2.6.4) + claide (>= 0.9.1, < 1.1.0) + fastlane (>= 2.1.0, < 3.0.0) + xcodeproj (1.16.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.2.6) + xcpretty (0.3.0) + rouge (~> 2.0.7) + xcpretty-travis-formatter (1.0.0) + xcpretty (~> 0.2, >= 0.0.7) + +PLATFORMS + ruby + +DEPENDENCIES + cocoapods + fastlane + xcode-install + +BUNDLED WITH + 2.1.2 diff --git a/TwoNetworking/AFNetworking/LICENSE b/TwoNetworking/AFNetworking/LICENSE new file mode 100644 index 0000000..f611f42 --- /dev/null +++ b/TwoNetworking/AFNetworking/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2020 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. diff --git a/TwoNetworking/AFNetworking/Package.swift b/TwoNetworking/AFNetworking/Package.swift new file mode 100644 index 0000000..fd6d31a --- /dev/null +++ b/TwoNetworking/AFNetworking/Package.swift @@ -0,0 +1,37 @@ +// swift-tools-version:5.0 +// +// Package.swift +// +// Copyright (c) 2020 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 PackageDescription + +let package = Package(name: "AFNetworking", + platforms: [.macOS(.v10_10), + .iOS(.v9), + .tvOS(.v9), + .watchOS(.v2)], + products: [.library(name: "AFNetworking", + targets: ["AFNetworking"])], + targets: [.target(name: "AFNetworking", + path: "AFNetworking", + publicHeadersPath: "")]) diff --git a/TwoNetworking/AFNetworking/README.md b/TwoNetworking/AFNetworking/README.md new file mode 100644 index 0000000..d193dfe --- /dev/null +++ b/TwoNetworking/AFNetworking/README.md @@ -0,0 +1,298 @@ +

+ AFNetworking +

+ +[![Build Status](https://github.com/AFNetworking/AFNetworking/workflows/AFNetworking%20CI/badge.svg?branch=master)](https://github.com/AFNetworking/AFNetworking/actions) +[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/AFNetworking.svg)](https://img.shields.io/cocoapods/v/AFNetworking.svg) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![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, macOS, watchOS, and tvOS. It's built on top of the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system), extending the powerful high-level networking abstractions built into Cocoa. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. + +Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac. + +## How To Get Started + +- [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/archive/master.zip) and try out the included Mac and iPhone example apps +- Read the ["Getting Started" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles on the Wiki](https://github.com/AFNetworking/AFNetworking/wiki) + +## Communication + +- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). (Tag 'afnetworking') +- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking). +- If you **found a bug**, _and can provide steps to reliably reproduce it_, open an issue. +- If you **have a feature request**, open an issue. +- If you **want to contribute**, submit a pull request. + +## Installation +AFNetworking supports multiple methods for installing the library in a project. + +## Installation with CocoaPods + +To integrate AFNetworking into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +pod 'AFNetworking', '~> 4.0' +``` + +### Installation with Swift Package Manager + +Once you have your Swift package set up, adding AFNetworking as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. + +```swift +dependencies: [ + .package(url: "https://github.com/AFNetworking/AFNetworking.git", .upToNextMajor(from: "4.0.0")) +] +``` + +> Note: AFNetworking's Swift package does not include it's UIKit extensions. + +### Installation with Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate AFNetworking, add the following to your `Cartfile`. + +```ogdl +github "AFNetworking/AFNetworking" ~> 4.0 +``` + +## Requirements + +| AFNetworking Version | Minimum iOS Target | Minimum macOS Target | Minimum watchOS Target | Minimum tvOS Target | Notes | +|:--------------------:|:---------------------------:|:----------------------------:|:----------------------------:|:----------------------------:|:-------------------------------------------------------------------------:| +| 4.x | iOS 9 | macOS 10.10 | watchOS 2.0 | tvOS 9.0 | Xcode 11+ is required. | +| 3.x | iOS 7 | OS X 10.9 | watchOS 2.0 | tvOS 9.0 | Xcode 7+ is required. `NSURLConnectionOperation` support has been removed. | +| 2.6 -> 2.6.3 | iOS 7 | OS X 10.9 | watchOS 2.0 | n/a | Xcode 7+ is required. | +| 2.0 -> 2.5.4 | iOS 6 | OS X 10.8 | n/a | n/a | Xcode 5+ is required. `NSURLSession` subspec requires iOS 7 or OS X 10.9. | +| 1.x | iOS 5 | Mac OS X 10.7 | n/a | n/a | +| 0.10.x | iOS 4 | Mac OS X 10.6 | n/a | n/a | + +(macOS projects must support [64-bit with modern Cocoa runtime](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. + +## Architecture + +### NSURLSession + +- `AFURLSessionManager` +- `AFHTTPSessionManager` + +### Serialization + +* `` + - `AFHTTPRequestSerializer` + - `AFJSONRequestSerializer` + - `AFPropertyListRequestSerializer` +* `` + - `AFHTTPResponseSerializer` + - `AFJSONResponseSerializer` + - `AFXMLParserResponseSerializer` + - `AFXMLDocumentResponseSerializer` _(macOS)_ + - `AFPropertyListResponseSerializer` + - `AFImageResponseSerializer` + - `AFCompoundResponseSerializer` + +### Additional Functionality + +- `AFSecurityPolicy` +- `AFNetworkReachabilityManager` + +## Usage + +### AFURLSessionManager + +`AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to ``, ``, ``, and ``. + +#### Creating a Download Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/download.zip"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) { + NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; + return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]]; +} completionHandler:^(NSURLResponse *response, NSURL *filePath, NSError *error) { + NSLog(@"File downloaded to: %@", filePath); +}]; +[downloadTask resume]; +``` + +#### Creating an Upload Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://example.com/upload"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURL *filePath = [NSURL fileURLWithPath:@"file://path/to/image.png"]; +NSURLSessionUploadTask *uploadTask = [manager uploadTaskWithRequest:request fromFile:filePath progress:nil completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"Success: %@ %@", response, responseObject); + } +}]; +[uploadTask resume]; +``` + +#### Creating an Upload Task for a Multi-Part Request, with Progress + +```objective-c +NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://example.com/upload" parameters:nil constructingBodyWithBlock:^(id formData) { + [formData appendPartWithFileURL:[NSURL fileURLWithPath:@"file://path/to/image.jpg"] name:@"file" fileName:@"filename.jpg" mimeType:@"image/jpeg" error:nil]; + } error:nil]; + +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + +NSURLSessionUploadTask *uploadTask; +uploadTask = [manager + uploadTaskWithStreamedRequest:request + progress:^(NSProgress * _Nonnull uploadProgress) { + // This is not called back on the main queue. + // You are responsible for dispatching to the main queue for UI updates + dispatch_async(dispatch_get_main_queue(), ^{ + //Update the progress view + [progressView setProgress:uploadProgress.fractionCompleted]; + }); + } + completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } + }]; + +[uploadTask resume]; +``` + +#### Creating a Data Task + +```objective-c +NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; +AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + +NSURL *URL = [NSURL URLWithString:@"http://httpbin.org/get"]; +NSURLRequest *request = [NSURLRequest requestWithURL:URL]; + +NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + if (error) { + NSLog(@"Error: %@", error); + } else { + NSLog(@"%@ %@", response, responseObject); + } +}]; +[dataTask resume]; +``` + +--- + +### Request Serialization + +Request serializers create requests from URL strings, encoding parameters as either a query string or HTTP body. + +```objective-c +NSString *URLString = @"http://example.com"; +NSDictionary *parameters = @{@"foo": @"bar", @"baz": @[@1, @2, @3]}; +``` + +#### Query String Parameter Encoding + +```objective-c +[[AFHTTPRequestSerializer serializer] requestWithMethod:@"GET" URLString:URLString parameters:parameters error:nil]; +``` + + GET http://example.com?foo=bar&baz[]=1&baz[]=2&baz[]=3 + +#### URL Form Parameter Encoding + +```objective-c +[[AFHTTPRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters error:nil]; +``` + + POST http://example.com/ + Content-Type: application/x-www-form-urlencoded + + foo=bar&baz[]=1&baz[]=2&baz[]=3 + +#### JSON Parameter Encoding + +```objective-c +[[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString:URLString parameters:parameters error:nil]; +``` + + POST http://example.com/ + Content-Type: application/json + + {"foo": "bar", "baz": [1,2,3]} + +--- + +### Network Reachability Manager + +`AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces. + +* Do not use Reachability to determine if the original request should be sent. + * You should try to send it. +* You can use Reachability to determine when a request should be automatically retried. + * Although it may still fail, a Reachability notification that the connectivity is available is a good time to retry something. +* Network reachability is a useful tool for determining why a request might have failed. + * After a network request has failed, telling the user they're offline is better than giving them a more technical but accurate error, such as "request timed out." + +See also [WWDC 2012 session 706, "Networking Best Practices."](https://developer.apple.com/videos/play/wwdc2012-706/). + +#### Shared Network Reachability + +```objective-c +[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status)); +}]; + +[[AFNetworkReachabilityManager sharedManager] startMonitoring]; +``` + +--- + +### Security Policy + +`AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections. + +Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled. + +#### Allowing Invalid SSL Certificates + +```objective-c +AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; +manager.securityPolicy.allowInvalidCertificates = YES; // not recommended for production +``` + +--- + +## Unit Tests + +AFNetworking includes a suite of unit tests within the Tests subdirectory. These tests can be run simply be executed the test action on the platform framework you would like to test. + +## Credits + +AFNetworking is owned and maintained by the [Alamofire Software Foundation](http://alamofire.org). + +AFNetworking was originally created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla). + +AFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/). + +And most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors). + +### Security Disclosure + +If you believe you have identified a security vulnerability with AFNetworking, you should report it as soon as possible via email to security@alamofire.org. Please do not post it to a public issue tracker. + +## License + +AFNetworking is released under the MIT license. See [LICENSE](https://github.com/AFNetworking/AFNetworking/blob/master/LICENSE) for details. diff --git a/TwoNetworking/AFNetworking/Tests/Info.plist b/TwoNetworking/AFNetworking/Tests/Info.plist new file mode 100644 index 0000000..169b6f7 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_0.cer b/TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_0.cer new file mode 100644 index 0000000000000000000000000000000000000000..5cbf610fe652c33dab0c2f549e601ea2beb2133e GIT binary patch literal 1321 zcmXqLVpTP0V&PrD%*4pVB*5L(@Y3#O{b8vMhc`%ceT_8WW#iOp^Jx3d%gD&e%3zRY z$Zf#M#vIDRCd?EXY$$3V4B~JJ^SETDXF8`Al_+@TB^yc_h=YW=g$2sX%k@%#QprFm zz2y8{LsbK1kQB493|xmtW_pH#V{vh5QDR<<3ziM!u8p+Ps?OPR7gikGq)G; zu1Hh4nD@AP(YYhJv%7-2_vf%4$Yg9iu|>8!dzn<;s*Cf^Hb#clEK6`@W@tI)bo`mv{s z@V@J9MiGG(Wmz#FrGKW~%VEjeP$jB+xU%kQn(=&%S*Poa1>(;qMQ)z2`gY2%2W+|R ztao^L92DzusX*q+g6bnoa6>Bm;VSNHF28t z1u!`@)+smLxi{yZyT z{ubz;_molL%Du{&9?jpuF(AvwBE}-}?$4=%MRspl&2!f53%B@}Cs3s243QRO0mfhx zA`Y6^VUfWHGM=B2@jnX-GZX6qh;mhsayAZaHef(23?dA)7HBL` zYg5T6DJihh*H13WF-A$A`pJpLy6Hw1dO#UWwI;aLI)SWEV6ir^G%#o5Olb39Z2OzT z$Y`KtpaF9T6Qh_6$lhY0#pu~W-#H-IpcJWYWvnUH{=|*R>~$7rQ>n*uU3uy=Ci?faV9? z8{daWojCmG-d9!bCtsRY-{sh_WxG$+H&Z1GTe0o!mM(|)C^uZsmr(D0A#M|Ed{+Ml LSE!%Gvt}Lu*zU_* literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_1.cer b/TwoNetworking/AFNetworking/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_1.cer new file mode 100644 index 0000000000000000000000000000000000000000..683d5ff30ac23b7f8ef3ceacf01f82f08c278102 GIT binary patch literal 1628 zcmbtUdr*{B6u)=B-DLrRg%$9DumUnXl)VdxMv5$pK%&MY5H%LJj|D#6SG!9L$T+z= zOF4kSG%3W;PD+v^HX@>wfPzM*(rZi0d_)g5Lujl-@zJ>=j@I}`(>HS;=XZYR+~0kC zhggNV#41RzGd#@WiCywNmock-Ykj{Qb}&_oo+WNV=Wtu9?WP;X0s$ggxhruNGTD5g zgqNKq_a+i*xJV`?aYdX`W3ot})3fra#FxUZ5^-s1X=DMoSa3zM2Aw>Dgi#kG349ch z$`ut$6=rjZNv&r!(#1K_OoPE9RVs+TuN#?9Vn~!ciomzZ*DWdv%xG$WNech3npq@h zT#et;)F>5mqKOp;K7J5bfEX+GK!CgOtQeynwM&>dKy@!>UWRDYe=KlF-R}WYNWLlZ7T1^83TfLdxsEuIbY~Z&$S* zURc|^a=j{6dnD^KB#Md`7v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!Em&G4m((=PUDRAG9qi=3oOnS`rlw%^#5e>)C->0KGMe7P*nC|y2 z;KS3U1MC5c*hY*|CU8utq&? zd&l;QPp7z6SghtsIkZ15c52JPg{pGxu~Grt3PNWbcjs{jTI}#X&BV;ez_>WsAklyi z7{#*ujEw(TSb)i@&43@o7Y6ZJ4VZzHfh)yU1V#fRgNzj0^gGw*%(v-CW8(-{yshZ|Lo0pNehH&82Z8W| zU7xFN3a0j%{+jp4b?dyFK8D^qCcbdi>Dyd!?)Ky0%ED_;6{j%X3T>aIlJc!9?aaM7 z=4V%!Y|Nakd}3aOl6Haf<4||QM9KFNM_cv%48AQe6jMI&{86fy@#+0i(hF>VoQmr< z>`vh5)a7A|3EF<-C)bRNqVe;E_SKjrTkLgNQvXCvo9oE*Ox~A0j}8cg?>JE=G%@s( zN9K(^T1?UWE>{!`Z-3cUpcXqJVcs5ZaZdd$r{$b8PO_^XycF~OmEz6}p*c2l_Rss% i5HmaZ>>Kx0s_N+r%s(?U)rMSO`QxRY@Z$0p@?HQubYDLJ literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/Google.com/Equifax_Secure_Certificate_Authority_Root.cer b/TwoNetworking/AFNetworking/Tests/Resources/Google.com/Equifax_Secure_Certificate_Authority_Root.cer new file mode 100644 index 0000000000000000000000000000000000000000..c44db27440eea7a3bb31f074f7e78371561bc439 GIT binary patch literal 804 zcmXqLVpcF{V(MJL%*4pV#A15y%XtG{HcqWJkGAi;jEtyK7--W?Eu}p{{{8NQ7Hh1uCKtoSIx(l&avIT2zvmmYJMblB(cXT9T1p zlvz?~AScdiX<=YtWMpV&VrXg@CC+Pz%%!@0jq{Ox#K_9P+}O)t(Ade;*vN1&c4I_3 zN7B0mvvlP-awm#p%;1vycZ(%oxFt#P@Wq;Q^I0G4VEo``^5#+3RF;%AAG3qwSvQ|f zZ`kj|)c5Z$Bj=lk3?lx2et+P(>%1#k`=NY8!A#Nc$zmV*r)OvT#K>w;01QT1d6rCrbc56d z$qN#f#2ds?H}DO44Y)yZ#VpL?9OPqYAO*5ffJN9qu#w-$05u*!3T63OSb!;m%|IT+ zQD%`a5Ni9zim?Tynv|}XXQT;yqDaXH{;!k|4}C{hi*zM48M0k@wKhia%E3OmNuvA zKkw=ni3M#yYhh_-T4IHvu7Ng4gj-kzDxwganp|3xs^FYjRFavNnVeXXs^C~!l96AO zSyE{rC(dhNWMFD!XkcOh1X1F=h86}EaIS$9s(oSxA`ts{-Ba^Jib{)16g=~i^$evA zBthcL!a{Iy_niEs#2f`@M}sCtC1h_fvNA9?G4eA2#krW87#SIEosmd3`1?g%St_h9 z`o2w$#goGA6%()QS$Mowf^~aVUEz{vM-rB8 zc;E1(Q-gn=>b1AcpVuy%czni5Cka!Lxoc;*P15r}^|9UgpxD%K-GKLn zRWmYrJAbccP2mx&T~(X99nfJ_DhYXeI*4sAAI+GJ;96w?KnRSYz&yu2LMu%guB{L-T2)MEXj)Pnrt%#!?~ zO5{WVOxw(jjSOWEh4TEo#e~`n*fuqCod3Xa{CHtq+Pgz=6OmQZF1=nXBf{aiZTHiO t@0-nD%ZBBjy0xb`dBT(WYCEOVw(M`?ElTD*W)ARMxPHdF#7`~uLID2>L2m#6 literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GeoTrust_Global_CA_Root.cer b/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GeoTrust_Global_CA_Root.cer new file mode 100644 index 0000000000000000000000000000000000000000..4ae42e81b7ab27da185c149c5cfa42e0c7d8ef11 GIT binary patch literal 856 zcmXqLVh%BAVzODl%*4pV#LQ$8X28qFsnzDu_MMlJk(HIfz{!x?fRl|ml!Z;0DKywn z%s>Rh;S%O`Pt6Z0DlINi@XSlrGn6)v1c@^X3&F+RbMliCa}=B%4dldm4U7y-jSLM; z41gd?oYx4MOBFks7?qHn&dAEZ+{DPwV9>ZE`H0 z6mGAWcxBJR8$Lf)IB#Qq>8r@j(Qzw6Kh08eFKb2jT#F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kr*oB(Jo7qZZnhDI>}GgkBqTNm ztJU*o(B?8%@H$UNV^CFA9@u*&$@f6@Rcyb>(0d{0QC2CCbC+3(AmgYI2tXo-=AyGe z%x2a5cO)@!=bqZnct@+w{$Pr2EveFh*_=Rw#)4UJrVPFwP~>L0P>cYnL}IIw!w(Ap zoFoxV25*9-hPe&1Ll*z19tZ#348K6|-HZsd_fD?)W6<7OT`{w@`sMgw4fa;GuZ6wn z>gxTgpdfbUyVozM)$0?A>)U_1rfEr@FYc7L)p_2Fzra*I{}Z`yOUEjD;|fe8nMF@N z+;wkjtszP(*>rf>n!J(a8I5Z#_1cYtbCzbd)D`1xo-Hpj&b^@!D-v~SKE;d!1J53u?)eu?Lb)0M literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_1.cer b/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_1.cer new file mode 100644 index 0000000000000000000000000000000000000000..521e439356a71e9f4d3c961a699a71a3e39271a2 GIT binary patch literal 1012 zcmXqLV*X&z#B^f;GZP~d6El-lnE@{wr&gOs+jm|@Mpjk^11Cdn15P&PP!={}rqEzR zF#{10hfA2(JvBe1sI<65!80#e&rsSx5+u$nECd&K&&f|p%u#T5G>{YLH8eIbF)%d* zLQ~TyAlJ;$$QX!BEln+>3_MZo5H=8m*umwVpP!zS3bMga)j%0yfec)*B(*3nwM4*a^M3LAGe6{B?Y;%s`RxZT1juU`Fgx7hC=Sf2|8Hfp+?=g% zueTt}>spn2&wle8@vRLX}#GsT|w};n`%#W_`E6QYIW@KPo-1yv} z@ri*vFhFIMStJa^8bl6M&B*BO{Jokrg-5VfV zv9;`LEHyT2jm&(v2kd#0n;BlBO{BF zfr5b?jBmi$CWK-_3djTlaga3%ECL3620UzBK&>o{*D9G<8IjWhFf{|y0waTZ&-s_f zt@j|VB`tHGQ z8!q!lJp8@!-<*YuU;I63|K)n&oxMFvBp)a$D~AgAFA-zntlPQ%-RQ_AqwZO)}*gqX8t$jL%n|| zx;{<6pajCVfdT#lzY<`5?N(B`Y#Ht#t+bmWaeWL>aa)DSBl2kv#o#2RDJF?^AzyO7 zuV|nQ_>#+0Fk8SbW~QBhMdt9UM8pCSizoz;mkC(}5wsoeTv+t!tVYS{7rz&raP_Rd zezJI&O;r0p>Vu=$;I8v zqtkxd{V4K!{?>Vg!?l|#hsMx7x@*S5_VlYI&E5iU$8AmbL;nry=Tdc<@^)WQ``)I7 z$L@dA(|IJ0t*&oSq?R5U1wcjK5g=c)s28xP8>nG~>Lip4 zUOG>Lh{a(dBs3BNRq+mE@anq!Qi=K^v(B&d18%YtomatJN znAt&lEPM`XgH21tDcn)ckmj<$8sQT>X2w|_aIn+=dqQI*H5q^6nv6ZAtb(U^Vz_%M z;h931rYg+z6oqsB6oQ#L#Y^!#TL>N?%6P!)<^j8h2S|noC8tOO>8*&M9uwMS1DWCIIF1;>+Olkv)u z2E1V=*kZnE)$1$+`^1ex5Og&t0rMs>5N=PjGmI-kr*oB(Jo7qZZnhDI>}GgkBqTNm ztJU*o(B?8%@H$UNV^CFA9@u*&$@f6@Rcyb>(0d{0QC2CCbC+3(AmgYI2tXo-=AyGe z%x2a5cO)@!=bqZnct@+w{$Pr2EveFh*_=Rw#)4UJrVPFwP~>L0P>cYnL}IIw!w(Ap zoFoxV25*9-hPe&1Ll*z19tZ#348K6|-HZsd_fD?)W6<7OT`{w@`sMgw4fa;GuZ6wn z>gxTgpdfbUyVozM)$0?A>)U_1rfEr@FYc7L)p_2Fzra*I{}Z`yOUEjD;|fe8nMF@N z+;wkjtszP(*>rf>n!J(a8I5Z#_1cYtbCzbd)D`1xo-Hpj&b^@!D-v~SKE;d!1J53u?)eu?Lb)0M literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_1.cer b/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_1.cer new file mode 100644 index 0000000000000000000000000000000000000000..521e439356a71e9f4d3c961a699a71a3e39271a2 GIT binary patch literal 1012 zcmXqLV*X&z#B^f;GZP~d6El-lnE@{wr&gOs+jm|@Mpjk^11Cdn15P&PP!={}rqEzR zF#{10hfA2(JvBe1sI<65!80#e&rsSx5+u$nECd&K&&f|p%u#T5G>{YLH8eIbF)%d* zLQ~TyAlJ;$$QX!BEln+>3_MZo5H=8m*umwVpP!zS3bMga)j%0yfec)*B(*3nwM4*a^M3LAGe6{B?Y;%s`RxZT1juU`Fgx7hC=Sf2|8Hfp+?=g% zueTt}>spn2&wle8@vRLX}#GsT|w};n`%#W_`E6QYIW@KPo-1yv} z@ri*vFhFIMStJa^8bl6M&B*BO{Jokrg-5VfV zv9;`LEHyT2jm&(v2kd#0n;BlBO{BF zfr5b?jBmi$CWK-_3djTlaga3%ECL3620UzBK&>o{*D9G<8IjWhFf{|y0waTZ&-s_f zt@j|VB`tHGQ z8!q!lJp8@!-<*YuU;I63|K)n&oxMFvBp)a$D~AgAFA-zntlPQ%-RyYhh_-T4IHvu7Ng4gj-kzDxwganp|3xs^FYjRFavNnVeXXs^C~!l96AO zSyE{rC(dhNWMFD!XkcOh1X1F=h86}EaIS$9s(oSxA`ts{-Ba^Jib{)16g=~i^$evA zBthcL!a{Iy_niEs#2f`@M}sCtC1h_fvNA9?G4eA2#krW87#SIEosmd3`1?g%St_h9 z`o2w$#goGA6%()QS$Mowf^~aVUEz{vM-rB8 zc;E1(Q-gn=>b1AcpVuy%czni5Cka!Lxoc;*P15r}^|9UgpxD%K-GKLn zRWmYrJAbccP2mx&T~(X99nfJ_DhYXeI*4sAAI+GJ;96w?KnRSYz&yu2LMu%guB{L-T2)MEXj)Pnrt%#!?~ zO5{WVOxw(jjSOWEh4TEo#e~`n*fuqCod3Xa{CHtq+Pgz=6OmQZF1=nXBf{aiZTHiO t@0-nD%ZBBjy0xb`dBT(WYCEOVw(M`?ElTD*W)ARMxPHdF#7`~uLID2>L2m#6 literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleInternetAuthorityG2.cer b/TwoNetworking/AFNetworking/Tests/Resources/Google.com/GoogleInternetAuthorityG2.cer new file mode 100644 index 0000000000000000000000000000000000000000..521e439356a71e9f4d3c961a699a71a3e39271a2 GIT binary patch literal 1012 zcmXqLV*X&z#B^f;GZP~d6El-lnE@{wr&gOs+jm|@Mpjk^11Cdn15P&PP!={}rqEzR zF#{10hfA2(JvBe1sI<65!80#e&rsSx5+u$nECd&K&&f|p%u#T5G>{YLH8eIbF)%d* zLQ~TyAlJ;$$QX!BEln+>3_MZo5H=8m*umwVpP!zS3bMga)j%0yfec)*B(*3nwM4*a^M3LAGe6{B?Y;%s`RxZT1juU`Fgx7hC=Sf2|8Hfp+?=g% zueTt}>spn2&wle8@vRLX}#GsT|w};n`%#W_`E6QYIW@KPo-1yv} z@ri*vFhFIMStJa^8bl6M&B*BO{Jokrg-5VfV zv9;`LEHyT2jm&(v2kd#0n;BlBO{BF zfr5b?jBmi$CWK-_3djTlaga3%ECL3620UzBK&>o{*D9G<8IjWhFf{|y0waTZ&-s_f zt@j|VB`tHGQ z8!q!lJp8@!-<*YuU;I63|K)n&oxMFvBp)a$D~AgAFA-zntlPQ%-RQ_AqwZO)}*gqX8t$jL%n|| zx;{<6pajCVfdT#lzY<`5?N(B`Y#Ht#t+bmWaeWL>aa)DSBl2kv#o#2RDJF?^AzyO7 zuV|nQ_>#+0Fk8SbW~QBhMdt9UM8pCSizoz;mkC(}5wsoeTv+t!tVYS{7rz&raP_Rd zezJI&O;r0p>Vu=$;I8v zqtkxd{V4K!{?>Vg!?l|#hsMx7x@*S5_VlYI&E5iU$8AmbL;nry=Tdc<@^)WQ``)I7 z$L@dA(|IJ0t*&oSq?R5U1wcjK5g=c)s28xP8>nG~>Lip4 zUOG>Lh{a(dBs3BNRq+mE@anq!Qi=K^v(B&d18%YtomatJN znAt&lEPM`XgH21tDcn)ckmj<$8sQT>X2w|_aIn+=dqQI*H5q^6nv6ZAtb(U^Vz_%M z;h931rYg+z6oqsB6oQ#L#Y^!#TL>N?%6P!)<^j8h2S|noC8tOO>8*&M9uwMS1DWCIIF1;>+Olkv)u z2E1V=*kZnE)$1$+`^1ex5Og&t0rMs>5N=PjGmI-kr*oB(Jo7qZZnhDI>}GgkBqTNm ztJU*o(B?8%@H$UNV^CFA9@u*&$@f6@Rcyb>(0d{0QC2CCbC+3(AmgYI2tXo-=AyGe z%x2a5cO)@!=bqZnct@+w{$Pr2EveFh*_=Rw#)4UJrVPFwP~>L0P>cYnL}IIw!w(Ap zoFoxV25*9-hPe&1Ll*z19tZ#348K6|-HZsd_fD?)W6<7OT`{w@`sMgw4fa;GuZ6wn z>gxTgpdfbUyVozM)$0?A>)U_1rfEr@FYc7L)p_2Fzra*I{}Z`yOUEjD;|fe8nMF@N z+;wkjtszP(*>rf>n!J(a8I5Z#_1cYtbCzbd)D`1xo-Hpj&b^@!D-v~SKE;d!1J53u?)eu?Lb)0M literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Amazon Root CA 1.cer b/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Amazon Root CA 1.cer new file mode 100644 index 0000000000000000000000000000000000000000..1dfb0e70faadbce1e2af09df6a528e061e25c471 GIT binary patch literal 1174 zcmXqLVwq&n#9Xz2nTe5!NtmsEikFu9+0VZYtXt&%@HGdA42zO&3iHgVpPe@$jfpL&Ho zaeesn?-sFNCAa3xHnr6MwLu|(EvM>2!=`0F*S~R>><_SDzq6>_GUCUst1Ewcq#I0o zH>DyjzjJZm0fV-*g|2D4LS8REJn^T;o&OhK80gmOmK2y??@;+Z??`0c?&5awPeyJU zJDh)QmtA#g%cuD&e7fG>3uEFk|G%2bblRe8U4TXY?ccgd(npWWg*+^OkbZ)HPP_6o zdk2Mjg@z*yK6chBYJDv0a%P=a#mmIZ$iTR`i4hc1x(58fV3ZYRWc<&BXZ91O#*&g90u|rX=N4(1F;5?Iq?kl zS212U(6;DUv?JGR&L_c%%?1^09NKJ*tgP&ej4U|@Sq6GAz5!#KQbtKhft9{~esXbv zUJ)?Kq#Nlaf+M)3sI<65FF8NgzyhwGsZ9r}KDnp_hjM+WDaolt2DTul$+MUlm>3u> zFj%06q&gUl2?wuSxc5gSU+HB1acyiV>Yx!i8X-0}GJzQ4Ld2736RdMc?thCgI?F?%I-GOx39|HQ98@v(?P>yKYAyG*~v&ztG{Jlp*J zk^noGH@~7<)7aBVVeH)eYVp7G2ef%w z4&4YAJ)QpHLdPkqi{iy!<7ZttS|nG;_;H3ovev3kRk}wXF-f&OHL~N|E4byn&E)su z0Rr=!53y-I;LX@~xue@Fwa4qqVLhMOpHNXFj`=MWIzsK1B!CMsZLgbg~x!)fP;-Ky^)8Ji4i%00kZ`#fiW_) zPTFU>yYl?vMkkpkkCTgoErU#-UtIfl-OR2vokIG%pXblI>R0qi!65PH^i5}%sx!H+ zI8|mh!>f7Twr8#nJ~@BmxR?7P@3tYk@CSWE-pRR%=G74&{shjLsKMmVTDJZ22kAr4 z;x44M3i9hU9usKP{HKuM@%ht-7UAGjQ&GX}ra*_#@OX)>8=z2d74|5W+M{AhK;yiKnU=uRl-^%PKFYO(f+(BdtN zPk3w=<(7N&Nb=5+vY-=tx*RJCZstzk?A2YN8@Gjju}{LOhwi526dmZ)Y-dL O|Bx}$wAHt!)B^x+u8a2o literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer b/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer new file mode 100644 index 0000000000000000000000000000000000000000..8ba123fbcfdfae8d3b54c7c39a5365dd71db3038 GIT binary patch literal 1394 zcmXqLV$CyXVhLNo%*4pVB*48o?5qCC?}{f5NB@aF#3JDSa9me#Edwtk1{rjCYoSckK-=Bt7|NEr#rLAUXl5>kg*+IY6u9NrO z6v&rJwqE$aw{&g&%+*VJHb=~uzw)T&>y093+RNPobRr+`C<~mCd{ec_E_9#AX$h0_ zCnvh3pViqijcfm*);QxC7IR*O?TR>e?KtPfDbemlc6VmqlW;HJ$g!t-;gg7Hj~SV& zZCcll_`m(Uu>bRFyVyPI3_?8mu?sI>HlJyfCCtRk$iTR`iK)$?iK)pz9vFhM$}AEF zVhtjZOVZea7F182WV3h*yZW?}=%2P13}itH_*lePM10+^OW(43`ul>R!>Mzo*Ftul zc)!#@6(lXlB4;4egd7V^yjpt5k-`U3#?Q$3pM`~)iFE2sk(&7@mnGoj6cvF&dTBa;CK8(VrK44`;L4eh99Du|HQZq(20S2#34;QG$pDldS=hLMerI94R>{P|#M1bcrSTKP z2Zl0+ciwxqm!3=5_0TC(e)Yq7X^Z*m;x`oCXl6K4-C4Eb?`Z}G#{6wgLeUHiEX)k< z2Chts42=v;6z+YTQ>IP0X0)qmP_dfyDsfo9^hY&*nj!5>|ZN z&~=*qVm^Cg>q5;Sp$T`_b+Zr*20BG3z AJOBUy literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_1.cer b/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_1.cer new file mode 100644 index 0000000000000000000000000000000000000000..93f1fb0c6b5686ff607c1297cd0adbdd08b28f54 GIT binary patch literal 1101 zcmXqLV(~O+Vm4gB%*4pVB+OPnCA_u$#hUVan}Us^_sr}L<2B%A?thCgI?F?%I-GOx39|HQ98@v(?P>yKYAyG*~v&ztG{Jlp*J zk^noGH@~7<)7aBVVeH)eYVp7G2ef%w z4&4YAJ)QpHLdPkqi{iy!<7ZttS|nG;_;H3ovev3kRk}wXF-f&OHL~N|E4byn&E)su z0Rr=!53y-I;LX@~xue@Fwa4qqVLhMOpHNXFj`=MWIzsK1B!CMsZLgbg~x!)fP;-Ky^)8Ji4i%00kZ`#fiW_) zPTFU>yYl?vMkkpkkCTgoErU#-UtIfl-OR2vokIG%pXblI>R0qi!65PH^i5}%sx!H+ zI8|mh!>f7Twr8#nJ~@BmxR?7P@3tYk@CSWE-pRR%=G74&{shjLsKMmVTDJZ22kAr4 z;x44M3i9hU9usKP{HKuM@%ht-7UAGjQ&GX}ra*_#@OX)>8=z2d74|5W+M{AhK;yiKnU=uRl-^%PKFYO(f+(BdtN zPk3w=<(7N&Nb=5+vY-=tx*RJCZstzk?A2YN8@Gjju}{LOhwi526dmZ)Y-dL O|Bx}$wAHt!)B^x+u8a2o literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_2.cer b/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_2.cer new file mode 100644 index 0000000000000000000000000000000000000000..1dfb0e70faadbce1e2af09df6a528e061e25c471 GIT binary patch literal 1174 zcmXqLVwq&n#9Xz2nTe5!NtmsEikFu9+0VZYtXt&%@HGdA42zO&3iHgVpPe@$jfpL&Ho zaeesn?-sFNCAa3xHnr6MwLu|(EvM>2!=`0F*S~R>><_SDzq6>_GUCUst1Ewcq#I0o zH>DyjzjJZm0fV-*g|2D4LS8REJn^T;o&OhK80gmOmK2y??@;+Z??`0c?&5awPeyJU zJDh)QmtA#g%cuD&e7fG>3uEFk|G%2bblRe8U4TXY?ccgd(npWWg*+^OkbZ)HPP_6o zdk2Mjg@z*yK6chBYJDv0a%P=a#mmIZ$iTR`i4hc1x(58fV3ZYRWc<&BXZ91O#*&g90u|rX=N4(1F;5?Iq?kl zS212U(6;DUv?JGR&L_c%%?1^09NKJ*tgP&ej4U|@Sq6GAz5!#KQbtKhft9{~esXbv zUJ)?Kq#Nlaf+M)3sI<65FF8NgzyhwGsZ9r}KDnp_hjM+WDaolt2DTul$+MUlm>3u> zFj%06q&gUl2?wuSxc5gSU+HB1acyiV>Yx!i8X-0}GJzQ4Ld2736RdMcw_D3L6N5MA(J7f|K)0N{Ukwb5eYzHCKm)Z-)bolIh;O^CBy1|pF@brm-wq|5 z7mj4oZa8D&et+k^38}eE=XEA7TlV~3tAuAwn%`op+?8A3ndt4}W!_|WKI zv(GhNbagYDR?vQriOL92MMqM(_))}EJy(# zix`W@oOp)&s~E2vXj^nF+L7xu=ab;XW&?SUv@(l?fmnmc{`l<|&)t=8`w|_x=FWA2 zLwqYco*VeHacHwKva+%>GO{=uI2y>n_y&w^0vRPG1y=g{`Fh30MtY^i`UZ+{S*A8o zsB8sHwn8sCwa7pXWTQNbyn(EN^a9BR;&64vFm*+G$wfKf#3!r3!ezi=z{bWBDyzVN zoG5^q379At8I)xocZHv-eJNh)^HDDJ@0s8{J9qy3$3j1CVljK$ARl}r)90=P*H74Fd{#O_po!_n5B;yg30GLpeQe}7cz1c}bbpDRx%a+Lp2)GQ&Oztx!B@M> z<{7h<%kpy62j7)WS>2@mG4rZ#+`2Cd50@^FaMAr_Q!r!AuFP#y%j@|K<8=NkXt#3D z{7@PHMI>a&)HuNkp#=4F^ADB(R}L%Sm?WBn literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Starfield Services Root Certificate Authority - G2.cer b/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/Starfield Services Root Certificate Authority - G2.cer new file mode 100644 index 0000000000000000000000000000000000000000..75df0cc7c0be230aca9aec4f9d5e958ea3b268ac GIT binary patch literal 1145 zcmXqLVktFfVvb$F%*4pV#L2Ln&&$W8X?wi^FB_*;n@8JsUPeZ4RtAF%Lv903Hs(+k zHesgFU_(^{We|r;SSGk6u_!GwH77+OBsDoBFFz+gJu|gfN5L~MSw_D3L6N5MA(J7f|K)0N{Ukwb5eYzHCKm)Z-)bolIh;O^CBy1|pF@brm-wq|5 z7mj4oZa8D&et+k^38}eE=XEA7TlV~3tAuAwn%`op+?8A3ndt4}W!_|WKI zv(GhNbagYDR?vQriOL92MMqM(_))}EJy(# zix`W@oOp)&s~E2vXj^nF+L7xu=ab;XW&?SUv@(l?fmnmc{`l<|&)t=8`w|_x=FWA2 zLwqYco*VeHacHwKva+%>GO{=uI2y>n_y&w^0vRPG1y=g{`Fh30MtY^i`UZ+{S*A8o zsB8sHwn8sCwa7pXWTQNbyn(EN^a9BR;&64vFm*+G$wfKf#3!r3!ezi=z{bWBDyzVN zoG5^q379At8I)xocZHv-eJNh)^HDDJ@0s8{J9qy3$3j1CVljK$ARl}r)90=P*H74Fd{#O_po!_n5B;yg30GLpeQe}7cz1c}bbpDRx%a+Lp2)GQ&Oztx!B@M> z<{7h<%kpy62j7)WS>2@mG4rZ#+`2Cd50@^FaMAr_Q!r!AuFP#y%j@|K<8=NkXt#3D z{7@PHMI>a&)HuNkp#=4F^ADB(R}L%Sm?WBn literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/httpbinorg_02182021.cer b/TwoNetworking/AFNetworking/Tests/Resources/HTTPBin.org/httpbinorg_02182021.cer new file mode 100644 index 0000000000000000000000000000000000000000..8ba123fbcfdfae8d3b54c7c39a5365dd71db3038 GIT binary patch literal 1394 zcmXqLV$CyXVhLNo%*4pVB*48o?5qCC?}{f5NB@aF#3JDSa9me#Edwtk1{rjCYoSckK-=Bt7|NEr#rLAUXl5>kg*+IY6u9NrO z6v&rJwqE$aw{&g&%+*VJHb=~uzw)T&>y093+RNPobRr+`C<~mCd{ec_E_9#AX$h0_ zCnvh3pViqijcfm*);QxC7IR*O?TR>e?KtPfDbemlc6VmqlW;HJ$g!t-;gg7Hj~SV& zZCcll_`m(Uu>bRFyVyPI3_?8mu?sI>HlJyfCCtRk$iTR`iK)$?iK)pz9vFhM$}AEF zVhtjZOVZea7F182WV3h*yZW?}=%2P13}itH_*lePM10+^OW(43`ul>R!>Mzo*Ftul zc)!#@6(lXlB4;4egd7V^yjpt5k-`U3#?Q$3pM`~)iFE2sk(&7@mnGoj6cvF&dTBa;CK8(VrK44`;L4eh99Du|HQZq(20S2#34;QG$pDldS=hLMerI94R>{P|#M1bcrSTKP z2Zl0+ciwxqm!3=5_0TC(e)Yq7X^Z*m;x`oCXl6K4-C4Eb?`Z}G#{6wgLeUHiEX)k< z2Chts42=v;6z+YTQ>IP0X0)qmP_dfyDsfo9^hY&*nj!5>|ZN z&~=*qVm^Cg>q5;Sp$T`_b+Zr*20BG3z AJOBUy literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/AltName.cer b/TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/AltName.cer new file mode 100644 index 0000000000000000000000000000000000000000..3ba9d33760747d8ec96b035dd0ebe736832cbe31 GIT binary patch literal 766 zcmXqLV)|v!#Q10dGZP~d6CeUxR{z485vdw)TK)uSl9UE%^}`fch26`@xAJ|OL#HgJ-H(be>TqWs=uBRmwfot zUxUJ1qF=J&b3#SSTxWes_3~)A``z$&^RMj{Y0I+tUoo+$IP@HOU3j^I=Z8$)=KyXu zW7DFFUW3B7>dY+rUW(mJwa=^IS(r22ba<$IwC)LX*UwonauWF9_ zp0lbs%26qtaw{FXf>vGQwUSwut#UUj;pdwYwwuxc9skd55({BJqx;e!aGq{UOZ>F8 zB@cyH?bE;beQ%LBzvl&x?CWOzrD5i-p{3KdC@E}ck?OFPUn6m~A#nzaSKwRSqP5CF zZl;`n_r72gx;v9=L56QzyfqUuBLm}NM+18UK47rR@-s62XJKJxVs9`I1MyWsd>#WX zHV$nzMpjmKW<~>1khmZVp8-!3S6Y64Qeu%_a(*syAajEQnUNvuTJJl_*opPiO18aw zq}|5J^z~5Q@CDy8$#;!b{V z@i)_V-`wakI C5GTO^ literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/NoDomains.cer b/TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/NoDomains.cer new file mode 100644 index 0000000000000000000000000000000000000000..6b6cce65b21e82464a994fba6adf62f91033f9de GIT binary patch literal 747 zcmXqLVtQ`S#CU!IGZP~d6Cch)(a~+BasKOyt0xXl z-dT96N^bKTtv!yyUtYc|vAeJ_ru$`f{|imV=L)Pke@<0|d^-0vr1p97^7l7d<}7Eb zx3tlg^jH2+)g=~t|0#oxn#OjYf7~-e3NrL3vN=3YmAP@-y7!A=&>cMqMrP@rt#Nsx z#xuV9vFv*!-y`4mO!rlA26I%J^XbjYmc6nxR*%oW=y>qiYx&LX7gm?1AO4t>9s9I% zoz0;qHNP%6$Fpb(ihen?b~j`5t@*!>@cvn}Z|_Fnpxf~eW?C1Hy!;P7k85tNCYZ+)5@Bsr}mYKV5 z;`11Av2kd#F|x9VA$XW7w0mq(AHyKi2Rrvogz3O0Hs`KvLdZ(Dk6ZQ6~wg7P<$ l&U`IAmc;PtPVPiMXT~|ay+>B>sAE01`uZC?uH~n%0RVpbD^UOd literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/foobar.com.cer b/TwoNetworking/AFNetworking/Tests/Resources/SelfSigned/foobar.com.cer new file mode 100644 index 0000000000000000000000000000000000000000..a9ca08eacdf4a860b3968195a0029ee3f66a5faf GIT binary patch literal 747 zcmXqLVtQ`S#CU!IGZP~d6CYP(-PYdE{;!(t>LUMDyb!A~dNqwpaF*et zY0>(}lc#(re#`Y%(E7L5WM($!{{8Qnm>C%u7i$@481MlDUY4Jc@jnX-GZTA*ff$Id z3gYt^aItY{voW%=vNJOxhbA{TG#MF6uN{rBjGvgG*qHxvscT`w_4S-;cR!bx2`m(n zEm+0f&N{obB4i3Q5p zTN>^1rQ~CBIu?3tNN8m^|2b5C{+h=p^NnPWna(mf5%lPB`-}&gJ9F3t&aRuWeS3-G z-H=B2)n6a3INoG|k!;bn&{sudNlqEhmf6Cc>%TM{dDRPJGh{+Cye z%_Q2-gSgeG|T0nf|@GeD}@W4;@Pv lzx~K+m9W*`cV5*6;|0=u+y2>~Tm5-ef%^1nBfrZ*dH@)(EGYm0 literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Resources/logo.png b/TwoNetworking/AFNetworking/Tests/Resources/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..4fc5a3c9104eed904619d378fa48907c200e52e8 GIT binary patch literal 14795 zcmajGWk6Kj7BD4PB*a&T8DgAlJEkL4qNeg|5*zdNiy2HyE}{X@p*Z9@p=jJ!d-3n_{GG;E^r74@BmNnxcR``&AoYG zZcP8dAP;r3bhUGKw}ZnNE-;!~z&+e0839WFvf$+WU$ii{f5Zd`jL+NLnUA0M(FIHY zc@PZ#zd!2a^xvo5+%=*9KfV7Gv75G!Gn7vg>IV04wFEZKn(1OGXK^`KsJT1bRT~a> z{ErkNws3d2n=Ra#K~77UfgNmaX$QNw!Ep%z28*k}+}zD!mQWRWNk#w%ubrJ0AWuOt z(MQ6H3IZas{QL?6qQas=a*xFxi3!VyJ>nM;`46l-+|t7d3UmJttkr*EMIQYt?1eHo zIRh)pLtX7Wp;n5na3_XKrp4|4ofi3j#rF@a)xXjrtnja}d;l?g7hC&(Z1sO`0s3?C z^}mV>4F0S7P#B=^u7F~kU_L-NtH>|Y+-vBXj;be2^r+}M}RZoL=Xb=NFJ#<5(eOT_*&CFIV|l4R1{?(lbZeONF__Z?b3D8`kGy<$l&H-XCQHn*m=>jZY;Jn=u zadH}bLFXXg;V$TGwHsp$s+VE!8u`zSLd1ZZk}w#frE~|N1VEvWE|MB3&AF@g-|;<` zbm>>DS1viPsCvngKHp+zm|^<(&Lwrh~ z-->5FtGok~kNmsFRZn4i!lr}2gP6SzW=(*JKQzRbOx3uGiD>@3qDbFa_xRrB5`$CG zH^j~ZAO97{puN!SY(DQV8ji@>T4SWZ1d_Fs>=II&i`F*V?;F&YvsG)^cR)ixM|}tX zlBqGa{MYO==mN@0r6f$PLn*HXaQ}kav5(45^!%|?Ex-E(6tO)Bm)!2VeTsj#v8ZcU z0$2CFu?fp*{90d*pVRk&&V-6aeuKuI{+m*Ocwh&#!&0a9hqx91VoZAUy@<=B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;Kz> zpIbY>pEsR$u&gHI^(0F5yN}J|Mf(m2mKqyqFdOIp-j;4J*>UrA;y|k6;AuHk z_4J;R?s<80;pvMP(#%r@!9hELhlh~|9ST2*mh@?Wj2yUbk(B|*X~1=HLU#Gy;=c@l zs_0?{IKR92_#cCdvrXUv$_(K8_rb+$*T4m2(ib29WAOi^9^E ozf4*?Z;p7XVVC>C#FL0ZY!3!+pMp39fXzIgTj0fsklv;Y7A literal 0 HcmV?d00001 diff --git a/TwoNetworking/AFNetworking/Tests/Tests-Prefix.pch b/TwoNetworking/AFNetworking/Tests/Tests-Prefix.pch new file mode 100644 index 0000000..eb2007e --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests-Prefix.pch @@ -0,0 +1,9 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#ifdef __OBJC__ + #import +#endif diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFAutoPurgingImageCacheTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFAutoPurgingImageCacheTests.m new file mode 100644 index 0000000..2e2b83f --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFAutoPurgingImageCacheTests.m @@ -0,0 +1,241 @@ +// AFAutoPurgingImageCacheTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "AFAutoPurgingImageCache.h" + +@interface AFAutoPurgingImageCacheTests : XCTestCase +@property (nonatomic, strong) AFAutoPurgingImageCache *cache; +@property (nonatomic, strong) UIImage *testImage; +@end + +@implementation AFAutoPurgingImageCacheTests + +- (void)setUp { + [super setUp]; + self.cache = [[AFAutoPurgingImageCache alloc] initWithMemoryCapacity:100 * 1024 * 1024 + preferredMemoryCapacity:60 * 1024 * 1024]; + + NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"logo" ofType:@"png"]; + self.testImage = [UIImage imageWithContentsOfFile:path]; + + +} + +- (void)tearDown { + [self.cache removeAllImages]; + self.cache = nil; + self.testImage = nil; + [super tearDown]; +} + +#pragma mark - Cache Return Images + +- (void)testImageIsReturnedFromCacheForIdentifier { + NSString *identifier = @"logo"; + [self.cache addImage:self.testImage withIdentifier:identifier]; + + UIImage *cachedImage = [self.cache imageWithIdentifier:identifier]; + XCTAssertEqual(self.testImage, cachedImage, @"Cached image should equal original image"); +} + +- (void)testImageIsReturnedFromCacheForURLRequest { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:nil]; + + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:nil]; + XCTAssertEqual(self.testImage, cachedImage, @"Cached image should equal original image"); +} + +- (void)testImageIsReturnedFromCacheForURLRequestWithAdditionalIdentifier { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + NSString *additionalIdentifier = @"filter"; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:additionalIdentifier]; + + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:additionalIdentifier]; + XCTAssertEqual(self.testImage, cachedImage, @"Cached image should equal original image"); +} + +- (void)testImageIsNotReturnedWhenAdditionalIdentifierIsNotSet { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + NSString *additionalIdentifier = @"filter"; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:additionalIdentifier]; + + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:nil]; + XCTAssertNil(cachedImage, @"cached image should be nil"); +} + +- (void)testImageIsNotReturnedWhenURLDoesntMatch { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSURLRequest *originalRequest = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:originalRequest withAdditionalIdentifier:nil]; + + NSURL *newURL = [NSURL URLWithString:@"http://test.com/differentImage"]; + NSURLRequest *newRequest = [[NSURLRequest alloc] initWithURL:newURL]; + UIImage *cachedImage = [self.cache imageforRequest:newRequest withAdditionalIdentifier:nil]; + XCTAssertNil(cachedImage, @"cached image should be nil"); +} + +- (void)testDuplicateImageAddedToCacheIsReturned { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:nil]; + + NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"logo" ofType:@"png"]; + UIImage *newImage = [UIImage imageWithContentsOfFile:path]; + + [self.cache addImage:newImage forRequest:request withAdditionalIdentifier:nil]; + + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:nil]; + XCTAssertEqual(cachedImage, newImage); + XCTAssertNotEqual(cachedImage, self.testImage); +} + +#pragma mark - Remove Image Tests + +- (void)testImageIsRemovedWithIdentifier { + NSString *identifier = @"logo"; + [self.cache addImage:self.testImage withIdentifier:identifier]; + XCTAssertTrue([self.cache removeImageWithIdentifier:identifier], @"image should be reported as removed"); + XCTAssertFalse([self.cache removeImageWithIdentifier:identifier], @"image should be reported as removed the second time"); + UIImage *cachedImage = [self.cache imageWithIdentifier:identifier]; + XCTAssertNil(cachedImage, @"cached image should be nil"); +} + +- (void)testImageIsRemovedWithURLRequest { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:nil]; + XCTAssertTrue([self.cache removeImageforRequest:request withAdditionalIdentifier:nil], @"image should be reported as removed"); + XCTAssertFalse([self.cache removeImageforRequest:request withAdditionalIdentifier:nil], @"image should be reported as removed the second time"); + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:nil]; + XCTAssertNil(cachedImage, @"cached image should be nil"); +} + +- (void)testImageIsRemovedWithURLRequestWithAdditionalIdentifier { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSString *identifier = @"filter"; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:identifier]; + XCTAssertTrue([self.cache removeImageforRequest:request withAdditionalIdentifier:identifier], @"image should be reported as removed"); + XCTAssertFalse([self.cache removeImageforRequest:request withAdditionalIdentifier:identifier], @"image should be reported as removed the second time"); + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:identifier]; + XCTAssertNil(cachedImage, @"cached image should be nil"); +} + +- (void)testImageIsNotRemovedWithURLRequestAndNilIdentifier { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSString *identifier = @"filter"; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:identifier]; + XCTAssertFalse([self.cache removeImageforRequest:request withAdditionalIdentifier:nil], @"image should not be reported as removed"); + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:identifier]; + XCTAssertNotNil(cachedImage, @"cached image should be nil"); +} + +- (void)testImageIsNotRemovedWithURLRequestAndIncorrectIdentifier { + NSURL *url = [NSURL URLWithString:@"http://test.com/image"]; + NSString *identifier = @"filter"; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url]; + [self.cache addImage:self.testImage forRequest:request withAdditionalIdentifier:identifier]; + NSString *differentIdentifier = @"nofilter"; + XCTAssertFalse([self.cache removeImageforRequest:request withAdditionalIdentifier:differentIdentifier], @"image should not be reported as removed"); + UIImage *cachedImage = [self.cache imageforRequest:request withAdditionalIdentifier:identifier]; + XCTAssertNotNil(cachedImage, @"cached image should be nil"); +} + +#pragma mark - Memory Usage +- (void)testThatMemoryUsageIncreasesWhenAddingImage { + NSString *identifier = @"logo"; + XCTAssertTrue(self.cache.memoryUsage == 0); + [self.cache addImage:self.testImage withIdentifier:identifier]; + XCTAssertTrue(self.cache.memoryUsage == 1020000); +} + +- (void)testThatMemoryUsageDecreasesWhenRemovingImage { + NSString *identifier = @"logo"; + [self.cache addImage:self.testImage withIdentifier:identifier]; + UInt64 currentUsage = self.cache.memoryUsage; + [self.cache removeImageWithIdentifier:identifier]; + XCTAssertTrue(currentUsage > self.cache.memoryUsage); +} + +#pragma mark - Purging +- (void)testThatImagesArePurgedWhenCapcityIsReached { + UInt64 imageSize = 1020000; + UInt64 numberOfImages = 10; + UInt64 numberOfImagesAfterPurge = 6; + self.cache = [[AFAutoPurgingImageCache alloc] initWithMemoryCapacity:numberOfImages * imageSize preferredMemoryCapacity:numberOfImagesAfterPurge * imageSize]; + NSUInteger index = 1; + while (YES) { + NSString * identifier = [NSString stringWithFormat:@"image-%ld",(long)index]; + [self.cache addImage:self.testImage withIdentifier:identifier]; + if (index <= numberOfImages) { + XCTAssertTrue(self.cache.memoryUsage == index * imageSize); + } else { + XCTAssertTrue(self.cache.memoryUsage == numberOfImagesAfterPurge * imageSize); + break; + } + index++; + } +} + +- (void)testThatPrioritizedImagesWithOldestLastAccessDatesAreRemovedDuringPurge { + UInt64 imageSize = 1020000; + UInt64 numberOfImages = 10; + UInt64 numberOfImagesAfterPurge = 6; + self.cache = [[AFAutoPurgingImageCache alloc] initWithMemoryCapacity:numberOfImages * imageSize preferredMemoryCapacity:numberOfImagesAfterPurge * imageSize]; + for (NSUInteger index = 0; index < numberOfImages; index ++) { + NSString * identifier = [NSString stringWithFormat:@"image-%ld",(long)index]; + [self.cache addImage:self.testImage withIdentifier:identifier]; + } + + NSString *firstIdentifier = [NSString stringWithFormat:@"image-%ld",(long)0]; + UIImage *firstImage = [self.cache imageWithIdentifier:firstIdentifier]; + XCTAssertNotNil(firstImage, @"first image should not be nil"); + UInt64 prePurgeMemoryUsage = self.cache.memoryUsage; + [self.cache addImage:self.testImage withIdentifier:[NSString stringWithFormat:@"image-%ld",(long)10]]; + UInt64 postPurgeMemoryUsage = self.cache.memoryUsage; + XCTAssertTrue(postPurgeMemoryUsage < prePurgeMemoryUsage); + + for (NSUInteger index = 0; index <= numberOfImages; index++) { + NSString * identifier = [NSString stringWithFormat:@"image-%ld",(long)index]; + UIImage *cachedImage = [self.cache imageWithIdentifier:identifier]; + if (index == 0 || index >= 6) { + XCTAssertNotNil(cachedImage, @"Image for %@ should be cached", identifier); + } else { + XCTAssertNil(cachedImage, @"Image for %@ should not be cached", identifier); + } + } +} + +#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 diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFCompoundResponseSerializerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFCompoundResponseSerializerTests.m new file mode 100644 index 0000000..894158f --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFCompoundResponseSerializerTests.m @@ -0,0 +1,94 @@ +// AFURLSessionManagerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "AFTestCase.h" +#import "AFURLResponseSerialization.h" + +@interface AFCompoundResponseSerializerTests : AFTestCase + +@end + +@implementation AFCompoundResponseSerializerTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +#pragma mark - Compound Serializers + +- (void)testCompoundSerializerProperlySerializesResponse { + + AFImageResponseSerializer *imageSerializer = [AFImageResponseSerializer serializer]; + AFJSONResponseSerializer *jsonSerializer = [AFJSONResponseSerializer serializer]; + AFCompoundResponseSerializer *compoundSerializer = [AFCompoundResponseSerializer compoundSerializerWithResponseSerializers:@[imageSerializer, jsonSerializer]]; + + NSData *data = [NSJSONSerialization dataWithJSONObject:@{@"key":@"value"} options:(NSJSONWritingOptions)0 error:nil]; + NSURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:[NSURL URLWithString:@"http://test.com"] + statusCode:200 + HTTPVersion:@"1.1" + headerFields:@{@"Content-Type":@"application/json"}]; + + NSError *error = nil; + id responseObject = [compoundSerializer responseObjectForResponse:response data:data error:&error]; + + XCTAssertTrue([responseObject isKindOfClass:[NSDictionary class]]); + XCTAssertNil(error); +} + +- (void)testCompoundSerializerCanBeCopied { + AFImageResponseSerializer *imageSerializer = [AFImageResponseSerializer serializer]; + AFJSONResponseSerializer *jsonSerializer = [AFJSONResponseSerializer serializer]; + AFCompoundResponseSerializer *compoundSerializer = [AFCompoundResponseSerializer compoundSerializerWithResponseSerializers:@[imageSerializer, jsonSerializer]]; + [compoundSerializer setAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:100]]; + [compoundSerializer setAcceptableContentTypes:[NSSet setWithObject:@"test/type"]]; + + AFCompoundResponseSerializer *copiedSerializer = [compoundSerializer copy]; + XCTAssertNotNil(copiedSerializer); + XCTAssertNotEqual(compoundSerializer, copiedSerializer); + XCTAssertTrue(compoundSerializer.responseSerializers.count == copiedSerializer.responseSerializers.count); + 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); +} + +- (void)testCompoundSerializerCanBeArchivedAndUnarchived { + AFImageResponseSerializer *imageSerializer = [AFImageResponseSerializer serializer]; + AFJSONResponseSerializer *jsonSerializer = [AFJSONResponseSerializer serializer]; + AFCompoundResponseSerializer *compoundSerializer = [AFCompoundResponseSerializer compoundSerializerWithResponseSerializers:@[imageSerializer, jsonSerializer]]; + NSData *data = [self archivedDataWithRootObject:compoundSerializer]; + XCTAssertNotNil(data); + AFCompoundResponseSerializer *unarchivedSerializer = [self unarchivedObjectOfClass:[AFCompoundResponseSerializer class] fromData:data]; + XCTAssertNotNil(unarchivedSerializer); + XCTAssertNotEqual(unarchivedSerializer, compoundSerializer); + XCTAssertTrue(compoundSerializer.responseSerializers.count == compoundSerializer.responseSerializers.count); + XCTAssertTrue([NSStringFromClass([unarchivedSerializer.responseSerializers[0] class]) isEqualToString:NSStringFromClass([AFImageResponseSerializer class])]); + XCTAssertTrue([NSStringFromClass([unarchivedSerializer.responseSerializers[1] class]) isEqualToString:NSStringFromClass([AFJSONResponseSerializer class])]); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFHTTPRequestSerializationTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFHTTPRequestSerializationTests.m new file mode 100644 index 0000000..2d9ef13 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFHTTPRequestSerializationTests.m @@ -0,0 +1,244 @@ +// AFHTTPRequestSerializationTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFURLRequestSerialization.h" + +@interface AFMultipartBodyStream : NSInputStream +@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts; +@end + +@protocol AFMultipartFormDataTest +@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream; + +- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest + stringEncoding:(NSStringEncoding)encoding; +@end + +@interface AFHTTPBodyPart : NSObject +@property (nonatomic, assign) NSStringEncoding stringEncoding; +@property (nonatomic, strong) NSDictionary *headers; +@property (nonatomic, copy) NSString *boundary; +@property (nonatomic, strong) id body; +@property (nonatomic, assign) NSUInteger bodyContentLength; +@property (nonatomic, strong) NSInputStream *inputStream; +@property (nonatomic, assign) BOOL hasInitialBoundary; +@property (nonatomic, assign) BOOL hasFinalBoundary; +@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable; +@property (readonly, nonatomic, assign) NSUInteger contentLength; + +- (NSInteger)read:(uint8_t *)buffer + maxLength:(NSUInteger)length; +@end + +#pragma mark - + +@interface AFHTTPRequestSerializationTests : AFTestCase +@property (nonatomic, strong) AFHTTPRequestSerializer *requestSerializer; +@end + +@implementation AFHTTPRequestSerializationTests + +- (void)setUp { + [super setUp]; + self.requestSerializer = [AFHTTPRequestSerializer serializer]; +} + +#pragma mark - + +- (void)testThatAFHTTPRequestSerializationSerializesPOSTRequestsProperly { + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + request.HTTPMethod = @"POST"; + + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:request withParameters:@{@"key":@"value"} error:nil]; + NSString *contentType = serializedRequest.allHTTPHeaderFields[@"Content-Type"]; + + XCTAssertNotNil(contentType); + XCTAssertEqualObjects(contentType, @"application/x-www-form-urlencoded"); + + XCTAssertNotNil(serializedRequest.HTTPBody); + XCTAssertEqualObjects(serializedRequest.HTTPBody, [@"key=value" dataUsingEncoding:NSUTF8StringEncoding]); +} + +- (void)testThatAFHTTPRequestSerializationSerializesPOSTRequestsProperlyWhenNoParameterIsProvided { + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + request.HTTPMethod = @"POST"; + + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:request withParameters:nil error:nil]; + NSString *contentType = serializedRequest.allHTTPHeaderFields[@"Content-Type"]; + + XCTAssertNotNil(contentType); + XCTAssertEqualObjects(contentType, @"application/x-www-form-urlencoded"); + + XCTAssertNotNil(serializedRequest.HTTPBody); + XCTAssertEqualObjects(serializedRequest.HTTPBody, [NSData data]); +} + +- (void)testThatAFHTTPRequestSerialiationSerializesQueryParametersCorrectly { + NSURLRequest *originalRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:originalRequest withParameters:@{@"key":@"value"} error:nil]; + + XCTAssertTrue([[[serializedRequest URL] query] isEqualToString:@"key=value"], @"Query parameters have not been serialized correctly (%@)", [[serializedRequest URL] query]); +} + +- (void)testThatEmptyDictionaryParametersAreProperlyEncoded { + NSURLRequest *originalRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:originalRequest withParameters:@{} error:nil]; + XCTAssertFalse([serializedRequest.URL.absoluteString hasSuffix:@"?"]); +} + +- (void)testThatAFHTTPRequestSerialiationSerializesURLEncodableQueryParametersCorrectly { + NSURLRequest *originalRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:originalRequest withParameters:@{@"key":@" :#[]@!$&'()*+,;=/?"} error:nil]; + + XCTAssertTrue([[[serializedRequest URL] query] isEqualToString:@"key=%20%3A%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D/?"], @"Query parameters have not been serialized correctly (%@)", [[serializedRequest URL] query]); +} + +- (void)testThatAFHTTPRequestSerialiationSerializesURLEncodedQueryParametersCorrectly { + NSURLRequest *originalRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:originalRequest withParameters:@{@"key":@"%20%21%22%23%24%25%26%27%28%29%2A%2B%2C%2F"} error:nil]; + + XCTAssertTrue([[[serializedRequest URL] query] isEqualToString:@"key=%2520%2521%2522%2523%2524%2525%2526%2527%2528%2529%252A%252B%252C%252F"], @"Query parameters have not been serialized correctly (%@)", [[serializedRequest URL] query]); +} + +- (void)testThatAFHTTPRequestSerialiationSerializesQueryParametersCorrectlyFromQuerySerializationBlock { + [self.requestSerializer setQueryStringSerializationWithBlock:^NSString *(NSURLRequest *request, NSDictionary *parameters, NSError *__autoreleasing *error) { + __block NSMutableString *query = [NSMutableString stringWithString:@""]; + [parameters enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { + [query appendFormat:@"%@**%@",key,obj]; + }]; + + return query; + }]; + + NSURLRequest *originalRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + NSURLRequest *serializedRequest = [self.requestSerializer requestBySerializingRequest:originalRequest withParameters:@{@"key":@"value"} error:nil]; + + XCTAssertTrue([[[serializedRequest URL] query] isEqualToString:@"key**value"], @"Custom Query parameters have not been serialized correctly (%@) by the query string block.", [[serializedRequest URL] query]); +} + +- (void)testThatAFHTTPRequestSerialiationSerializesMIMETypeCorrectly { + NSMutableURLRequest *originalRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com"]]; + Class streamClass = NSClassFromString(@"AFStreamingMultipartFormData"); + id formData = [[streamClass alloc] initWithURLRequest:originalRequest stringEncoding:NSUTF8StringEncoding]; + + NSURL *fileURL = [NSURL fileURLWithPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"ADNNetServerTrustChain/adn_0" ofType:@"cer"]]; + + [formData appendPartWithFileURL:fileURL name:@"test" error:NULL]; + + AFHTTPBodyPart *part = [formData.bodyStream.HTTPBodyParts firstObject]; + + XCTAssertTrue([part.headers[@"Content-Type"] isEqualToString:@"application/x-x509-ca-cert"], @"MIME Type has not been obtained correctly (%@)", part.headers[@"Content-Type"]); +} + +#pragma mark - + +- (void)testThatValueForHTTPHeaderFieldReturnsSetValue { + [self.requestSerializer setValue:@"Actual Value" forHTTPHeaderField:@"Set-Header"]; + NSString *value = [self.requestSerializer valueForHTTPHeaderField:@"Set-Header"]; + XCTAssertTrue([value isEqualToString:@"Actual Value"]); +} + +- (void)testThatValueForHTTPHeaderFieldReturnsNilForUnsetHeader { + NSString *value = [self.requestSerializer valueForHTTPHeaderField:@"Unset-Header"]; + XCTAssertNil(value); +} + +- (void)testQueryStringSerializationCanFailWithError { + AFHTTPRequestSerializer *serializer = [AFHTTPRequestSerializer serializer]; + + NSError *serializerError = [NSError errorWithDomain:@"TestDomain" code:0 userInfo:nil]; + + [serializer setQueryStringSerializationWithBlock:^NSString *(NSURLRequest *request, NSDictionary *parameters, NSError *__autoreleasing *error) { + if (error != NULL) { + *error = serializerError; + } + return nil; + }]; + + NSError *error; + NSURLRequest *request = [serializer requestWithMethod:@"GET" URLString:@"url" parameters:@{} error:&error]; + XCTAssertNil(request); + XCTAssertEqual(error, serializerError); +} + +- (void)testThatHTTPHeaderValueCanBeRemoved { + AFHTTPRequestSerializer *serializer = [AFHTTPRequestSerializer serializer]; + NSString *headerField = @"TestHeader"; + NSString *headerValue = @"test"; + [serializer setValue:headerValue forHTTPHeaderField:headerField]; + XCTAssertTrue([serializer.HTTPRequestHeaders[headerField] isEqualToString:headerValue]); + [serializer setValue:nil forHTTPHeaderField:headerField]; + XCTAssertFalse([serializer.HTTPRequestHeaders.allKeys containsObject:headerField]); +} + +- (void)testThatHTTPHeaderValueCanBeSetToReferenceCountedStringFromMultipleThreadsWithoutCrashing { + @autoreleasepool { + int dispatchTarget = 1000; + __block int completionCount = 0; + for(int i=0; i _Nonnull formData) { + [formData appendPartWithFileData:[payload dataUsingEncoding:NSUTF8StringEncoding] name:@"AFNetworking" fileName:@"AFNetworking" mimeType:@"text/html"]; + } + progress:^(NSProgress * _Nonnull uploadProgress) { + if (uploadProgress.fractionCompleted == 1.0) { + [expectation fulfill]; + } + } + success:nil + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +# pragma mark - HTTP Status Codes + +- (void)testThatSuccessBlockIsCalledFor200 { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"status/200" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatFailureBlockIsCalledFor404 { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"status/404" + parameters:nil + headers:nil + progress:nil + success:nil + failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nullable error) { + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatResponseObjectIsEmptyFor204 { + __block id urlResponseObject = nil; + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"status/204" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + urlResponseObject = responseObject; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertNil(urlResponseObject); +} + +#pragma mark - Rest Interface + +- (void)testGET { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"get" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTAssertNotNil(responseObject); + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testHEAD { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + HEAD:@"get" + parameters:nil + headers:nil + success:^(NSURLSessionDataTask * _Nonnull task) { + XCTAssertNotNil(task); + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testPOST { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager.requestSerializer setValue:@"default value" + forHTTPHeaderField:@"field"]; + [self.sessionManager + POST:@"post" + parameters:@{@"key":@"value"} + headers:@{@"field":@"value"} + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]); + XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]); + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testPOSTWithConstructingBody { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager.requestSerializer setValue:@"default value" + forHTTPHeaderField:@"field"]; + [self.sessionManager + POST:@"post" + parameters:@{@"key":@"value"} + headers:@{@"field":@"value"} + constructingBodyWithBlock:^(id _Nonnull formData) { + [formData appendPartWithFileData:[@"Data" dataUsingEncoding:NSUTF8StringEncoding] + name:@"DataName" + fileName:@"DataFileName" + mimeType:@"data"]; + } + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]); + XCTAssertTrue([responseObject[@"files"][@"DataName"] isEqualToString:@"Data"]); + XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]); + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testPUT { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager.requestSerializer setValue:@"default value" + forHTTPHeaderField:@"field"]; + [self.sessionManager + PUT:@"put" + parameters:@{@"key":@"value"} + headers:@{@"field":@"value"} + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]); + XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]); + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testDELETE { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager.requestSerializer setValue:@"default value" + forHTTPHeaderField:@"field"]; + [self.sessionManager + DELETE:@"delete" + parameters:@{@"key":@"value"} + headers:@{@"field":@"value"} + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]); + XCTAssertTrue([responseObject[@"args"][@"key"] isEqualToString:@"value"]); + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testPATCH { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager.requestSerializer setValue:@"default value" + forHTTPHeaderField:@"field"]; + [self.sessionManager + PATCH:@"patch" + parameters:@{@"key":@"value"} + headers:@{@"field":@"value"} + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTAssertTrue([task.originalRequest.allHTTPHeaderFields[@"field"] isEqualToString:@"value"]); + XCTAssertTrue([responseObject[@"form"][@"key"] isEqualToString:@"value"]); + [expectation fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; +} + +#pragma mark - Auth + +- (void)testHiddenBasicAuthentication { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Request should finish"]; + [self.sessionManager.requestSerializer setAuthorizationHeaderFieldWithUsername:@"user" password:@"password"]; + [self.sessionManager + GET:@"hidden-basic-auth/user/password" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + [expectation fulfill]; + } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + XCTFail(@"Request should succeed"); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; +} + +# pragma mark - Security Policy + +- (void)testValidSecureNoPinningSecurityPolicy { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://example.com"]]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; + XCTAssertNoThrow(manager.securityPolicy = securityPolicy); +} + +- (void)testValidInsecureNoPinningSecurityPolicy { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://example.com"]]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; + XCTAssertNoThrow(manager.securityPolicy = securityPolicy); +} + +- (void)testValidCertificatePinningSecurityPolicy { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://example.com"]]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + XCTAssertNoThrow(manager.securityPolicy = securityPolicy); +} + +- (void)testInvalidCertificatePinningSecurityPolicy { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://example.com"]]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + XCTAssertThrowsSpecificNamed(manager.securityPolicy = securityPolicy, NSException, @"Invalid Security Policy"); +} + +- (void)testValidPublicKeyPinningSecurityPolicy { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://example.com"]]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + XCTAssertNoThrow(manager.securityPolicy = securityPolicy); +} + +- (void)testInvalidPublicKeyPinningSecurityPolicy { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://example.com"]]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + XCTAssertThrowsSpecificNamed(manager.securityPolicy = securityPolicy, NSException, @"Invalid Security Policy"); +} + +- (void)testInvalidCertificatePinningSecurityPolicyWithoutBaseURL { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] init]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + XCTAssertThrowsSpecificNamed(manager.securityPolicy = securityPolicy, NSException, @"Invalid Security Policy"); +} + +- (void)testInvalidPublicKeyPinningSecurityPolicyWithoutBaseURL { + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] init]; + AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + XCTAssertThrowsSpecificNamed(manager.securityPolicy = securityPolicy, NSException, @"Invalid Security Policy"); +} + +# pragma mark - Server Trust + +- (void)testInvalidServerTrustProducesCorrectErrorForCertificatePinning { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Request should fail with untrusted certificate error"]; + NSURL *googleCertificateURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"google.com" withExtension:@"cer"]; + NSData *googleCertificateData = [NSData dataWithContentsOfURL:googleCertificateURL]; + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://apple.com/"]]; + [manager setResponseSerializer:[AFHTTPResponseSerializer serializer]]; + manager.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate withPinnedCertificates:[NSSet setWithObject:googleCertificateData]]; + [manager + GET:@"" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTFail(@"Request should fail"); + [expectation fulfill]; + } + failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + XCTAssertEqualObjects(error.domain, NSURLErrorDomain); + XCTAssertEqual(error.code, NSURLErrorServerCertificateUntrusted); + XCTAssertEqualObjects(error.localizedDescription, @"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “apple.com” which could put your confidential information at risk."); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; +} + +- (void)testInvalidServerTrustProducesCorrectErrorForPublicKeyPinning { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Request should fail with untrusted certificate error"]; + NSURL *googleCertificateURL = [[NSBundle bundleForClass:[self class]] URLForResource:@"google.com" withExtension:@"cer"]; + NSData *googleCertificateData = [NSData dataWithContentsOfURL:googleCertificateURL]; + AFHTTPSessionManager *manager = [[AFHTTPSessionManager alloc] initWithBaseURL:[NSURL URLWithString:@"https://apple.com/"]]; + [manager setResponseSerializer:[AFHTTPResponseSerializer serializer]]; + manager.securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey withPinnedCertificates:[NSSet setWithObject:googleCertificateData]]; + [manager + GET:@"" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + XCTFail(@"Request should fail"); + [expectation fulfill]; + } + failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + XCTAssertEqualObjects(error.domain, NSURLErrorDomain); + XCTAssertEqual(error.code, NSURLErrorServerCertificateUntrusted); + XCTAssertEqualObjects(error.localizedDescription, @"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “apple.com” which could put your confidential information at risk."); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; + [manager invalidateSessionCancelingTasks:YES resetSession:NO]; +} + +# pragma mark - Custom Authentication Challenge Handler + +- (void)testAuthenticationChallengeHandlerCredentialResult { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Request succeed with provided credentials"]; + self.sessionManager.responseSerializer = [AFHTTPResponseSerializer serializer]; + [self.sessionManager setAuthenticationChallengeHandler:^id _Nonnull(NSURLSession * _Nonnull session, NSURLSessionTask * _Nonnull task, NSURLAuthenticationChallenge * _Nonnull challenge, void (^ _Nonnull completionHandler)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable)) { + if ([challenge.protectionSpace.realm isEqualToString:@"Fake Realm"]) { + return [NSURLCredential credentialWithUser:@"user" password:@"passwd" persistence:NSURLCredentialPersistenceNone]; + } + return @(NSURLSessionAuthChallengePerformDefaultHandling); + }]; + [self.sessionManager + GET:@"basic-auth/user/passwd" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + [expectation fulfill]; + } + failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + XCTFail(@"Request should succeed"); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeoutUsingHandler:nil]; +} + +- (void)testThatServerTrustErrorIsCreatedWithProperUserInfoWithAllParameters { + NSURL *url = [NSURL URLWithString:@"https://httpbin.org/get"]; + SecTrustRef trust = AFUTTrustChainForCertsInDirectory([[[NSBundle bundleForClass:[self class]] resourcePath] + stringByAppendingPathComponent:@"HTTPBinOrgServerTrustChain"]); + NSError *error = [self.sessionManager serverTrustErrorForServerTrust:trust url:url]; + + XCTAssertNotNil(error); + XCTAssertNotNil(error.userInfo[NSURLErrorFailingURLPeerTrustErrorKey]); + XCTAssertEqual(error.userInfo[NSURLErrorFailingURLErrorKey], url); + XCTAssertEqual(error.userInfo[NSURLErrorFailingURLStringErrorKey], url.absoluteString); +} + +- (void)testThatServerTrustErrorIsCreatedWithProperUserInfoWhenTrustIsNil { + NSURL *url = [NSURL URLWithString:@"https://httpbin.org/get"]; + NSError *error = [self.sessionManager serverTrustErrorForServerTrust:nil url:url]; + + XCTAssertNotNil(error); + XCTAssertNil(error.userInfo[NSURLErrorFailingURLPeerTrustErrorKey]); + XCTAssertEqual(error.userInfo[NSURLErrorFailingURLErrorKey], url); + XCTAssertEqual(error.userInfo[NSURLErrorFailingURLStringErrorKey], url.absoluteString); +} + +- (void)testThatServerTrustErrorIsCreatedWithProperUserInfoWhenURLIsNil { + SecTrustRef trust = AFUTTrustChainForCertsInDirectory([[[NSBundle bundleForClass:[self class]] resourcePath] + stringByAppendingPathComponent:@"HTTPBinOrgServerTrustChain"]); + NSError *error = [self.sessionManager serverTrustErrorForServerTrust:trust url:nil]; + + XCTAssertNotNil(error); + XCTAssertNotNil(error.userInfo[NSURLErrorFailingURLPeerTrustErrorKey]); + XCTAssertNil(error.userInfo[NSURLErrorFailingURLErrorKey]); + XCTAssertNil(error.userInfo[NSURLErrorFailingURLStringErrorKey]); +} + +- (void)testThatServerTrustErrorIsCreatedWithProperUserInfoAllParametersAreNil { + NSError *error = [self.sessionManager serverTrustErrorForServerTrust:nil url:nil]; + + XCTAssertNotNil(error); + XCTAssertNil(error.userInfo[NSURLErrorFailingURLPeerTrustErrorKey]); + XCTAssertNil(error.userInfo[NSURLErrorFailingURLErrorKey]); + XCTAssertNil(error.userInfo[NSURLErrorFailingURLStringErrorKey]); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFImageDownloaderTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFImageDownloaderTests.m new file mode 100644 index 0000000..7eee82e --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFImageDownloaderTests.m @@ -0,0 +1,600 @@ +// AFImageDownloaderTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" +#import "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; +@property (nonatomic, strong) AFImageDownloader *downloader; +@end + +@implementation AFImageDownloaderTests + +- (void)setUp { + [super setUp]; + self.downloader = [[AFImageDownloader alloc] init]; + [[AFImageDownloader defaultURLCache] removeAllCachedResponses]; + [[[AFImageDownloader defaultInstance] imageCache] removeAllImages]; + self.pngRequest = [NSURLRequest requestWithURL:self.pngURL]; + self.jpegRequest = [NSURLRequest requestWithURL:self.jpegURL]; +} + +- (void)tearDown { + [self.downloader.sessionManager invalidateSessionCancelingTasks:YES resetSession:NO]; + self.downloader = nil; + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; + self.pngRequest = nil; +} + +#pragma mark - Image Download + +- (void)testThatImageDownloaderSingletonCanBeInitialized { + AFImageDownloader *downloader = [AFImageDownloader defaultInstance]; + XCTAssertNotNil(downloader, @"Downloader should not be nil"); +} + +- (void)testThatImageDownloaderCanBeInitializedAndDeinitializedWithActiveDownloads { + [self.downloader downloadImageForURLRequest:self.pngRequest + success:nil + failure:nil]; + self.downloader = nil; + XCTAssertNil(self.downloader, @"Downloader should be nil"); +} + +- (void)testThatImageDownloaderReturnsNilWithInvalidURL +{ + NSMutableURLRequest *mutableURLRequest = [NSMutableURLRequest requestWithURL:self.pngURL]; + [mutableURLRequest setURL:nil]; + /** NSURLRequest nor NSMutableURLRequest can be initialized with a nil URL, + * but NSMutableURLRequest can have its URL set to nil + **/ + NSURLRequest *invalidRequest = [mutableURLRequest copy]; + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should fail"]; + AFImageDownloadReceipt *downloadReceipt = [self.downloader + downloadImageForURLRequest:invalidRequest + success:nil + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + XCTAssertNotNil(error); + XCTAssertTrue([error.domain isEqualToString:NSURLErrorDomain]); + XCTAssertTrue(error.code == NSURLErrorBadURL); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertNil(downloadReceipt, @"downloadReceipt should be nil"); +} + +- (void)testThatImageDownloaderCanDownloadImage { + XCTestExpectation *expectation = [self expectationWithDescription:@"image download should succeed"]; + + __block NSHTTPURLResponse *urlResponse = nil; + __block UIImage *responseImage = nil; + + [self.downloader + downloadImageForURLRequest:self.pngRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + urlResponse = response; + responseImage = responseObject; + [expectation fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; + + XCTAssertNotNil(urlResponse, @"HTTPURLResponse should not be nil"); + XCTAssertNotNil(responseImage, @"Response image should not be nil"); +} + +- (void)testThatItCanDownloadMultipleImagesSimultaneously { + 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]; + + XCTestExpectation *expectation2 = [self expectationWithDescription:@"image 2 download should succeed"]; + __block NSHTTPURLResponse *urlResponse2 = nil; + __block UIImage *responseImage2 = nil; + + [self.downloader + downloadImageForURLRequest:self.jpegRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + urlResponse2 = response; + responseImage2 = responseObject; + [expectation2 fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; + + XCTAssertNotNil(urlResponse1, @"HTTPURLResponse should not be nil"); + XCTAssertNotNil(responseImage1, @"Respone image should not be nil"); + + XCTAssertNotNil(urlResponse2, @"HTTPURLResponse should not be nil"); + XCTAssertNotNil(responseImage2, @"Respone image should not be nil"); +} + +- (void)testThatSimultaneouslyRequestsForTheSameAssetReceiveSameResponse { + 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]; + + 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]; + + XCTAssertEqual(urlResponse1, urlResponse2, @"responses should be equal"); + XCTAssertEqual(responseImage2, responseImage2, @"responses should be equal"); +} + +- (void)testThatImageBehindRedirectCanBeDownloaded { + XCTestExpectation *expectation = [self expectationWithDescription:@"image download should succeed"]; + NSURL *redirectURL = [self.jpegRequest URL]; + NSURLRequest *downloadRequest = [NSURLRequest requestWithURL:redirectURL]; + + __block NSHTTPURLResponse *urlResponse = nil; + __block UIImage *responseImage = nil; + + [self.downloader + downloadImageForURLRequest:downloadRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + urlResponse = response; + responseImage = responseObject; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertNotNil(urlResponse); + XCTAssertNotNil(responseImage); + +} + +#pragma mark - Caching +- (void)testThatResponseIsNilWhenReturnedFromCache { + 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)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; + receipt1 = [self.downloader + downloadImageForURLRequest:self.pngRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + [expectation1 fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; + + XCTestExpectation *expectation2 = [self expectationWithDescription:@"image 2 download should succeed"]; + + AFImageDownloadReceipt *receipt2; + receipt2 = [self.downloader + downloadImageForURLRequest:self.pngRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + [expectation2 fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; + + XCTAssertNotNil(receipt1); + XCTAssertNil(receipt2); +} + +- (void)testThatCacheIsIgnoredIfCacheIgnoredInRequest { + XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"]; + + __block NSHTTPURLResponse *urlResponse1 = nil; + __block UIImage *responseImage1 = nil; + AFImageDownloadReceipt *receipt1; + receipt1 = [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"]; + NSMutableURLRequest *alteredRequest = [self.pngRequest mutableCopy]; + alteredRequest.cachePolicy = NSURLRequestReloadIgnoringLocalCacheData; + + AFImageDownloadReceipt *receipt2; + __block NSHTTPURLResponse *urlResponse2 = nil; + __block UIImage *responseImage2 = nil; + receipt2 = [self.downloader + downloadImageForURLRequest:alteredRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + urlResponse2 = response; + responseImage2 = responseObject; + [expectation2 fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; + + XCTAssertNotNil(receipt1); + XCTAssertNotNil(receipt2); + XCTAssertNotEqual(receipt1, receipt2); + + XCTAssertNotNil(urlResponse1); + XCTAssertNotNil(responseImage1); + + XCTAssertNotNil(urlResponse2); + XCTAssertNotNil(responseImage2); + + XCTAssertNotEqual(responseImage1, responseImage2); +} + +#pragma mark - Cancellation + +- (void)testThatCancellingDownloadCallsCompletionWithCancellationError { + AFImageDownloadReceipt *receipt; + XCTestExpectation *expectation = [self expectationWithDescription:@"image download should fail"]; + __block NSError *responseError = nil; + receipt = [self.downloader + downloadImageForURLRequest:self.pngRequest + success:nil + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + responseError = error; + [expectation fulfill]; + }]; + [self.downloader cancelTaskForImageDownloadReceipt:receipt]; + [self waitForExpectationsWithCommonTimeout]; + + XCTAssertTrue(responseError.code == NSURLErrorCancelled); + XCTAssertTrue([responseError.domain isEqualToString:NSURLErrorDomain]); +} + +- (void)testThatCancellingDownloadWithMultipleResponseHandlersCancelsFirstYetAllowsSecondToComplete { + XCTestExpectation *expectation1 = [self expectationWithDescription:@"image 1 download should succeed"]; + __block NSHTTPURLResponse *urlResponse = nil; + __block UIImage *responseImage = nil; + + [self.downloader + downloadImageForURLRequest:self.pngRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + urlResponse = response; + responseImage = responseObject; + [expectation1 fulfill]; + } + failure:nil]; + + XCTestExpectation *expectation2 = [self expectationWithDescription:@"image 2 download should fail"]; + __block NSError *responseError = nil; + AFImageDownloadReceipt *receipt; + receipt = [self.downloader + downloadImageForURLRequest:self.pngRequest + success:nil + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + responseError = error; + [expectation2 fulfill]; + }]; + [self.downloader cancelTaskForImageDownloadReceipt:receipt]; + [self waitForExpectationsWithCommonTimeout]; + + XCTAssertTrue(responseError.code == NSURLErrorCancelled); + XCTAssertTrue([responseError.domain isEqualToString:NSURLErrorDomain]); + XCTAssertNotNil(urlResponse); + XCTAssertNotNil(responseImage); +} + +- (void)testThatItCanDownloadAndCancelAndDownloadAgain { + NSArray *imageURLStrings = @[ + @"https://secure.gravatar.com/avatar/5a105e8b9d40e1329780d62ea2265d8a?d=identicon", + @"https://secure.gravatar.com/avatar/6a105e8b9d40e1329780d62ea2265d8a?d=identicon", + @"https://secure.gravatar.com/avatar/7a105e8b9d40e1329780d62ea2265d8a?d=identicon", + @"https://secure.gravatar.com/avatar/8a105e8b9d40e1329780d62ea2265d8a?d=identicon", + @"https://secure.gravatar.com/avatar/9a105e8b9d40e1329780d62ea2265d8a?d=identicon" + ]; + + for (NSString *imageURLString in imageURLStrings) { + XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"Request %@ should be cancelled", imageURLString]]; + AFImageDownloadReceipt *receipt = [self.downloader + downloadImageForURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:imageURLString]] + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + XCTFail(@"Request %@ succeeded when it should have failed", request); + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + XCTAssertTrue([error.domain isEqualToString:NSURLErrorDomain]); + XCTAssertTrue([error code] == NSURLErrorCancelled); + [expectation fulfill]; + }]; + [self.downloader cancelTaskForImageDownloadReceipt:receipt]; + } + + for (NSString *imageURLString in imageURLStrings) { + XCTestExpectation *expectation = [self expectationWithDescription:[NSString stringWithFormat:@"Request %@ should succeed", imageURLString]]; + [self.downloader + downloadImageForURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:imageURLString]] + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + [expectation fulfill]; + } failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + XCTFail(@"Request %@ failed with error %@", request, error); + }]; + } + + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatCancelImageDownloadItShouldCancelImmediately { + [self.downloader.imageCache removeAllImages]; + + NSString *imageURLString = @"https://secure.gravatar.com/avatar/5a105e8b9d40e1329780d62ea2265d8a?d=identicon"; + AFImageDownloadReceipt *receipt = [self.downloader + downloadImageForURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:imageURLString]] + success:nil + failure:nil]; + [self.downloader cancelTaskForImageDownloadReceipt:receipt]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"Image download should be cancelled immediately"]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + UIImage *cacheImage = [self.downloader.imageCache imageWithIdentifier:imageURLString]; + XCTAssertNil(cacheImage); + [expectation fulfill]; + }); + + [self waitForExpectationsWithCommonTimeout]; +} + + +#pragma mark - Threading +- (void)testThatItAlwaysCallsTheSuccessHandlerOnTheMainQueue { + XCTestExpectation *expectation = [self expectationWithDescription:@"image download should succeed"]; + __block BOOL successIsOnMainThread = false; + [self.downloader + downloadImageForURLRequest:self.pngRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + successIsOnMainThread = [[NSThread currentThread] isMainThread]; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertTrue(successIsOnMainThread); +} + +- (void)testThatItAlwaysCallsTheFailureHandlerOnTheMainQueue { + NSURLRequest *notFoundRequest = [NSURLRequest requestWithURL:[self URLWithStatusCode:404]]; + XCTestExpectation *expectation = [self expectationWithDescription:@"image download should fail"]; + __block BOOL failureIsOnMainThread = false; + [self.downloader + downloadImageForURLRequest:notFoundRequest + success:nil + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + failureIsOnMainThread = [[NSThread currentThread] isMainThread]; + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertTrue(failureIsOnMainThread); +} + +#pragma mark - misc + +- (void)testThatReceiptIDMatchesReturnedID { + NSUUID *receiptId = [NSUUID UUID]; + AFImageDownloadReceipt *receipt = [self.downloader + downloadImageForURLRequest:self.jpegRequest + withReceiptID:receiptId + success:nil + failure:nil]; + XCTAssertEqual(receiptId, receipt.receiptID); + [self.downloader cancelTaskForImageDownloadReceipt:receipt]; +} + +@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 diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFImageResponseSerializerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFImageResponseSerializerTests.m new file mode 100644 index 0000000..c65587c --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFImageResponseSerializerTests.m @@ -0,0 +1,98 @@ +// AFImageResponseSerializerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "AFTestCase.h" +#import "AFURLResponseSerialization.h" + +@interface AFImageResponseSerializerTests : AFTestCase + +@end + +@implementation AFImageResponseSerializerTests + +#pragma mark NSCopying + +- (void)testImageSerializerCanBeCopied { + AFImageResponseSerializer *responseSerializer = [AFImageResponseSerializer serializer]; + [responseSerializer setAcceptableContentTypes:[NSSet setWithObject:@"test/type"]]; + [responseSerializer setAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:100]]; + + AFImageResponseSerializer *copiedSerializer = [responseSerializer copy]; + XCTAssertNotNil(copiedSerializer); + XCTAssertNotEqual(copiedSerializer, responseSerializer); + XCTAssertEqual(copiedSerializer.acceptableContentTypes, responseSerializer.acceptableContentTypes); + XCTAssertEqual(copiedSerializer.acceptableStatusCodes, responseSerializer.acceptableStatusCodes); +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + XCTAssertTrue(copiedSerializer.automaticallyInflatesResponseImage == responseSerializer.automaticallyInflatesResponseImage); + XCTAssertTrue(fabs(copiedSerializer.imageScale - responseSerializer.imageScale) <= 0.001); +#endif + +} + +#pragma mark NSSecureCoding + +- (void)testImageSerializerSupportsSecureCoding { + XCTAssertTrue([AFImageResponseSerializer supportsSecureCoding]); +} + +- (void)testImageSerializerCanBeArchivedAndUnarchived { + AFImageResponseSerializer *responseSerializer = [AFImageResponseSerializer serializer]; + NSData *archive = nil; + + archive = [self archivedDataWithRootObject:responseSerializer]; + XCTAssertNotNil(archive); + AFImageResponseSerializer *unarchivedSerializer = [self unarchivedObjectOfClass:[AFImageResponseSerializer class] fromData:archive]; + XCTAssertNotNil(unarchivedSerializer); + XCTAssertNotEqual(unarchivedSerializer, responseSerializer); + XCTAssertTrue([unarchivedSerializer.acceptableContentTypes isEqualToSet:responseSerializer.acceptableContentTypes]); + XCTAssertTrue([unarchivedSerializer.acceptableStatusCodes isEqualToIndexSet:responseSerializer.acceptableStatusCodes]); + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + XCTAssertTrue(unarchivedSerializer.automaticallyInflatesResponseImage == responseSerializer.automaticallyInflatesResponseImage); + XCTAssertTrue(fabs(unarchivedSerializer.imageScale - responseSerializer.imageScale) <= 0.001); +#endif + +} + +- (void)testImageSerializerCanBeArchivedAndUnarchivedWithNonDefaultPropertyValues { + AFImageResponseSerializer *responseSerializer = [AFImageResponseSerializer serializer]; + NSData *archive = nil; + + // Customize the default property values +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + responseSerializer.automaticallyInflatesResponseImage = !responseSerializer.automaticallyInflatesResponseImage; + responseSerializer.imageScale = responseSerializer.imageScale * 2.0f; +#endif + + archive = [self archivedDataWithRootObject:responseSerializer]; + XCTAssertNotNil(archive); + AFImageResponseSerializer *unarchivedSerializer = [self unarchivedObjectOfClass:[AFImageResponseSerializer class] fromData:archive]; + XCTAssertNotNil(unarchivedSerializer); + XCTAssertNotEqual(unarchivedSerializer, responseSerializer); + +#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH + XCTAssertTrue(unarchivedSerializer.automaticallyInflatesResponseImage == responseSerializer.automaticallyInflatesResponseImage); + XCTAssertTrue(fabs(unarchivedSerializer.imageScale - responseSerializer.imageScale) <= 0.001); +#endif +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFJSONSerializationTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFJSONSerializationTests.m new file mode 100644 index 0000000..e17b193 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFJSONSerializationTests.m @@ -0,0 +1,228 @@ +// AFJSONSerializationTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" + +static NSData * AFJSONTestData() { + return [NSJSONSerialization dataWithJSONObject:@{@"foo": @"bar"} options:(NSJSONWritingOptions)0 error:nil]; +} + +#pragma mark - + +@interface AFJSONRequestSerializationTests : AFTestCase +@property (nonatomic, strong) AFJSONRequestSerializer *requestSerializer; +@end + +@implementation AFJSONRequestSerializationTests + +- (void)setUp { + self.requestSerializer = [[AFJSONRequestSerializer alloc] init]; +} + +#pragma mark - + +- (void)testThatJSONRequestSerializationHandlesParametersDictionary { + NSDictionary *parameters = @{@"key":@"value"}; + NSError *error = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:self.baseURL.absoluteString parameters:parameters error:&error]; + + XCTAssertNil(error, @"Serialization error should be nil"); + + NSString *body = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; + + XCTAssertTrue([@"{\"key\":\"value\"}" isEqualToString:body], @"Parameters were not encoded correctly"); +} + +- (void)testThatJSONRequestSerializationHandlesParametersArray { + NSArray *parameters = @[@{@"key":@"value"}]; + NSError *error = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:self.baseURL.absoluteString parameters:parameters error:&error]; + + XCTAssertNil(error, @"Serialization error should be nil"); + + NSString *body = [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]; + + XCTAssertTrue([@"[{\"key\":\"value\"}]" isEqualToString:body], @"Parameters were not encoded correctly"); +} + +- (void)testThatJSONRequestSerializationHandlesInvalidParameters { + NSString *string = [[NSString alloc] initWithBytes:"\xd8\x00" length:2 encoding:NSUTF16StringEncoding]; + + NSDictionary *parameters = @{@"key":string}; + NSError *error = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:self.baseURL.absoluteString parameters:parameters error:&error]; + + XCTAssertNil(request, @"Expected nil request."); + XCTAssertNotNil(error, @"Expected non-nil error."); +} + +- (void)testThatJSONRequestSerializationErrorsWithInvalidJSON { + NSDictionary *parameters = @{@"key":[NSSet setWithObject:@"value"]}; + NSError *error = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:self.baseURL.absoluteString parameters:parameters error:&error]; + + XCTAssertNil(request, @"Request should be nil"); + XCTAssertNotNil(error, @"Serialization error should be not nil"); + XCTAssertEqualObjects(error.domain, AFURLRequestSerializationErrorDomain); + XCTAssertEqual(error.code, NSURLErrorCannotDecodeContentData); + XCTAssertEqualObjects(error.localizedFailureReason, @"The `parameters` argument is not valid JSON."); +} + +@end + +#pragma mark - + +@interface AFJSONResponseSerializationTests : AFTestCase +@property (nonatomic, strong) AFJSONResponseSerializer *responseSerializer; +@end + +@implementation AFJSONResponseSerializationTests + +- (void)setUp { + [super setUp]; + self.responseSerializer = [AFJSONResponseSerializer serializer]; +} + +#pragma mark - + +- (void)testThatJSONResponseSerializerAcceptsApplicationJSONMimeType { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/json"}]; + + NSError *error = nil; + [self.responseSerializer validateResponse:response data:AFJSONTestData() error:&error]; + + XCTAssertNil(error, @"Error handling application/json"); +} + +- (void)testThatJSONResponseSerializerAcceptsTextJSONMimeType { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"text/json"}]; + NSError *error = nil; + [self.responseSerializer validateResponse:response data:AFJSONTestData()error:&error]; + + XCTAssertNil(error, @"Error handling text/json"); +} + +- (void)testThatJSONResponseSerializerAcceptsTextJavaScriptMimeType { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"text/javascript"}]; + NSError *error = nil; + [self.responseSerializer validateResponse:response data:AFJSONTestData() error:&error]; + + XCTAssertNil(error, @"Error handling text/javascript"); +} + +- (void)testThatJSONResponseSerializerDoesNotAcceptNonStandardJSONMimeType { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"nonstandard/json"}]; + NSError *error = nil; + [self.responseSerializer validateResponse:response data:AFJSONTestData() error:&error]; + + XCTAssertNotNil(error, @"Error should have been thrown for nonstandard/json"); +} + +- (void)testThatJSONResponseSerializerReturnsDictionaryForValidJSONDictionary { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"text/json"}]; + NSError *error = nil; + id responseObject = [self.responseSerializer responseObjectForResponse:response data:AFJSONTestData() error:&error]; + + XCTAssertNil(error, @"Serialization error should be nil"); + XCTAssert([responseObject isKindOfClass:[NSDictionary class]], @"Expected response to be a NSDictionary"); +} + +- (void)testThatJSONResponseSerializerReturnsErrorForInvalidJSON { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type":@"text/json"}]; + NSError *error = nil; + [self.responseSerializer responseObjectForResponse:response data:[@"{invalid}" dataUsingEncoding:NSUTF8StringEncoding] error:&error]; + + XCTAssertNotNil(error, @"Serialization error should not be nil"); +} + +- (void)testThatJSONResponseSerializerReturnsNilObjectAndNilErrorForEmptyData { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type":@"text/json"}]; + NSData *data = [NSData data]; + NSError *error = nil; + id responseObject = [self.responseSerializer responseObjectForResponse:response data:data error:&error]; + XCTAssertNil(responseObject); + XCTAssertNil(error); +} + +- (void)testThatJSONResponseSerializerReturnsNilObjectAndNilErrorForSingleSpace { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type":@"text/json"}]; + NSData *data = [@" " dataUsingEncoding:NSUTF8StringEncoding]; + NSError *error = nil; + id responseObject = [self.responseSerializer responseObjectForResponse:response data:data error:&error]; + XCTAssertNil(responseObject); + XCTAssertNil(error); +} + +- (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]}], @"arrayWithNulls": @[[NSNull null]]} + options:(NSJSONWritingOptions)0 + error:nil]; + + NSError *error = nil; + NSDictionary *responseObject = [self.responseSerializer responseObjectForResponse:response + data:data + error:&error]; + XCTAssertNil(error); + XCTAssertNotNil(responseObject[@"key"]); + XCTAssertNil(responseObject[@"nullkey"]); + XCTAssertNil(responseObject[@"array"][0][@"subnullkey"]); + XCTAssertEqualObjects(responseObject[@"arrayWithNulls"], @[]); +} + +- (void)testThatJSONResponseSerializerCanBeCopied { + [self.responseSerializer setAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:100]]; + [self.responseSerializer setAcceptableContentTypes:[NSSet setWithObject:@"test/type"]]; + [self.responseSerializer setReadingOptions:NSJSONReadingMutableLeaves]; + [self.responseSerializer setRemovesKeysWithNullValues:YES]; + + AFJSONResponseSerializer *copiedSerializer = [self.responseSerializer copy]; + XCTAssertNotEqual(copiedSerializer, self.responseSerializer); + XCTAssertEqual(copiedSerializer.acceptableStatusCodes, self.responseSerializer.acceptableStatusCodes); + XCTAssertEqual(copiedSerializer.acceptableContentTypes, self.responseSerializer.acceptableContentTypes); + XCTAssertEqual(copiedSerializer.readingOptions, self.responseSerializer.readingOptions); + XCTAssertEqual(copiedSerializer.removesKeysWithNullValues, self.responseSerializer.removesKeysWithNullValues); +} + +#pragma mark NSSecureCoding + +- (void)testJSONSerializerSupportsSecureCoding { + XCTAssertTrue([AFJSONResponseSerializer supportsSecureCoding]); +} + +- (void)testJSONSerializerCanBeArchivedAndUnarchived { + AFJSONResponseSerializer *responseSerializer = [AFJSONResponseSerializer serializer]; + NSData *archive = nil; + + archive = [self archivedDataWithRootObject:responseSerializer]; + XCTAssertNotNil(archive); + AFJSONResponseSerializer *unarchivedSerializer = [self unarchivedObjectOfClass:[AFJSONResponseSerializer class] fromData:archive]; + XCTAssertNotNil(unarchivedSerializer); + XCTAssertNotEqual(unarchivedSerializer, responseSerializer); + XCTAssertTrue([unarchivedSerializer.acceptableContentTypes isEqualToSet:responseSerializer.acceptableContentTypes]); + XCTAssertTrue([unarchivedSerializer.acceptableStatusCodes isEqualToIndexSet:responseSerializer.acceptableStatusCodes]); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFNetworkActivityManagerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFNetworkActivityManagerTests.m new file mode 100644 index 0000000..152eae6 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFNetworkActivityManagerTests.m @@ -0,0 +1,201 @@ +// AFNetworkActivityManagerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFNetworkActivityIndicatorManager.h" +#import "AFHTTPSessionManager.h" + +@interface AFNetworkActivityManagerTests : AFTestCase +@property (nonatomic, strong) AFNetworkActivityIndicatorManager *networkActivityIndicatorManager; +@property (nonatomic, strong) AFHTTPSessionManager *sessionManager; +@end + +#pragma mark - + +@implementation AFNetworkActivityManagerTests + +- (void)setUp { + [super setUp]; + + self.sessionManager = [[AFHTTPSessionManager alloc] initWithBaseURL:self.baseURL sessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + self.networkActivityIndicatorManager = [[AFNetworkActivityIndicatorManager alloc] init]; + self.networkActivityIndicatorManager.enabled = YES; +} + +- (void)tearDown { + [super tearDown]; + self.networkActivityIndicatorManager = nil; + + [self.sessionManager invalidateSessionCancelingTasks:YES resetSession:NO]; + self.sessionManager = nil; +} + +#pragma mark - + +- (void)testThatNetworkActivityIndicatorTurnsOnAndOffIndicatorWhenRequestSucceeds { + self.networkActivityIndicatorManager.activationDelay = 0.0; + self.networkActivityIndicatorManager.completionDelay = 0.0; + + XCTestExpectation *startExpectation = [self expectationWithDescription:@"Indicator Visible"]; + XCTestExpectation *endExpectation = [self expectationWithDescription:@"Indicator Hidden"]; + [self.networkActivityIndicatorManager setNetworkingActivityActionWithBlock:^(BOOL networkActivityIndicatorVisible) { + if (networkActivityIndicatorVisible) { + [startExpectation fulfill]; + } else { + [endExpectation fulfill]; + } + }]; + + XCTestExpectation *requestExpectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"/delay/1" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { + [requestExpectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatNetworkActivityIndicatorTurnsOnAndOffIndicatorWhenRequestFails { + self.networkActivityIndicatorManager.activationDelay = 0.0; + self.networkActivityIndicatorManager.completionDelay = 0.0; + + XCTestExpectation *startExpectation = [self expectationWithDescription:@"Indicator Visible"]; + XCTestExpectation *endExpectation = [self expectationWithDescription:@"Indicator Hidden"]; + [self.networkActivityIndicatorManager setNetworkingActivityActionWithBlock:^(BOOL networkActivityIndicatorVisible) { + if (networkActivityIndicatorVisible) { + [startExpectation fulfill]; + } else { + [endExpectation fulfill]; + } + }]; + + XCTestExpectation *requestExpectation = [self expectationWithDescription:@"Request should fail"]; + [self.sessionManager + GET:@"/status/404" + parameters:nil + headers:nil + progress:nil + success:nil + failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + [requestExpectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatVisibilityDelaysAreApplied { + + self.networkActivityIndicatorManager.activationDelay = 1.0; + self.networkActivityIndicatorManager.completionDelay = 1.0; + + CFTimeInterval requestStartTime = CACurrentMediaTime(); + __block CFTimeInterval requestEndTime; + __block CFTimeInterval indicatorVisbleTime; + __block CFTimeInterval indicatorHiddenTime; + XCTestExpectation *startExpectation = [self expectationWithDescription:@"Indicator Visible"]; + XCTestExpectation *endExpectation = [self expectationWithDescription:@"Indicator Hidden"]; + [self.networkActivityIndicatorManager setNetworkingActivityActionWithBlock:^(BOOL networkActivityIndicatorVisible) { + if (networkActivityIndicatorVisible) { + indicatorVisbleTime = CACurrentMediaTime(); + [startExpectation fulfill]; + } else { + indicatorHiddenTime = CACurrentMediaTime(); + [endExpectation fulfill]; + } + }]; + + XCTestExpectation *requestExpectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"/delay/2" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { + requestEndTime = CACurrentMediaTime(); + [requestExpectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertTrue((indicatorVisbleTime - requestStartTime) > self.networkActivityIndicatorManager.activationDelay); + XCTAssertTrue((indicatorHiddenTime - requestEndTime) > self.networkActivityIndicatorManager.completionDelay); +} + +- (void)testThatIndicatorBlockIsOnlyCalledOnceEachForStartAndEndForMultipleRequests { + self.networkActivityIndicatorManager.activationDelay = 1.0; + self.networkActivityIndicatorManager.completionDelay = 1.0; + + XCTestExpectation *startExpectation = [self expectationWithDescription:@"Indicator Visible"]; + XCTestExpectation *endExpectation = [self expectationWithDescription:@"Indicator Hidden"]; + [self.networkActivityIndicatorManager setNetworkingActivityActionWithBlock:^(BOOL networkActivityIndicatorVisible) { + if (networkActivityIndicatorVisible) { + [startExpectation fulfill]; + } else { + [endExpectation fulfill]; + } + }]; + + XCTestExpectation *requestExpectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"/delay/4" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { + [requestExpectation fulfill]; + } + failure:nil]; + + XCTestExpectation *secondRequestExpectation = [self expectationWithDescription:@"Request should succeed"]; + [self.sessionManager + GET:@"/delay/2" + parameters:nil + headers:nil + progress:nil + success:^(NSURLSessionDataTask * _Nonnull task, id _Nonnull responseObject) { + + [secondRequestExpectation fulfill]; + } + failure:nil]; + + [self waitForExpectationsWithCommonTimeout]; + +} + +- (void)testThatIndicatorKVOOnlyTriggerOnce { + // create new one indicator manager + AFNetworkActivityIndicatorManager *manager = [AFNetworkActivityIndicatorManager new]; + __block NSInteger kvoTriggerCount = 0; + + XCTKVOExpectation *activityCountExpectation = [[XCTKVOExpectation alloc] initWithKeyPath:@"activityCount" object:manager]; + activityCountExpectation.handler = ^BOOL(id _Nonnull observedObject, NSDictionary * _Nonnull change) { + kvoTriggerCount += 1; + return [change[NSKeyValueChangeNewKey] isEqualToNumber:@(1)]; + }; + [manager incrementActivityCount]; + XCTAssertTrue(kvoTriggerCount == 1); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFNetworkReachabilityManagerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFNetworkReachabilityManagerTests.m new file mode 100644 index 0000000..49fca9b --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFNetworkReachabilityManagerTests.m @@ -0,0 +1,141 @@ +// AFNetworkReachabilityManagerTests.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFNetworkReachabilityManager.h" +#import +#import + +@interface AFNetworkReachabilityManagerTests : AFTestCase +@property (nonatomic, strong) AFNetworkReachabilityManager *addressReachability; +@property (nonatomic, strong) AFNetworkReachabilityManager *domainReachability; +@end + +@implementation AFNetworkReachabilityManagerTests + +- (void)setUp { + [super setUp]; + + //both of these manager objects should always be reachable when the tests are run + self.domainReachability = [AFNetworkReachabilityManager managerForDomain:@"localhost"]; + self.addressReachability = [AFNetworkReachabilityManager manager]; +} + +- (void)tearDown +{ + [self.addressReachability stopMonitoring]; + [self.domainReachability stopMonitoring]; + + [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"); +} + +- (void)testDomainReachabilityStartsInUnknownState { + XCTAssertEqual(self.domainReachability.networkReachabilityStatus, AFNetworkReachabilityStatusUnknown, + @"Reachability should start in an unknown state"); +} + +- (void)verifyReachabilityNotificationGetsPostedWithManager:(AFNetworkReachabilityManager *)manager +{ + [self expectationForNotification:AFNetworkingReachabilityDidChangeNotification + object:nil + handler:^BOOL(NSNotification *note) { + AFNetworkReachabilityStatus status; + status = [note.userInfo[AFNetworkingReachabilityNotificationStatusItem] integerValue]; + BOOL isReachable = (status == AFNetworkReachabilityStatusReachableViaWiFi + || status == AFNetworkReachabilityStatusReachableViaWWAN); + return isReachable; + }]; + + [manager startMonitoring]; + + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testAddressReachabilityNotification { + [self verifyReachabilityNotificationGetsPostedWithManager:self.addressReachability]; +} + +- (void)testDomainReachabilityNotification { + [self verifyReachabilityNotificationGetsPostedWithManager:self.domainReachability]; +} + +- (void)verifyReachabilityStatusBlockGetsCalledWithManager:(AFNetworkReachabilityManager *)manager +{ + __weak __block XCTestExpectation *expectation = [self expectationWithDescription:@"reachability status change block gets called"]; + + [manager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + BOOL isReachable = (status == AFNetworkReachabilityStatusReachableViaWiFi + || status == AFNetworkReachabilityStatusReachableViaWWAN); + if (isReachable) { + [expectation fulfill]; + expectation = nil; + } + }]; + + [manager startMonitoring]; + + [self waitForExpectationsWithCommonTimeout]; + [manager setReachabilityStatusChangeBlock:nil]; + +} + +- (void)testAddressReachabilityBlock { + [self verifyReachabilityStatusBlockGetsCalledWithManager:self.addressReachability]; +} + +- (void)testDomainReachabilityBlock { + [self verifyReachabilityStatusBlockGetsCalledWithManager:self.domainReachability]; +} + +- (void)testObjectPostingReachabilityManagerNotification { + [self expectationForNotification:AFNetworkingReachabilityDidChangeNotification + object:self.domainReachability + handler:^BOOL(NSNotification *notification) { + BOOL isObjectPostingNotification = [notification.object isEqual:self.domainReachability]; + return isObjectPostingNotification; + }]; + + [self.domainReachability startMonitoring]; + + [self waitForExpectationsWithCommonTimeout]; +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListRequestSerializerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListRequestSerializerTests.m new file mode 100644 index 0000000..f8590db --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListRequestSerializerTests.m @@ -0,0 +1,56 @@ +// AFPropertyListRequestSerializerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFURLRequestSerialization.h" + +@interface AFPropertyListRequestSerializerTests : AFTestCase +@property (nonatomic, strong) AFPropertyListRequestSerializer *requestSerializer; +@end + +@implementation AFPropertyListRequestSerializerTests + +- (void)setUp { + [super setUp]; + self.requestSerializer = [AFPropertyListRequestSerializer serializer]; +} + +#pragma mark - + +- (void)testThatPropertyListRequestSerializerAcceptsPlist { + NSDictionary *parameters = @{@"key":@"value"}; + NSError *error = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:self.baseURL.absoluteString parameters:parameters error:&error]; + + XCTAssertNotNil(request, @"Expected non-nil request."); +} + +- (void)testThatPropertyListRequestSerializerHandlesInvalidPlist { + NSDictionary *parameters = @{@42:@"value"}; + NSError *error = nil; + NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:@"POST" URLString:self.baseURL.absoluteString parameters:parameters error:&error]; + + XCTAssertNil(request, @"Expected nil request."); + XCTAssertNotNil(error, @"Expected non-nil error."); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListResponseSerializerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListResponseSerializerTests.m new file mode 100644 index 0000000..7bbeb57 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFPropertyListResponseSerializerTests.m @@ -0,0 +1,94 @@ +// AFPropertyListResponseSerializerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFURLResponseSerialization.h" + +@interface AFPropertyListResponseSerializerTests : AFTestCase +@property (nonatomic, strong) AFPropertyListResponseSerializer *responseSerializer; +@end + +@implementation AFPropertyListResponseSerializerTests + +- (void)setUp { + [super setUp]; + self.responseSerializer = [AFPropertyListResponseSerializer serializer]; +} + +#pragma mark - + +- (void)testThatPropertyListResponseSerializerAcceptsPlistData { + NSData *data = [NSPropertyListSerialization dataWithPropertyList:@{@"foo": @"bar"} format:NSPropertyListXMLFormat_v1_0 options:0 error:NULL]; + + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/x-plist"}]; + NSError *error = nil; + id responseObject = [self.responseSerializer responseObjectForResponse:response data:data error:&error]; + + XCTAssertTrue([responseObject isKindOfClass:[NSDictionary class]], @"Expected valid dictionary."); +} + +- (void)testThatPropertyListResponseSerializerHandlesInvalidPlistData { + NSData *data = [NSJSONSerialization dataWithJSONObject:@{@"foo": @"bar"} options:(NSJSONWritingOptions)0 error:nil]; + + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:200 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/x-plist"}]; + NSError *error = nil; + id responseObject = [self.responseSerializer responseObjectForResponse:response data:data error:&error]; + + XCTAssertNil(responseObject, @"Expected nil responseObject."); + XCTAssertNotNil(error, @"Expected non-nil error."); +} + +- (void)testThatPropertyListResponseSerializerHandles204 { + NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:self.baseURL statusCode:204 HTTPVersion:@"1.1" headerFields:@{@"Content-Type": @"application/x-plist"}]; + NSError *error; + id responseObject = [self.responseSerializer responseObjectForResponse:response data:nil error:&error]; + + XCTAssertNil(responseObject, @"Response should be nil when handling 204 with application/x-plist"); + XCTAssertNil(error, @"Error handling application/x-plist"); +} + +- (void)testResponseSerializerCanBeCopied { + [self.responseSerializer setAcceptableContentTypes:[NSSet setWithObject:@"test/type"]]; + [self.responseSerializer setAcceptableStatusCodes:[NSIndexSet indexSetWithIndex:100]]; + [self.responseSerializer setFormat:NSPropertyListXMLFormat_v1_0]; + [self.responseSerializer setReadOptions:NSPropertyListMutableContainers]; + + AFPropertyListResponseSerializer *copiedSerializer = [self.responseSerializer copy]; + XCTAssertNotNil(copiedSerializer); + XCTAssertNotEqual(copiedSerializer, self.responseSerializer); + XCTAssertEqual(copiedSerializer.format, self.responseSerializer.format); + XCTAssertEqual(copiedSerializer.readOptions, self.responseSerializer.readOptions); + XCTAssertEqual(copiedSerializer.acceptableContentTypes, self.responseSerializer.acceptableContentTypes); + XCTAssertEqual(copiedSerializer.acceptableStatusCodes, self.responseSerializer.acceptableStatusCodes); +} + +- (void)testResponseSerializerCanBeArchivedAndUnarchived { + NSData *archive = [self archivedDataWithRootObject:self.responseSerializer]; + XCTAssertNotNil(archive); + AFPropertyListResponseSerializer *unarchivedSerializer = [self unarchivedObjectOfClass:[AFPropertyListResponseSerializer class] fromData:archive]; + XCTAssertNotNil(unarchivedSerializer); + XCTAssertNotEqual(unarchivedSerializer, self.responseSerializer); + XCTAssertTrue(unarchivedSerializer.format == self.responseSerializer.format); + XCTAssertTrue(unarchivedSerializer.readOptions == self.responseSerializer.readOptions); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFSecurityPolicyTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFSecurityPolicyTests.m new file mode 100644 index 0000000..06867ca --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFSecurityPolicyTests.m @@ -0,0 +1,548 @@ +// AFSecurityPolicyTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" +#import "AFSecurityPolicy.h" + +@interface AFSecurityPolicyTests : AFTestCase + +@end + +static SecTrustRef AFUTHTTPBinOrgServerTrust() { + NSString *bundlePath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] resourcePath]; + NSString *serverCertDirectoryPath = [bundlePath stringByAppendingPathComponent:@"HTTPBinOrgServerTrustChain"]; + + return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath); +} + +static SecTrustRef AFUTADNNetServerTrust() { + NSString *bundlePath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] resourcePath]; + NSString *serverCertDirectoryPath = [bundlePath stringByAppendingPathComponent:@"ADNNetServerTrustChain"]; + + return AFUTTrustChainForCertsInDirectory(serverCertDirectoryPath); +} + +static SecCertificateRef AFUTHTTPBinOrgCertificate() { + NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"httpbinorg_02182021" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecCertificateRef AFUTAmazonAuthorityCertificate() { + NSString *certPath = [[NSBundle bundleForClass:NSClassFromString(@"AFSecurityPolicyTests")] pathForResource:@"Amazon" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecCertificateRef AFUTAmazonRootAuthorityCertificate() { + NSString *certPath = [[NSBundle bundleForClass:NSClassFromString(@"AFSecurityPolicyTests")] pathForResource:@"Amazon Root CA 1" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecCertificateRef AFUTStarfieldServicesRootCertificate() { + NSString *certPath = [[NSBundle bundleForClass:NSClassFromString(@"AFSecurityPolicyTests")] pathForResource:@"Starfield Services Root Certificate Authority - G2" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecCertificateRef AFUTSelfSignedCertificateWithoutDomain() { + NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"NoDomains" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecCertificateRef AFUTSelfSignedCertificateWithCommonNameDomain() { + NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"foobar.com" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecCertificateRef AFUTSelfSignedCertificateWithDNSNameDomain() { + NSString *certPath = [[NSBundle bundleForClass:[AFSecurityPolicyTests class]] pathForResource:@"AltName" ofType:@"cer"]; + NSCAssert(certPath != nil, @"Path for certificate should not be nil"); + NSData *certData = [NSData dataWithContentsOfFile:certPath]; + + return SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); +} + +static SecTrustRef AFUTTrustWithCertificate(SecCertificateRef certificate) { + NSArray *certs = @[(__bridge id)(certificate)]; + + SecPolicyRef policy = SecPolicyCreateBasicX509(); + SecTrustRef trust = NULL; + SecTrustCreateWithCertificates((__bridge CFTypeRef)(certs), policy, &trust); + CFRelease(policy); + + return trust; +} + +@implementation AFSecurityPolicyTests + +#pragma mark - Default Policy Tests +#pragma mark Default Values Test + +- (void)testDefaultPolicyPinningModeIsSetToNone { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + XCTAssertTrue(policy.SSLPinningMode == AFSSLPinningModeNone, @"Pinning Mode should be set to by default"); +} + +- (void)testDefaultPolicyHasInvalidCertificatesAreDisabledByDefault { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + XCTAssertFalse(policy.allowInvalidCertificates, @"Invalid Certificates Should Be Disabled by Default"); +} + +- (void)testDefaultPolicyHasDomainNamesAreValidatedByDefault { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + XCTAssertTrue(policy.validatesDomainName, @"Domain names should be validated by default"); +} + +- (void)testDefaultPolicyHasNoPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + XCTAssertTrue(policy.pinnedCertificates.count == 0, @"The default policy should not have any pinned certificates"); +} + +#pragma mark Positive Server Trust Evaluation Tests + +- (void)testDefaultPolicyDoesAllowHTTPBinOrgCertificate { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + SecTrustRef trust = AFUTHTTPBinOrgServerTrust(); + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:nil], @"Valid Certificate should be allowed by default."); +} + +- (void)testDefaultPolicyDoesAllowHTTPBinOrgCertificateForValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + SecTrustRef trust = AFUTHTTPBinOrgServerTrust(); + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:@"httpbin.org"], @"Valid Certificate should be allowed by default."); +} + +#pragma mark Negative Server Trust Evaluation Tests + +- (void)testDefaultPolicyDoesNotAllowInvalidCertificate { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + SecCertificateRef certificate = AFUTSelfSignedCertificateWithoutDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:nil], @"Invalid Certificates should not be allowed"); +} + +- (void)testDefaultPolicyDoesNotAllowCertificateWithInvalidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + SecTrustRef trust = AFUTHTTPBinOrgServerTrust(); + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:@"apple.com"], @"Certificate should not be allowed because the domain names do not match."); +} + +#pragma mark - Public Key Pinning Tests +#pragma mark Default Values Tests + +- (void)testPolicyWithPublicKeyPinningModeHasPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + XCTAssertTrue(policy.pinnedCertificates > 0, @"Policy should contain default pinned certificates"); +} + +- (void)testPolicyWithPublicKeyPinningModeHasHTTPBinOrgPinnedCertificate { + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey withPinnedCertificates:[AFSecurityPolicy certificatesInBundle:bundle]]; + + SecCertificateRef cert = AFUTHTTPBinOrgCertificate(); + NSData *certData = (__bridge NSData *)(SecCertificateCopyData(cert)); + CFRelease(cert); + NSSet *set = [policy.pinnedCertificates objectsPassingTest:^BOOL(NSData *data, BOOL *stop) { + return [data isEqualToData:certData]; + }]; + + XCTAssertEqual(set.count, 1U, @"HTTPBin.org certificate not found in the default certificates"); +} + +#pragma mark Positive Server Trust Evaluation Tests +- (void)testPolicyWithPublicKeyPinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgLeafCertificatePinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow server trust"); +} + +- (void)testPolicyWithPublicKeyPinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgIntermediateCertificatePinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTAmazonAuthorityCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow server trust"); +} + +- (void)testPolicyWithPublicKeyPinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgRootCertificatePinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTAmazonRootAuthorityCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow server trust"); +} + +- (void)testPolicyWithPublicKeyPinningAllowsHTTPBinOrgServerTrustWithEntireCertificateChainPinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef httpBinCertificate = AFUTHTTPBinOrgCertificate(); + SecCertificateRef intermediateCertificate = AFUTAmazonAuthorityCertificate(); + SecCertificateRef intermediateCertificate2 = AFUTAmazonRootAuthorityCertificate(); + SecCertificateRef rootCertificate = AFUTStarfieldServicesRootCertificate(); + [policy setPinnedCertificates:[NSSet setWithObjects:(__bridge_transfer NSData *)SecCertificateCopyData(httpBinCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(intermediateCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(intermediateCertificate2), + (__bridge_transfer NSData *)SecCertificateCopyData(rootCertificate), nil]]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow HTTPBinOrg server trust because at least one of the pinned certificates is valid"); + +} + +- (void)testPolicyWithPublicKeyPinningAllowsHTTPBirnOrgServerTrustWithHTTPbinOrgPinnedCertificateAndAdditionalPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef httpBinCertificate = AFUTHTTPBinOrgCertificate(); + SecCertificateRef selfSignedCertificate = AFUTSelfSignedCertificateWithCommonNameDomain(); + [policy setPinnedCertificates:[NSSet setWithObjects:(__bridge_transfer NSData *)SecCertificateCopyData(httpBinCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(selfSignedCertificate), nil]]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow HTTPBinOrg server trust because at least one of the pinned certificates is valid"); +} + +- (void)testPolicyWithPublicKeyPinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgLeafCertificatePinnedAndValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:@"httpbin.org"], @"Policy should allow server trust"); +} + +#pragma mark Negative Server Trust Evaluation Tests + +- (void)testPolicyWithPublicKeyPinningAndNoPinnedCertificatesDoesNotAllowHTTPBinOrgServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + policy.pinnedCertificates = [NSSet set]; + XCTAssertFalse([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should not allow server trust because the policy is set to public key pinning and it does not contain any pinned certificates."); +} + +- (void)testPolicyWithPublicKeyPinningDoesNotAllowADNServerTrustWithHTTPBinOrgPinnedCertificate { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertFalse([policy evaluateServerTrust:AFUTADNNetServerTrust() forDomain:nil], @"Policy should not allow ADN server trust for pinned HTTPBin.org certificate"); +} + +- (void)testPolicyWithPublicKeyPinningDoesNotAllowHTTPBinOrgServerTrustWithHTTPBinOrgLeafCertificatePinnedAndInvalidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertFalse([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:@"invaliddomainname.com"], @"Policy should not allow server trust"); +} + +- (void)testPolicyWithPublicKeyPinningDoesNotAllowADNServerTrustWithMultipleInvalidPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef httpBinCertificate = AFUTHTTPBinOrgCertificate(); + SecCertificateRef selfSignedCertificate = AFUTSelfSignedCertificateWithCommonNameDomain(); + [policy setPinnedCertificates:[NSSet setWithObjects:(__bridge_transfer NSData *)SecCertificateCopyData(httpBinCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(selfSignedCertificate), nil]]; + XCTAssertFalse([policy evaluateServerTrust:AFUTADNNetServerTrust() forDomain:nil], @"Policy should not allow ADN server trust because there are no matching pinned certificates"); +} + +#pragma mark - Certificate Pinning Tests +#pragma mark Default Values Tests + +- (void)testPolicyWithCertificatePinningModeHasPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + XCTAssertTrue(policy.pinnedCertificates > 0, @"Policy should contain default pinned certificates"); +} + +- (void)testPolicyWithCertificatePinningModeHasHTTPBinOrgPinnedCertificate { + NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate withPinnedCertificates:[AFSecurityPolicy certificatesInBundle:bundle]]; + + SecCertificateRef cert = AFUTHTTPBinOrgCertificate(); + NSData *certData = (__bridge NSData *)(SecCertificateCopyData(cert)); + CFRelease(cert); + NSSet *set = [policy.pinnedCertificates objectsPassingTest:^BOOL(NSData *data, BOOL *stop) { + return [data isEqualToData:certData]; + }]; + + XCTAssertEqual(set.count, 1U, @"HTTPBin.org certificate not found in the default certificates"); +} + +#pragma mark Positive Server Trust Evaluation Tests +- (void)testPolicyWithCertificatePinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgLeafCertificatePinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow server trust"); +} + +- (void)testPolicyWithCertificatePinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgIntermediateCertificatePinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTAmazonAuthorityCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow server trust"); +} + +- (void)testPolicyWithCertificatePinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgRootCertificatePinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTAmazonRootAuthorityCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow server trust"); +} + +- (void)testPolicyWithCertificatePinningAllowsHTTPBinOrgServerTrustWithEntireCertificateChainPinned { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef httpBinCertificate = AFUTHTTPBinOrgCertificate(); + SecCertificateRef intermediateCertificate = AFUTAmazonAuthorityCertificate(); + SecCertificateRef intermediateCertificate2 = AFUTAmazonRootAuthorityCertificate(); + SecCertificateRef rootCertificate = AFUTStarfieldServicesRootCertificate(); + [policy setPinnedCertificates:[NSSet setWithObjects:(__bridge_transfer NSData *)SecCertificateCopyData(httpBinCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(intermediateCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(intermediateCertificate2), + (__bridge_transfer NSData *)SecCertificateCopyData(rootCertificate), nil]]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow HTTPBinOrg server trust because at least one of the pinned certificates is valid"); + +} + +- (void)testPolicyWithCertificatePinningAllowsHTTPBirnOrgServerTrustWithHTTPbinOrgPinnedCertificateAndAdditionalPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef httpBinCertificate = AFUTHTTPBinOrgCertificate(); + SecCertificateRef selfSignedCertificate = AFUTSelfSignedCertificateWithCommonNameDomain(); + [policy setPinnedCertificates:[NSSet setWithObjects:(__bridge_transfer NSData *)SecCertificateCopyData(httpBinCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(selfSignedCertificate), nil]]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should allow HTTPBinOrg server trust because at least one of the pinned certificates is valid"); +} + +- (void)testPolicyWithCertificatePinningAllowsHTTPBinOrgServerTrustWithHTTPBinOrgLeafCertificatePinnedAndValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:@"httpbin.org"], @"Policy should allow server trust"); +} + +#pragma mark Negative Server Trust Evaluation Tests + +- (void)testPolicyWithCertificatePinningAndNoPinnedCertificatesDoesNotAllowHTTPBinOrgServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + policy.pinnedCertificates = [NSSet set]; + XCTAssertFalse([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:nil], @"Policy should not allow server trust because the policy does not contain any pinned certificates."); +} + +- (void)testPolicyWithCertificatePinningDoesNotAllowADNServerTrustWithHTTPBinOrgPinnedCertificate { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertFalse([policy evaluateServerTrust:AFUTADNNetServerTrust() forDomain:nil], @"Policy should not allow ADN server trust for pinned HTTPBin.org certificate"); +} + +- (void)testPolicyWithCertificatePinningDoesNotAllowHTTPBinOrgServerTrustWithHTTPBinOrgLeafCertificatePinnedAndInvalidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTHTTPBinOrgCertificate(); + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(certificate)]; + XCTAssertFalse([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:@"invaliddomainname.com"], @"Policy should not allow server trust"); +} + +- (void)testPolicyWithCertificatePinningDoesNotAllowADNServerTrustWithMultipleInvalidPinnedCertificates { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef httpBinCertificate = AFUTHTTPBinOrgCertificate(); + SecCertificateRef selfSignedCertificate = AFUTSelfSignedCertificateWithCommonNameDomain(); + [policy setPinnedCertificates:[NSSet setWithObjects:(__bridge_transfer NSData *)SecCertificateCopyData(httpBinCertificate), + (__bridge_transfer NSData *)SecCertificateCopyData(selfSignedCertificate), nil]]; + XCTAssertFalse([policy evaluateServerTrust:AFUTADNNetServerTrust() forDomain:nil], @"Policy should not allow ADN server trust because there are no matching pinned certificates"); +} + +#pragma mark - Domain Name Validation Tests +#pragma mark Positive Evaluation Tests + +- (void)testThatPolicyWithoutDomainNameValidationAllowsServerTrustWithInvalidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + [policy setValidatesDomainName:NO]; + XCTAssertTrue([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:@"invalid.org"], @"Policy should allow server trust because domain name validation is disabled"); +} + +- (void)testThatPolicyWithDomainNameValidationAndSelfSignedCommonNameCertificateAllowsServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithCommonNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + [policy setPinnedCertificates:[NSSet setWithObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]]; + [policy setAllowInvalidCertificates:YES]; + + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should allow server trust"); +} + +- (void)testThatPolicyWithDomainNameValidationAndSelfSignedDNSCertificateAllowsServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + [policy setPinnedCertificates:[NSSet setWithObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]]; + [policy setAllowInvalidCertificates:YES]; + + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should allow server trust"); +} + +#pragma mark Negative Evaluation Tests + +- (void)testThatPolicyWithDomainNameValidationDoesNotAllowServerTrustWithInvalidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + XCTAssertFalse([policy evaluateServerTrust:AFUTHTTPBinOrgServerTrust() forDomain:@"invalid.org"], @"Policy should not allow allow server trust"); +} + +- (void)testThatPolicyWithDomainNameValidationAndSelfSignedNoDomainCertificateDoesNotAllowServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithoutDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + [policy setPinnedCertificates:[NSSet setWithObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]]; + [policy setAllowInvalidCertificates:YES]; + + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should not allow server trust"); +} + +#pragma mark - Self Signed Certificate Tests +#pragma mark Positive Test Cases + +- (void)testThatPolicyWithInvalidCertificatesAllowedAllowsSelfSignedServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + [policy setAllowInvalidCertificates:YES]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:nil], @"Policy should allow server trust because invalid certificates are allowed"); +} + +- (void)testThatPolicyWithInvalidCertificatesAllowedAndValidPinnedCertificatesDoesAllowSelfSignedServerTrustForValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + [policy setAllowInvalidCertificates:YES]; + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + [policy setPinnedCertificates:[NSSet setWithObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]]; + + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should allow server trust because invalid certificates are allowed"); +} + +- (void)testThatPolicyWithInvalidCertificatesAllowedAndNoSSLPinningAndDomainNameValidationDisabledDoesAllowSelfSignedServerTrustForValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; + [policy setAllowInvalidCertificates:YES]; + [policy setValidatesDomainName:NO]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + + XCTAssertTrue([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should allow server trust because invalid certificates are allowed"); +} + +#pragma mark Negative Test Cases + +- (void)testThatPolicyWithInvalidCertificatesDisabledDoesNotAllowSelfSignedServerTrust { + AFSecurityPolicy *policy = [AFSecurityPolicy defaultPolicy]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:nil], @"Policy should not allow server trust because invalid certificates are not allowed"); +} + +- (void)testThatPolicyWithInvalidCertificatesAllowedAndNoPinnedCertificatesAndPublicKeyPinningModeDoesNotAllowSelfSignedServerTrustForValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModePublicKey]; + [policy setAllowInvalidCertificates:YES]; + [policy setPinnedCertificates:[NSSet set]]; + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should not allow server trust because invalid certificates are allowed but there are no pinned certificates"); +} + +- (void)testThatPolicyWithInvalidCertificatesAllowedAndValidPinnedCertificatesAndNoPinningModeDoesNotAllowSelfSignedServerTrustForValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; + [policy setAllowInvalidCertificates:YES]; + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + [policy setPinnedCertificates:[NSSet setWithObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)]]; + + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should not allow server trust because invalid certificates are allowed but there are no pinned certificates"); +} + +- (void)testThatPolicyWithInvalidCertificatesAllowedAndNoValidPinnedCertificatesAndNoPinningModeAndDomainValidationDoesNotAllowSelfSignedServerTrustForValidDomainName { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone]; + [policy setAllowInvalidCertificates:YES]; + [policy setPinnedCertificates:[NSSet set]]; + + SecCertificateRef certificate = AFUTSelfSignedCertificateWithDNSNameDomain(); + SecTrustRef trust = AFUTTrustWithCertificate(certificate); + + XCTAssertFalse([policy evaluateServerTrust:trust forDomain:@"foobar.com"], @"Policy should not allow server trust because invalid certificates are allowed but there are no pinned certificates"); +} + +#pragma mark - NSCopying +- (void)testThatPolicyCanBeCopied { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + policy.allowInvalidCertificates = YES; + policy.validatesDomainName = NO; + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(AFUTHTTPBinOrgCertificate())]; + + AFSecurityPolicy *copiedPolicy = [policy copy]; + XCTAssertNotEqual(copiedPolicy, policy); + XCTAssertEqual(copiedPolicy.allowInvalidCertificates, policy.allowInvalidCertificates); + XCTAssertEqual(copiedPolicy.validatesDomainName, policy.validatesDomainName); + XCTAssertEqual(copiedPolicy.SSLPinningMode, policy.SSLPinningMode); + XCTAssertTrue([copiedPolicy.pinnedCertificates isEqualToSet:policy.pinnedCertificates]); +} + +- (void)testThatPolicyCanBeEncodedAndDecoded { + AFSecurityPolicy *policy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeCertificate]; + policy.allowInvalidCertificates = YES; + policy.validatesDomainName = NO; + policy.pinnedCertificates = [NSSet setWithObject:(__bridge_transfer id)SecCertificateCopyData(AFUTHTTPBinOrgCertificate())]; + + NSData *archive = [self archivedDataWithRootObject:policy]; + AFSecurityPolicy *unarchivedPolicy = [self unarchivedObjectOfClass:[AFSecurityPolicy class] fromData:archive]; + + XCTAssertNotEqual(unarchivedPolicy, policy); + XCTAssertEqual(unarchivedPolicy.allowInvalidCertificates, policy.allowInvalidCertificates); + XCTAssertEqual(unarchivedPolicy.validatesDomainName, policy.validatesDomainName); + XCTAssertEqual(unarchivedPolicy.SSLPinningMode, policy.SSLPinningMode); + XCTAssertTrue([unarchivedPolicy.pinnedCertificates isEqualToSet:policy.pinnedCertificates]); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.h b/TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.h new file mode 100644 index 0000000..3efca6e --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.h @@ -0,0 +1,41 @@ +// AFTestCase.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +SecTrustRef AFUTTrustChainForCertsInDirectory(NSString *directoryPath); + +@interface AFTestCase : XCTestCase + +@property (nonatomic, strong, readonly) NSURL *baseURL; +@property (nonatomic, strong, readonly) NSURL *pngURL; +@property (nonatomic, strong, readonly) NSURL *jpegURL; +@property (nonatomic, strong, readonly) NSURL *delayURL; +- (NSURL *)URLWithStatusCode:(NSInteger)statusCode; + +@property (nonatomic, assign) NSTimeInterval networkTimeout; + +- (void)waitForExpectationsWithCommonTimeout; +- (void)waitForExpectationsWithCommonTimeoutUsingHandler:(XCWaitCompletionHandler)handler; +- (NSData *)archivedDataWithRootObject:(id)object; +- (id)unarchivedObjectOfClass:(Class)class fromData:(NSData *)data; + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.m b/TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.m new file mode 100644 index 0000000..52023ef --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFTestCase.m @@ -0,0 +1,97 @@ +// AFTestCase.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +SecTrustRef AFUTTrustChainForCertsInDirectory(NSString *directoryPath) { + NSArray *certFileNames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:directoryPath error:nil]; + NSMutableArray *certs = [NSMutableArray arrayWithCapacity:[certFileNames count]]; + for (NSString *path in certFileNames) { + NSData *certData = [NSData dataWithContentsOfFile:[directoryPath stringByAppendingPathComponent:path]]; + SecCertificateRef cert = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)(certData)); + [certs addObject:(__bridge_transfer id)(cert)]; + } + + SecPolicyRef policy = SecPolicyCreateBasicX509(); + SecTrustRef trust = NULL; + SecTrustCreateWithCertificates((__bridge CFTypeRef)(certs), policy, &trust); + CFRelease(policy); + + return trust; +} + +@implementation AFTestCase + +- (void)setUp { + [super setUp]; + self.networkTimeout = 20.0; +} + +- (void)tearDown { + [super tearDown]; +} + +#pragma mark - + +- (NSURL *)baseURL { + NSDictionary *environment = [[NSProcessInfo processInfo] environment]; + return [NSURL URLWithString:environment[@"HTTPBIN_BASE_URL"] ?: @"https://httpbin.org"]; +} + +- (NSURL *)pngURL { + return [self.baseURL URLByAppendingPathComponent:@"image/png"]; +} + +- (NSURL *)jpegURL { + return [self.baseURL URLByAppendingPathComponent:@"image/jpeg"]; +} + +- (NSURL *)delayURL { + return [self.baseURL URLByAppendingPathComponent:@"delay/1"]; +} + +- (NSURL *)URLWithStatusCode:(NSInteger)statusCode { + return [self.baseURL URLByAppendingPathComponent:[NSString stringWithFormat:@"status/%@", @(statusCode)]]; +} + +- (void)waitForExpectationsWithCommonTimeout { + [self waitForExpectationsWithCommonTimeoutUsingHandler:nil]; +} + +- (void)waitForExpectationsWithCommonTimeoutUsingHandler:(XCWaitCompletionHandler)handler { + [self waitForExpectationsWithTimeout:self.networkTimeout handler:handler]; +} + +- (NSData *)archivedDataWithRootObject:(id)object { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + return [NSKeyedArchiver archivedDataWithRootObject:object]; +#pragma clang diagnostic pop +} + +- (id)unarchivedObjectOfClass:(Class)class fromData:(NSData *)data { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + return [NSKeyedUnarchiver unarchiveObjectWithData:data]; +#pragma clang diagnostic pop +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFUIActivityIndicatorViewTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFUIActivityIndicatorViewTests.m new file mode 100644 index 0000000..ed591c9 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFUIActivityIndicatorViewTests.m @@ -0,0 +1,121 @@ +// AFUIActivityIndicatorViewTests.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" +#import "UIActivityIndicatorView+AFNetworking.h" +#import "AFURLSessionManager.h" + +@interface AFUIActivityIndicatorViewTests : AFTestCase +@property (nonatomic, strong) NSURLRequest *request; +@property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView; +@property (nonatomic, strong) AFURLSessionManager *sessionManager; +@end + +@implementation AFUIActivityIndicatorViewTests + +- (void)setUp { + [super setUp]; +#if TARGET_OS_MACCATALYST + self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleMedium]; +#else + self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; +#endif + self.request = [NSURLRequest requestWithURL:self.delayURL]; + self.sessionManager = [[AFURLSessionManager alloc] initWithSessionConfiguration:nil]; +} + +- (void)tearDown { + [super tearDown]; + [self.sessionManager invalidateSessionCancelingTasks:YES resetSession:NO]; + self.sessionManager = nil; +} + +- (void)testTaskDidResumeNotificationDoesNotCauseCrashForAIVWithTask { + XCTestExpectation *expectation = [self expectationWithDescription:@"No Crash"]; + [self expectationForNotification:AFNetworkingTaskDidResumeNotification object:nil handler:nil]; + NSURLSessionDataTask *task = [self.sessionManager + dataTaskWithRequest:self.request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + [expectation fulfill]; + }]; + + [self.activityIndicatorView setAnimatingWithStateOfTask:task]; + self.activityIndicatorView = nil; + + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [task cancel]; +} + + +- (void)testTaskDidCompleteNotificationDoesNotCauseCrashForAIVWithTask { + XCTestExpectation *expectation = [self expectationWithDescription:@"No Crash"]; + [self expectationForNotification:AFNetworkingTaskDidCompleteNotification object:nil handler:nil]; + NSURLSessionDataTask *task = [self.sessionManager + dataTaskWithRequest:self.request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + //Without the dispatch after, this test would PASS errorenously because the test + //would finish before the notification was posted to all objects that were + //observing it. + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [expectation fulfill]; + }); + }]; + + [self.activityIndicatorView setAnimatingWithStateOfTask:task]; + self.activityIndicatorView = nil; + + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [task cancel]; +} + +- (void)testTaskDidSuspendNotificationDoesNotCauseCrashForAIVWithTask { + XCTestExpectation *expectation = [self expectationWithDescription:@"No Crash"]; + [self expectationForNotification:AFNetworkingTaskDidSuspendNotification object:nil handler:nil]; + NSURLSessionDataTask *task = [self.sessionManager + dataTaskWithRequest:self.request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + //Without the dispatch after, this test would PASS errorenously because the test + //would finish before the notification was posted to all objects that were + //observing it. + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [expectation fulfill]; + }); + }]; + + [self.activityIndicatorView setAnimatingWithStateOfTask:task]; + self.activityIndicatorView = nil; + + [task resume]; + [task suspend]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [task cancel]; +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFUIButtonTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFUIButtonTests.m new file mode 100644 index 0000000..de2664e --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFUIButtonTests.m @@ -0,0 +1,110 @@ +// AFUIButtonTests.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import "AFTestCase.h" +#import "UIButton+AFNetworking.h" +#import "AFImageDownloader.h" + +@interface AFUIButtonTests : AFTestCase +@property (nonatomic, strong) UIImage *cachedImage; +@property (nonatomic, strong) NSURLRequest *cachedImageRequest; +@property (nonatomic, strong) UIButton *button; + +@property (nonatomic, strong) NSURLRequest *error404URLRequest; + +@property (nonatomic, strong) NSURLRequest *jpegURLRequest; +@end + +@implementation AFUIButtonTests + +- (void)setUp { + [super setUp]; + [[UIButton sharedImageDownloader].imageCache removeAllImages]; + [[[[[[UIButton sharedImageDownloader] sessionManager] session] configuration] URLCache] removeAllCachedResponses]; + [UIButton setSharedImageDownloader:[[AFImageDownloader alloc] init]]; + + self.button = [UIButton new]; + + self.jpegURLRequest = [NSURLRequest requestWithURL:self.jpegURL]; + + self.error404URLRequest = [NSURLRequest requestWithURL:[self URLWithStatusCode:404]]; +} + +- (void)tearDown { + self.button = nil; + [super tearDown]; + +} + +- (void)testThatBackgroundImageChanges { + XCTAssertNil([self.button backgroundImageForState:UIControlStateNormal]); + [self.button setBackgroundImageForState:UIControlStateNormal withURL:self.jpegURL]; + NSPredicate *predicate = [NSPredicate predicateWithBlock:^BOOL(UIButton * _Nonnull button, NSDictionary * _Nullable bindings) { + return [button backgroundImageForState:UIControlStateNormal] != nil; + }]; + + [self expectationForPredicate:predicate + evaluatedWithObject:self.button + handler:nil]; + + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatForegroundImageCanBeCancelledAndDownloadedImmediately { + //https://github.com/Alamofire/AlamofireImage/issues/55 + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.button setImageForState:UIControlStateNormal withURL:self.jpegURL]; + [self.button cancelImageDownloadTaskForState:UIControlStateNormal]; + __block UIImage *responseImage; + [self.button + setImageForState:UIControlStateNormal + withURLRequest:self.jpegURLRequest + placeholderImage:nil + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { + responseImage = image; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertNotNil(responseImage); +} + +- (void)testThatBackgroundImageCanBeCancelledAndDownloadedImmediately { + //https://github.com/Alamofire/AlamofireImage/issues/55 + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.button setBackgroundImageForState:UIControlStateNormal withURL:self.jpegURL]; + [self.button cancelBackgroundImageDownloadTaskForState:UIControlStateNormal]; + __block UIImage *responseImage; + [self.button + setBackgroundImageForState:UIControlStateNormal + withURLRequest:self.jpegURLRequest + placeholderImage:nil + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { + responseImage = image; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertNotNil(responseImage); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFUIImageViewTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFUIImageViewTests.m new file mode 100644 index 0000000..8bc044a --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFUIImageViewTests.m @@ -0,0 +1,174 @@ +// AFUIImageViewTests.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" +#import "UIImageView+AFNetworking.h" +#import "AFImageDownloader.h" + +@interface AFUIImageViewTests : AFTestCase +@property (nonatomic, strong) UIImage *cachedImage; +@property (nonatomic, strong) NSURLRequest *cachedImageRequest; +@property (nonatomic, strong) UIImageView *imageView; + +@property (nonatomic, strong) NSURLRequest *error404URLRequest; + +@property (nonatomic, strong) NSURLRequest *jpegURLRequest; + +@end + +@implementation AFUIImageViewTests + +- (void)setUp { + [super setUp]; + [[UIImageView sharedImageDownloader].imageCache removeAllImages]; + [[[[[[UIImageView sharedImageDownloader] sessionManager] session] configuration] URLCache] removeAllCachedResponses]; + [UIImageView setSharedImageDownloader:[[AFImageDownloader alloc] init]]; + + self.imageView = [UIImageView new]; + + self.jpegURLRequest = [NSURLRequest requestWithURL:self.jpegURL]; + + self.error404URLRequest = [NSURLRequest requestWithURL:[self URLWithStatusCode:404]]; +} + +- (void)tearDown { + self.imageView = nil; + [super tearDown]; + +} + +- (void)testThatImageCanBeDownloadedFromURL { + XCTAssertNil(self.imageView.image); + [self.imageView setImageWithURL:self.jpegURL]; + [self expectationForPredicate:[NSPredicate predicateWithFormat:@"image != nil"] + evaluatedWithObject:self.imageView + handler:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatImageDownloadSucceedsWhenDuplicateRequestIsSentToImageView { + XCTAssertNil(self.imageView.image); + [self.imageView setImageWithURL:self.jpegURL]; + [self.imageView setImageWithURL:self.jpegURL]; + [self expectationForPredicate:[NSPredicate predicateWithFormat:@"image != nil"] + evaluatedWithObject:self.imageView + handler:nil]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testThatPlaceholderImageIsSetIfRequestFails { + UIImage *placeholder = [UIImage imageNamed:@"logo"]; + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should fail"]; + + [self.imageView setImageWithURLRequest:self.error404URLRequest + placeholderImage:placeholder + success:nil + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertEqual(self.imageView.image, placeholder); +} + +- (void)testResponseIsNilWhenLoadedFromCache { + AFImageDownloader *downloader = [UIImageView sharedImageDownloader]; + XCTestExpectation *cacheExpectation = [self expectationWithDescription:@"Cache request should succeed"]; + __block UIImage *downloadImage = nil; + [downloader + downloadImageForURLRequest:self.jpegURLRequest + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + downloadImage = responseObject; + [cacheExpectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + + __block UIImage *cachedImage = nil; + __block NSHTTPURLResponse *urlResponse; + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.imageView + setImageWithURLRequest:self.jpegURLRequest + placeholderImage:nil + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { + urlResponse = response; + cachedImage = image; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + XCTAssertNil(urlResponse); + XCTAssertNotNil(cachedImage); + XCTAssertEqual(cachedImage, downloadImage); +} + +- (void)testThatImageCanBeCancelledAndDownloadedImmediately { + //https://github.com/Alamofire/AlamofireImage/issues/55 + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.imageView setImageWithURL:self.jpegURL]; + [self.imageView cancelImageDownloadTask]; + __block UIImage *responseImage; + [self.imageView + setImageWithURLRequest:self.jpegURLRequest + placeholderImage:nil + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) { + responseImage = image; + [expectation fulfill]; + } + failure:nil]; + [self waitForExpectationsWithCommonTimeout]; + 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" + [self.imageView setImageWithURL:nil]; +#pragma clang diagnostic pop + +} + + + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFUIRefreshControlTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFUIRefreshControlTests.m new file mode 100644 index 0000000..c5ab5af --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFUIRefreshControlTests.m @@ -0,0 +1,116 @@ +// AFUIRefreshControlTests.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" +#import "UIRefreshControl+AFNetworking.h" +#import "AFURLSessionManager.h" + +@interface AFUIRefreshControlTests : AFTestCase +@property (nonatomic, strong) NSURLRequest *request; +@property (nonatomic, strong) UIRefreshControl *refreshControl; +@property (nonatomic, strong) AFURLSessionManager *sessionManager; +@end + +@implementation AFUIRefreshControlTests + +- (void)setUp { + [super setUp]; + self.refreshControl = [[UIRefreshControl alloc] init]; + self.request = [NSURLRequest requestWithURL:self.delayURL]; + self.sessionManager = [[AFURLSessionManager alloc] initWithSessionConfiguration:nil]; +} + +- (void)tearDown { + [super tearDown]; + [self.sessionManager invalidateSessionCancelingTasks:YES resetSession:NO]; + self.sessionManager = nil; +} + +- (void)testTaskDidResumeNotificationDoesNotCauseCrashForUIRCWithTask { + XCTestExpectation *expectation = [self expectationWithDescription:@"No Crash"]; + [self expectationForNotification:AFNetworkingTaskDidResumeNotification object:nil handler:nil]; + NSURLSessionDataTask *task = [self.sessionManager + dataTaskWithRequest:self.request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + [expectation fulfill]; + }]; + + [self.refreshControl setRefreshingWithStateOfTask:task]; + self.refreshControl = nil; + + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [task cancel]; +} + +- (void)testTaskDidCompleteNotificationDoesNotCauseCrashForUIRCWithTask { + XCTestExpectation *expectation = [self expectationWithDescription:@"No Crash"]; + [self expectationForNotification:AFNetworkingTaskDidCompleteNotification object:nil handler:nil]; + NSURLSessionDataTask *task = [self.sessionManager + dataTaskWithRequest:self.request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + //Without the dispatch after, this test would PASS errorenously because the test + //would finish before the notification was posted to all objects that were + //observing it. + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [expectation fulfill]; + }); + }]; + + [self.refreshControl setRefreshingWithStateOfTask:task]; + self.refreshControl = nil; + + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [task cancel]; +} + +- (void)testTaskDidSuspendNotificationDoesNotCauseCrashForUIRCWithTask { + XCTestExpectation *expectation = [self expectationWithDescription:@"No Crash"]; + [self expectationForNotification:AFNetworkingTaskDidSuspendNotification object:nil handler:nil]; + NSURLSessionDataTask *task = [self.sessionManager + dataTaskWithRequest:self.request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) { + //Without the dispatch after, this test would PASS errorenously because the test + //would finish before the notification was posted to all objects that were + //observing it. + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [expectation fulfill]; + }); + }]; + + [self.refreshControl setRefreshingWithStateOfTask:task]; + self.refreshControl = nil; + + [task resume]; + [task suspend]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [task cancel]; +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFURLSessionManagerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFURLSessionManagerTests.m new file mode 100644 index 0000000..fc4d3bf --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFURLSessionManagerTests.m @@ -0,0 +1,550 @@ +// AFURLSessionManagerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "AFTestCase.h" + +#import "AFURLSessionManager.h" + +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +#define NSFoundationVersionNumber_With_Fixed_28588583_bug 0.0 +#else +#define NSFoundationVersionNumber_With_Fixed_28588583_bug DBL_MAX +#endif + + +@interface AFURLSessionManagerTests : AFTestCase +@property (readwrite, nonatomic, strong) AFURLSessionManager *localManager; +@property (readwrite, nonatomic, strong) AFURLSessionManager *backgroundManager; +@end + +@implementation AFURLSessionManagerTests + +- (NSURLRequest *)bigImageURLRequest { + NSURL *url = [NSURL URLWithString:@"http://scitechdaily.com/images/New-Image-of-the-Galaxy-Messier-94-also-Known-as-NGC-4736.jpg"]; + NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0]; + return request; +} + +- (void)setUp { + [super setUp]; + self.localManager = [[AFURLSessionManager alloc] init]; + [self.localManager.session.configuration.URLCache removeAllCachedResponses]; + + //It was discovered that background sessions were hanging the test target + //on iOS 10 and Xcode 8. + // + //rdar://28588583 + // + //For now, we'll disable the unit tests for background managers until that can + //be resolved + if (NSFoundationVersionNumber > NSFoundationVersionNumber_With_Fixed_28588583_bug) { + NSString *identifier = [NSString stringWithFormat:@"com.afnetworking.tests.urlsession.%@", [[NSUUID UUID] UUIDString]]; + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:identifier]; + self.backgroundManager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; + } + else { + self.backgroundManager = nil; + } +} + +- (void)tearDown { + [super tearDown]; + [self.localManager.session.configuration.URLCache removeAllCachedResponses]; + [self.localManager invalidateSessionCancelingTasks:YES resetSession:NO]; + self.localManager = nil; + + [self.backgroundManager invalidateSessionCancelingTasks:YES resetSession:NO]; + self.backgroundManager = nil; +} + +#pragma mark Progress - + +- (void)testDataTaskDoesReportDownloadProgress { + NSURLSessionDataTask *task; + + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress should equal 1.0"]; + task = [self.localManager + dataTaskWithRequest:[self bigImageURLRequest] + uploadProgress:nil + downloadProgress:^(NSProgress * _Nonnull downloadProgress) { + if (downloadProgress.fractionCompleted == 1.0) { + [expectation fulfill]; + } + } + completionHandler:nil]; + + [task resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testDataTaskDownloadProgressCanBeKVOd { + NSURLSessionDataTask *task; + + task = [self.localManager + dataTaskWithRequest:[self bigImageURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + + NSProgress *progress = [self.localManager downloadProgressForTask:task]; + [self keyValueObservingExpectationForObject:progress keyPath:@"fractionCompleted" + handler:^BOOL(NSProgress *observedProgress, NSDictionary * _Nonnull change) { + double new = [change[@"new"] doubleValue]; + double old = [change[@"old"] doubleValue]; + return new == 1.0 && old != 0.0; + }]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testDownloadTaskDoesReportProgress { + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress should equal 1.0"]; + NSURLSessionTask *task; + task = [self.localManager + downloadTaskWithRequest:[self bigImageURLRequest] + progress:^(NSProgress * _Nonnull downloadProgress) { + if (downloadProgress.fractionCompleted == 1.0) { + [expectation fulfill]; + } + } + destination:nil + completionHandler:nil]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testSessionTaskDoesReportMetrics { + [self expectationForNotification:AFNetworkingTaskDidCompleteNotification object:nil handler:^BOOL(NSNotification * _Nonnull notification) { +#if AF_CAN_USE_AT_AVAILABLE && AF_CAN_INCLUDE_SESSION_TASK_METRICS + if (@available(iOS 10, macOS 10.12, watchOS 3, tvOS 10, *)) { + return [notification userInfo][AFNetworkingTaskDidCompleteSessionTaskMetrics] != nil; + } +#endif + return YES; + }]; + +#if AF_CAN_INCLUDE_SESSION_TASK_METRICS + __weak XCTestExpectation *metricsBlock = [self expectationWithDescription:@"Metrics completion block is called"]; + [self.localManager setTaskDidFinishCollectingMetricsBlock:^(NSURLSession * _Nonnull session, NSURLSessionTask * _Nonnull task, NSURLSessionTaskMetrics * _Nullable metrics) { + [metricsBlock fulfill]; + }]; +#endif + + NSURLSessionTask *task = [self.localManager downloadTaskWithRequest:[self bigImageURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testSessionIsStillValid { + + NSURLSession *session = self.localManager.session; + [self.localManager invalidateSessionCancelingTasks:YES resetSession:NO]; + + XCTAssertEqual(session, self.localManager.session); +} + +- (void)testSessionRecreatesAgain { + + [self.localManager invalidateSessionCancelingTasks:YES resetSession:YES]; + + XCTAssertNotNil(self.localManager.session); +} + +- (void)testUploadTaskDoesReportProgress { + NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"]; + while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) { + [payload appendString:@"AFNetworking"]; + } + + NSURL *url = [NSURL URLWithString:[[self.baseURL absoluteString] stringByAppendingString:@"/post"]]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0]; + [request setHTTPMethod:@"POST"]; + + __weak XCTestExpectation *expectation = [self expectationWithDescription:@"Progress should equal 1.0"]; + + NSURLSessionTask *task; + task = [self.localManager + uploadTaskWithRequest:request + fromData:[payload dataUsingEncoding:NSUTF8StringEncoding] + progress:^(NSProgress * _Nonnull uploadProgress) { + NSLog(@"%@", uploadProgress.localizedDescription); + if (uploadProgress.fractionCompleted == 1.0) { + [expectation fulfill]; + } + } + completionHandler:nil]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testUploadProgressCanBeKVOd { + NSMutableString *payload = [NSMutableString stringWithString:@"AFNetworking"]; + while ([payload lengthOfBytesUsingEncoding:NSUTF8StringEncoding] < 20000) { + [payload appendString:@"AFNetworking"]; + } + + NSURL *url = [NSURL URLWithString:[[self.baseURL absoluteString] stringByAppendingString:@"/post"]]; + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:60.0]; + [request setHTTPMethod:@"POST"]; + + NSURLSessionTask *task; + task = [self.localManager + uploadTaskWithRequest:request + fromData:[payload dataUsingEncoding:NSUTF8StringEncoding] + progress:nil + completionHandler:nil]; + + NSProgress *uploadProgress = [self.localManager uploadProgressForTask:task]; + [self keyValueObservingExpectationForObject:uploadProgress keyPath:NSStringFromSelector(@selector(fractionCompleted)) expectedValue:@(1.0)]; + + [task resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +#pragma mark - Issue #2702 Tests +// The following tests are all releated to issue #2702 + +- (void)testDidResumeNotificationIsReceivedByLocalDataTaskAfterResume { + NSURLSessionDataTask *task = [self.localManager dataTaskWithRequest:[self _delayURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + [self _testResumeNotificationForTask:task]; +} + +- (void)testDidSuspendNotificationIsReceivedByLocalDataTaskAfterSuspend { + NSURLSessionDataTask *task = [self.localManager dataTaskWithRequest:[self _delayURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + [self _testSuspendNotificationForTask:task]; +} + +- (void)testDidResumeNotificationIsReceivedByBackgroundDataTaskAfterResume { + if (self.backgroundManager) { + NSURLSessionDataTask *task = [self.backgroundManager dataTaskWithRequest:[self _delayURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + [self _testResumeNotificationForTask:task]; + } +} + +- (void)testDidSuspendNotificationIsReceivedByBackgroundDataTaskAfterSuspend { + if (self.backgroundManager) { + NSURLSessionDataTask *task = [self.backgroundManager dataTaskWithRequest:[self _delayURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + [self _testSuspendNotificationForTask:task]; + } +} + +- (void)testDidResumeNotificationIsReceivedByLocalUploadTaskAfterResume { + NSURLSessionUploadTask *task = [self.localManager uploadTaskWithRequest:[self _delayURLRequest] + fromData:[NSData data] + progress:nil + completionHandler:nil]; + [self _testResumeNotificationForTask:task]; +} + +- (void)testDidSuspendNotificationIsReceivedByLocalUploadTaskAfterSuspend { + NSURLSessionUploadTask *task = [self.localManager uploadTaskWithRequest:[self _delayURLRequest] + fromData:[NSData data] + progress:nil + completionHandler:nil]; + [self _testSuspendNotificationForTask:task]; +} + +- (void)testDidResumeNotificationIsReceivedByBackgroundUploadTaskAfterResume { + if (self.backgroundManager) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" + NSURLSessionUploadTask *task = [self.backgroundManager uploadTaskWithRequest:[self _delayURLRequest] + fromFile:nil + progress:nil + completionHandler:nil]; +#pragma clang diagnostic pop + [self _testResumeNotificationForTask:task]; + } +} + +- (void)testDidSuspendNotificationIsReceivedByBackgroundUploadTaskAfterSuspend { + if (self.backgroundManager) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" + NSURLSessionUploadTask *task = [self.backgroundManager uploadTaskWithRequest:[self _delayURLRequest] + fromFile:nil + progress:nil + completionHandler:nil]; +#pragma clang diagnostic pop + [self _testSuspendNotificationForTask:task]; + } +} + +- (void)testDidResumeNotificationIsReceivedByLocalDownloadTaskAfterResume { + NSURLSessionDownloadTask *task = [self.localManager downloadTaskWithRequest:[self _delayURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + [self _testResumeNotificationForTask:task]; +} + +- (void)testDidSuspendNotificationIsReceivedByLocalDownloadTaskAfterSuspend { + NSURLSessionDownloadTask *task = [self.localManager downloadTaskWithRequest:[self _delayURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + [self _testSuspendNotificationForTask:task]; +} + +- (void)testDidResumeNotificationIsReceivedByBackgroundDownloadTaskAfterResume { + if (self.backgroundManager) { + NSURLSessionDownloadTask *task = [self.backgroundManager downloadTaskWithRequest:[self _delayURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + [self _testResumeNotificationForTask:task]; + } +} + +- (void)testDidSuspendNotificationIsReceivedByBackgroundDownloadTaskAfterSuspend { + if (self.backgroundManager) { + NSURLSessionDownloadTask *task = [self.backgroundManager downloadTaskWithRequest:[self _delayURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + [self _testSuspendNotificationForTask:task]; + } +} + +- (void)testSwizzlingIsProperlyConfiguredForDummyClass { + IMP originalAFResumeIMP = [self _originalAFResumeImplementation]; + IMP originalAFSuspendIMP = [self _originalAFSuspendImplementation]; + XCTAssert(originalAFResumeIMP, @"Swizzled af_resume Method Not Found"); + XCTAssert(originalAFSuspendIMP, @"Swizzled af_suspend Method Not Found"); + XCTAssertNotEqual(originalAFResumeIMP, originalAFSuspendIMP, @"af_resume and af_suspend should not be equal"); +} + +- (void)testSwizzlingIsWorkingAsExpectedForForegroundDataTask { + NSURLSessionTask *task = [self.localManager dataTaskWithRequest:[self _delayURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + [self _testSwizzlingForTask:task]; + [task cancel]; +} + +- (void)testSwizzlingIsWorkingAsExpectedForForegroundUpload { + NSURLSessionTask *task = [self.localManager uploadTaskWithRequest:[self _delayURLRequest] + fromData:[NSData data] + progress:nil + completionHandler:nil]; + [self _testSwizzlingForTask:task]; + [task cancel]; +} + +- (void)testSwizzlingIsWorkingAsExpectedForForegroundDownload { + NSURLSessionTask *task = [self.localManager downloadTaskWithRequest:[self _delayURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + [self _testSwizzlingForTask:task]; + [task cancel]; +} + +- (void)testSwizzlingIsWorkingAsExpectedForBackgroundDataTask { + //iOS 7 doesn't let us use a background manager in these tests, so reference these + //classes directly. There are tests below to confirm background manager continues + //to return the exepcted classes going forward. If those fail in a future iOS version, + //it should point us to a problem here. + [self _testSwizzlingForTaskClass:NSClassFromString(@"__NSCFBackgroundDataTask")]; +} + +- (void)testSwizzlingIsWorkingAsExpectedForBackgroundUploadTask { + //iOS 7 doesn't let us use a background manager in these tests, so reference these + //classes directly. There are tests below to confirm background manager continues + //to return the exepcted classes going forward. If those fail in a future iOS version, + //it should point us to a problem here. + [self _testSwizzlingForTaskClass:NSClassFromString(@"__NSCFBackgroundUploadTask")]; +} + +- (void)testSwizzlingIsWorkingAsExpectedForBackgroundDownloadTask { + //iOS 7 doesn't let us use a background manager in these tests, so reference these + //classes directly. There are tests below to confirm background manager continues + //to return the exepcted classes going forward. If those fail in a future iOS version, + //it should point us to a problem here. + [self _testSwizzlingForTaskClass:NSClassFromString(@"__NSCFBackgroundDownloadTask")]; +} + +- (void)testBackgroundManagerReturnsExpectedClassForDataTask { + if (self.backgroundManager) { + NSURLSessionTask *task = [self.backgroundManager dataTaskWithRequest:[self _delayURLRequest] + uploadProgress:nil + downloadProgress:nil + completionHandler:nil]; + XCTAssert([NSStringFromClass([task class]) isEqualToString:@"__NSCFBackgroundDataTask"]); + [task cancel]; + } else { + NSLog(@"Unable to run %@ because self.backgroundManager is nil", NSStringFromSelector(_cmd)); + } +} + +- (void)testBackgroundManagerReturnsExpectedClassForUploadTask { + if (self.backgroundManager) { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" + NSURLSessionTask *task = [self.backgroundManager uploadTaskWithRequest:[self _delayURLRequest] + fromFile:nil + progress:nil + completionHandler:nil]; +#pragma clang diagnostic pop + XCTAssert([NSStringFromClass([task class]) isEqualToString:@"__NSCFBackgroundUploadTask"]); + [task cancel]; + } else { + NSLog(@"Unable to run %@ because self.backgroundManager is nil", NSStringFromSelector(_cmd)); + } +} + +- (void)testBackgroundManagerReturnsExpectedClassForDownloadTask { + if (self.backgroundManager) { + NSURLSessionTask *task = [self.backgroundManager downloadTaskWithRequest:[self _delayURLRequest] + progress:nil + destination:nil + completionHandler:nil]; + XCTAssert([NSStringFromClass([task class]) isEqualToString:@"__NSCFBackgroundDownloadTask"]); + [task cancel]; + } else { + NSLog(@"Unable to run %@ because self.backgroundManager is nil", NSStringFromSelector(_cmd)); + } +} + +#pragma mark - Notifications + +- (void)testTaskMoveSuccessfullyAfterDownloading { + NSURL *dirURL = [[[NSFileManager defaultManager] URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject]; + NSURL *destinationURL = [dirURL URLByAppendingPathComponent:NSUUID.UUID.UUIDString]; + + NSURLSessionDownloadTask *task = [self.localManager downloadTaskWithRequest:[self bigImageURLRequest] + progress:nil + destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) { + return destinationURL; + } + completionHandler:nil]; + + [self expectationForNotification:AFURLSessionDownloadTaskDidMoveFileSuccessfullyNotification + object:nil + handler:nil]; + [task resume]; + [self waitForExpectationsWithCommonTimeout]; + [[NSFileManager defaultManager] removeItemAtURL:destinationURL error:nil]; +} + +- (void)testTaskMoveFailedAfterDownloading { + NSURLSessionDownloadTask *downloadTask = [self.localManager downloadTaskWithRequest:[self bigImageURLRequest] + progress:nil + destination:^NSURL *(NSURL *targetPath, NSURLResponse *response) { + // Try to move the destination file to a nonexist path on purpose for simulating a move failure. + return [NSURL fileURLWithPath:@"/a/b/c"]; + } + completionHandler:nil]; + + [self expectationForNotification:AFURLSessionDownloadTaskDidFailToMoveFileNotification + object:nil + handler:nil]; + [downloadTask resume]; + [self waitForExpectationsWithCommonTimeout]; +} + +#pragma mark - private + +- (void)_testResumeNotificationForTask:(NSURLSessionTask *)task { + [self expectationForNotification:AFNetworkingTaskDidResumeNotification + object:nil + handler:nil]; + [task resume]; + [task suspend]; + [task resume]; + [self waitForExpectationsWithTimeout:2.0 handler:nil]; + [task cancel]; +} + +- (void)_testSuspendNotificationForTask:(NSURLSessionTask *)task { + [self expectationForNotification:AFNetworkingTaskDidSuspendNotification + object:nil + handler:nil]; + [task resume]; + [task suspend]; + [task resume]; + [self waitForExpectationsWithTimeout:2.0 handler:nil]; + [task cancel]; +} + +- (NSURLRequest *)_delayURLRequest { + return [NSURLRequest requestWithURL:self.delayURL]; +} + +- (IMP)_implementationForTask:(NSURLSessionTask *)task selector:(SEL)selector { + return [self _implementationForClass:[task class] selector:selector]; +} + +- (IMP)_implementationForClass:(Class)class selector:(SEL)selector { + return method_getImplementation(class_getInstanceMethod(class, selector)); +} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wundeclared-selector" +- (IMP)_originalAFResumeImplementation { + return method_getImplementation(class_getInstanceMethod(NSClassFromString(@"_AFURLSessionTaskSwizzling"), @selector(af_resume))); +} + +- (IMP)_originalAFSuspendImplementation { + return method_getImplementation(class_getInstanceMethod(NSClassFromString(@"_AFURLSessionTaskSwizzling"), @selector(af_suspend))); +} + +- (void)_testSwizzlingForTask:(NSURLSessionTask *)task { + [self _testSwizzlingForTaskClass:[task class]]; +} + +- (void)_testSwizzlingForTaskClass:(Class)class { + IMP originalAFResumeIMP = [self _originalAFResumeImplementation]; + IMP originalAFSuspendIMP = [self _originalAFSuspendImplementation]; + + IMP taskResumeImp = [self _implementationForClass:class selector:@selector(resume)]; + IMP taskSuspendImp = [self _implementationForClass:class selector:@selector(suspend)]; + XCTAssertEqual(originalAFResumeIMP, taskResumeImp, @"resume has not been properly swizzled for %@", NSStringFromClass(class)); + XCTAssertEqual(originalAFSuspendIMP, taskSuspendImp, @"suspend has not been properly swizzled for %@", NSStringFromClass(class)); + + IMP taskAFResumeImp = [self _implementationForClass:class selector:@selector(af_resume)]; + IMP taskAFSuspendImp = [self _implementationForClass:class selector:@selector(af_suspend)]; + XCTAssert(taskAFResumeImp != NULL, @"af_resume is nil. Something has not been been swizzled right for %@", NSStringFromClass(class)); + XCTAssertNotEqual(taskAFResumeImp, taskResumeImp, @"af_resume has not been properly swizzled for %@", NSStringFromClass(class)); + XCTAssert(taskAFSuspendImp != NULL, @"af_suspend is nil. Something has not been been swizzled right for %@", NSStringFromClass(class)); + XCTAssertNotEqual(taskAFSuspendImp, taskSuspendImp, @"af_suspend has not been properly swizzled for %@", NSStringFromClass(class)); +} +#pragma clang diagnostic pop + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFWKWebViewTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFWKWebViewTests.m new file mode 100644 index 0000000..80c10b5 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFWKWebViewTests.m @@ -0,0 +1,136 @@ +// AFWKWebViewTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import +#import "AFTestCase.h" +#import "WKWebView+AFNetworking.h" + +@interface AFWKWebViewTests : AFTestCase + +@property (nonatomic, strong) WKWebView *webView; +@property (nonatomic, strong) WKNavigation *navigation; +@property (nonatomic, strong) NSURLRequest *HTMLRequest; +@property (nonatomic, strong) NSURLRequest *largeHTMLRequest; +@property (nonatomic, strong) NSURLRequest *headerRequest; +@property (nonatomic, strong) NSProgress *progressCapture; + +@end + +@implementation AFWKWebViewTests + +-(void)setUp { + [super setUp]; + self.webView = [WKWebView new]; + self.webView.navigationDelegate = self; + self.navigation = [WKNavigation new]; + self.HTMLRequest = [NSURLRequest requestWithURL:[self.baseURL URLByAppendingPathComponent:@"html"] + cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData + timeoutInterval:self.networkTimeout]; + NSURL * largeURL = [[self.baseURL URLByAppendingPathComponent:@"bytes"] URLByAppendingPathComponent:@(1024 * 1024).stringValue]; + self.largeHTMLRequest = [NSURLRequest requestWithURL:largeURL + cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData + timeoutInterval:self.networkTimeout]; + NSMutableURLRequest *customHeaderRequest = [NSMutableURLRequest requestWithURL:[self.baseURL URLByAppendingPathComponent:@"headers"]]; + [customHeaderRequest setValue:@"Custom-Header-Value" forHTTPHeaderField:@"Custom-Header-Field"]; + self.headerRequest = customHeaderRequest; +} + +- (void)testNilProgressDoesNotCauseCrash { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.webView + loadRequest:self.HTMLRequest + navigation:self.navigation + progress:nil + success:^NSString * _Nonnull(NSHTTPURLResponse * _Nonnull response, NSString * _Nonnull HTML) { + [expectation fulfill]; + return HTML; + } failure:^(NSError * _Nonnull error) { + XCTFail(@"Request %@ failed with error %@", self.HTMLRequest, error); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testNUllProgressDoesNotCauseCrash { + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.webView + loadRequest:self.HTMLRequest + navigation:self.navigation + progress:NULL + success:^NSString * _Nonnull(NSHTTPURLResponse * _Nonnull response, NSString * _Nonnull HTML) { + [expectation fulfill]; + return HTML; + } failure:^(NSError * _Nonnull error) { + XCTFail(@"Request %@ failed with error %@", self.HTMLRequest, error); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testProgressIsSet { + NSProgress* progress = nil; + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + + [self.webView + loadRequest:self.largeHTMLRequest + navigation:self.navigation + progress:&progress + success:^NSString * _Nonnull(NSHTTPURLResponse * _Nonnull response, NSString * _Nonnull HTML) { + [expectation fulfill]; + return HTML; + } failure:^(NSError * _Nonnull error) { + XCTFail(@"Request %@ failed with error %@", self.largeHTMLRequest, error); + [expectation fulfill]; + }]; + [self keyValueObservingExpectationForObject:progress + keyPath:@"fractionCompleted" + expectedValue:@(1.0)]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)testRequestWithCustomHeaders { + + XCTestExpectation *expectation = [self expectationWithDescription:@"Request should succeed"]; + [self.webView + loadRequest:self.headerRequest + navigation:self.navigation + progress:NULL + success:^NSString * _Nonnull(NSHTTPURLResponse * _Nonnull response, NSString * _Nonnull string) { + // Here string is actually JSON + NSDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:[string dataUsingEncoding:NSUTF8StringEncoding] options:(NSJSONReadingOptions)0 error:nil]; + + NSDictionary *headers = responseObject[@"headers"]; + XCTAssertTrue([headers[@"Custom-Header-Field"] isEqualToString:@"Custom-Header-Value"]); + [expectation fulfill]; + return string; + } failure:^(NSError * _Nonnull error) { + XCTFail(@"Request %@ failed with error %@", self.headerRequest, error); + [expectation fulfill]; + }]; + [self waitForExpectationsWithCommonTimeout]; +} + +- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error { + XCTFail(@"Navigation failed with error %@", error); +} + +@end diff --git a/TwoNetworking/AFNetworking/Tests/Tests/AFXMLDocumentResponseSerializerTests.m b/TwoNetworking/AFNetworking/Tests/Tests/AFXMLDocumentResponseSerializerTests.m new file mode 100644 index 0000000..0682943 --- /dev/null +++ b/TwoNetworking/AFNetworking/Tests/Tests/AFXMLDocumentResponseSerializerTests.m @@ -0,0 +1,101 @@ +// AFXMLDocumentResponseSerializerTests.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFTestCase.h" + +#import "AFURLRequestSerialization.h" +#import "AFURLResponseSerialization.h" + +#import + +static NSData * AFXMLTestData() { + return [@"someValue" 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:[@"someValue" 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 diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h new file mode 100644 index 0000000..1a27bb4 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.h @@ -0,0 +1,160 @@ +// AFAutoPurgingImageCache.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import +#import + +#if TARGET_OS_IOS || TARGET_OS_TV +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + The `AFImageCache` protocol defines a set of APIs for adding, removing and fetching images from a cache synchronously. + */ +@protocol AFImageCache + +/** + Adds the image to the cache with the given identifier. + + @param image The image to cache. + @param identifier The unique identifier for the image in the cache. + */ +- (void)addImage:(UIImage *)image withIdentifier:(NSString *)identifier; + +/** + Removes the image from the cache matching the given identifier. + + @param identifier The unique identifier for the image in the cache. + + @return A BOOL indicating whether or not the image was removed from the cache. + */ +- (BOOL)removeImageWithIdentifier:(NSString *)identifier; + +/** + Removes all images from the cache. + + @return A BOOL indicating whether or not all images were removed from the cache. + */ +- (BOOL)removeAllImages; + +/** + Returns the image in the cache associated with the given identifier. + + @param identifier The unique identifier for the image in the cache. + + @return An image for the matching identifier, or nil. + */ +- (nullable UIImage *)imageWithIdentifier:(NSString *)identifier; +@end + + +/** + The `ImageRequestCache` protocol extends the `ImageCache` protocol by adding methods for adding, removing and fetching images from a cache given an `NSURLRequest` and additional identifier. + */ +@protocol AFImageRequestCache + +/** + 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. + + @param image The image to cache. + @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. + */ +- (void)addImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier; + +/** + Removes the image from the cache using an identifier created from the request and additional identifier. + + @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 all images were removed from the cache. + */ +- (BOOL)removeImageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier; + +/** + Returns the image from the cache associated with an identifier created from the request and additional identifier. + + @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 An image for the matching request and identifier, or nil. + */ +- (nullable UIImage *)imageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier; + +@end + +/** + The `AutoPurgingImageCache` in an in-memory image cache used to store images up to a given memory capacity. When the memory capacity is reached, the image cache is sorted by last access date, then the oldest image is continuously purged until the preferred memory usage after purge is met. Each time an image is accessed through the cache, the internal access date of the image is updated. + */ +@interface AFAutoPurgingImageCache : NSObject + +/** + The total memory capacity of the cache in bytes. + */ +@property (nonatomic, assign) UInt64 memoryCapacity; + +/** + The preferred memory usage after purge in bytes. During a purge, images will be purged until the memory capacity drops below this limit. + */ +@property (nonatomic, assign) UInt64 preferredMemoryUsageAfterPurge; + +/** + The current total memory usage in bytes of all images stored within the cache. + */ +@property (nonatomic, assign, readonly) UInt64 memoryUsage; + +/** + Initialies the `AutoPurgingImageCache` instance with default values for memory capacity and preferred memory usage after purge limit. `memoryCapcity` defaults to `100 MB`. `preferredMemoryUsageAfterPurge` defaults to `60 MB`. + + @return The new `AutoPurgingImageCache` instance. + */ +- (instancetype)init; + +/** + Initialies the `AutoPurgingImageCache` instance with the given memory capacity and preferred memory usage + after purge limit. + + @param memoryCapacity The total memory capacity of the cache in bytes. + @param preferredMemoryCapacity The preferred memory usage after purge in bytes. + + @return The new `AutoPurgingImageCache` instance. + */ +- (instancetype)initWithMemoryCapacity:(UInt64)memoryCapacity preferredMemoryCapacity:(UInt64)preferredMemoryCapacity; + +@end + +NS_ASSUME_NONNULL_END + +#endif + diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m new file mode 100644 index 0000000..a09e87c --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFAutoPurgingImageCache.m @@ -0,0 +1,205 @@ +// AFAutoPurgingImageCache.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFAutoPurgingImageCache.h" + +@interface AFCachedImage : NSObject + +@property (nonatomic, strong) UIImage *image; +@property (nonatomic, copy) NSString *identifier; +@property (nonatomic, assign) UInt64 totalBytes; +@property (nonatomic, strong) NSDate *lastAccessDate; +@property (nonatomic, assign) UInt64 currentMemoryUsage; + +@end + +@implementation AFCachedImage + +- (instancetype)initWithImage:(UIImage *)image identifier:(NSString *)identifier { + if (self = [self init]) { + self.image = image; + self.identifier = identifier; + + CGSize imageSize = CGSizeMake(image.size.width * image.scale, image.size.height * image.scale); + CGFloat bytesPerPixel = 4.0; + CGFloat bytesPerSize = imageSize.width * imageSize.height; + self.totalBytes = (UInt64)bytesPerPixel * (UInt64)bytesPerSize; + self.lastAccessDate = [NSDate date]; + } + return self; +} + +- (UIImage *)accessImage { + self.lastAccessDate = [NSDate date]; + return self.image; +} + +- (NSString *)description { + NSString *descriptionString = [NSString stringWithFormat:@"Idenfitier: %@ lastAccessDate: %@ ", self.identifier, self.lastAccessDate]; + return descriptionString; + +} + +@end + +@interface AFAutoPurgingImageCache () +@property (nonatomic, strong) NSMutableDictionary *cachedImages; +@property (nonatomic, assign) UInt64 currentMemoryUsage; +@property (nonatomic, strong) dispatch_queue_t synchronizationQueue; +@end + +@implementation AFAutoPurgingImageCache + +- (instancetype)init { + return [self initWithMemoryCapacity:100 * 1024 * 1024 preferredMemoryCapacity:60 * 1024 * 1024]; +} + +- (instancetype)initWithMemoryCapacity:(UInt64)memoryCapacity preferredMemoryCapacity:(UInt64)preferredMemoryCapacity { + if (self = [super init]) { + self.memoryCapacity = memoryCapacity; + self.preferredMemoryUsageAfterPurge = preferredMemoryCapacity; + self.cachedImages = [[NSMutableDictionary alloc] init]; + + NSString *queueName = [NSString stringWithFormat:@"com.alamofire.autopurgingimagecache-%@", [[NSUUID UUID] UUIDString]]; + self.synchronizationQueue = dispatch_queue_create([queueName cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); + + [[NSNotificationCenter defaultCenter] + addObserver:self + selector:@selector(removeAllImages) + name:UIApplicationDidReceiveMemoryWarningNotification + object:nil]; + + } + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + +- (UInt64)memoryUsage { + __block UInt64 result = 0; + dispatch_sync(self.synchronizationQueue, ^{ + result = self.currentMemoryUsage; + }); + return result; +} + +- (void)addImage:(UIImage *)image withIdentifier:(NSString *)identifier { + dispatch_barrier_async(self.synchronizationQueue, ^{ + AFCachedImage *cacheImage = [[AFCachedImage alloc] initWithImage:image identifier:identifier]; + + AFCachedImage *previousCachedImage = self.cachedImages[identifier]; + if (previousCachedImage != nil) { + self.currentMemoryUsage -= previousCachedImage.totalBytes; + } + + self.cachedImages[identifier] = cacheImage; + self.currentMemoryUsage += cacheImage.totalBytes; + }); + + dispatch_barrier_async(self.synchronizationQueue, ^{ + if (self.currentMemoryUsage > self.memoryCapacity) { + UInt64 bytesToPurge = self.currentMemoryUsage - self.preferredMemoryUsageAfterPurge; + NSMutableArray *sortedImages = [NSMutableArray arrayWithArray:self.cachedImages.allValues]; + NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lastAccessDate" + ascending:YES]; + [sortedImages sortUsingDescriptors:@[sortDescriptor]]; + + UInt64 bytesPurged = 0; + + for (AFCachedImage *cachedImage in sortedImages) { + [self.cachedImages removeObjectForKey:cachedImage.identifier]; + bytesPurged += cachedImage.totalBytes; + if (bytesPurged >= bytesToPurge) { + break; + } + } + self.currentMemoryUsage -= bytesPurged; + } + }); +} + +- (BOOL)removeImageWithIdentifier:(NSString *)identifier { + __block BOOL removed = NO; + dispatch_barrier_sync(self.synchronizationQueue, ^{ + AFCachedImage *cachedImage = self.cachedImages[identifier]; + if (cachedImage != nil) { + [self.cachedImages removeObjectForKey:identifier]; + self.currentMemoryUsage -= cachedImage.totalBytes; + removed = YES; + } + }); + return removed; +} + +- (BOOL)removeAllImages { + __block BOOL removed = NO; + dispatch_barrier_sync(self.synchronizationQueue, ^{ + if (self.cachedImages.count > 0) { + [self.cachedImages removeAllObjects]; + self.currentMemoryUsage = 0; + removed = YES; + } + }); + return removed; +} + +- (nullable UIImage *)imageWithIdentifier:(NSString *)identifier { + __block UIImage *image = nil; + dispatch_sync(self.synchronizationQueue, ^{ + AFCachedImage *cachedImage = self.cachedImages[identifier]; + image = [cachedImage accessImage]; + }); + return image; +} + +- (void)addImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier { + [self addImage:image withIdentifier:[self imageCacheKeyFromURLRequest:request withAdditionalIdentifier:identifier]]; +} + +- (BOOL)removeImageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier { + return [self removeImageWithIdentifier:[self imageCacheKeyFromURLRequest:request withAdditionalIdentifier:identifier]]; +} + +- (nullable UIImage *)imageforRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)identifier { + return [self imageWithIdentifier:[self imageCacheKeyFromURLRequest:request withAdditionalIdentifier:identifier]]; +} + +- (NSString *)imageCacheKeyFromURLRequest:(NSURLRequest *)request withAdditionalIdentifier:(NSString *)additionalIdentifier { + NSString *key = request.URL.absoluteString; + if (additionalIdentifier != nil) { + key = [key stringByAppendingString:additionalIdentifier]; + } + return key; +} + +- (BOOL)shouldCacheImage:(UIImage *)image forRequest:(NSURLRequest *)request withAdditionalIdentifier:(nullable NSString *)identifier { + return YES; +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h new file mode 100644 index 0000000..3bf5a32 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.h @@ -0,0 +1,171 @@ +// AFImageDownloader.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import +#import "AFAutoPurgingImageCache.h" +#import "AFHTTPSessionManager.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, AFImageDownloadPrioritization) { + AFImageDownloadPrioritizationFIFO, + AFImageDownloadPrioritizationLIFO +}; + +/** + The `AFImageDownloadReceipt` is an object vended by the `AFImageDownloader` when starting a data task. It can be used to cancel active tasks running on the `AFImageDownloader` session. As a general rule, image data tasks should be cancelled using the `AFImageDownloadReceipt` instead of calling `cancel` directly on the `task` itself. The `AFImageDownloader` is optimized to handle duplicate task scenarios as well as pending versus active downloads. + */ +@interface AFImageDownloadReceipt : NSObject + +/** + The data task created by the `AFImageDownloader`. +*/ +@property (nonatomic, strong) NSURLSessionDataTask *task; + +/** + The unique identifier for the success and failure blocks when duplicate requests are made. + */ +@property (nonatomic, strong) NSUUID *receiptID; +@end + +/** The `AFImageDownloader` class is responsible for downloading images in parallel on a prioritized queue. Incoming downloads are added to the front or back of the queue depending on the download prioritization. Each downloaded image is cached in the underlying `NSURLCache` as well as the in-memory image cache. By default, any download request with a cached image equivalent in the image cache will automatically be served the cached image representation. + */ +@interface AFImageDownloader : NSObject + +/** + The image cache used to store all downloaded images in. `AFAutoPurgingImageCache` by default. + */ +@property (nonatomic, strong, nullable) id imageCache; + +/** + The `AFHTTPSessionManager` used to download images. By default, this is configured with an `AFImageResponseSerializer`, and a shared `NSURLCache` for all image downloads. + */ +@property (nonatomic, strong) AFHTTPSessionManager *sessionManager; + +/** + Defines the order prioritization of incoming download requests being inserted into the queue. `AFImageDownloadPrioritizationFIFO` by default. + */ +@property (nonatomic, assign) AFImageDownloadPrioritization downloadPrioritization; + +/** + The shared default instance of `AFImageDownloader` initialized with default values. + */ ++ (instancetype)defaultInstance; + +/** + Creates a default `NSURLCache` with common usage parameter values. + + @returns The default `NSURLCache` instance. + */ ++ (NSURLCache *)defaultURLCache; + +/** + The default `NSURLSessionConfiguration` with common usage parameter values. + */ ++ (NSURLSessionConfiguration *)defaultURLSessionConfiguration; + +/** + Default initializer + + @return An instance of `AFImageDownloader` initialized with default values. + */ +- (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. + + @param sessionManager The session manager to use to download images. + @param downloadPrioritization The download prioritization of the download queue. + @param maximumActiveDownloads The maximum number of active downloads allowed at any given time. Recommend `4`. + @param imageCache The image cache used to store all downloaded images in. + + @return The new `AFImageDownloader` instance. + */ +- (instancetype)initWithSessionManager:(AFHTTPSessionManager *)sessionManager + downloadPrioritization:(AFImageDownloadPrioritization)downloadPrioritization + maximumActiveDownloads:(NSInteger)maximumActiveDownloads + imageCache:(nullable id )imageCache; + +/** + Creates a data task using the `sessionManager` instance for the specified URL request. + + If the same data task is already in the queue or currently being downloaded, the success and failure blocks are + appended to the already existing task. Once the task completes, all success or failure blocks attached to the + task are executed in the order they were added. + + @param request The URL request. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + + @return The image download receipt for the data task if available. `nil` if the image is stored in the cache. + cache and the URL request cache policy allows the cache to be used. + */ +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + +/** + Creates a data task using the `sessionManager` instance for the specified URL request. + + If the same data task is already in the queue or currently being downloaded, the success and failure blocks are + appended to the already existing task. Once the task completes, all success or failure blocks attached to the + task are executed in the order they were added. + + @param request The URL request. + @param receiptID The identifier to use for the download receipt that will be created for this request. This must be a unique identifier that does not represent any other request. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + + @return The image download receipt for the data task if available. `nil` if the image is stored in the cache. + cache and the URL request cache policy allows the cache to be used. + */ +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + withReceiptID:(NSUUID *)receiptID + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + +/** + Cancels the data task in the receipt by removing the corresponding success and failure blocks and cancelling the data task if necessary. + + If the data task is pending in the queue, it will be cancelled if no other success and failure blocks are registered with the data task. If the data task is currently executing or is already completed, the success and failure blocks are removed and will not be called when the task finishes. + + @param imageDownloadReceipt The image download receipt to cancel. + */ +- (void)cancelTaskForImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt; + +@end + +#endif + +NS_ASSUME_NONNULL_END diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m new file mode 100644 index 0000000..008a782 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFImageDownloader.m @@ -0,0 +1,421 @@ +// AFImageDownloader.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFImageDownloader.h" +#import "AFHTTPSessionManager.h" + +@interface AFImageDownloaderResponseHandler : NSObject +@property (nonatomic, strong) NSUUID *uuid; +@property (nonatomic, copy) void (^successBlock)(NSURLRequest *, NSHTTPURLResponse *, UIImage *); +@property (nonatomic, copy) void (^failureBlock)(NSURLRequest *, NSHTTPURLResponse *, NSError *); +@end + +@implementation AFImageDownloaderResponseHandler + +- (instancetype)initWithUUID:(NSUUID *)uuid + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { + if (self = [self init]) { + self.uuid = uuid; + self.successBlock = success; + self.failureBlock = failure; + } + return self; +} + +- (NSString *)description { + return [NSString stringWithFormat: @"UUID: %@", [self.uuid UUIDString]]; +} + +@end + +@interface AFImageDownloaderMergedTask : NSObject +@property (nonatomic, strong) NSString *URLIdentifier; +@property (nonatomic, strong) NSUUID *identifier; +@property (nonatomic, strong) NSURLSessionDataTask *task; +@property (nonatomic, strong) NSMutableArray *responseHandlers; + +@end + +@implementation AFImageDownloaderMergedTask + +- (instancetype)initWithURLIdentifier:(NSString *)URLIdentifier identifier:(NSUUID *)identifier task:(NSURLSessionDataTask *)task { + if (self = [self init]) { + self.URLIdentifier = URLIdentifier; + self.task = task; + self.identifier = identifier; + self.responseHandlers = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)addResponseHandler:(AFImageDownloaderResponseHandler *)handler { + [self.responseHandlers addObject:handler]; +} + +- (void)removeResponseHandler:(AFImageDownloaderResponseHandler *)handler { + [self.responseHandlers removeObject:handler]; +} + +@end + +@implementation AFImageDownloadReceipt + +- (instancetype)initWithReceiptID:(NSUUID *)receiptID task:(NSURLSessionDataTask *)task { + if (self = [self init]) { + self.receiptID = receiptID; + self.task = task; + } + return self; +} + +@end + +@interface AFImageDownloader () + +@property (nonatomic, strong) dispatch_queue_t synchronizationQueue; +@property (nonatomic, strong) dispatch_queue_t responseQueue; + +@property (nonatomic, assign) NSInteger maximumActiveDownloads; +@property (nonatomic, assign) NSInteger activeRequestCount; + +@property (nonatomic, strong) NSMutableArray *queuedMergedTasks; +@property (nonatomic, strong) NSMutableDictionary *mergedTasks; + +@end + +@implementation AFImageDownloader + ++ (NSURLCache *)defaultURLCache { + NSUInteger memoryCapacity = 20 * 1024 * 1024; // 20MB + NSUInteger diskCapacity = 150 * 1024 * 1024; // 150MB + NSURL *cacheURL = [[[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory + inDomain:NSUserDomainMask + appropriateForURL:nil + create:YES + error:nil] + URLByAppendingPathComponent:@"com.alamofire.imagedownloader"]; + +#if TARGET_OS_MACCATALYST + return [[NSURLCache alloc] initWithMemoryCapacity:memoryCapacity + diskCapacity:diskCapacity + directoryURL:cacheURL]; +#else + return [[NSURLCache alloc] initWithMemoryCapacity:memoryCapacity + diskCapacity:diskCapacity + diskPath:[cacheURL path]]; +#endif +} + ++ (NSURLSessionConfiguration *)defaultURLSessionConfiguration { + NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; + + //TODO set the default HTTP headers + + configuration.HTTPShouldSetCookies = YES; + configuration.HTTPShouldUsePipelining = NO; + + configuration.requestCachePolicy = NSURLRequestUseProtocolCachePolicy; + configuration.allowsCellularAccess = YES; + configuration.timeoutIntervalForRequest = 60.0; + configuration.URLCache = [AFImageDownloader defaultURLCache]; + + return configuration; +} + +- (instancetype)init { + NSURLSessionConfiguration *defaultConfiguration = [self.class defaultURLSessionConfiguration]; + return [self initWithSessionConfiguration:defaultConfiguration]; +} + +- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration { + AFHTTPSessionManager *sessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:configuration]; + sessionManager.responseSerializer = [AFImageResponseSerializer serializer]; + + return [self initWithSessionManager:sessionManager + downloadPrioritization:AFImageDownloadPrioritizationFIFO + maximumActiveDownloads:4 + imageCache:[[AFAutoPurgingImageCache alloc] init]]; +} + +- (instancetype)initWithSessionManager:(AFHTTPSessionManager *)sessionManager + downloadPrioritization:(AFImageDownloadPrioritization)downloadPrioritization + maximumActiveDownloads:(NSInteger)maximumActiveDownloads + imageCache:(id )imageCache { + if (self = [super init]) { + self.sessionManager = sessionManager; + + self.downloadPrioritization = downloadPrioritization; + self.maximumActiveDownloads = maximumActiveDownloads; + self.imageCache = imageCache; + + self.queuedMergedTasks = [[NSMutableArray alloc] init]; + self.mergedTasks = [[NSMutableDictionary alloc] init]; + self.activeRequestCount = 0; + + NSString *name = [NSString stringWithFormat:@"com.alamofire.imagedownloader.synchronizationqueue-%@", [[NSUUID UUID] UUIDString]]; + self.synchronizationQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_SERIAL); + + name = [NSString stringWithFormat:@"com.alamofire.imagedownloader.responsequeue-%@", [[NSUUID UUID] UUIDString]]; + self.responseQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT); + } + + return self; +} + ++ (instancetype)defaultInstance { + static AFImageDownloader *sharedInstance = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sharedInstance = [[self alloc] init]; + }); + return sharedInstance; +} + +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + success:(void (^)(NSURLRequest * _Nonnull, NSHTTPURLResponse * _Nullable, UIImage * _Nonnull))success + failure:(void (^)(NSURLRequest * _Nonnull, NSHTTPURLResponse * _Nullable, NSError * _Nonnull))failure { + return [self downloadImageForURLRequest:request withReceiptID:[NSUUID UUID] success:success failure:failure]; +} + +- (nullable AFImageDownloadReceipt *)downloadImageForURLRequest:(NSURLRequest *)request + withReceiptID:(nonnull NSUUID *)receiptID + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *responseObject))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure { + __block NSURLSessionDataTask *task = nil; + dispatch_sync(self.synchronizationQueue, ^{ + NSString *URLIdentifier = request.URL.absoluteString; + if (URLIdentifier == nil) { + if (failure) { + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorBadURL userInfo:nil]; + dispatch_async(dispatch_get_main_queue(), ^{ + failure(request, nil, error); + }); + } + return; + } + + // 1) Append the success and failure blocks to a pre-existing request if it already exists + AFImageDownloaderMergedTask *existingMergedTask = self.mergedTasks[URLIdentifier]; + if (existingMergedTask != nil) { + AFImageDownloaderResponseHandler *handler = [[AFImageDownloaderResponseHandler alloc] initWithUUID:receiptID success:success failure:failure]; + [existingMergedTask addResponseHandler:handler]; + task = existingMergedTask.task; + return; + } + + // 2) Attempt to load the image from the image cache if the cache policy allows it + switch (request.cachePolicy) { + case NSURLRequestUseProtocolCachePolicy: + case NSURLRequestReturnCacheDataElseLoad: + case NSURLRequestReturnCacheDataDontLoad: { + UIImage *cachedImage = [self.imageCache imageforRequest:request withAdditionalIdentifier:nil]; + if (cachedImage != nil) { + if (success) { + dispatch_async(dispatch_get_main_queue(), ^{ + success(request, nil, cachedImage); + }); + } + return; + } + break; + } + default: + break; + } + + // 3) Create the request and set up authentication, validation and response serialization + NSUUID *mergedTaskIdentifier = [NSUUID UUID]; + NSURLSessionDataTask *createdTask; + __weak __typeof__(self) weakSelf = self; + + createdTask = [self.sessionManager + dataTaskWithRequest:request + uploadProgress:nil + downloadProgress:nil + completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + dispatch_async(self.responseQueue, ^{ + __strong __typeof__(weakSelf) strongSelf = weakSelf; + 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); + }); + } + } + } else { + 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); + }); + } + } + + } + } + [strongSelf safelyDecrementActiveTaskCount]; + [strongSelf safelyStartNextTaskIfNecessary]; + }); + }]; + + // 4) Store the response handler for use when the request completes + AFImageDownloaderResponseHandler *handler = [[AFImageDownloaderResponseHandler alloc] initWithUUID:receiptID + success:success + failure:failure]; + AFImageDownloaderMergedTask *mergedTask = [[AFImageDownloaderMergedTask alloc] + initWithURLIdentifier:URLIdentifier + identifier:mergedTaskIdentifier + task:createdTask]; + [mergedTask addResponseHandler:handler]; + self.mergedTasks[URLIdentifier] = mergedTask; + + // 5) Either start the request or enqueue it depending on the current active request count + if ([self isActiveRequestCountBelowMaximumLimit]) { + [self startMergedTask:mergedTask]; + } else { + [self enqueueMergedTask:mergedTask]; + } + + task = mergedTask.task; + }); + if (task) { + return [[AFImageDownloadReceipt alloc] initWithReceiptID:receiptID task:task]; + } else { + return nil; + } +} + +- (void)cancelTaskForImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt { + dispatch_sync(self.synchronizationQueue, ^{ + NSString *URLIdentifier = imageDownloadReceipt.task.originalRequest.URL.absoluteString; + AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier]; + NSUInteger index = [mergedTask.responseHandlers indexOfObjectPassingTest:^BOOL(AFImageDownloaderResponseHandler * _Nonnull handler, __unused NSUInteger idx, __unused BOOL * _Nonnull stop) { + return handler.uuid == imageDownloadReceipt.receiptID; + }]; + + if (index != NSNotFound) { + AFImageDownloaderResponseHandler *handler = mergedTask.responseHandlers[index]; + [mergedTask removeResponseHandler:handler]; + NSString *failureReason = [NSString stringWithFormat:@"ImageDownloader cancelled URL request: %@",imageDownloadReceipt.task.originalRequest.URL.absoluteString]; + NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey:failureReason}; + NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]; + if (handler.failureBlock) { + dispatch_async(dispatch_get_main_queue(), ^{ + handler.failureBlock(imageDownloadReceipt.task.originalRequest, nil, error); + }); + } + } + + if (mergedTask.responseHandlers.count == 0) { + [mergedTask.task cancel]; + [self removeMergedTaskWithURLIdentifier:URLIdentifier]; + } + }); +} + +- (AFImageDownloaderMergedTask *)safelyRemoveMergedTaskWithURLIdentifier:(NSString *)URLIdentifier { + __block AFImageDownloaderMergedTask *mergedTask = nil; + dispatch_sync(self.synchronizationQueue, ^{ + mergedTask = [self removeMergedTaskWithURLIdentifier:URLIdentifier]; + }); + return mergedTask; +} + +//This method should only be called from safely within the synchronizationQueue +- (AFImageDownloaderMergedTask *)removeMergedTaskWithURLIdentifier:(NSString *)URLIdentifier { + AFImageDownloaderMergedTask *mergedTask = self.mergedTasks[URLIdentifier]; + [self.mergedTasks removeObjectForKey:URLIdentifier]; + return mergedTask; +} + +- (void)safelyDecrementActiveTaskCount { + dispatch_sync(self.synchronizationQueue, ^{ + if (self.activeRequestCount > 0) { + self.activeRequestCount -= 1; + } + }); +} + +- (void)safelyStartNextTaskIfNecessary { + dispatch_sync(self.synchronizationQueue, ^{ + if ([self isActiveRequestCountBelowMaximumLimit]) { + while (self.queuedMergedTasks.count > 0) { + AFImageDownloaderMergedTask *mergedTask = [self dequeueMergedTask]; + if (mergedTask.task.state == NSURLSessionTaskStateSuspended) { + [self startMergedTask:mergedTask]; + break; + } + } + } + }); +} + +- (void)startMergedTask:(AFImageDownloaderMergedTask *)mergedTask { + [mergedTask.task resume]; + ++self.activeRequestCount; +} + +- (void)enqueueMergedTask:(AFImageDownloaderMergedTask *)mergedTask { + switch (self.downloadPrioritization) { + case AFImageDownloadPrioritizationFIFO: + [self.queuedMergedTasks addObject:mergedTask]; + break; + case AFImageDownloadPrioritizationLIFO: + [self.queuedMergedTasks insertObject:mergedTask atIndex:0]; + break; + } +} + +- (AFImageDownloaderMergedTask *)dequeueMergedTask { + AFImageDownloaderMergedTask *mergedTask = nil; + mergedTask = [self.queuedMergedTasks firstObject]; + [self.queuedMergedTasks removeObject:mergedTask]; + return mergedTask; +} + +- (BOOL)isActiveRequestCountBelowMaximumLimit { + return self.activeRequestCount < self.maximumActiveDownloads; +} + +- (AFImageDownloaderMergedTask *)safelyGetMergedTask:(NSString *)URLIdentifier { + __block AFImageDownloaderMergedTask *mergedTask; + dispatch_sync(self.synchronizationQueue, ^(){ + mergedTask = self.mergedTasks[URLIdentifier]; + }); + return mergedTask; +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h new file mode 100644 index 0000000..3bcf289 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h @@ -0,0 +1,103 @@ +// AFNetworkActivityIndicatorManager.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a session task has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. + + You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: + + [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; + + By setting `enabled` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. + + See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: + http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 + */ +NS_EXTENSION_UNAVAILABLE_IOS("Use view controller based solutions where appropriate instead.") +@interface AFNetworkActivityIndicatorManager : NSObject + +/** + A Boolean value indicating whether the manager is enabled. + + If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO. + */ +@property (nonatomic, assign, getter = isEnabled) BOOL enabled; + +/** + A Boolean value indicating whether the network activity indicator manager is currently active. +*/ +@property (readonly, nonatomic, assign, getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; + +/** + A time interval indicating the minimum duration of networking activity that should occur before the activity indicator is displayed. The default value 1 second. If the network activity indicator should be displayed immediately when network activity occurs, this value should be set to 0 seconds. + + Apple's HIG describes the following: + + > Display the network activity indicator to provide feedback when your app accesses the network for more than a couple of seconds. If the operation finishes sooner than that, you don’t have to show the network activity indicator, because the indicator is likely to disappear before users notice its presence. + + */ +@property (nonatomic, assign) NSTimeInterval activationDelay; + +/** + A time interval indicating the duration of time of no networking activity required before the activity indicator is disabled. This allows for continuous display of the network activity indicator across multiple requests. The default value is 0.17 seconds. + */ + +@property (nonatomic, assign) NSTimeInterval completionDelay; + +/** + Returns the shared network activity indicator manager object for the system. + + @return The systemwide network activity indicator manager. + */ ++ (instancetype)sharedManager; + +/** + Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. + */ +- (void)incrementActivityCount; + +/** + Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator. + */ +- (void)decrementActivityCount; + +/** + Set the a custom method to be executed when the network activity indicator manager should be hidden/shown. By default, this is null, and the UIApplication Network Activity Indicator will be managed automatically. If this block is set, it is the responsiblity of the caller to manager the network activity indicator going forward. + + @param block A block to be executed when the network activity indicator status changes. + */ +- (void)setNetworkingActivityActionWithBlock:(nullable void (^)(BOOL networkActivityIndicatorVisible))block; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m new file mode 100644 index 0000000..8cb5677 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m @@ -0,0 +1,239 @@ +// AFNetworkActivityIndicatorManager.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AFNetworkActivityIndicatorManager.h" + +#if TARGET_OS_IOS +#import "AFURLSessionManager.h" + +typedef NS_ENUM(NSInteger, AFNetworkActivityManagerState) { + AFNetworkActivityManagerStateNotActive, + AFNetworkActivityManagerStateDelayingStart, + AFNetworkActivityManagerStateActive, + AFNetworkActivityManagerStateDelayingEnd +}; + +static NSTimeInterval const kDefaultAFNetworkActivityManagerActivationDelay = 1.0; +static NSTimeInterval const kDefaultAFNetworkActivityManagerCompletionDelay = 0.17; + +static NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) { + if ([[notification object] respondsToSelector:@selector(originalRequest)]) { + return [(NSURLSessionTask *)[notification object] originalRequest]; + } else { + return nil; + } +} + +typedef void (^AFNetworkActivityActionBlock)(BOOL networkActivityIndicatorVisible); + +@interface AFNetworkActivityIndicatorManager () +@property (readwrite, nonatomic, assign) NSInteger activityCount; +@property (readwrite, nonatomic, strong) NSTimer *activationDelayTimer; +@property (readwrite, nonatomic, strong) NSTimer *completionDelayTimer; +@property (readonly, nonatomic, getter = isNetworkActivityOccurring) BOOL networkActivityOccurring; +@property (nonatomic, copy) AFNetworkActivityActionBlock networkActivityActionBlock; +@property (nonatomic, assign) AFNetworkActivityManagerState currentState; +@property (nonatomic, assign, getter=isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; + +- (void)updateCurrentStateForNetworkActivityChange; +@end + +@implementation AFNetworkActivityIndicatorManager + ++ (instancetype)sharedManager { + static AFNetworkActivityIndicatorManager *_sharedManager = nil; + static dispatch_once_t oncePredicate; + dispatch_once(&oncePredicate, ^{ + _sharedManager = [[self alloc] init]; + }); + + return _sharedManager; +} + +- (instancetype)init { + self = [super init]; + if (!self) { + return nil; + } + self.currentState = AFNetworkActivityManagerStateNotActive; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidResumeNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidSuspendNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidCompleteNotification object:nil]; + self.activationDelay = kDefaultAFNetworkActivityManagerActivationDelay; + self.completionDelay = kDefaultAFNetworkActivityManagerCompletionDelay; + + return self; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [_activationDelayTimer invalidate]; + [_completionDelayTimer invalidate]; +} + +- (void)setEnabled:(BOOL)enabled { + _enabled = enabled; + if (enabled == NO) { + [self setCurrentState:AFNetworkActivityManagerStateNotActive]; + } +} + +- (void)setNetworkingActivityActionWithBlock:(void (^)(BOOL networkActivityIndicatorVisible))block { + self.networkActivityActionBlock = block; +} + +- (BOOL)isNetworkActivityOccurring { + @synchronized(self) { + return self.activityCount > 0; + } +} + +- (void)setNetworkActivityIndicatorVisible:(BOOL)networkActivityIndicatorVisible { + if (_networkActivityIndicatorVisible != networkActivityIndicatorVisible) { + @synchronized(self) { + _networkActivityIndicatorVisible = networkActivityIndicatorVisible; + } + if (self.networkActivityActionBlock) { + self.networkActivityActionBlock(networkActivityIndicatorVisible); + } else { + [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:networkActivityIndicatorVisible]; + } + } +} + + +- (void)incrementActivityCount { + @synchronized(self) { + self.activityCount++; + } + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateCurrentStateForNetworkActivityChange]; + }); +} + +- (void)decrementActivityCount { + @synchronized(self) { + self.activityCount = MAX(_activityCount - 1, 0); + } + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateCurrentStateForNetworkActivityChange]; + }); +} + +- (void)networkRequestDidStart:(NSNotification *)notification { + if ([AFNetworkRequestFromNotification(notification) URL]) { + [self incrementActivityCount]; + } +} + +- (void)networkRequestDidFinish:(NSNotification *)notification { + if ([AFNetworkRequestFromNotification(notification) URL]) { + [self decrementActivityCount]; + } +} + +#pragma mark - Internal State Management +- (void)setCurrentState:(AFNetworkActivityManagerState)currentState { + @synchronized(self) { + if (_currentState != currentState) { + _currentState = currentState; + switch (currentState) { + case AFNetworkActivityManagerStateNotActive: + [self cancelActivationDelayTimer]; + [self cancelCompletionDelayTimer]; + [self setNetworkActivityIndicatorVisible:NO]; + break; + case AFNetworkActivityManagerStateDelayingStart: + [self startActivationDelayTimer]; + break; + case AFNetworkActivityManagerStateActive: + [self cancelCompletionDelayTimer]; + [self setNetworkActivityIndicatorVisible:YES]; + break; + case AFNetworkActivityManagerStateDelayingEnd: + [self startCompletionDelayTimer]; + break; + } + } + } +} + +- (void)updateCurrentStateForNetworkActivityChange { + if (self.enabled) { + switch (self.currentState) { + case AFNetworkActivityManagerStateNotActive: + if (self.isNetworkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateDelayingStart]; + } + break; + case AFNetworkActivityManagerStateDelayingStart: + //No op. Let the delay timer finish out. + break; + case AFNetworkActivityManagerStateActive: + if (!self.isNetworkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateDelayingEnd]; + } + break; + case AFNetworkActivityManagerStateDelayingEnd: + if (self.isNetworkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateActive]; + } + break; + } + } +} + +- (void)startActivationDelayTimer { + self.activationDelayTimer = [NSTimer + timerWithTimeInterval:self.activationDelay target:self selector:@selector(activationDelayTimerFired) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.activationDelayTimer forMode:NSRunLoopCommonModes]; +} + +- (void)activationDelayTimerFired { + if (self.networkActivityOccurring) { + [self setCurrentState:AFNetworkActivityManagerStateActive]; + } else { + [self setCurrentState:AFNetworkActivityManagerStateNotActive]; + } +} + +- (void)startCompletionDelayTimer { + [self.completionDelayTimer invalidate]; + self.completionDelayTimer = [NSTimer timerWithTimeInterval:self.completionDelay target:self selector:@selector(completionDelayTimerFired) userInfo:nil repeats:NO]; + [[NSRunLoop mainRunLoop] addTimer:self.completionDelayTimer forMode:NSRunLoopCommonModes]; +} + +- (void)completionDelayTimerFired { + [self setCurrentState:AFNetworkActivityManagerStateNotActive]; +} + +- (void)cancelActivationDelayTimer { + [self.activationDelayTimer invalidate]; +} + +- (void)cancelCompletionDelayTimer { + [self.completionDelayTimer invalidate]; +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h new file mode 100644 index 0000000..d424c9b --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h @@ -0,0 +1,48 @@ +// UIActivityIndicatorView+AFNetworking.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +/** + This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a session task. + */ +@interface UIActivityIndicatorView (AFNetworking) + +///---------------------------------- +/// @name Animating for Session Tasks +///---------------------------------- + +/** + Binds the animating state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setAnimatingWithStateOfTask:(nullable NSURLSessionTask *)task; + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m new file mode 100644 index 0000000..602a72d --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m @@ -0,0 +1,114 @@ +// UIActivityIndicatorView+AFNetworking.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIActivityIndicatorView+AFNetworking.h" +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFURLSessionManager.h" + +@interface AFActivityIndicatorViewNotificationObserver : NSObject +@property (readonly, nonatomic, weak) UIActivityIndicatorView *activityIndicatorView; +- (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView; + +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; + +@end + +@implementation UIActivityIndicatorView (AFNetworking) + +- (AFActivityIndicatorViewNotificationObserver *)af_notificationObserver { + AFActivityIndicatorViewNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); + if (notificationObserver == nil) { + notificationObserver = [[AFActivityIndicatorViewNotificationObserver alloc] initWithActivityIndicatorView:self]; + objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return notificationObserver; +} + +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { + [[self af_notificationObserver] setAnimatingWithStateOfTask:task]; +} + +@end + +@implementation AFActivityIndicatorViewNotificationObserver + +- (instancetype)initWithActivityIndicatorView:(UIActivityIndicatorView *)activityIndicatorView +{ + self = [super init]; + if (self) { + _activityIndicatorView = activityIndicatorView; + } + return self; +} + +- (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + if (task) { + if (task.state != NSURLSessionTaskStateCompleted) { + UIActivityIndicatorView *activityIndicatorView = self.activityIndicatorView; + if (task.state == NSURLSessionTaskStateRunning) { + [activityIndicatorView startAnimating]; + } else { + [activityIndicatorView stopAnimating]; + } + + [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; + } + } +} + +#pragma mark - + +- (void)af_startAnimating { + dispatch_async(dispatch_get_main_queue(), ^{ + [self.activityIndicatorView startAnimating]; + }); +} + +- (void)af_stopAnimating { + dispatch_async(dispatch_get_main_queue(), ^{ + [self.activityIndicatorView stopAnimating]; + }); +} + +#pragma mark - + +- (void)dealloc { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h new file mode 100644 index 0000000..d33e0d4 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h @@ -0,0 +1,175 @@ +// UIButton+AFNetworking.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFImageDownloader; + +/** + This category adds methods to the UIKit framework's `UIButton` class. The methods in this category provide support for loading remote images and background images asynchronously from a URL. + + @warning Compound values for control `state` (such as `UIControlStateHighlighted | UIControlStateDisabled`) are unsupported. + */ +@interface UIButton (AFNetworking) + +///------------------------------------ +/// @name Accessing the Image Downloader +///------------------------------------ + +/** + Set the shared image downloader used to download images. + + @param imageDownloader The shared image downloader used to download images. +*/ ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader; + +/** + The shared image downloader used to download images. + */ ++ (AFImageDownloader *)sharedImageDownloader; + +///-------------------- +/// @name Setting Image +///-------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the image request. + */ +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. + */ +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setImage:forState:` is applied. + + @param state The control state. + @param urlRequest The URL request used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the button will not change its image until the image request finishes. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + */ +- (void)setImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + + +///------------------------------- +/// @name Setting Background Image +///------------------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous background image request for the receiver will be cancelled. + + If the background image is cached locally, the background image is set immediately, otherwise the specified placeholder background image will be set immediately, and then the remote background image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the background image request. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it as the background image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + @param state The control state. + @param url The URL used for the background image request. + @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it as the image for the specified state once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the button before returning. If no success block is specified, the default behavior of setting the image with `setBackgroundImage:forState:` is applied. + + @param state The control state. + @param urlRequest The URL request used for the image request. + @param placeholderImage The background image to be set initially, until the background image request finishes. If `nil`, the button will not change its background image until the background image request finishes. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + */ +- (void)setBackgroundImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + + +///------------------------------ +/// @name Canceling Image Loading +///------------------------------ + +/** + Cancels any executing image task for the specified control state of the receiver, if one exists. + + @param state The control state. + */ +- (void)cancelImageDownloadTaskForState:(UIControlState)state; + +/** + Cancels any executing background image task for the specified control state of the receiver, if one exists. + + @param state The control state. + */ +- (void)cancelBackgroundImageDownloadTaskForState:(UIControlState)state; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m new file mode 100644 index 0000000..03aaf2a --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.m @@ -0,0 +1,302 @@ +// UIButton+AFNetworking.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIButton+AFNetworking.h" + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "UIImageView+AFNetworking.h" +#import "AFImageDownloader.h" + +@interface UIButton (_AFNetworking) +@end + +@implementation UIButton (_AFNetworking) + +#pragma mark - + +static char AFImageDownloadReceiptNormal; +static char AFImageDownloadReceiptHighlighted; +static char AFImageDownloadReceiptSelected; +static char AFImageDownloadReceiptDisabled; + +static const char * af_imageDownloadReceiptKeyForState(UIControlState state) { + switch (state) { + case UIControlStateHighlighted: + return &AFImageDownloadReceiptHighlighted; + case UIControlStateSelected: + return &AFImageDownloadReceiptSelected; + case UIControlStateDisabled: + return &AFImageDownloadReceiptDisabled; + case UIControlStateNormal: + default: + return &AFImageDownloadReceiptNormal; + } +} + +- (AFImageDownloadReceipt *)af_imageDownloadReceiptForState:(UIControlState)state { + return (AFImageDownloadReceipt *)objc_getAssociatedObject(self, af_imageDownloadReceiptKeyForState(state)); +} + +- (void)af_setImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt + forState:(UIControlState)state +{ + objc_setAssociatedObject(self, af_imageDownloadReceiptKeyForState(state), imageDownloadReceipt, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +static char AFBackgroundImageDownloadReceiptNormal; +static char AFBackgroundImageDownloadReceiptHighlighted; +static char AFBackgroundImageDownloadReceiptSelected; +static char AFBackgroundImageDownloadReceiptDisabled; + +static const char * af_backgroundImageDownloadReceiptKeyForState(UIControlState state) { + switch (state) { + case UIControlStateHighlighted: + return &AFBackgroundImageDownloadReceiptHighlighted; + case UIControlStateSelected: + return &AFBackgroundImageDownloadReceiptSelected; + case UIControlStateDisabled: + return &AFBackgroundImageDownloadReceiptDisabled; + case UIControlStateNormal: + default: + return &AFBackgroundImageDownloadReceiptNormal; + } +} + +- (AFImageDownloadReceipt *)af_backgroundImageDownloadReceiptForState:(UIControlState)state { + return (AFImageDownloadReceipt *)objc_getAssociatedObject(self, af_backgroundImageDownloadReceiptKeyForState(state)); +} + +- (void)af_setBackgroundImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt + forState:(UIControlState)state +{ + objc_setAssociatedObject(self, af_backgroundImageDownloadReceiptKeyForState(state), imageDownloadReceipt, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIButton (AFNetworking) + ++ (AFImageDownloader *)sharedImageDownloader { + + return objc_getAssociatedObject([UIButton class], @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance]; +} + ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader { + objc_setAssociatedObject([UIButton class], @selector(sharedImageDownloader), imageDownloader, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url +{ + [self setImageForState:state withURL:url placeholderImage:nil]; +} + +- (void)setImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure +{ + if ([self isActiveTaskURLEqualToURLRequest:urlRequest forState:state]) { + return; + } + + [self cancelImageDownloadTaskForState:state]; + + AFImageDownloader *downloader = [[self class] sharedImageDownloader]; + id imageCache = downloader.imageCache; + + //Use the image from the image cache if it exists + UIImage *cachedImage = [imageCache imageforRequest:urlRequest withAdditionalIdentifier:nil]; + if (cachedImage) { + if (success) { + success(urlRequest, nil, cachedImage); + } else { + [self setImage:cachedImage forState:state]; + } + [self af_setImageDownloadReceipt:nil forState:state]; + } else { + if (placeholderImage) { + [self setImage:placeholderImage forState:state]; + } + + __weak __typeof(self)weakSelf = self; + NSUUID *downloadID = [NSUUID UUID]; + AFImageDownloadReceipt *receipt; + receipt = [downloader + downloadImageForURLRequest:urlRequest + withReceiptID:downloadID + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_imageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (success) { + success(request, response, responseObject); + } else if (responseObject) { + [strongSelf setImage:responseObject forState:state]; + } + [strongSelf af_setImageDownloadReceipt:nil forState:state]; + } + + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_imageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (failure) { + failure(request, response, error); + } + [strongSelf af_setImageDownloadReceipt:nil forState:state]; + } + }]; + + [self af_setImageDownloadReceipt:receipt forState:state]; + } +} + +#pragma mark - + +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url +{ + [self setBackgroundImageForState:state withURL:url placeholderImage:nil]; +} + +- (void)setBackgroundImageForState:(UIControlState)state + withURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setBackgroundImageForState:state withURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setBackgroundImageForState:(UIControlState)state + withURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure +{ + if ([self isActiveBackgroundTaskURLEqualToURLRequest:urlRequest forState:state]) { + return; + } + + [self cancelBackgroundImageDownloadTaskForState:state]; + + AFImageDownloader *downloader = [[self class] sharedImageDownloader]; + id imageCache = downloader.imageCache; + + //Use the image from the image cache if it exists + UIImage *cachedImage = [imageCache imageforRequest:urlRequest withAdditionalIdentifier:nil]; + if (cachedImage) { + if (success) { + success(urlRequest, nil, cachedImage); + } else { + [self setBackgroundImage:cachedImage forState:state]; + } + [self af_setBackgroundImageDownloadReceipt:nil forState:state]; + } else { + if (placeholderImage) { + [self setBackgroundImage:placeholderImage forState:state]; + } + + __weak __typeof(self)weakSelf = self; + NSUUID *downloadID = [NSUUID UUID]; + AFImageDownloadReceipt *receipt; + receipt = [downloader + downloadImageForURLRequest:urlRequest + withReceiptID:downloadID + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_backgroundImageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (success) { + success(request, response, responseObject); + } else if (responseObject) { + [strongSelf setBackgroundImage:responseObject forState:state]; + } + [strongSelf af_setBackgroundImageDownloadReceipt:nil forState:state]; + } + + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([[strongSelf af_backgroundImageDownloadReceiptForState:state].receiptID isEqual:downloadID]) { + if (failure) { + failure(request, response, error); + } + [strongSelf af_setBackgroundImageDownloadReceipt:nil forState:state]; + } + }]; + + [self af_setBackgroundImageDownloadReceipt:receipt forState:state]; + } +} + +#pragma mark - + +- (void)cancelImageDownloadTaskForState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_imageDownloadReceiptForState:state]; + if (receipt != nil) { + [[self.class sharedImageDownloader] cancelTaskForImageDownloadReceipt:receipt]; + [self af_setImageDownloadReceipt:nil forState:state]; + } +} + +- (void)cancelBackgroundImageDownloadTaskForState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_backgroundImageDownloadReceiptForState:state]; + if (receipt != nil) { + [[self.class sharedImageDownloader] cancelTaskForImageDownloadReceipt:receipt]; + [self af_setBackgroundImageDownloadReceipt:nil forState:state]; + } +} + +- (BOOL)isActiveTaskURLEqualToURLRequest:(NSURLRequest *)urlRequest forState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_imageDownloadReceiptForState:state]; + return [receipt.task.originalRequest.URL.absoluteString isEqualToString:urlRequest.URL.absoluteString]; +} + +- (BOOL)isActiveBackgroundTaskURLEqualToURLRequest:(NSURLRequest *)urlRequest forState:(UIControlState)state { + AFImageDownloadReceipt *receipt = [self af_backgroundImageDownloadReceiptForState:state]; + return [receipt.task.originalRequest.URL.absoluteString isEqualToString:urlRequest.URL.absoluteString]; +} + + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h new file mode 100644 index 0000000..8929252 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h @@ -0,0 +1,109 @@ +// UIImageView+AFNetworking.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFImageDownloader; + +/** + This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL. + */ +@interface UIImageView (AFNetworking) + +///------------------------------------ +/// @name Accessing the Image Downloader +///------------------------------------ + +/** + Set the shared image downloader used to download images. + + @param imageDownloader The shared image downloader used to download images. + */ ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader; + +/** + The shared image downloader used to download images. + */ ++ (AFImageDownloader *)sharedImageDownloader; + +///-------------------- +/// @name Setting Image +///-------------------- + +/** + Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + + @param url The URL used for the image request. + */ +- (void)setImageWithURL:(NSURL *)url; + +/** + Asynchronously downloads an image from the specified URL, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + By default, URL requests have a `Accept` header field value of "image / *", a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + + @param url The URL used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. + */ +- (void)setImageWithURL:(NSURL *)url + placeholderImage:(nullable UIImage *)placeholderImage; + +/** + Asynchronously downloads an image from the specified URL request, and sets it once the request is finished. Any previous image request for the receiver will be cancelled. + + If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. + + If a success block is specified, it is the responsibility of the block to set the image of the image view before returning. If no success block is specified, the default behavior of setting the image with `self.image = image` is applied. + + @param urlRequest The URL request used for the image request. + @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. + @param success A block to be executed when the image data task finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the response parameter will be `nil`. + @param failure A block object to be executed when the image data task finishes unsuccessfully, or that finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error object describing the network or parsing error that occurred. + */ +- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(nullable UIImage *)placeholderImage + success:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, UIImage *image))success + failure:(nullable void (^)(NSURLRequest *request, NSHTTPURLResponse * _Nullable response, NSError *error))failure; + +/** + Cancels any executing image operation for the receiver, if one exists. + */ +- (void)cancelImageDownloadTask; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m new file mode 100644 index 0000000..8ae4950 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.m @@ -0,0 +1,159 @@ +// UIImageView+AFNetworking.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIImageView+AFNetworking.h" + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFImageDownloader.h" + +@interface UIImageView (_AFNetworking) +@property (readwrite, nonatomic, strong, setter = af_setActiveImageDownloadReceipt:) AFImageDownloadReceipt *af_activeImageDownloadReceipt; +@end + +@implementation UIImageView (_AFNetworking) + +- (AFImageDownloadReceipt *)af_activeImageDownloadReceipt { + return (AFImageDownloadReceipt *)objc_getAssociatedObject(self, @selector(af_activeImageDownloadReceipt)); +} + +- (void)af_setActiveImageDownloadReceipt:(AFImageDownloadReceipt *)imageDownloadReceipt { + objc_setAssociatedObject(self, @selector(af_activeImageDownloadReceipt), imageDownloadReceipt, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation UIImageView (AFNetworking) + ++ (AFImageDownloader *)sharedImageDownloader { + return objc_getAssociatedObject([UIImageView class], @selector(sharedImageDownloader)) ?: [AFImageDownloader defaultInstance]; +} + ++ (void)setSharedImageDownloader:(AFImageDownloader *)imageDownloader { + objc_setAssociatedObject([UIImageView class], @selector(sharedImageDownloader), imageDownloader, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setImageWithURL:(NSURL *)url { + [self setImageWithURL:url placeholderImage:nil]; +} + +- (void)setImageWithURL:(NSURL *)url + placeholderImage:(UIImage *)placeholderImage +{ + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; + [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; + + [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; +} + +- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest + placeholderImage:(UIImage *)placeholderImage + 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.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]; + id imageCache = downloader.imageCache; + + //Use the image from the image cache if it exists + UIImage *cachedImage = [imageCache imageforRequest:urlRequest withAdditionalIdentifier:nil]; + if (cachedImage) { + if (success) { + success(urlRequest, nil, cachedImage); + } else { + self.image = cachedImage; + } + [self clearActiveDownloadInformation]; + } else { + if (placeholderImage) { + self.image = placeholderImage; + } + + __weak __typeof(self)weakSelf = self; + NSUUID *downloadID = [NSUUID UUID]; + AFImageDownloadReceipt *receipt; + receipt = [downloader + downloadImageForURLRequest:urlRequest + withReceiptID:downloadID + success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull responseObject) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([strongSelf.af_activeImageDownloadReceipt.receiptID isEqual:downloadID]) { + if (success) { + success(request, response, responseObject); + } else if (responseObject) { + strongSelf.image = responseObject; + } + [strongSelf clearActiveDownloadInformation]; + } + + } + failure:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, NSError * _Nonnull error) { + __strong __typeof(weakSelf)strongSelf = weakSelf; + if ([strongSelf.af_activeImageDownloadReceipt.receiptID isEqual:downloadID]) { + if (failure) { + failure(request, response, error); + } + [strongSelf clearActiveDownloadInformation]; + } + }]; + + self.af_activeImageDownloadReceipt = receipt; + } +} + +- (void)cancelImageDownloadTask { + if (self.af_activeImageDownloadReceipt != nil) { + [[self.class sharedImageDownloader] cancelTaskForImageDownloadReceipt:self.af_activeImageDownloadReceipt]; + [self clearActiveDownloadInformation]; + } +} + +- (void)clearActiveDownloadInformation { + self.af_activeImageDownloadReceipt = nil; +} + +- (BOOL)isActiveTaskURLEqualToURLRequest:(NSURLRequest *)urlRequest { + return [self.af_activeImageDownloadReceipt.task.originalRequest.URL.absoluteString isEqualToString:urlRequest.URL.absoluteString]; +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h new file mode 100644 index 0000000..aa9c0b0 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h @@ -0,0 +1,43 @@ +// UIKit+AFNetworking.h +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#ifndef _UIKIT_AFNETWORKING_ + #define _UIKIT_AFNETWORKING_ + +#if TARGET_OS_IOS || TARGET_OS_TV + #import "AFAutoPurgingImageCache.h" + #import "AFImageDownloader.h" + #import "UIActivityIndicatorView+AFNetworking.h" + #import "UIButton+AFNetworking.h" + #import "UIImageView+AFNetworking.h" + #import "UIProgressView+AFNetworking.h" +#endif + +#if TARGET_OS_IOS + #import "AFNetworkActivityIndicatorManager.h" + #import "UIRefreshControl+AFNetworking.h" + #import "WKWebView+AFNetworking.h" +#endif + +#endif /* _UIKIT_AFNETWORKING_ */ diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h new file mode 100644 index 0000000..8ea0a73 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h @@ -0,0 +1,64 @@ +// UIProgressView+AFNetworking.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import + +NS_ASSUME_NONNULL_BEGIN + + +/** + This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task. + */ +@interface UIProgressView (AFNetworking) + +///------------------------------------ +/// @name Setting Session Task Progress +///------------------------------------ + +/** + Binds the progress to the upload progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated; + +/** + Binds the progress to the download progress of the specified session task. + + @param task The session task. + @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. + */ +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m new file mode 100644 index 0000000..2ae753e --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.m @@ -0,0 +1,126 @@ +// UIProgressView+AFNetworking.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIProgressView+AFNetworking.h" + +#import + +#if TARGET_OS_IOS || TARGET_OS_TV + +#import "AFURLSessionManager.h" + +static void * AFTaskCountOfBytesSentContext = &AFTaskCountOfBytesSentContext; +static void * AFTaskCountOfBytesReceivedContext = &AFTaskCountOfBytesReceivedContext; + +#pragma mark - + +@implementation UIProgressView (AFNetworking) + +- (BOOL)af_uploadProgressAnimated { + return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_uploadProgressAnimated)) boolValue]; +} + +- (void)af_setUploadProgressAnimated:(BOOL)animated { + objc_setAssociatedObject(self, @selector(af_uploadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL)af_downloadProgressAnimated { + return [(NSNumber *)objc_getAssociatedObject(self, @selector(af_downloadProgressAnimated)) boolValue]; +} + +- (void)af_setDownloadProgressAnimated:(BOOL)animated { + objc_setAssociatedObject(self, @selector(af_downloadProgressAnimated), @(animated), OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task + animated:(BOOL)animated +{ + if (task.state == NSURLSessionTaskStateCompleted) { + return; + } + + [task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext]; + [task addObserver:self forKeyPath:@"countOfBytesSent" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesSentContext]; + + [self af_setUploadProgressAnimated:animated]; +} + +- (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task + animated:(BOOL)animated +{ + if (task.state == NSURLSessionTaskStateCompleted) { + return; + } + + [task addObserver:self forKeyPath:@"state" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext]; + [task addObserver:self forKeyPath:@"countOfBytesReceived" options:(NSKeyValueObservingOptions)0 context:AFTaskCountOfBytesReceivedContext]; + + [self af_setDownloadProgressAnimated:animated]; +} + +#pragma mark - NSKeyValueObserving + +- (void)observeValueForKeyPath:(NSString *)keyPath + ofObject:(id)object + change:(__unused NSDictionary *)change + context:(void *)context +{ + if (context == AFTaskCountOfBytesSentContext || context == AFTaskCountOfBytesReceivedContext) { + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) { + if ([object countOfBytesExpectedToSend] > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self setProgress:[object countOfBytesSent] / ([object countOfBytesExpectedToSend] * 1.0f) animated:self.af_uploadProgressAnimated]; + }); + } + } + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) { + if ([object countOfBytesExpectedToReceive] > 0) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self setProgress:[object countOfBytesReceived] / ([object countOfBytesExpectedToReceive] * 1.0f) animated:self.af_downloadProgressAnimated]; + }); + } + } + + if ([keyPath isEqualToString:NSStringFromSelector(@selector(state))]) { + if ([(NSURLSessionTask *)object state] == NSURLSessionTaskStateCompleted) { + @try { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(state))]; + + if (context == AFTaskCountOfBytesSentContext) { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))]; + } + + if (context == AFTaskCountOfBytesReceivedContext) { + [object removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))]; + } + } + @catch (NSException * __unused exception) {} + } + } + } +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h new file mode 100644 index 0000000..215eafc --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h @@ -0,0 +1,53 @@ +// UIRefreshControl+AFNetworking.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically beginning and ending refreshing depending on the loading state of a session task. + */ +@interface UIRefreshControl (AFNetworking) + +///----------------------------------- +/// @name Refreshing for Session Tasks +///----------------------------------- + +/** + Binds the refreshing state to the state of the specified task. + + @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. + */ +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m new file mode 100644 index 0000000..cd46916 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m @@ -0,0 +1,113 @@ +// UIRefreshControl+AFNetworking.m +// +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "UIRefreshControl+AFNetworking.h" +#import + +#if TARGET_OS_IOS + +#import "AFURLSessionManager.h" + +@interface AFRefreshControlNotificationObserver : NSObject +@property (readonly, nonatomic, weak) UIRefreshControl *refreshControl; +- (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl; + +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; + +@end + +@implementation UIRefreshControl (AFNetworking) + +- (AFRefreshControlNotificationObserver *)af_notificationObserver { + AFRefreshControlNotificationObserver *notificationObserver = objc_getAssociatedObject(self, @selector(af_notificationObserver)); + if (notificationObserver == nil) { + notificationObserver = [[AFRefreshControlNotificationObserver alloc] initWithActivityRefreshControl:self]; + objc_setAssociatedObject(self, @selector(af_notificationObserver), notificationObserver, OBJC_ASSOCIATION_RETAIN_NONATOMIC); + } + return notificationObserver; +} + +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { + [[self af_notificationObserver] setRefreshingWithStateOfTask:task]; +} + +@end + +@implementation AFRefreshControlNotificationObserver + +- (instancetype)initWithActivityRefreshControl:(UIRefreshControl *)refreshControl +{ + self = [super init]; + if (self) { + _refreshControl = refreshControl; + } + return self; +} + +- (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + + if (task) { + UIRefreshControl *refreshControl = self.refreshControl; + if (task.state == NSURLSessionTaskStateRunning) { + [refreshControl beginRefreshing]; + + [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; + [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; + } else { + [refreshControl endRefreshing]; + } + } +} + +#pragma mark - + +- (void)af_beginRefreshing { + dispatch_async(dispatch_get_main_queue(), ^{ + [self.refreshControl beginRefreshing]; + }); +} + +- (void)af_endRefreshing { + dispatch_async(dispatch_get_main_queue(), ^{ + [self.refreshControl endRefreshing]; + }); +} + +#pragma mark - + +- (void)dealloc { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + + [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; + [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.h b/TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.h new file mode 100644 index 0000000..680fedf --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.h @@ -0,0 +1,80 @@ +// WkWebView+AFNetworking.h +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import + +#if TARGET_OS_IOS + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class AFHTTPSessionManager; + +@interface WKWebView (AFNetworking) + +/** + The session manager used to download all request + */ +@property (nonatomic, strong) AFHTTPSessionManager *sessionManager; + +/** + Asynchronously loads the specified request. + + @param request A URL request identifying the location of the content to load. This must not be `nil`. + @param navigation The WKNavigation object that containts information for tracking the loading progress of a webpage. This must not be `nil`. + @param progress A progress object monitoring the current download progress. + @param success A block object to be executed when the request finishes loading successfully. This block returns the HTML string to be loaded by the web view, and takes two arguments: the response, and the response string. + @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)loadRequest:(NSURLRequest *)request + navigation:(WKNavigation * _Nonnull)navigation + progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress + success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(nullable void (^)(NSError *error))failure; + +/** + Asynchronously loads the data associated with a particular request with a specified MIME type and text encoding. + + @param request A URL request identifying the location of the content to load. This must not be `nil`. + @param navigation The WKNavigation object that containts information for tracking the loading progress of a webpage. This must not be `nil`. + @param MIMEType The MIME type of the content. Defaults to the content type of the response if not specified. + @param textEncodingName The IANA encoding name, as in `utf-8` or `utf-16`. Defaults to the response text encoding if not specified. + @param progress A progress object monitoring the current download progress. + @param success A block object to be executed when the request finishes loading successfully. This block returns the data to be loaded by the web view and takes two arguments: the response, and the downloaded data. + @param failure A block object to be executed when the data task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a single argument: the error that occurred. + */ +- (void)loadRequest:(NSURLRequest *)request + navigation:(WKNavigation * _Nonnull)navigation + MIMEType:(nullable NSString *)MIMEType + textEncodingName:(nullable NSString *)textEncodingName + progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress + success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(nullable void (^)(NSError *error))failure; + +@end + +NS_ASSUME_NONNULL_END + +#endif diff --git a/TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.m b/TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.m new file mode 100644 index 0000000..6eca3c3 --- /dev/null +++ b/TwoNetworking/AFNetworking/UIKit+AFNetworking/WKWebView+AFNetworking.m @@ -0,0 +1,154 @@ +// WkWebView+AFNetworking.m +// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ ) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "WKWebView+AFNetworking.h" + +#import + +#if TARGET_OS_IOS + +#import "AFHTTPSessionManager.h" +#import "AFURLResponseSerialization.h" +#import "AFURLRequestSerialization.h" + +@interface WKWebView (_AFNetworking) +@property (readwrite, nonatomic, strong, setter = af_setURLSessionTask:) NSURLSessionDataTask *af_URLSessionTask; +@end + +@implementation WKWebView (_AFNetworking) + +- (NSURLSessionDataTask *)af_URLSessionTask { + return (NSURLSessionDataTask *)objc_getAssociatedObject(self, @selector(af_URLSessionTask)); +} + +- (void)af_setURLSessionTask:(NSURLSessionDataTask *)af_URLSessionTask { + objc_setAssociatedObject(self, @selector(af_URLSessionTask), af_URLSessionTask, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +@end + +#pragma mark - + +@implementation WKWebView (AFNetworking) + +- (AFHTTPSessionManager *)sessionManager { + static AFHTTPSessionManager *_af_defaultHTTPSessionManager = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultHTTPSessionManager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + _af_defaultHTTPSessionManager.requestSerializer = [AFHTTPRequestSerializer serializer]; + _af_defaultHTTPSessionManager.responseSerializer = [AFHTTPResponseSerializer serializer]; + }); + + return objc_getAssociatedObject(self, @selector(sessionManager)) ?: _af_defaultHTTPSessionManager; +} + +- (void)setSessionManager:(AFHTTPSessionManager *)sessionManager { + objc_setAssociatedObject(self, @selector(sessionManager), sessionManager, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (AFHTTPResponseSerializer *)responseSerializer { + static AFHTTPResponseSerializer *_af_defaultResponseSerializer = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + _af_defaultResponseSerializer = [AFHTTPResponseSerializer serializer]; + }); + + return objc_getAssociatedObject(self, @selector(responseSerializer)) ?: _af_defaultResponseSerializer; +} + +- (void)setResponseSerializer:(AFHTTPResponseSerializer *)responseSerializer { + objc_setAssociatedObject(self, @selector(responseSerializer), responseSerializer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +#pragma mark - + +- (void)loadRequest:(NSURLRequest *)request + navigation:(WKNavigation * _Nonnull)navigation + progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress + success:(nullable NSString * (^)(NSHTTPURLResponse *response, NSString *HTML))success + failure:(nullable void (^)(NSError *error))failure { + [self loadRequest:request navigation:navigation MIMEType:nil textEncodingName:nil progress:progress success:^NSData * _Nonnull(NSHTTPURLResponse * _Nonnull response, NSData * _Nonnull data) { + NSStringEncoding stringEncoding = NSUTF8StringEncoding; + if (response.textEncodingName) { + CFStringEncoding encoding = CFStringConvertIANACharSetNameToEncoding((CFStringRef)response.textEncodingName); + if (encoding != kCFStringEncodingInvalidId) { + stringEncoding = CFStringConvertEncodingToNSStringEncoding(encoding); + } + } + + NSString *string = [[NSString alloc] initWithData:data encoding:stringEncoding]; + if (success) { + string = success(response, string); + } + + return [string dataUsingEncoding:stringEncoding]; + } failure:failure]; +} + +- (void)loadRequest:(NSURLRequest *)request + navigation:(WKNavigation * _Nonnull)navigation + MIMEType:(nullable NSString *)MIMEType + textEncodingName:(nullable NSString *)textEncodingName + progress:(NSProgress * _Nullable __autoreleasing * _Nullable)progress + success:(nullable NSData * (^)(NSHTTPURLResponse *response, NSData *data))success + failure:(nullable void (^)(NSError *error))failure { + NSParameterAssert(request); + + if (self.af_URLSessionTask.state == NSURLSessionTaskStateRunning || self.af_URLSessionTask.state == NSURLSessionTaskStateSuspended) { + [self.af_URLSessionTask cancel]; + } + self.af_URLSessionTask = nil; + + __weak __typeof(self)weakSelf = self; + __block NSURLSessionDataTask *dataTask; + __strong __typeof(weakSelf) strongSelf = weakSelf; + __strong __typeof(weakSelf.navigationDelegate) strongSelfDelegate = strongSelf.navigationDelegate; + dataTask = [self.sessionManager dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { + if (error) { + if (failure) { + failure(error); + } + } else { + if (success) { + success((NSHTTPURLResponse *)response, responseObject); + } + [strongSelf loadData:responseObject MIMEType:MIMEType characterEncodingName:textEncodingName baseURL:[dataTask.currentRequest URL]]; + + if ([strongSelfDelegate respondsToSelector:@selector(webView:didFinishNavigation:)]) { + [strongSelfDelegate webView:strongSelf didFinishNavigation:navigation]; + } + } + }]; + self.af_URLSessionTask = dataTask; + if (progress != nil) { + *progress = [self.sessionManager downloadProgressForTask:dataTask]; + } + [self.af_URLSessionTask resume]; + + if ([strongSelfDelegate respondsToSelector:@selector(webView:didStartProvisionalNavigation:)]) { + [strongSelfDelegate webView:self didStartProvisionalNavigation:navigation]; + } +} + +@end + +#endif diff --git a/TwoNetworking/AFNetworking/fastlane/.env b/TwoNetworking/AFNetworking/fastlane/.env new file mode 100644 index 0000000..5b1917c --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env @@ -0,0 +1,11 @@ +AF_WORKSPACE="AFNetworking.xcworkspace" + +AF_IOS_FRAMEWORK_SCHEME="AFNetworking iOS" +AF_TVOS_FRAMEWORK_SCHEME="AFNetworking tvOS" +AF_OSX_FRAMEWORK_SCHEME="AFNetworking macOS" + +AF_IOS_EXAMPLE_SCHEME="iOS Example" +AF_TVOS_EXAMPLE_SCHEME="tvOS Example" +AF_OSX_EXAMPLE_SCHEME="macOS Example" + +FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 diff --git a/TwoNetworking/AFNetworking/fastlane/.env.catalyst b/TwoNetworking/AFNetworking/fastlane/.env.catalyst new file mode 100644 index 0000000..37ecfc1 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.catalyst @@ -0,0 +1,2 @@ +SCAN_SCHEME="AFNetworking iOS" +SCAN_DESTINATION="platform=macOS" diff --git a/TwoNetworking/AFNetworking/fastlane/.env.default b/TwoNetworking/AFNetworking/fastlane/.env.default new file mode 100644 index 0000000..4abfaec --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.default @@ -0,0 +1,4 @@ +AF_CONFIGURATION=Release + +SCAN_WORKSPACE=$AF_WORKSPACE +SCAN_OUTPUT_DIRECTORY=fastlane/test-output diff --git a/TwoNetworking/AFNetworking/fastlane/.env.deploy b/TwoNetworking/AFNetworking/fastlane/.env.deploy new file mode 100644 index 0000000..a123e62 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.deploy @@ -0,0 +1,14 @@ +DEPLOY_BRANCH=master +DEPLOY_PLIST_PATH=Framework/Info.plist +DEPLOY_PODSPEC=AFNetworking.podspec +DEPLOY_REMOTE=origin + +DEPLOY_CHANGELOG_PATH=CHANGELOG.md +DEPLOY_CHANGELOG_DELIMITER=--- + +# Used for CHANGELOG Generation and Github Release Management +GITHUB_OWNER=AFNetworking +GITHUB_REPOSITORY=AFNetworking +# CI Should Provide GITHUB_API_TOKEN + +CARTHAGE_FRAMEWORK_NAME=AFNetworking \ No newline at end of file diff --git a/TwoNetworking/AFNetworking/fastlane/.env.ios11_xcode94 b/TwoNetworking/AFNetworking/fastlane/.env.ios11_xcode94 new file mode 100644 index 0000000..f91d853 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.ios11_xcode94 @@ -0,0 +1,2 @@ +SCAN_DEVICE="iPhone X" +SCAN_SCHEME="AFNetworking iOS" diff --git a/TwoNetworking/AFNetworking/fastlane/.env.ios12_xcode10 b/TwoNetworking/AFNetworking/fastlane/.env.ios12_xcode10 new file mode 100644 index 0000000..85d5de0 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.ios12_xcode10 @@ -0,0 +1,3 @@ +SCAN_DEVICE="iPhone XS" +SCAN_SCHEME="AFNetworking iOS" +SCAN_DESTINATION="OS=12.4,name=iPhone XS" diff --git a/TwoNetworking/AFNetworking/fastlane/.env.ios13_xcode11 b/TwoNetworking/AFNetworking/fastlane/.env.ios13_xcode11 new file mode 100644 index 0000000..bcafbad --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.ios13_xcode11 @@ -0,0 +1,3 @@ +SCAN_DEVICE="iPhone 11 Pro" +SCAN_SCHEME="AFNetworking iOS" +SCAN_DESTINATION="OS=13.3,name=iPhone 11 Pro" diff --git a/TwoNetworking/AFNetworking/fastlane/.env.macos b/TwoNetworking/AFNetworking/fastlane/.env.macos new file mode 100644 index 0000000..dded8b5 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.macos @@ -0,0 +1,2 @@ +SCAN_SCHEME="AFNetworking macOS" +SCAN_DESTINATION="platform=macOS" diff --git a/TwoNetworking/AFNetworking/fastlane/.env.tvos13_xcode11 b/TwoNetworking/AFNetworking/fastlane/.env.tvos13_xcode11 new file mode 100644 index 0000000..7f79722 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/.env.tvos13_xcode11 @@ -0,0 +1,3 @@ +SCAN_SCHEME="AFNetworking tvOS" +SCAN_DEVICE="Apple TV 4K" +SCAN_DESTINATION="OS=13.3,name=Apple TV 4K" diff --git a/TwoNetworking/AFNetworking/fastlane/Fastfile b/TwoNetworking/AFNetworking/fastlane/Fastfile new file mode 100644 index 0000000..5e53259 --- /dev/null +++ b/TwoNetworking/AFNetworking/fastlane/Fastfile @@ -0,0 +1,4 @@ +import_from_git( + url: 'https://github.com/AFNetworking/fastlane.git', + branch: 'master' +) diff --git a/TwoNetworking/TwoNetworking.xcodeproj/project.pbxproj b/TwoNetworking/TwoNetworking.xcodeproj/project.pbxproj new file mode 100644 index 0000000..001f402 --- /dev/null +++ b/TwoNetworking/TwoNetworking.xcodeproj/project.pbxproj @@ -0,0 +1,357 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 84F5EB9E2E55C4FB0029A999 /* AFNetworking in Frameworks */ = {isa = PBXBuildFile; productRef = 84F5EB9D2E55C4FB0029A999 /* AFNetworking */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 84F5EB7E2E55C4280029A999 /* TwoNetworking.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TwoNetworking.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84F5EB9C2E55C4E10029A999 /* AFNetworking */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AFNetworking; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 84F5EB952E55C42A0029A999 /* Exceptions for "TwoNetworking" folder in "TwoNetworking" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 84F5EB7D2E55C4280029A999 /* TwoNetworking */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 84F5EB802E55C4280029A999 /* TwoNetworking */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 84F5EB952E55C42A0029A999 /* Exceptions for "TwoNetworking" folder in "TwoNetworking" target */, + ); + path = TwoNetworking; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84F5EB7B2E55C4280029A999 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84F5EB9E2E55C4FB0029A999 /* AFNetworking in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84F5EB752E55C4280029A999 = { + isa = PBXGroup; + children = ( + 84F5EB802E55C4280029A999 /* TwoNetworking */, + 84F5EB9B2E55C4E10029A999 /* Frameworks */, + 84F5EB7F2E55C4280029A999 /* Products */, + ); + sourceTree = ""; + }; + 84F5EB7F2E55C4280029A999 /* Products */ = { + isa = PBXGroup; + children = ( + 84F5EB7E2E55C4280029A999 /* TwoNetworking.app */, + ); + name = Products; + sourceTree = ""; + }; + 84F5EB9B2E55C4E10029A999 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84F5EB9C2E55C4E10029A999 /* AFNetworking */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84F5EB7D2E55C4280029A999 /* TwoNetworking */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84F5EB962E55C42A0029A999 /* Build configuration list for PBXNativeTarget "TwoNetworking" */; + buildPhases = ( + 84F5EB7A2E55C4280029A999 /* Sources */, + 84F5EB7B2E55C4280029A999 /* Frameworks */, + 84F5EB7C2E55C4280029A999 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 84F5EB802E55C4280029A999 /* TwoNetworking */, + ); + name = TwoNetworking; + packageProductDependencies = ( + 84F5EB9D2E55C4FB0029A999 /* AFNetworking */, + ); + productName = TwoNetworking; + productReference = 84F5EB7E2E55C4280029A999 /* TwoNetworking.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84F5EB762E55C4280029A999 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1620; + TargetAttributes = { + 84F5EB7D2E55C4280029A999 = { + CreatedOnToolsVersion = 16.2; + }; + }; + }; + buildConfigurationList = 84F5EB792E55C4280029A999 /* Build configuration list for PBXProject "TwoNetworking" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 84F5EB752E55C4280029A999; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 84F5EB7F2E55C4280029A999 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84F5EB7D2E55C4280029A999 /* TwoNetworking */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84F5EB7C2E55C4280029A999 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84F5EB7A2E55C4280029A999 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 84F5EB972E55C42A0029A999 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = U677F4BTM8; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = TwoNetworking/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rehome.twonetworking.TwoNetworking; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 84F5EB982E55C42A0029A999 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = U677F4BTM8; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = TwoNetworking/Info.plist; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.rehome.twonetworking.TwoNetworking; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + 84F5EB992E55C42A0029A999 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = 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; + CLANG_WARN_DOCUMENTATION_COMMENTS = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 84F5EB9A2E55C42A0029A999 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = 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; + CLANG_WARN_DOCUMENTATION_COMMENTS = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 18.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84F5EB792E55C4280029A999 /* Build configuration list for PBXProject "TwoNetworking" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84F5EB992E55C42A0029A999 /* Debug */, + 84F5EB9A2E55C42A0029A999 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84F5EB962E55C42A0029A999 /* Build configuration list for PBXNativeTarget "TwoNetworking" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84F5EB972E55C42A0029A999 /* Debug */, + 84F5EB982E55C42A0029A999 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 84F5EB9D2E55C4FB0029A999 /* AFNetworking */ = { + isa = XCSwiftPackageProductDependency; + productName = AFNetworking; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 84F5EB762E55C4280029A999 /* Project object */; +} diff --git a/TwoNetworking/TwoNetworking.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/TwoNetworking/TwoNetworking.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/TwoNetworking/TwoNetworking.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/TwoNetworking/TwoNetworking/1755680333205.jpg b/TwoNetworking/TwoNetworking/1755680333205.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a5177a2e93534f7abddbeae064d4bfb8d6815c83 GIT binary patch literal 115695 zcmeFYcT|&K()FZ zfpFsQJ>Pl1@2+#!y63KY*Sde4fk`I&+0Q(CCVS7`Q*yg}3k4`1X=rNzSXcm{h4}++ zVSuuFptA!2=;{LZ001BWuwtD791Ml&0x)6_0I)w`|3?c*>;vdOXzZH57jL(*>9y6= zte!s8)6jmb{ts(x0vk`ySAUtfx%+xQ(^O?QHZf(#|AFC74Uhuj0HuwskEhDhr;q<~ z_>cF$^uOV9@t+X@b3%W4ef4Y`_863WyWYuzWot5>@b7;AQ;NvW-p3YmKN4cU-Xywr@tED z0eAvIfH&X_I08<9FXmnqOp7P*3b4n}+JHM?3kU;(|M0wz;V1c5&zO5L@NfP7yUoK0 z03;PK7p?x?W?cyY?Q9tFp#N^;nFjz$j4t|4JZ-#f{$cm`1?v*W$3a}|pU+sttpI?V zb9;M^;fc==05?mwx2V?J+nbL709plr-pkuwfRX^a1|$Z;;sCHIu|Skqw}SxYQCPTG z|GdPfiv(bCZ~Fmm(o^6}r3kd%^sAS0{xP+db)OZ(CD7Y2q# z81ZcF>>V7PoLzi;{rm$0gI-5QMaRU(#V2HBW@YE(zRAlkE-5YhSYGkzb3;MdcC~;cipk9u69x)1wWM3)f*TjMwz&|SJkj{=gFj; z@|mC5-&<2z^<=_H3JZ3l*|DNmauSKW1+avC$9obLIdlmn^H>EW&xD2T^Gbm342L&0}|8TuMh@8^CIroD2(i;W3}w zs(#QNbrV-=8#>vULr?s;>?l-NRB%|;rNXv~6Zipr^}zBth!c6tCOvZU0~lxF^gxde znLl^Z^0bOHxJ-uT{&zNp1j2yfy|b33U}v@EH1Y zjP}jR)#3VtSCD6zo`J6|J$kJ^MYi0x zU%XOsSdV&3N5^XQ#%SWVh1vTrjW3FOZ$gWES;S#@)q%_zIZ^@jem-a8YH*>9rN)%W5b0L=NiSoP|G0oM{gk5_I1b=!UjQlah^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CP4k1KAX;stHvIh@4m z2?0o(h=gKpQeS(K@Uf(?WXX7xkI#%jK5fben^G|r$6^-d&w4i!g?rxpr>kE73}c-L z!Q0wsM?nA5W}Y}`{@vE{FA6IE13h2lzlD$Cf9Iq4_Z|l|K!bbb;_z!J;wM|9{NM4k GOaB8Tls(h{ literal 0 HcmV?d00001 diff --git a/TwoNetworking/TwoNetworking/AppDelegate.h b/TwoNetworking/TwoNetworking/AppDelegate.h new file mode 100644 index 0000000..baf511c --- /dev/null +++ b/TwoNetworking/TwoNetworking/AppDelegate.h @@ -0,0 +1,15 @@ +// +// AppDelegate.h +// TwoNetworking +// +// Created by admin on 2025/8/20. +// XCode集成第三方framework步骤 +// https://blog.csdn.net/qq_32540053/article/details/147073246 + +#import + +@interface AppDelegate : UIResponder + + +@end + diff --git a/TwoNetworking/TwoNetworking/AppDelegate.m b/TwoNetworking/TwoNetworking/AppDelegate.m new file mode 100644 index 0000000..633c1ad --- /dev/null +++ b/TwoNetworking/TwoNetworking/AppDelegate.m @@ -0,0 +1,40 @@ +// +// AppDelegate.m +// TwoNetworking +// +// Created by admin on 2025/8/20. +// + +#import "AppDelegate.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + + +#pragma mark - UISceneSession lifecycle + + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + + +- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. +} + + +@end diff --git a/TwoNetworking/TwoNetworking/Assets.xcassets/AccentColor.colorset/Contents.json b/TwoNetworking/TwoNetworking/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/TwoNetworking/TwoNetworking/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwoNetworking/TwoNetworking/Assets.xcassets/AppIcon.appiconset/Contents.json b/TwoNetworking/TwoNetworking/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/TwoNetworking/TwoNetworking/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwoNetworking/TwoNetworking/Assets.xcassets/Contents.json b/TwoNetworking/TwoNetworking/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/TwoNetworking/TwoNetworking/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/TwoNetworking/TwoNetworking/Base.lproj/LaunchScreen.storyboard b/TwoNetworking/TwoNetworking/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..865e932 --- /dev/null +++ b/TwoNetworking/TwoNetworking/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/TwoNetworking/Base.lproj/Main.storyboard b/TwoNetworking/TwoNetworking/Base.lproj/Main.storyboard new file mode 100644 index 0000000..7400df5 --- /dev/null +++ b/TwoNetworking/TwoNetworking/Base.lproj/Main.storyboard @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/TwoNetworking/TwoNetworking/Info.plist b/TwoNetworking/TwoNetworking/Info.plist new file mode 100644 index 0000000..81ed29b --- /dev/null +++ b/TwoNetworking/TwoNetworking/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/TwoNetworking/TwoNetworking/NetworkTools.h b/TwoNetworking/TwoNetworking/NetworkTools.h new file mode 100644 index 0000000..4f2a0b4 --- /dev/null +++ b/TwoNetworking/TwoNetworking/NetworkTools.h @@ -0,0 +1,30 @@ +// +// NetworkTools.h +// one +// +// Created by admin on 2023/10/12. +// + +//#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +//网络请求枚举 +typedef enum : NSUInteger { + GET, + POST +} RequestMethod; + +@interface NetworkTools : AFHTTPSessionManager + ++(instancetype)sharedTools; + +-(void) request:(RequestMethod)method URLString:(NSString *)URLString parameters:(nullable id)parameters finished:(void (^)(id result, NSError *error))finished; + +-(void) request:(RequestMethod)method URLString:(NSString *)URLString parameters:(nullable id)parameters token:(NSString *)token finished:(void (^)(id result, NSError *error))finished; + +@end + +NS_ASSUME_NONNULL_END diff --git a/TwoNetworking/TwoNetworking/NetworkTools.m b/TwoNetworking/TwoNetworking/NetworkTools.m new file mode 100644 index 0000000..a565266 --- /dev/null +++ b/TwoNetworking/TwoNetworking/NetworkTools.m @@ -0,0 +1,154 @@ +// +// NetworkTools.m +// one +// +// Created by admin on 2023/10/12. +// + +#import "NetworkTools.h" + +////网络工具协议 +//@protocol NetworkToolsProxy +// +////此方法 AFNetworking 以提供 (供参考) +//@optional +//- (nullable NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method +// URLString:(NSString *)URLString +// parameters:(nullable id)parameters +// headers:(nullable NSDictionary *)headers +// uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress +// downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress +// success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success +// failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure; +//@end +// +////遵守网络协议,意味着有提示 +//@interface NetworkTools() +//@end + +@implementation NetworkTools + ++(instancetype) sharedTools{ + + static NetworkTools *tools; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + //注意:末尾需要包含 '/' + //NSURL *baseUrl = [NSURL URLWithString:@"https://mobile.zhp.geg.com.cn:7082/"]; + NSURL *baseUrl = [NSURL URLWithString:@"https://app.dywzhny.com.cn/"]; + tools = [[self alloc]initWithBaseURL:baseUrl]; + //设置反序列化格式 + tools.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", @"text/html", nil]; + }); + return tools; +} + +-(void) request:(RequestMethod)method URLString:(NSString *)URLString parameters:(nullable id)parameters finished:(void (^)(id result, NSError *error))finished{ + + NSString *methodName = (method == GET) ? @"GET": @"POST"; + // dataTaskWithHTTPMethod 本类没有实现方法,但父类实现了 + // 在调用方法的时候,如果本类没有提供,就直接调用父类的方法,AFN 内部已经实现 +// NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:methodName URLString:URLString parameters:parameters headers:nil uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { +// finished(responseObject,nil); +// } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { +// finished(nil,error); +// NSLog(@"%@",error); +// }]; +// [dataTask resume]; + + NSLog(@"%@",self.baseURL); + + NSString *urlString = [self.baseURL.absoluteString stringByAppendingString:URLString]; + NSLog(@"%@",urlString); + NSURL *url = [NSURL URLWithString:urlString]; + + + NSData* dataParam = [parameters dataUsingEncoding:NSUTF8StringEncoding]; + + AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:1000]; + [request setHTTPMethod:methodName]; + [request setHTTPBody:dataParam]; + + NSURLSession *requestSessions = [NSURLSession sharedSession]; + NSURLSessionDataTask *requestTasks = [requestSessions dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { + //NSLog(@"data ======= %@, response ======= %@, error ======= %@",data ,response, error); + + if(error==NULL){ + NSString *resultStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"响应数据正常"); + NSLog(@"-------------data start---------------"); + NSLog(@"%@",resultStr); + NSLog(@"-------------data end-----------------"); + finished(data,nil); + }else{ + NSLog(@"响应数据出错了"); + NSLog(@"%@",error); + finished(nil,error); + } + }]; + [requestTasks resume]; +} + +-(void) request:(RequestMethod)method URLString:(NSString *)URLString parameters:(nullable id)parameters token:(NSString *)token finished:(void (^)(id result, NSError *error))finished{ + + NSString *methodName = (method == GET) ? @"GET": @"POST"; + // dataTaskWithHTTPMethod 本类没有实现方法,但父类实现了 + // 在调用方法的时候,如果本类没有提供,就直接调用父类的方法,AFN 内部已经实现 +// NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:methodName URLString:URLString parameters:parameters headers:nil uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { +// finished(responseObject,nil); +// } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { +// finished(nil,error); +// NSLog(@"%@",error); +// }]; +// [dataTask resume]; + + NSLog(@"%@",self.baseURL); + + NSString *urlString = [self.baseURL.absoluteString stringByAppendingString:URLString]; + NSLog(@"%@",urlString); + NSURL *url = [NSURL URLWithString:urlString]; + + NSString *bearerStart = @"Bearer "; + NSString *tokenBearer = [bearerStart stringByAppendingString:token]; + NSLog(@"%@",tokenBearer); + + NSData* dataParam = [parameters dataUsingEncoding:NSUTF8StringEncoding]; + + AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:1000]; + + + //[request setValue:@"bearer your_access_token" forHTTPHeaderField:@"Authorization"]; + [request setValue:tokenBearer forHTTPHeaderField:@"Authorization"]; + + [request setHTTPMethod:methodName]; + [request setHTTPBody:dataParam]; + + NSURLSession *requestSessions = [NSURLSession sharedSession]; + NSURLSessionDataTask *requestTasks = [requestSessions dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { + //NSLog(@"data ======= %@, response ======= %@, error ======= %@",data ,response, error); + + if(error==NULL){ + NSString *resultStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"响应数据正常"); + NSLog(@"-------------data start---------------"); + NSLog(@"%@",resultStr); + NSLog(@"-------------data end-----------------"); + finished(data,nil); + }else{ + NSLog(@"响应数据出错了"); + NSLog(@"%@",error); + finished(nil,error); + } + }]; + [requestTasks resume]; +} + +@end diff --git a/TwoNetworking/TwoNetworking/RSAUtil.h b/TwoNetworking/TwoNetworking/RSAUtil.h new file mode 100755 index 0000000..2ad8491 --- /dev/null +++ b/TwoNetworking/TwoNetworking/RSAUtil.h @@ -0,0 +1,44 @@ +// +// RSAUtil.h +// Encryption +// +// Created by 雷传营 on 16/1/10. +// Copyright © 2016年 leichuanying. All rights reserved. +// + +#import +//#import + +@interface RSAUtil : NSObject + +//公钥 +#define RSA_Public_key @"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnRh8MAqfpBZffouPsU3hToRZl3soo2ntYU4psQtc72QOvnprQ6Ua6UBY0WqemCJF/KxQ8p+vY7/r5eZ97Fw7Sq40PQTNKvyxFQuMGRAO8xTahSn2/79KViq7mVVLm2UAH8QaFmq7rJJbkCif3I1yiFMqzOF41ak231GF8eD62gr9+DFLiR1UKjv+/qXG4UjFQM6pa0cD1kAOsoYz0dSQlHFMbOaVf+VEWxSqFjKPiep6bYoViTlMRkdLqbUbHr/xk67C8lGqWO7wnB32T0+fYwnFWF952OJ9kov9oSnvOFXa+NwlAe7m2hZtFnW/NoBX1WxkQ6zTTTxJb8sRNft7qQIDAQAB" + +//私钥 +#define RSA_Privite_key @"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC7SNle+VEIE5flHbBbtr4Dp1yJAPYXYNCo45pXI8YfV9DEF1Wf8d+CIFhc8Mih1pJJMNyXWuOV6lSIBmPJOnOJ5mAOjq3HLmdwHW2zzl+tzQMXTzOf7PO2PiD3MhTtDynPFgn7bAjVdw3O3R5pYEJTsNkqOOnmJFO4o1wsnlUt7TDw9+8b4DCoYM36P7nbdXv2jzWl2EEnmHNaF2TM7rZfZVrsSNxD2SkM0Oxp+pfOFcTJ/suISzJCQNbNYJm5k3sNCEquIl6l+sWoKqWRQe2N3otLCWgSrFh2t9Me4rHEsRQkX7TnW+sRp/ABUzZKDrmepZs8jXUTYMFuvfBI1VgpAgMBAAECggEAL7KfAcw3cfojfkuwZbtF64JNU+s1wcB7g/frj/PheowP9FEJEqI0TVzVhF4iiu0t9owGMloIil7Sxo3yDgbf9CgDINH/ujG8UFZ+YQPXZFlJRz95o2piq3BpTuunXrS07jPruOfL3CnlD2FLZIUKf2wT8ufp0h5AYE7io85zXS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9sJHcvhwx93ecQ+evXHztRYouJ0WzQOOEKKHgID+ImcpYpyAbSeWfacyOHx6UVu+2fL88jyhhz20OQLVCBp2MzIHPPez0l/LJ/OveeKC3lLvQKBgQDNl+Kj7DfhcjvzLBML6tAE73tiGt6QbMf9frVq4J+oAM9tW862WsZgAAOSkkG+fUuIF0FmvQ4mRPs8R2s4etC5n5G3wEbLPJruF2yEngONI8bI9i+yzx/xVl3Pru85QOBvpxpxCPx2uxK/LzE5PfnWPqRwQ7+BiLMVLigM/bn+nwKBgQDpM8+9CQ2S/RA6qao6Sr3LiLATA0y0ShjEiii2ZkCxgTyl004xhSxj45ijkFmJRqUix7yt/CGZQq3JxnrWAEH1Y0r/AM8F7sTtKu37fLyCoVpQ4HlyyCCVVLvTExOZYsf8lGLJB2DOJGKK5V69uvOLqc8zmsPSSbVlvAC+6ZHcNwKBgDWXIMmv2kUW3M+fLnvNwll2/0dsT5V/9YV7UNjCInvNckRESRa5hLojZsr++sonqNeZkD+yigypsH9e8nDvepbYJEisgweZDZ2AV5YeBjj1GWzq1zYZzW7AH4XySIM5CQexnC/Yss5UJyfUqlUMdaJGA+ELl9CxDFU6CdCRFrlrAoGAR2tVuNgX7ydPnBewCZAwVjAzdG8zQ5fZw/9n/oyMTZB96W8waFwXvzPJ4HXp5e/bzS4Mq+AmzhAstznxDq8fhC53nmc5/+AjMVtPbRDDjuIpjdFhgHSn/fPoXflerEAjbUhohJac4CUmhNFAVaz2v5Qu3+gLBtEKG/Ea7V0NDbsCgYAocw/DFV5hAyQHyVwPNtsSd/vF+iGSyJJxqBPXW36fLNzdkoZL8TNGWeuyTloZbsXBorYESTX+1522xAFr7FcQpoQRjEOAuloqc5+C03D0fSrdczbxyHQMVTvsdFbfKWaQO4EjDrZqFA50h3rhY3ZosT8IS5npZQ7ifR3B1DCfdQ=="; + +// return base64 encoded string ++ (NSString *)encryptString:(NSString *)str publicKey:(NSString *)pubKey; +// return raw datax ++ (NSData *)encryptData:(NSData *)data publicKey:(NSString *)pubKey; +// return base64 encoded string +// enc with private key NOT working YET! +//+ (NSString *)encryptString:(NSString *)str privateKey:(NSString *)privKey; +// return raw data +//+ (NSData *)encryptData:(NSData *)data privateKey:(NSString *)privKey; + +// decrypt base64 encoded string, convert result to string(not base64 encoded) ++ (NSString *)decryptString:(NSString *)str publicKey:(NSString *)pubKey; ++ (NSData *)decryptData:(NSData *)data publicKey:(NSString *)pubKey; ++ (NSString *)decryptString:(NSString *)str privateKey:(NSString *)privKey; ++ (NSData *)decryptData:(NSData *)data privateKey:(NSString *)privKey; +@end diff --git a/TwoNetworking/TwoNetworking/RSAUtil.m b/TwoNetworking/TwoNetworking/RSAUtil.m new file mode 100755 index 0000000..4755156 --- /dev/null +++ b/TwoNetworking/TwoNetworking/RSAUtil.m @@ -0,0 +1,406 @@ +// +// RSAUtil.m +// Encryption +// +// Created by 雷传营 on 16/1/10. +// Copyright © 2016年 leichuanying. All rights reserved. +// + +#import "RSAUtil.h" +#import +@interface RSAUtil () + +@end + +@implementation RSAUtil + +/* + static NSString *base64_encode(NSString *str){ + NSData* data = [str dataUsingEncoding:NSUTF8StringEncoding]; + if(!data){ + return nil; + } + return base64_encode_data(data); + } + */ + +static NSString *base64_encode_data(NSData *data){ + data = [data base64EncodedDataWithOptions:0]; + NSString *ret = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + return ret; +} + +static NSData *base64_decode(NSString *str){ + NSData *data = [[NSData alloc] initWithBase64EncodedString:str options:NSDataBase64DecodingIgnoreUnknownCharacters]; + return data; +} + ++ (NSData *)stripPublicKeyHeader:(NSData *)d_key{ + // Skip ASN.1 public key header + if (d_key == nil) return(nil); + + unsigned long len = [d_key length]; + if (!len) return(nil); + + unsigned char *c_key = (unsigned char *)[d_key bytes]; + unsigned int idx = 0; + + if (c_key[idx++] != 0x30) return(nil); + + if (c_key[idx] > 0x80) idx += c_key[idx] - 0x80 + 1; + else idx++; + + // PKCS #1 rsaEncryption szOID_RSA_RSA + static unsigned char seqiod[] = + { 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, + 0x01, 0x05, 0x00 }; + if (memcmp(&c_key[idx], seqiod, 15)) return(nil); + + idx += 15; + + if (c_key[idx++] != 0x03) return(nil); + + if (c_key[idx] > 0x80) idx += c_key[idx] - 0x80 + 1; + else idx++; + + if (c_key[idx++] != '\0') return(nil); + + // Now make a new NSData from this buffer + return([NSData dataWithBytes:&c_key[idx] length:len - idx]); +} + +//credit: http://hg.mozilla.org/services/fx-home/file/tip/Sources/NetworkAndStorage/CryptoUtils.m#l1036 ++ (NSData *)stripPrivateKeyHeader:(NSData *)d_key{ + // Skip ASN.1 private key header + if (d_key == nil) return(nil); + + unsigned long len = [d_key length]; + if (!len) return(nil); + + unsigned char *c_key = (unsigned char *)[d_key bytes]; + unsigned int idx = 22; //magic byte at offset 22 + + if (0x04 != c_key[idx++]) return nil; + + //calculate length of the key + unsigned int c_len = c_key[idx++]; + int det = c_len & 0x80; + if (!det) { + c_len = c_len & 0x7f; + } else { + int byteCount = c_len & 0x7f; + if (byteCount + idx > len) { + //rsa length field longer than buffer + return nil; + } + unsigned int accum = 0; + unsigned char *ptr = &c_key[idx]; + idx += byteCount; + while (byteCount) { + accum = (accum << 8) + *ptr; + ptr++; + byteCount--; + } + c_len = accum; + } + + // Now make a new NSData from this buffer + return [d_key subdataWithRange:NSMakeRange(idx, c_len)]; +} + ++ (SecKeyRef)addPublicKey:(NSString *)key{ + NSRange spos = [key rangeOfString:@"-----BEGIN PUBLIC KEY-----"]; + NSRange epos = [key rangeOfString:@"-----END PUBLIC KEY-----"]; + if(spos.location != NSNotFound && epos.location != NSNotFound){ + NSUInteger s = spos.location + spos.length; + NSUInteger e = epos.location; + NSRange range = NSMakeRange(s, e-s); + key = [key substringWithRange:range]; + } + key = [key stringByReplacingOccurrencesOfString:@"\r" withString:@""]; + key = [key stringByReplacingOccurrencesOfString:@"\n" withString:@""]; + key = [key stringByReplacingOccurrencesOfString:@"\t" withString:@""]; + key = [key stringByReplacingOccurrencesOfString:@" " withString:@""]; + + // This will be base64 encoded, decode it. + NSData *data = base64_decode(key); + data = [RSAUtil stripPublicKeyHeader:data]; + if(!data){ + return nil; + } + + //a tag to read/write keychain storage + NSString *tag = @"RSAUtil_PubKey"; + NSData *d_tag = [NSData dataWithBytes:[tag UTF8String] length:[tag length]]; + + // Delete any old lingering key with the same tag + NSMutableDictionary *publicKey = [[NSMutableDictionary alloc] init]; + [publicKey setObject:(__bridge id) kSecClassKey forKey:(__bridge id)kSecClass]; + [publicKey setObject:(__bridge id) kSecAttrKeyTypeRSA forKey:(__bridge id)kSecAttrKeyType]; + [publicKey setObject:d_tag forKey:(__bridge id)kSecAttrApplicationTag]; + SecItemDelete((__bridge CFDictionaryRef)publicKey); + + // Add persistent version of the key to system keychain + [publicKey setObject:data forKey:(__bridge id)kSecValueData]; + [publicKey setObject:(__bridge id) kSecAttrKeyClassPublic forKey:(__bridge id) + kSecAttrKeyClass]; + [publicKey setObject:[NSNumber numberWithBool:YES] forKey:(__bridge id) + kSecReturnPersistentRef]; + + CFTypeRef persistKey = nil; + OSStatus status = SecItemAdd((__bridge CFDictionaryRef)publicKey, &persistKey); + if (persistKey != nil){ + CFRelease(persistKey); + } + if ((status != noErr) && (status != errSecDuplicateItem)) { + return nil; + } + + [publicKey removeObjectForKey:(__bridge id)kSecValueData]; + [publicKey removeObjectForKey:(__bridge id)kSecReturnPersistentRef]; + [publicKey setObject:[NSNumber numberWithBool:YES] forKey:(__bridge id)kSecReturnRef]; + [publicKey setObject:(__bridge id) kSecAttrKeyTypeRSA forKey:(__bridge id)kSecAttrKeyType]; + + // Now fetch the SecKeyRef version of the key + SecKeyRef keyRef = nil; + status = SecItemCopyMatching((__bridge CFDictionaryRef)publicKey, (CFTypeRef *)&keyRef); + if(status != noErr){ + return nil; + } + return keyRef; +} + ++ (SecKeyRef)addPrivateKey:(NSString *)key{ + NSRange spos = [key rangeOfString:@"-----BEGIN RSA PRIVATE KEY-----"]; + NSRange epos = [key rangeOfString:@"-----END RSA PRIVATE KEY-----"]; + if(spos.location != NSNotFound && epos.location != NSNotFound){ + NSUInteger s = spos.location + spos.length; + NSUInteger e = epos.location; + NSRange range = NSMakeRange(s, e-s); + key = [key substringWithRange:range]; + } + key = [key stringByReplacingOccurrencesOfString:@"\r" withString:@""]; + key = [key stringByReplacingOccurrencesOfString:@"\n" withString:@""]; + key = [key stringByReplacingOccurrencesOfString:@"\t" withString:@""]; + key = [key stringByReplacingOccurrencesOfString:@" " withString:@""]; + + // This will be base64 encoded, decode it. + NSData *data = base64_decode(key); + data = [RSAUtil stripPrivateKeyHeader:data]; + if(!data){ + return nil; + } + + //a tag to read/write keychain storage + NSString *tag = @"RSAUtil_PrivKey"; + NSData *d_tag = [NSData dataWithBytes:[tag UTF8String] length:[tag length]]; + + // Delete any old lingering key with the same tag + NSMutableDictionary *privateKey = [[NSMutableDictionary alloc] init]; + [privateKey setObject:(__bridge id) kSecClassKey forKey:(__bridge id)kSecClass]; + [privateKey setObject:(__bridge id) kSecAttrKeyTypeRSA forKey:(__bridge id)kSecAttrKeyType]; + [privateKey setObject:d_tag forKey:(__bridge id)kSecAttrApplicationTag]; + SecItemDelete((__bridge CFDictionaryRef)privateKey); + + // Add persistent version of the key to system keychain + [privateKey setObject:data forKey:(__bridge id)kSecValueData]; + [privateKey setObject:(__bridge id) kSecAttrKeyClassPrivate forKey:(__bridge id) + kSecAttrKeyClass]; + [privateKey setObject:[NSNumber numberWithBool:YES] forKey:(__bridge id) + kSecReturnPersistentRef]; + + CFTypeRef persistKey = nil; + OSStatus status = SecItemAdd((__bridge CFDictionaryRef)privateKey, &persistKey); + if (persistKey != nil){ + CFRelease(persistKey); + } + if ((status != noErr) && (status != errSecDuplicateItem)) { + return nil; + } + + [privateKey removeObjectForKey:(__bridge id)kSecValueData]; + [privateKey removeObjectForKey:(__bridge id)kSecReturnPersistentRef]; + [privateKey setObject:[NSNumber numberWithBool:YES] forKey:(__bridge id)kSecReturnRef]; + [privateKey setObject:(__bridge id) kSecAttrKeyTypeRSA forKey:(__bridge id)kSecAttrKeyType]; + + // Now fetch the SecKeyRef version of the key + SecKeyRef keyRef = nil; + status = SecItemCopyMatching((__bridge CFDictionaryRef)privateKey, (CFTypeRef *)&keyRef); + if(status != noErr){ + return nil; + } + return keyRef; +} + +/* START: Encryption & Decryption with RSA private key */ + ++ (NSData *)encryptData:(NSData *)data withKeyRef:(SecKeyRef) keyRef{ + const uint8_t *srcbuf = (const uint8_t *)[data bytes]; + size_t srclen = (size_t)data.length; + + size_t block_size = SecKeyGetBlockSize(keyRef) * sizeof(uint8_t); + void *outbuf = malloc(block_size); + size_t src_block_size = block_size - 11; + + NSMutableData *ret = [[NSMutableData alloc] init]; + for(int idx=0; idx src_block_size){ + data_len = src_block_size; + } + + size_t outlen = block_size; + OSStatus status = noErr; + status = SecKeyEncrypt(keyRef, + kSecPaddingPKCS1, + srcbuf + idx, + data_len, + outbuf, + &outlen + ); + if (status != 0) { + NSLog(@"SecKeyEncrypt fail. Error Code: %d", status); + ret = nil; + break; + }else{ + [ret appendBytes:outbuf length:outlen]; + } + } + + free(outbuf); + CFRelease(keyRef); + return ret; +} + ++ (NSString *)encryptString:(NSString *)str privateKey:(NSString *)privKey{ + NSData *data = [RSAUtil encryptData:[str dataUsingEncoding:NSUTF8StringEncoding] privateKey:privKey]; + NSString *ret = base64_encode_data(data); + return ret; +} + ++ (NSData *)encryptData:(NSData *)data privateKey:(NSString *)privKey{ + if(!data || !privKey){ + return nil; + } + SecKeyRef keyRef = [RSAUtil addPrivateKey:privKey]; + if(!keyRef){ + return nil; + } + return [RSAUtil encryptData:data withKeyRef:keyRef]; +} + ++ (NSData *)decryptData:(NSData *)data withKeyRef:(SecKeyRef) keyRef{ + const uint8_t *srcbuf = (const uint8_t *)[data bytes]; + size_t srclen = (size_t)data.length; + + size_t block_size = SecKeyGetBlockSize(keyRef) * sizeof(uint8_t); + UInt8 *outbuf = malloc(block_size); + size_t src_block_size = block_size; + + NSMutableData *ret = [[NSMutableData alloc] init]; + for(int idx=0; idx src_block_size){ + data_len = src_block_size; + } + + size_t outlen = block_size; + OSStatus status = noErr; + status = SecKeyDecrypt(keyRef, + kSecPaddingNone, + srcbuf + idx, + data_len, + outbuf, + &outlen + ); + if (status != 0) { + NSLog(@"SecKeyEncrypt fail. Error Code: %d", status); + ret = nil; + break; + }else{ + //the actual decrypted data is in the middle, locate it! + int idxFirstZero = -1; + int idxNextZero = (int)outlen; + for ( int i = 0; i < outlen; i++ ) { + if ( outbuf[i] == 0 ) { + if ( idxFirstZero < 0 ) { + idxFirstZero = i; + } else { + idxNextZero = i; + break; + } + } + } + + [ret appendBytes:&outbuf[idxFirstZero+1] length:idxNextZero-idxFirstZero-1]; + } + } + + free(outbuf); + CFRelease(keyRef); + return ret; +} + + ++ (NSString *)decryptString:(NSString *)str privateKey:(NSString *)privKey{ + NSData *data = [[NSData alloc] initWithBase64EncodedString:str options:NSDataBase64DecodingIgnoreUnknownCharacters]; + data = [RSAUtil decryptData:data privateKey:privKey]; + NSString *ret = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + return ret; +} + ++ (NSData *)decryptData:(NSData *)data privateKey:(NSString *)privKey{ + if(!data || !privKey){ + return nil; + } + SecKeyRef keyRef = [RSAUtil addPrivateKey:privKey]; + if(!keyRef){ + return nil; + } + return [RSAUtil decryptData:data withKeyRef:keyRef]; +} + +/* END: Encryption & Decryption with RSA private key */ + +/* START: Encryption & Decryption with RSA public key */ + ++ (NSString *)encryptString:(NSString *)str publicKey:(NSString *)pubKey{ + NSData *data = [RSAUtil encryptData:[str dataUsingEncoding:NSUTF8StringEncoding] publicKey:pubKey]; + NSString *ret = base64_encode_data(data); + return ret; +} + ++ (NSData *)encryptData:(NSData *)data publicKey:(NSString *)pubKey{ + if(!data || !pubKey){ + return nil; + } + SecKeyRef keyRef = [RSAUtil addPublicKey:pubKey]; + if(!keyRef){ + return nil; + } + return [RSAUtil encryptData:data withKeyRef:keyRef]; +} + ++ (NSString *)decryptString:(NSString *)str publicKey:(NSString *)pubKey{ + NSData *data = [[NSData alloc] initWithBase64EncodedString:str options:NSDataBase64DecodingIgnoreUnknownCharacters]; + data = [RSAUtil decryptData:data publicKey:pubKey]; + NSString *ret = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + return ret; +} + ++ (NSData *)decryptData:(NSData *)data publicKey:(NSString *)pubKey{ + if(!data || !pubKey){ + return nil; + } + SecKeyRef keyRef = [RSAUtil addPublicKey:pubKey]; + if(!keyRef){ + return nil; + } + return [RSAUtil decryptData:data withKeyRef:keyRef]; +} + +/* END: Encryption & Decryption with RSA public key */ + +@end diff --git a/TwoNetworking/TwoNetworking/SceneDelegate.h b/TwoNetworking/TwoNetworking/SceneDelegate.h new file mode 100644 index 0000000..053a56f --- /dev/null +++ b/TwoNetworking/TwoNetworking/SceneDelegate.h @@ -0,0 +1,15 @@ +// +// SceneDelegate.h +// TwoNetworking +// +// Created by admin on 2025/8/20. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end + diff --git a/TwoNetworking/TwoNetworking/SceneDelegate.m b/TwoNetworking/TwoNetworking/SceneDelegate.m new file mode 100644 index 0000000..76d03f2 --- /dev/null +++ b/TwoNetworking/TwoNetworking/SceneDelegate.m @@ -0,0 +1,57 @@ +// +// SceneDelegate.m +// TwoNetworking +// +// Created by admin on 2025/8/20. +// + +#import "SceneDelegate.h" + +@interface SceneDelegate () + +@end + +@implementation SceneDelegate + + +- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). +} + + +- (void)sceneDidDisconnect:(UIScene *)scene { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). +} + + +- (void)sceneDidBecomeActive:(UIScene *)scene { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. +} + + +- (void)sceneWillResignActive:(UIScene *)scene { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). +} + + +- (void)sceneWillEnterForeground:(UIScene *)scene { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. +} + + +- (void)sceneDidEnterBackground:(UIScene *)scene { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. +} + + +@end diff --git a/TwoNetworking/TwoNetworking/ViewController.h b/TwoNetworking/TwoNetworking/ViewController.h new file mode 100644 index 0000000..4ecac1c --- /dev/null +++ b/TwoNetworking/TwoNetworking/ViewController.h @@ -0,0 +1,23 @@ +// +// ViewController.h +// TwoNetworking +// +// Created by admin on 2025/8/20. +// + +#import + +@interface ViewController : UIViewController + + +- (IBAction)btnClick:(id)sender; +@property (weak, nonatomic) IBOutlet UITextField *username; +@property (weak, nonatomic) IBOutlet UITextField *pwd; + +- (IBAction)dywLogin:(id)sender; + + +-(void)getDataByApi:(NSString *) token; + +@end + diff --git a/TwoNetworking/TwoNetworking/ViewController.m b/TwoNetworking/TwoNetworking/ViewController.m new file mode 100644 index 0000000..3c67609 --- /dev/null +++ b/TwoNetworking/TwoNetworking/ViewController.m @@ -0,0 +1,284 @@ +// +// ViewController.m +// TwoNetworking +// +// Created by admin on 2025/8/20. +// + +#import "ViewController.h" +#import "NetworkTools.h" +#import "RSAUtil.h" + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. +// [self.username setText:@"ZHPS_Admin"]; +// [self.pwd setText:@"Rehome.zhps@996"]; + //李耿 +// [self.username setText:@"310261"]; +// [self.pwd setText:@"!LLg770731"]; + + [self.username setText:@"ceshi1"]; + [self.pwd setText:@"A000000a."]; + + +} + + +- (IBAction)btnClick:(id)sender { + NSLog(@"haha"); + [self postLogin]; + //[self testPostTwo]; + +} + +-(void)testPost{ + + NSString *param = @"ALmSSvL4sBL9VMXMJH4IznebXiVzHhAsnC9r2CbZ7m5xudJoQcv7JjbHIJ0vuriZLgpw64lWpHjTqD98NnpA+PdALyduJvuhVQmNfWDb65y/VanUJuNC3q7VnOOU1d4aFgDZEb81oz0uBSbVeNBRU4Q8/SfA/PsToy9GDCd/sSL8/ApLzK+c4yywgoktwkYW8awAhmex8kTRRb3oRq0vWPpfryRl8G/L8M1h02bX7VR3fy1bPzZHpAbR2cRYqOMD4Gg/FTI8cMonh/jaSS/ADcJEsslESk8WZ8w7b5PJAvBQyUBud4fHIaLwjBY7pbs9brrAQnTjUwG/u09KdZmMNw=="; + + NSString *urlString = @"PubFile/Data/AppLogin/GetDataRsa.aspx"; + + [[NetworkTools sharedTools] request:POST URLString:urlString parameters: param finished:^(id _Nonnull result, NSError * _Nonnull error) { + if(error != nil){ + + return; + }else{ + + } + NSLog(@"%@",result); + }]; +} + +-(void)postLogin{ + NSMutableDictionary *mutableDic = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + @"1d8404185d72d804",@"imeinum", + self.pwd.text,@"password", + @"iPhone16",@"phonemodel", + @"",@"phonenum", + @"16",@"sysversion", + self.username.text,@"username", nil]; + + NSMutableDictionary *mutableDicParam = [[NSMutableDictionary alloc] init]; + mutableDicParam[@"Rows"]=@[mutableDic]; + + NSLog(@"mutableDic :%@",mutableDicParam); + + BOOL isYes = [NSJSONSerialization isValidJSONObject:mutableDicParam]; + if(isYes){ + NSLog(@"可以转换"); + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:mutableDicParam options:0 error:NULL]; + NSString *_rsaStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + NSLog(@"%@",_rsaStr); + NSString *param = [RSAUtil encryptString:_rsaStr publicKey:RSA_Public_key]; + NSLog(@"%@",param); + + NSString *urlString = @"PubFile/Data/AppLogin/GetDataRsa.aspx"; + + [[NetworkTools sharedTools] request:POST URLString:urlString parameters: param finished:^(id _Nonnull result, NSError * _Nonnull error) { + if(error != nil){ + + return; + }else{ + + } + NSString *resultStr = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; + NSString *resultDecode = [RSAUtil decryptString:resultStr privateKey:RSA_Privite_key]; + + //NSLog(@"%@",result); + NSLog(@"%@",resultDecode); + + NSData *dataDecode = [resultDecode dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *dictDecode = [NSJSONSerialization JSONObjectWithData:dataDecode options:NSJSONReadingMutableContainers error:nil]; + NSArray *arryRow = dictDecode[@"Rows"]; + NSDictionary *dictRow = arryRow[0]; + NSString *token = dictRow[@"token"]; + NSLog(@"%@",token); + if(token!=nil){ + [self getDataByApi:token]; + } + + + }]; + + }else{ + NSLog(@"JSON数据生成失败,请检查数据格式"); + } +} + +-(void)testPostOne{ + // NSString *urlString = @"http://itunes.apple.com/search?term=metallica"; + // NSURL *url = [NSURL URLWithString:urlString]; + // + // AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; + // [manager GET:url.absoluteString parameters:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) { + // + // NSLog(@"results: %@", responseObject); + // + // } failure:^(NSURLSessionDataTask *task, NSError *error) { + // + // NSLog(@"results: %@", error); + // + // }]; + + NSString *urlString = @"http://192.168.2.215:8082/PubFile/Data/AppLogin/GetDataRsa.aspx"; + NSURL *url = [NSURL URLWithString:urlString]; + AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; + + manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json",@"text/javascript",@"text/html",nil]; + + + // [manager GET:url.absoluteString parameters:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) { + // + // NSLog(@"results: %@", responseObject); + // + // } failure:^(NSURLSessionDataTask *task, NSError *error) { + // + // NSLog(@"results: %@", error); + // + // }]; + + + [manager.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; + + //manager.requestSerializer = [AFJSONRequestSerializer serializer]; + NSString *param = @"ALmSSvL4sBL9VMXMJH4IznebXiVzHhAsnC9r2CbZ7m5xudJoQcv7JjbHIJ0vuriZLgpw64lWpHjTqD98NnpA+PdALyduJvuhVQmNfWDb65y/VanUJuNC3q7VnOOU1d4aFgDZEb81oz0uBSbVeNBRU4Q8/SfA/PsToy9GDCd/sSL8/ApLzK+c4yywgoktwkYW8awAhmex8kTRRb3oRq0vWPpfryRl8G/L8M1h02bX7VR3fy1bPzZHpAbR2cRYqOMD4Gg/FTI8cMonh/jaSS/ADcJEsslESk8WZ8w7b5PJAvBQyUBud4fHIaLwjBY7pbs9brrAQnTjUwG/u09KdZmMNw=="; + + + [manager POST:url.absoluteString parameters:param headers:nil progress:nil success:^(NSURLSessionDataTask *task, id responseObject) { + + NSLog(@"results: %@", responseObject); + + } failure:^(NSURLSessionDataTask *task, NSError *error) { + + NSLog(@"results: %@", error); + + }]; + +} + +-(void)testPostTwo{ + + NSString *urlString = @"http://192.168.2.215:8082/PubFile/Data/AppLogin/GetDataRsa.aspx"; + NSURL *url = [NSURL URLWithString:urlString]; + + NSString *param = @"ALmSSvL4sBL9VMXMJH4IznebXiVzHhAsnC9r2CbZ7m5xudJoQcv7JjbHIJ0vuriZLgpw64lWpHjTqD98NnpA+PdALyduJvuhVQmNfWDb65y/VanUJuNC3q7VnOOU1d4aFgDZEb81oz0uBSbVeNBRU4Q8/SfA/PsToy9GDCd/sSL8/ApLzK+c4yywgoktwkYW8awAhmex8kTRRb3oRq0vWPpfryRl8G/L8M1h02bX7VR3fy1bPzZHpAbR2cRYqOMD4Gg/FTI8cMonh/jaSS/ADcJEsslESk8WZ8w7b5PJAvBQyUBud4fHIaLwjBY7pbs9brrAQnTjUwG/u09KdZmMNw=="; + + + NSData* data = [param dataUsingEncoding:NSUTF8StringEncoding]; + + AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]]; + + NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:url + cachePolicy:NSURLRequestReloadIgnoringCacheData + timeoutInterval:1000]; + [request setHTTPMethod:@"POST"]; + [request setHTTPBody:data]; + + NSURLSession *requestSessions = [NSURLSession sharedSession]; + NSURLSessionDataTask *requestTasks = [requestSessions dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { + //NSLog(@"data ======= %@, response ======= %@, error ======= %@",data ,response, error); + + if(error==NULL){ + NSString *resultStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSLog(@"data ======= %@",resultStr); + } + }]; + [requestTasks resume]; +} + +-(void)getDataByApi:(NSString *) token{ + + //https://mobile.zhp.geg.com.cn:7082/PubFile/Data/aboutme/aboutdetailRsa.ashx + + //PubFile/Data/GetOrderListRsa.ashx?departmentnameid=090300&page=1&pageSize=20&listcode=ApplySuggestion&proposerid=&manid=310261 + + //NSString *urlString = @"PubFile/Data/aboutme/aboutdetailRsa.ashx"; + NSString *urlString = @"PubFile/Data/GetOrderListRsa.ashx?departmentnameid=090300&page=1&pageSize=20&listcode=ApplySuggestion&proposerid=&manid=310261"; + + + + [[NetworkTools sharedTools] request:GET URLString:urlString parameters: nil token:token finished:^(id _Nonnull result, NSError * _Nonnull error) { + if(error != nil){ + + return; + }else{ + + } + NSString *resultStr = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; + NSString *resultDecode = [RSAUtil decryptString:resultStr privateKey:RSA_Privite_key]; + + NSLog(@"%@",result); + NSLog(@"%@",resultDecode); + +// NSData *dataDecode = [resultDecode dataUsingEncoding:NSUTF8StringEncoding]; +// NSDictionary *dictDecode = [NSJSONSerialization JSONObjectWithData:dataDecode options:NSJSONReadingMutableContainers error:nil]; +// NSArray *arryRow = dictDecode[@"Rows"]; +// NSDictionary *dictRow = arryRow[0]; +// NSString *token = dictRow[@"token"]; +// NSLog(@"%@",token); + + }]; + +} + +- (IBAction)dywLogin:(id)sender { + NSMutableDictionary *mutableDic = [[NSMutableDictionary alloc] initWithObjectsAndKeys: + @"1d8404185d72d804",@"imeinum", + self.pwd.text,@"password", + @"iPhone16",@"phonemodel", + @"",@"phonenum", + @"16",@"sysversion", + self.username.text,@"username", nil]; + + NSMutableDictionary *mutableDicParam = [[NSMutableDictionary alloc] init]; + mutableDicParam[@"Rows"]=@[mutableDic]; + + NSLog(@"mutableDic :%@",mutableDicParam); + + BOOL isYes = [NSJSONSerialization isValidJSONObject:mutableDicParam]; + if(isYes){ + NSLog(@"可以转换"); + NSData *jsonData = [NSJSONSerialization dataWithJSONObject:mutableDicParam options:0 error:NULL]; + NSString *_rsaStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + NSLog(@"%@",_rsaStr); + NSString *param = [RSAUtil encryptString:_rsaStr publicKey:RSA_Public_key]; + NSLog(@"%@",param); + + NSString *urlString = @"api/app/login/appLdapLogin"; + + [[NetworkTools sharedTools] request:POST URLString:urlString parameters: param finished:^(id _Nonnull result, NSError * _Nonnull error) { + if(error != nil){ + + return; + }else{ + + } + NSString *resultStr = [[NSString alloc] initWithData:result encoding:NSUTF8StringEncoding]; + NSString *resultDecode = [RSAUtil decryptString:resultStr privateKey:RSA_Privite_key]; + + NSLog(@"%@",result); + NSLog(@"%@",resultDecode); + + NSData *dataDecode = [resultDecode dataUsingEncoding:NSUTF8StringEncoding]; + NSDictionary *dictDecode = [NSJSONSerialization JSONObjectWithData:dataDecode options:NSJSONReadingMutableContainers error:nil]; + NSArray *arryRow = dictDecode[@"Rows"]; + NSDictionary *dictRow = arryRow[0]; + NSString *token = dictRow[@"token"]; + NSLog(@"%@",token); + //[self getDataByApi:token]; + + }]; + + }else{ + NSLog(@"JSON数据生成失败,请检查数据格式"); + } +} + + +@end diff --git a/TwoNetworking/TwoNetworking/main.m b/TwoNetworking/TwoNetworking/main.m new file mode 100644 index 0000000..126bcd9 --- /dev/null +++ b/TwoNetworking/TwoNetworking/main.m @@ -0,0 +1,18 @@ +// +// main.m +// TwoNetworking +// +// Created by admin on 2025/8/20. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString * appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +}