diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.pbxproj b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.pbxproj deleted file mode 100644 index 97a929b8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXBuildFile section */ - 143474D1256BFA8300149168 /* SQURLRequestSerializationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 143474D0256BFA8300149168 /* SQURLRequestSerializationTest.m */; }; - 14560566256E957F00746C4A /* SQMultipartBodyStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 14560565256E957F00746C4A /* SQMultipartBodyStream.m */; }; - 14963573256BEC5200B1E31B /* SQHTTPBodyPart.m in Sources */ = {isa = PBXBuildFile; fileRef = 14963572256BEC5200B1E31B /* SQHTTPBodyPart.m */; }; - 149635AB256BFA3600B1E31B /* AFNetworking_DebugTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 149635AA256BFA3600B1E31B /* AFNetworking_DebugTests.m */; }; - 14A334872568D62400772436 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A334862568D62400772436 /* AppDelegate.m */; }; - 14A3348A2568D62400772436 /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A334892568D62400772436 /* SceneDelegate.m */; }; - 14A3348D2568D62400772436 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A3348C2568D62400772436 /* ViewController.m */; }; - 14A334902568D62400772436 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 14A3348E2568D62400772436 /* Main.storyboard */; }; - 14A334922568D62500772436 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 14A334912568D62500772436 /* Assets.xcassets */; }; - 14A334952568D62500772436 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 14A334932568D62500772436 /* LaunchScreen.storyboard */; }; - 14A334982568D62500772436 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A334972568D62500772436 /* main.m */; }; - 14ED0256256A480700D370FD /* SQQueryStringPair.m in Sources */ = {isa = PBXBuildFile; fileRef = 14ED0255256A480700D370FD /* SQQueryStringPair.m */; }; - 14ED0267256A4AD700D370FD /* SQURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = 14ED0266256A4AD700D370FD /* SQURLRequestSerialization.m */; }; - 1E4C433D320B90193A1EE719 /* Pods_AFNetworking_Debug.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E27C56A0FCB7F71F556F4D1 /* Pods_AFNetworking_Debug.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 149635AD256BFA3600B1E31B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 14A3347A2568D62400772436 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 14A334812568D62400772436; - remoteInfo = "AFNetworking-Debug"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 002F3802D60E85956ACBBB58 /* Pods-AFNetworking-Debug.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AFNetworking-Debug.release.xcconfig"; path = "Target Support Files/Pods-AFNetworking-Debug/Pods-AFNetworking-Debug.release.xcconfig"; sourceTree = ""; }; - 143474D0256BFA8300149168 /* SQURLRequestSerializationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SQURLRequestSerializationTest.m; sourceTree = ""; }; - 14560564256E957F00746C4A /* SQMultipartBodyStream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQMultipartBodyStream.h; sourceTree = ""; }; - 14560565256E957F00746C4A /* SQMultipartBodyStream.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQMultipartBodyStream.m; sourceTree = ""; }; - 14963571256BEC5200B1E31B /* SQHTTPBodyPart.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQHTTPBodyPart.h; sourceTree = ""; }; - 14963572256BEC5200B1E31B /* SQHTTPBodyPart.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQHTTPBodyPart.m; sourceTree = ""; }; - 149635A8256BFA3600B1E31B /* AFNetworking-DebugTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AFNetworking-DebugTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 149635AA256BFA3600B1E31B /* AFNetworking_DebugTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AFNetworking_DebugTests.m; sourceTree = ""; }; - 149635AC256BFA3600B1E31B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 14A334822568D62400772436 /* AFNetworking-Debug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AFNetworking-Debug.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 14A334852568D62400772436 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 14A334862568D62400772436 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 14A334882568D62400772436 /* SceneDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = ""; }; - 14A334892568D62400772436 /* SceneDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = ""; }; - 14A3348B2568D62400772436 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 14A3348C2568D62400772436 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 14A3348F2568D62400772436 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 14A334912568D62500772436 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 14A334942568D62500772436 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 14A334962568D62500772436 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 14A334972568D62500772436 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 14ED0254256A480700D370FD /* SQQueryStringPair.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQQueryStringPair.h; sourceTree = ""; }; - 14ED0255256A480700D370FD /* SQQueryStringPair.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQQueryStringPair.m; sourceTree = ""; }; - 14ED0265256A4AD700D370FD /* SQURLRequestSerialization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQURLRequestSerialization.h; sourceTree = ""; }; - 14ED0266256A4AD700D370FD /* SQURLRequestSerialization.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SQURLRequestSerialization.m; sourceTree = ""; }; - 3E27C56A0FCB7F71F556F4D1 /* Pods_AFNetworking_Debug.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AFNetworking_Debug.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 67E409C126A533A0A2F1DA57 /* Pods-AFNetworking-Debug.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AFNetworking-Debug.debug.xcconfig"; path = "Target Support Files/Pods-AFNetworking-Debug/Pods-AFNetworking-Debug.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 149635A5256BFA3600B1E31B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 14A3347F2568D62400772436 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E4C433D320B90193A1EE719 /* Pods_AFNetworking_Debug.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 149635A9256BFA3600B1E31B /* AFNetworking-DebugTests */ = { - isa = PBXGroup; - children = ( - 143474D0256BFA8300149168 /* SQURLRequestSerializationTest.m */, - 149635AA256BFA3600B1E31B /* AFNetworking_DebugTests.m */, - 149635AC256BFA3600B1E31B /* Info.plist */, - ); - path = "AFNetworking-DebugTests"; - sourceTree = ""; - }; - 14A334792568D62400772436 = { - isa = PBXGroup; - children = ( - 14A334842568D62400772436 /* AFNetworking-Debug */, - 149635A9256BFA3600B1E31B /* AFNetworking-DebugTests */, - 14A334832568D62400772436 /* Products */, - E8805DB42FDB0DFA806D2195 /* Pods */, - D2153CAF6D5B087489DCB36C /* Frameworks */, - ); - sourceTree = ""; - }; - 14A334832568D62400772436 /* Products */ = { - isa = PBXGroup; - children = ( - 14A334822568D62400772436 /* AFNetworking-Debug.app */, - 149635A8256BFA3600B1E31B /* AFNetworking-DebugTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 14A334842568D62400772436 /* AFNetworking-Debug */ = { - isa = PBXGroup; - children = ( - 14A334852568D62400772436 /* AppDelegate.h */, - 14A334862568D62400772436 /* AppDelegate.m */, - 14A334882568D62400772436 /* SceneDelegate.h */, - 14A334892568D62400772436 /* SceneDelegate.m */, - 14A3348B2568D62400772436 /* ViewController.h */, - 14A3348C2568D62400772436 /* ViewController.m */, - 14ED0254256A480700D370FD /* SQQueryStringPair.h */, - 14ED0255256A480700D370FD /* SQQueryStringPair.m */, - 14963571256BEC5200B1E31B /* SQHTTPBodyPart.h */, - 14963572256BEC5200B1E31B /* SQHTTPBodyPart.m */, - 14560564256E957F00746C4A /* SQMultipartBodyStream.h */, - 14560565256E957F00746C4A /* SQMultipartBodyStream.m */, - 14ED0265256A4AD700D370FD /* SQURLRequestSerialization.h */, - 14ED0266256A4AD700D370FD /* SQURLRequestSerialization.m */, - 14A3348E2568D62400772436 /* Main.storyboard */, - 14A334912568D62500772436 /* Assets.xcassets */, - 14A334932568D62500772436 /* LaunchScreen.storyboard */, - 14A334962568D62500772436 /* Info.plist */, - 14A334972568D62500772436 /* main.m */, - ); - path = "AFNetworking-Debug"; - sourceTree = ""; - }; - D2153CAF6D5B087489DCB36C /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3E27C56A0FCB7F71F556F4D1 /* Pods_AFNetworking_Debug.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - E8805DB42FDB0DFA806D2195 /* Pods */ = { - isa = PBXGroup; - children = ( - 67E409C126A533A0A2F1DA57 /* Pods-AFNetworking-Debug.debug.xcconfig */, - 002F3802D60E85956ACBBB58 /* Pods-AFNetworking-Debug.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 149635A7256BFA3600B1E31B /* AFNetworking-DebugTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 149635AF256BFA3600B1E31B /* Build configuration list for PBXNativeTarget "AFNetworking-DebugTests" */; - buildPhases = ( - 149635A4256BFA3600B1E31B /* Sources */, - 149635A5256BFA3600B1E31B /* Frameworks */, - 149635A6256BFA3600B1E31B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 149635AE256BFA3600B1E31B /* PBXTargetDependency */, - ); - name = "AFNetworking-DebugTests"; - productName = "AFNetworking-DebugTests"; - productReference = 149635A8256BFA3600B1E31B /* AFNetworking-DebugTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 14A334812568D62400772436 /* AFNetworking-Debug */ = { - isa = PBXNativeTarget; - buildConfigurationList = 14A3349B2568D62500772436 /* Build configuration list for PBXNativeTarget "AFNetworking-Debug" */; - buildPhases = ( - EDE07985A07A34DA021298E0 /* [CP] Check Pods Manifest.lock */, - 14A3347E2568D62400772436 /* Sources */, - 14A3347F2568D62400772436 /* Frameworks */, - 14A334802568D62400772436 /* Resources */, - 6ACB7A2F48A37CC90E70A518 /* [CP] Embed Pods Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "AFNetworking-Debug"; - productName = "AFNetworking-Debug"; - productReference = 14A334822568D62400772436 /* AFNetworking-Debug.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 14A3347A2568D62400772436 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1200; - TargetAttributes = { - 149635A7256BFA3600B1E31B = { - CreatedOnToolsVersion = 12.0; - TestTargetID = 14A334812568D62400772436; - }; - 14A334812568D62400772436 = { - CreatedOnToolsVersion = 12.0; - }; - }; - }; - buildConfigurationList = 14A3347D2568D62400772436 /* Build configuration list for PBXProject "AFNetworking-Debug" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 14A334792568D62400772436; - productRefGroup = 14A334832568D62400772436 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 14A334812568D62400772436 /* AFNetworking-Debug */, - 149635A7256BFA3600B1E31B /* AFNetworking-DebugTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 149635A6256BFA3600B1E31B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 14A334802568D62400772436 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 14A334952568D62500772436 /* LaunchScreen.storyboard in Resources */, - 14A334922568D62500772436 /* Assets.xcassets in Resources */, - 14A334902568D62400772436 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 6ACB7A2F48A37CC90E70A518 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AFNetworking-Debug/Pods-AFNetworking-Debug-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AFNetworking-Debug/Pods-AFNetworking-Debug-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AFNetworking-Debug/Pods-AFNetworking-Debug-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - EDE07985A07A34DA021298E0 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-AFNetworking-Debug-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 149635A4256BFA3600B1E31B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 149635AB256BFA3600B1E31B /* AFNetworking_DebugTests.m in Sources */, - 143474D1256BFA8300149168 /* SQURLRequestSerializationTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 14A3347E2568D62400772436 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 14A3348D2568D62400772436 /* ViewController.m in Sources */, - 14963573256BEC5200B1E31B /* SQHTTPBodyPart.m in Sources */, - 14560566256E957F00746C4A /* SQMultipartBodyStream.m in Sources */, - 14A334872568D62400772436 /* AppDelegate.m in Sources */, - 14ED0267256A4AD700D370FD /* SQURLRequestSerialization.m in Sources */, - 14A334982568D62500772436 /* main.m in Sources */, - 14A3348A2568D62400772436 /* SceneDelegate.m in Sources */, - 14ED0256256A480700D370FD /* SQQueryStringPair.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 149635AE256BFA3600B1E31B /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 14A334812568D62400772436 /* AFNetworking-Debug */; - targetProxy = 149635AD256BFA3600B1E31B /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 14A3348E2568D62400772436 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 14A3348F2568D62400772436 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 14A334932568D62500772436 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 14A334942568D62500772436 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 149635B0256BFA3600B1E31B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = NGPFU6GT2A; - INFOPLIST_FILE = "AFNetworking-DebugTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = "coderZsq.AFNetworking-DebugTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AFNetworking-Debug.app/AFNetworking-Debug"; - }; - name = Debug; - }; - 149635B1256BFA3600B1E31B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = NGPFU6GT2A; - INFOPLIST_FILE = "AFNetworking-DebugTests/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = "coderZsq.AFNetworking-DebugTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AFNetworking-Debug.app/AFNetworking-Debug"; - }; - name = Release; - }; - 14A334992568D62500772436 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - 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; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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 = 14.0; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 14A3349A2568D62500772436 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - 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; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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 = 14.0; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 14A3349C2568D62500772436 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 67E409C126A533A0A2F1DA57 /* Pods-AFNetworking-Debug.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = NGPFU6GT2A; - INFOPLIST_FILE = "AFNetworking-Debug/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = "coderZsq.AFNetworking-Debug"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 14A3349D2568D62500772436 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 002F3802D60E85956ACBBB58 /* Pods-AFNetworking-Debug.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = NGPFU6GT2A; - INFOPLIST_FILE = "AFNetworking-Debug/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = "coderZsq.AFNetworking-Debug"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 149635AF256BFA3600B1E31B /* Build configuration list for PBXNativeTarget "AFNetworking-DebugTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 149635B0256BFA3600B1E31B /* Debug */, - 149635B1256BFA3600B1E31B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 14A3347D2568D62400772436 /* Build configuration list for PBXProject "AFNetworking-Debug" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 14A334992568D62500772436 /* Debug */, - 14A3349A2568D62500772436 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 14A3349B2568D62500772436 /* Build configuration list for PBXNativeTarget "AFNetworking-Debug" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 14A3349C2568D62500772436 /* Debug */, - 14A3349D2568D62500772436 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 14A3347A2568D62400772436 /* Project object */; -} diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcworkspace/contents.xcworkspacedata b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index cd360849..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d98100..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/AppDelegate.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/AppDelegate.h deleted file mode 100644 index 61ebfedc..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/AppDelegate.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// AppDelegate.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#import - -@interface AppDelegate : UIResponder - - -@end - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/AppDelegate.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/AppDelegate.m deleted file mode 100644 index 4f3e7eea..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/AppDelegate.m +++ /dev/null @@ -1,40 +0,0 @@ -// -// AppDelegate.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#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/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AccentColor.colorset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb878970..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index f2c3885f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40.png deleted file mode 100644 index 3cf6c5dd..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png deleted file mode 100644 index 9e573ac6..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png deleted file mode 100644 index e647adb1..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png deleted file mode 100644 index e647adb1..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png deleted file mode 100644 index bf024e75..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-76.png deleted file mode 100644 index 0cdf6723..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png deleted file mode 100644 index fe0be25b..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small.png deleted file mode 100644 index c4003bfd..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png deleted file mode 100644 index 6f525983..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png deleted file mode 100644 index d7ea8401..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/Contents.json deleted file mode 100644 index 73c00596..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Base.lproj/LaunchScreen.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index 865e9329..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Base.lproj/Main.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Base.lproj/Main.storyboard deleted file mode 100644 index 2566cdb2..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Base.lproj/Main.storyboard +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Info.plist deleted file mode 100644 index 426744f7..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/Info.plist +++ /dev/null @@ -1,71 +0,0 @@ - - - - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - SceneDelegate - UISceneStoryboardFile - Main - - - - - UIApplicationSupportsIndirectInputEvents - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQHTTPBodyPart.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQHTTPBodyPart.h deleted file mode 100644 index eab80bbc..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQHTTPBodyPart.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// SQHTTPBodyPart.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/23. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -NSString * SQCreateMultipartFormBoundary(void); - -NSString * SQMultipartFormInitialBoundary(NSString *boundary); - -NSString * SQMultipartFormEncapsulationBoundary(NSString *boundary); - -NSString * SQMultipartFormFinalBoundary(NSString *boundary); - -NSString * SQContentTypeForPathExtension(NSString *extension); - -@interface SQHTTPBodyPart : 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, assign) 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; - -- (NSString *)stringForHeaders; - -@end - -NS_ASSUME_NONNULL_END diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQHTTPBodyPart.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQHTTPBodyPart.m deleted file mode 100644 index 4892112c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQHTTPBodyPart.m +++ /dev/null @@ -1,218 +0,0 @@ -// -// SQHTTPBodyPart.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/23. -// - -#import "SQHTTPBodyPart.h" -#import - -NSString * SQCreateMultipartFormBoundary() { - return [NSString stringWithFormat:@"Boundary+%08X%08X", arc4random(), arc4random()]; -} - -NSString * const kSQMultipartFormCRLF = @"\r\n"; - -inline NSString * SQMultipartFormInitialBoundary(NSString *boundary) { - return [NSString stringWithFormat:@"--%@%@", boundary, kSQMultipartFormCRLF]; -} - -inline NSString * SQMultipartFormEncapsulationBoundary(NSString *boundary) { - return [NSString stringWithFormat:@"%@--%@%@", kSQMultipartFormCRLF, boundary, kSQMultipartFormCRLF]; // 细节 boundary前后有两个换行 -} - -inline NSString * SQMultipartFormFinalBoundary(NSString *boundary) { - return [NSString stringWithFormat:@"%@--%@--%@", kSQMultipartFormCRLF, boundary, kSQMultipartFormCRLF]; // 细节 boundary前后有两个换行 -} - -inline NSString * SQContentTypeForPathExtension(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; - } -} - -typedef enum { - SQEncapsulationBoundaryPhase = 1, - SQHeaderPhase = 2, - SQBodyPhase = 3, - SQFinalBoundaryPhase = 4, -} SQHTTPBodyPartReadPhase; - -@interface SQHTTPBodyPart () { - SQHTTPBodyPartReadPhase _phase; - NSInputStream *_inputStram; - unsigned long long _phaseReadOffset; -} - -/** - 过度到下一个阶段 - */ -- (BOOL)transitionToNextPhase; -- (NSInteger)readData:(NSData *)data intoBuffer:(uint8_t *)buffer maxLength:(NSUInteger)length; - -@end - -@implementation SQHTTPBodyPart - -- (BOOL)transitionToNextPhase { - if (![[NSThread currentThread] isMainThread]) { - dispatch_sync(dispatch_get_main_queue(), ^{ - [self transitionToNextPhase]; - }); - return YES; - } - switch (_phase) { - case SQEncapsulationBoundaryPhase: - _phase = SQHeaderPhase; - break; - case SQHeaderPhase: - [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; - [self.inputStream open]; - _phase = SQBodyPhase; - break; - case SQBodyPhase: - [self.inputStream close]; - _phase = SQFinalBoundaryPhase; - break; - case SQFinalBoundaryPhase: - default: - _phase = SQEncapsulationBoundaryPhase; - break; - } - _phaseReadOffset = 0; - return YES; -} - -- (instancetype)init -{ - self = [super init]; - if (!self) { - return nil; - } - [self transitionToNextPhase]; - return self; -} - -- (instancetype)copyWithZone:(NSZone *)zone { - SQHTTPBodyPart *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; -} - -- (void)dealloc { - if (_inputStram) { - [_inputStram close]; - _inputStram = nil; - } -} - -- (NSInputStream *)inputStream { - if (!_inputStram) { - if ([self.body isKindOfClass:[NSData class]]) { - _inputStram = [NSInputStream inputStreamWithData:self.body]; - } else if ([self.body isKindOfClass:[NSURL class]]) { - _inputStram = [NSInputStream inputStreamWithURL:self.body]; - } else if ([self.body isKindOfClass:[NSInputStream class]]) { - _inputStram = self.body; - } else { - _inputStram = [NSInputStream inputStreamWithData:[NSData data]]; - } - } - return _inputStram; -} - -- (NSString *)stringForHeaders { - NSMutableString *headerString = [NSMutableString string]; - for (NSString *field in [self.headers allKeys]) { - [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kSQMultipartFormCRLF]]; - } - [headerString appendString:kSQMultipartFormCRLF]; // 最后多加一个换行 - return [NSString stringWithString:headerString]; -} - -- (unsigned long long)contentLength { - unsigned long long length = 0; - NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? SQMultipartFormInitialBoundary(self.boundary) : SQMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; - length += [encapsulationBoundaryData length]; - - NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; - length += [headersData length]; - - length += _bodyContentLength; - - NSData *closingBoundaryData = ([self hasFinalBoundary] ? [SQMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); - length += [closingBoundaryData length]; - return length; -} - -- (BOOL)hasBytesAvailable { - // 如果AFMultipartFormFinalBoundary不适合可用缓冲区,则允许再次调用read:maxLength: - if (_phase == SQFinalBoundaryPhase) { - 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)readData:(NSData *)data intoBuffer:(uint8_t *)buffer maxLength:(NSUInteger)length { - NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, length); - [data getBytes:buffer range:range]; - - _phaseReadOffset += range.length; - - if (((NSUInteger)_phaseReadOffset) >= [data length]) { - [self transitionToNextPhase]; - } - return (NSInteger) range.length; -} - -- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)length { - NSInteger totalNumberOfBytesRead = 0; - if (_phase == SQEncapsulationBoundaryPhase) { - NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? SQMultipartFormInitialBoundary(self.boundary) : SQMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding]; - totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:length - (NSInteger)totalNumberOfBytesRead]; - } - if (_phase == SQHeaderPhase) { - NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; - totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; - } - if (_phase == SQBodyPhase) { - 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 == SQFinalBoundaryPhase) { - NSData *closingBoundaryData = ([self hasFinalBoundary] ? [SQMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]); - totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)]; - } - return totalNumberOfBytesRead; -} - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQMultipartBodyStream.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQMultipartBodyStream.h deleted file mode 100644 index 5d22719b..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQMultipartBodyStream.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// SQMultipartBodyStream.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/25. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@class SQHTTPBodyPart; - -@interface SQMultipartBodyStream : 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:(SQHTTPBodyPart *)bodyPart; - -@end - -NS_ASSUME_NONNULL_END diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQMultipartBodyStream.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQMultipartBodyStream.m deleted file mode 100644 index 36cbcb72..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQMultipartBodyStream.m +++ /dev/null @@ -1,164 +0,0 @@ -// -// SQMultipartBodyStream.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/25. -// - -#import "SQMultipartBodyStream.h" -#import "SQHTTPBodyPart.h" - -@interface NSStream () -@property (readwrite) NSStreamStatus streamStatus; -@property (readwrite, copy) NSError *streamError; -@end - -@interface SQMultipartBodyStream () -@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; -@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts; -@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator; -@property (readwrite, nonatomic, strong) SQHTTPBodyPart *currentHTTPBodyPart; -@property (readwrite, nonatomic, strong) NSOutputStream *outputStream; -@property (readwrite, nonatomic, strong) NSMutableData *buffer; -@end - -@implementation SQMultipartBodyStream - -@synthesize delegate; -@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 (SQHTTPBodyPart *bodyPart in self.HTTPBodyParts) { - bodyPart.hasInitialBoundary = NO; - bodyPart.hasFinalBoundary = NO; - } - [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES]; - [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; - } -} - -- (void)appendHTTPBodyPart:(SQHTTPBodyPart *)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 * _Nullable *)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 NSStreamPropertyKey)key { - return nil; -} - -- (BOOL)setProperty:(__unused id)property forKey:(__unused NSStreamPropertyKey)key { - return NO; -} - -- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop forMode:(__unused NSRunLoopMode)mode { - -} - -- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop forMode:(__unused NSRunLoopMode)mode { - -} - -- (unsigned long long)contentLength { - unsigned long long length = 0; - for (SQHTTPBodyPart *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 { - SQMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; - for (SQHTTPBodyPart *bodyPart in self.HTTPBodyParts) { - [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]]; - } - [bodyStreamCopy setInitialAndFinalBoundaries]; - return bodyStreamCopy; -} - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQQueryStringPair.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQQueryStringPair.h deleted file mode 100644 index 839dbaaf..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQQueryStringPair.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// SQQueryStringPair.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/22. -// - -#import - -NSString * SQQueryStringFromParameters(NSDictionary *parameters); - -NSArray * SQQueryStringPairFromDictionary(NSDictionary *dictionary); - -NSArray * SQQueryStringPairsFromKeyAndValue(NSString *key, id value); - -@interface SQQueryStringPair : NSObject - -@property (readwrite, nonatomic, strong) id field; -@property (readwrite, nonatomic, strong) id value; - -- (instancetype)initWithField:(id)field value:(id)value; - -- (NSString *)URLEncodedStringValue; - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQQueryStringPair.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQQueryStringPair.m deleted file mode 100644 index 4d7deaaa..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQQueryStringPair.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// SQQueryStringPair.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/22. -// - -#import "SQQueryStringPair.h" - -NSString * SQQueryStringFromParameters(NSDictionary *parameters) { - NSMutableArray *mutablePairs = [NSMutableArray array]; - for (SQQueryStringPair *pair in SQQueryStringPairFromDictionary(parameters)) { - [mutablePairs addObject:[pair URLEncodedStringValue]]; - } - return [mutablePairs componentsJoinedByString:@"&"]; -} - -NSArray * SQQueryStringPairFromDictionary(NSDictionary *dictionary) { - return SQQueryStringPairsFromKeyAndValue(nil, dictionary); -} - -NSArray * SQQueryStringPairsFromKeyAndValue(NSString *key, id value) { - NSMutableArray *mutableQueryStringComponents = [NSMutableArray array]; - // 按照key字母进行排序 - NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)]; - if ([value isKindOfClass:[NSDictionary class]]) { - NSDictionary *dictionary = value; - for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { - id nestedValue = dictionary[nestedKey]; - if (nestedValue) { - [mutableQueryStringComponents addObjectsFromArray:SQQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; - } - } - } else if ([value isKindOfClass:[NSArray class]]) { - NSArray *array = value; - for (id nestedValue in array) { - [mutableQueryStringComponents addObjectsFromArray:SQQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; - } - } else if ([value isKindOfClass:[NSSet class]]) { - NSSet *set = value; - for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) { - [mutableQueryStringComponents addObjectsFromArray:SQQueryStringPairsFromKeyAndValue(key, obj)]; - } - } else { - [mutableQueryStringComponents addObject:[[SQQueryStringPair alloc] initWithField:key value:value]]; - } - return mutableQueryStringComponents; -} - - -@implementation SQQueryStringPair - -NSString * SQPercentEscapedStringFromString(NSString *string) { -// return string; - static NSString * const kSQCharactersGeneralDelimitersToEncode = @":#[]@"; - static NSString * const kSQCharactersSubDelimitersToEncode = @"!$&'()*+,;="; - NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy]; - [allowedCharacterSet removeCharactersInString:[kSQCharactersGeneralDelimitersToEncode stringByAppendingString:kSQCharactersSubDelimitersToEncode]]; - NSString *encoded = [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); - range = [string rangeOfComposedCharacterSequencesForRange:range]; - NSString *substring = [string substringWithRange:range]; - NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; - [escaped appendString:encoded]; - index += range.length; - } - return encoded; -} - -- (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 SQPercentEscapedStringFromString([self.field description]); - } else { - return [NSString stringWithFormat:@"%@=%@", SQPercentEscapedStringFromString([self.field description]), SQPercentEscapedStringFromString([self.value description])]; - } -} - -- (NSString *)description { - return [self URLEncodedStringValue]; -} - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQURLRequestSerialization.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQURLRequestSerialization.h deleted file mode 100644 index 2ab1c214..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQURLRequestSerialization.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// SQURLRequestSerialization.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/22. -// - -#import - -@interface SQURLRequestSerialization : NSObject - - - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQURLRequestSerialization.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQURLRequestSerialization.m deleted file mode 100644 index 6007038a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SQURLRequestSerialization.m +++ /dev/null @@ -1,14 +0,0 @@ -// -// SQURLRequestSerialization.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/22. -// - -#import "SQURLRequestSerialization.h" -#import "SQQueryStringPair.h" - -@implementation SQURLRequestSerialization - - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SceneDelegate.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SceneDelegate.h deleted file mode 100644 index 9c2b000a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SceneDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// SceneDelegate.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#import - -@interface SceneDelegate : UIResponder - -@property (strong, nonatomic) UIWindow * window; - -@end - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SceneDelegate.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SceneDelegate.m deleted file mode 100644 index 7e43ce60..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/SceneDelegate.m +++ /dev/null @@ -1,57 +0,0 @@ -// -// SceneDelegate.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#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/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/ViewController.h b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/ViewController.h deleted file mode 100644 index 97a3c4c6..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/ViewController.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// ViewController.h -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#import - -@interface ViewController : UIViewController - - -@end - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/ViewController.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/ViewController.m deleted file mode 100644 index e8d20677..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/ViewController.m +++ /dev/null @@ -1,189 +0,0 @@ -// -// ViewController.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#import "ViewController.h" -#import -#import "SQURLRequestSerialization.h" -#import "SQHTTPBodyPart.h" - -@interface ViewController () -@property (nonatomic, weak) IBOutlet UIProgressView *progressView; -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - [self debug_AFNURLRequestSerialSerialization]; -} - -- (void)create_a_downloadTask { - NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; - AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; - - NSURL *URL = [NSURL URLWithString:@"http://localhost:8080/afn/downloadTask/download.zip"]; - NSURLRequest *request = [NSURLRequest requestWithURL:URL]; - - NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:nil destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) { - NSLog(@"targetPath: %@", targetPath); - /** - targetPath: file:///Users/zhushuangquan/Library/Developer/CoreSimulator/Devices/384515F7-F815-4CD8-89F8-90481BD7EB0C/data/Containers/Data/Application/8D91694B-11F9-4537-A914-3C4EB61BED37/tmp/CFNetworkDownload_xPcOB5.tmp - */ - NSLog(@"response: %@", response); - /** - response: { URL: http://localhost:8080/afn/downloadTask/download.zip } { Status Code: 200, Headers { - "Cache-Control" = ( - "max-age=0" - ); - Connection = ( - "keep-alive" - ); - "Content-Disposition" = ( - "attachment; filename=\"download.zip\"" - ); - "Content-Length" = ( - 655724 - ); - "Content-Type" = ( - "application/zip" - ); - Date = ( - "Sat, 21 Nov 2020 07:09:02 GMT" - ); - "Keep-Alive" = ( - "timeout=5" - ); - "Last-Modified" = ( - "Sat, 21 Nov 2020 07:04:18 GMT" - ); - } } - */ - NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error: nil]; - return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]]; - } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) { - NSLog(@"response: %@", response); - /** - response: { URL: http://localhost:8080/afn/downloadTask/download.zip } { Status Code: 200, Headers { - "Cache-Control" = ( - "max-age=0" - ); - Connection = ( - "keep-alive" - ); - "Content-Disposition" = ( - "attachment; filename=\"download.zip\"" - ); - "Content-Length" = ( - 655724 - ); - "Content-Type" = ( - "application/zip" - ); - Date = ( - "Sat, 21 Nov 2020 07:09:02 GMT" - ); - "Keep-Alive" = ( - "timeout=5" - ); - "Last-Modified" = ( - "Sat, 21 Nov 2020 07:04:18 GMT" - ); - } } - */ - NSLog(@"File downloaded to: %@", filePath); - /** - File downloaded to: file:///Users/zhushuangquan/Library/Developer/CoreSimulator/Devices/384515F7-F815-4CD8-89F8-90481BD7EB0C/data/Containers/Data/Application/8D91694B-11F9-4537-A914-3C4EB61BED37/Documents/download.zip - */ - }]; - [downloadTask resume]; -} - -- (void)create_an_uploadTask { - AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; - manager.responseSerializer = [AFJSONResponseSerializer serializer]; - [manager POST:@"http://localhost:8080/afn/uploadTask/upload" parameters:nil headers:nil constructingBodyWithBlock:^(id _Nonnull formData) { - NSURL *filePath = [NSURL fileURLWithPath:@"/Users/zhushuangquan/Desktop/AFN.png"]; - [formData appendPartWithFileURL:filePath name:@"file" error:nil]; - } progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { - NSLog(@"Success: %@", responseObject); - } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { - NSLog(@"Error: %@", error); - }]; -} - -- (void)create_an_uploadTaskFor_a_MultiPartRequestWithProgress { - NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://localhost:8080/afn/uploadTask/upload" parameters:nil constructingBodyWithBlock:^(id formData) { - [formData appendPartWithFileURL:[NSURL fileURLWithPath:@"/Users/zhushuangquan/Desktop/AFN.png"] 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 - [self.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]; -} - -- (void)create_a_dataTask { - NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; - AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; - manager.responseSerializer = [AFJSONResponseSerializer serializer]; - - NSURL *URL = [NSURL URLWithString:@"http://localhost:8080/afn/dataTask/get"]; - NSURLRequest *request = [NSURLRequest requestWithURL:URL]; - NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { - if (error) { - NSLog(@"Error: %@", error); - } else { - NSLog(@"%@ %@", response, responseObject); - } - }]; - [dataTask resume]; -} - -- (void)sharedNetworkReachability { - [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { - NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status)); - }]; - - [[AFNetworkReachabilityManager sharedManager] startMonitoring]; -} - -- (void)debug_AFNURLRequestSerialSerialization { - NSLog(@"URL: %@", AFPercentEscapedStringFromString(@"http://localhost:8080/afn/dataTask/get?a=1&b=2&c=3")); - // URL: http%3A//localhost%3A8080/afn/dataTask/get?a%3D1%26b%3D2%26c%3D3 - - NSLog(@"QueryString: %@", AFQueryStringFromParameters(@{@"a": @1, @"b": @2, @"c": @3})); - // QueryString: a=1&b=2&c=3 - - NSLog(@"AFURLRequestSerializationErrorDomain: %@", AFURLRequestSerializationErrorDomain); - // AFURLRequestSerializationErrorDomain: com.alamofire.error.serialization.request - NSLog(@"AFNetworkingOperationFailingURLRequestErrorKey: %@", AFNetworkingOperationFailingURLRequestErrorKey); - // AFNetworkingOperationFailingURLRequestErrorKey: com.alamofire.serialization.request.error.response - NSLog(@"kAFUploadStream3GSuggestedPacketSize: %lu", kAFUploadStream3GSuggestedPacketSize); - // kAFUploadStream3GSuggestedPacketSize: 16384 - NSLog(@"kAFUploadStream3GSuggestedDelay: %f", kAFUploadStream3GSuggestedDelay); - // kAFUploadStream3GSuggestedDelay: 0.200000 -} - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/main.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/main.m deleted file mode 100644 index ce4d5da6..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-Debug/main.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// main.m -// AFNetworking-Debug -// -// Created by 朱双泉 on 2020/11/21. -// - -#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); -} diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/AFNetworking_DebugTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/AFNetworking_DebugTests.m deleted file mode 100644 index e65cf4df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/AFNetworking_DebugTests.m +++ /dev/null @@ -1,36 +0,0 @@ -// -// AFNetworking_DebugTests.m -// AFNetworking-DebugTests -// -// Created by 朱双泉 on 2020/11/23. -// - -#import - -@interface AFNetworking_DebugTests : XCTestCase - -@end - -@implementation AFNetworking_DebugTests - -- (void)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. -} - -- (void)testExample { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; -} - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/Info.plist deleted file mode 100644 index 64d65ca4..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/SQURLRequestSerializationTest.m b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/SQURLRequestSerializationTest.m deleted file mode 100644 index a4cf135a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/AFNetworking-DebugTests/SQURLRequestSerializationTest.m +++ /dev/null @@ -1,112 +0,0 @@ -// -// SQURLRequestSerializationTest.m -// AFNetworking-DebugTests -// -// Created by 朱双泉 on 2020/11/23. -// - -#import -#import "SQQueryStringPair.h" -#import "SQHTTPBodyPart.h" - -@interface SQQueryStringPairTest : XCTestCase - -@end - -@implementation SQQueryStringPairTest - -- (void)setUp { - NSLog(@"==================DEBUG=================="); -} - -- (void)tearDown { - NSLog(@"==================DEBUG=================="); -} - -- (void)testStringPair { - SQQueryStringPair *pair = [[SQQueryStringPair alloc] initWithField:@"a" value:@1]; - NSLog(@"%@", [pair URLEncodedStringValue]); - // a=1 - - SQQueryStringPair *pair2 = [[SQQueryStringPair alloc] initWithField:@"b" value:nil]; - NSLog(@"%@", [pair2 URLEncodedStringValue]); - // b - - NSLog(@"%@", SQQueryStringPairsFromKeyAndValue(@"a", @1)); - /** - ( - "a=1" - ) - */ - - NSLog(@"%@", SQQueryStringPairsFromKeyAndValue(@"a", @{@"b": @{@"c": @3}, @"d": @""})); - /** - ( - "a[b][c]=3", - "a[d]=" - ) - */ - NSLog(@"%@", SQQueryStringPairsFromKeyAndValue(@"a", @[@"b", @{@"c": @3}, @"d"])); - /** - ( - "a[]=b", - "a[][c]=3", - "a[]=d" - ) - */ - NSLog(@"%@", SQQueryStringPairFromDictionary(@{@"a": @{@"b": @{@"c": @3}, @"d": @""}})); - /** - ( - "a[b][c]=3", - "a[d]=" - ) - */ - NSLog(@"%@", SQQueryStringFromParameters(@{@"a": @{@"b": @{@"c": @3}, @"d": @""}})); - // a[b][c]=3&a[d]= -} - -- (void)testHTTPBodyPart { - NSString *boundary = SQCreateMultipartFormBoundary(); - NSLog(@"InitialBoundary: %@", SQMultipartFormInitialBoundary(boundary)); - // InitialBoundary: --Boundary+97E7F63434C35636 - NSLog(@"EncapsulationBoundary: %@", SQMultipartFormEncapsulationBoundary(boundary)); - // EncapsulationBoundary: - // --Boundary+97E7F63434C35636 - // - NSLog(@"FinalBoundary: %@", SQMultipartFormFinalBoundary(boundary)); - // FinalBoundary: - // --Boundary+97E7F63434C35636-- - // - NSLog(@"ContentType: %@", SQContentTypeForPathExtension(@"jpg")); - // ContentType: image/jpeg - NSLog(@"ContentType: %@", SQContentTypeForPathExtension(@"mp4")); - // ContentType: video/mp4 - NSLog(@"ContentType: %@", SQContentTypeForPathExtension(@"zip")); - // ContentType: application/zip - - SQHTTPBodyPart *bodyPart = [[SQHTTPBodyPart alloc] init]; - bodyPart.headers = @{ - @"accept": @"application/json, text/javascript, */*; q=0.01", - @"accept-encoding": @"gzip, deflate, br", - @"accept-language": @"en-US,en;q=0.9,zh;q=0.8", - @"content-length": @"9", - @"content-type": @"application/json; charset=UTF-8" - }; - NSLog(@"%@", [bodyPart stringForHeaders]); - -// accept: application/json, text/javascript, */*; q=0.01 -// accept-language: en-US,en;q=0.9,zh;q=0.8 -// content-length: 9 -// accept-encoding: gzip, deflate, br -// content-type: application/json; charset=UTF-8 -// -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; -} - -@end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/Podfile b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/Podfile deleted file mode 100644 index dc8783fd..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/Podfile +++ /dev/null @@ -1,10 +0,0 @@ -# Uncomment the next line to define a global platform for your project -platform :ios, '14.0' - -target 'AFNetworking-Debug' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - - # Pods for AFNetworking-Debug - pod 'AFNetworking', '~> 4.0' -end diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/Podfile.lock b/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/Podfile.lock deleted file mode 100644 index bb5670d1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1-Debug/Podfile.lock +++ /dev/null @@ -1,30 +0,0 @@ -PODS: - - AFNetworking (4.0.1): - - AFNetworking/NSURLSession (= 4.0.1) - - AFNetworking/Reachability (= 4.0.1) - - AFNetworking/Security (= 4.0.1) - - AFNetworking/Serialization (= 4.0.1) - - AFNetworking/UIKit (= 4.0.1) - - AFNetworking/NSURLSession (4.0.1): - - AFNetworking/Reachability - - AFNetworking/Security - - AFNetworking/Serialization - - AFNetworking/Reachability (4.0.1) - - AFNetworking/Security (4.0.1) - - AFNetworking/Serialization (4.0.1) - - AFNetworking/UIKit (4.0.1): - - AFNetworking/NSURLSession - -DEPENDENCIES: - - AFNetworking (~> 4.0) - -SPEC REPOS: - trunk: - - AFNetworking - -SPEC CHECKSUMS: - AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce - -PODFILE CHECKSUM: 73760f0b004663d86c52a1661f29cb5a5ffeb9d0 - -COCOAPODS: 1.8.1 diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/.cocoadocs.yml b/SQDebug/AFNetworking/AFNetworking-4.0.1/.cocoadocs.yml deleted file mode 100644 index aaf16cb1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.cocoadocs.yml +++ /dev/null @@ -1,7 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/.codecov.yml b/SQDebug/AFNetworking/AFNetworking-4.0.1/.codecov.yml deleted file mode 100644 index 951b97b9..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -ignore: - - "Tests" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/issue_template.md b/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/issue_template.md deleted file mode 100644 index 7d2ed51c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/issue_template.md +++ /dev/null @@ -1,33 +0,0 @@ -> ℹ 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/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/pull_request_template.md b/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/pull_request_template.md deleted file mode 100644 index 6e04c374..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/pull_request_template.md +++ /dev/null @@ -1,13 +0,0 @@ -### Issue Link :link: - - -### Goals :soccer: - - - -### Implementation Details :construction: - - - -### Testing Details :mag: - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/stale.yml b/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/stale.yml deleted file mode 100644 index 65f633c7..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/stale.yml +++ /dev/null @@ -1,33 +0,0 @@ -# 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/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/workflows/ci.yml b/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/workflows/ci.yml deleted file mode 100644 index ec939bbb..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.github/workflows/ci.yml +++ /dev/null @@ -1,68 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/.gitignore b/SQDebug/AFNetworking/AFNetworking-4.0.1/.gitignore deleted file mode 100644 index cddadc30..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# 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/SQDebug/AFNetworking/AFNetworking-4.0.1/.ruby-gemset b/SQDebug/AFNetworking/AFNetworking-4.0.1/.ruby-gemset deleted file mode 100644 index 0edabf33..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.ruby-gemset +++ /dev/null @@ -1 +0,0 @@ -afnetworking diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/.ruby-version b/SQDebug/AFNetworking/AFNetworking-4.0.1/.ruby-version deleted file mode 100644 index 24ba9a38..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.0 diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.podspec b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.podspec deleted file mode 100644 index ef110340..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.podspec +++ /dev/null @@ -1,56 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/project.pbxproj b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/project.pbxproj deleted file mode 100644 index c6b4daf2..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1686 +0,0 @@ -// !$*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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme deleted file mode 100644 index 264cb201..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking iOS.xcscheme +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme deleted file mode 100644 index 08a2cf7b..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking macOS.xcscheme +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme deleted file mode 100644 index 9bd6a4cb..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking tvOS.xcscheme +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme deleted file mode 100644 index 25852160..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking.xcodeproj/xcshareddata/xcschemes/AFNetworking watchOS.xcscheme +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFCompatibilityMacros.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFCompatibilityMacros.h deleted file mode 100644 index 1f0ab26d..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFCompatibilityMacros.h +++ /dev/null @@ -1,49 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFHTTPSessionManager.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFHTTPSessionManager.h deleted file mode 100644 index 943fc22d..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFHTTPSessionManager.h +++ /dev/null @@ -1,285 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFHTTPSessionManager.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFHTTPSessionManager.m deleted file mode 100644 index b4ab5915..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFHTTPSessionManager.m +++ /dev/null @@ -1,357 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworkReachabilityManager.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworkReachabilityManager.h deleted file mode 100644 index 21982a0e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworkReachabilityManager.h +++ /dev/null @@ -1,216 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworkReachabilityManager.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworkReachabilityManager.m deleted file mode 100644 index 0322bf9b..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworkReachabilityManager.m +++ /dev/null @@ -1,269 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworking.h deleted file mode 100644 index e2fb2f44..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFNetworking.h +++ /dev/null @@ -1,41 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFSecurityPolicy.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFSecurityPolicy.h deleted file mode 100644 index 9b966a57..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFSecurityPolicy.h +++ /dev/null @@ -1,161 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFSecurityPolicy.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFSecurityPolicy.m deleted file mode 100644 index da199aa3..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFSecurityPolicy.m +++ /dev/null @@ -1,341 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLRequestSerialization.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLRequestSerialization.h deleted file mode 100644 index 57d80ed1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLRequestSerialization.h +++ /dev/null @@ -1,477 +0,0 @@ -// 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 - -/** - 返回遵循RFC 3986的查询字符串键或值的百分比转义字符串。 - RFC 3986声明以下字符为“保留”字符。 - -通用分隔符:“:”,“#”,“ [”,“]”,“ @”,“?”,“ /” - -子定界符:“!”,“ $”,“&”,“'”,“(”,“)”,“ *”,“ +”,“,”,“,”,“ =” - - 在RFC 3986-3.4节中,它指出“?” 和“ /”字符不应转义以允许查询字符串包含URL。 因此,所有“保留”字符(“?”除外) 和“ /”应该在查询字符串中转义。 - - @param string 要百分号转义的字符串。 - - @return换码百分比的字符串。 - */ -FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string); - -/** - 一种辅助方法,用于生成编码后的URL查询参数,以附加到URL的末尾。 - - @param parameters 要编码的键/值的字典。 - - @return网址编码的查询字符串 - */ -FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters); - -/** - 对象采用“ AFURLRequestSerialization”协议,该协议对指定HTTP请求的参数进行编码。 请求序列化程序可以将参数编码为查询字符串,HTTP正文,并根据需要设置适当的HTTP标头字段。 - - 例如,JSON请求序列化程序可以将请求的HTTP主体设置为JSON表示,并将“ Content-Type” HTTP标头字段值设置为“ application / json”。 - */ -@protocol AFURLRequestSerialization - -/** - 返回带有已编码为原始请求副本的指定参数的请求。 - - @param request 原始请求。 - @param parameters 要编码的参数。 - @param error 尝试对请求参数进行编码时发生的错误。 - - @return 序列化的请求。 - */ -- (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符合AFURLRequestSerialization和AFURLResponseSerialization协议,提供查询字符串/ URL格式编码的参数序列化和默认请求标头的具体基础实现,以及响应状态代码和内容类型验证。 - - 鼓励任何处理HTTP的请求或响应序列化器都继承AFHTTPRequestSerializer的子类,以确保一致的默认行为。 - */ -@interface AFHTTPRequestSerializer : NSObject - -/** - 用于序列化参数的字符串编码。 默认情况下,`NSUTF8StringEncoding`。 - */ -@property (nonatomic, assign) NSStringEncoding stringEncoding; - -/** - 创建的请求是否可以使用设备的蜂窝无线电(如果有)。 默认为YES。 - - @see NSMutableURLRequest -setAllowsCellularAccess: - */ -@property (nonatomic, assign) BOOL allowsCellularAccess; - -/** - 创建的请求的缓存策略。 默认情况下,`NSURLRequestUseProtocolCachePolicy`。 - - @see NSMutableURLRequest -setCachePolicy: - */ -@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; - -/** - 创建的请求是否应使用默认的cookie处理。 默认为YES。 - - @see NSMutableURLRequest -setHTTPShouldHandleCookies: - */ -@property (nonatomic, assign) BOOL HTTPShouldHandleCookies; - -/** - 在收到来自较早传输的响应之前,创建的请求是否可以继续传输数据。 默认为“否” - - @see NSMutableURLRequest -setHTTPShouldUsePipelining: - */ -@property (nonatomic, assign) BOOL HTTPShouldUsePipelining; - -/** - 创建的请求的网络服务类型。 默认情况下为“ NSURLNetworkServiceTypeDefault”。 - - @see NSMutableURLRequest -setNetworkServiceType: - */ -@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType; - -/** - 创建的请求的超时间隔(以秒为单位)。 默认超时间隔为60秒。 - - @see NSMutableURLRequest -setTimeoutInterval: - */ -@property (nonatomic, assign) NSTimeInterval timeoutInterval; - -///--------------------------------------- -/// @name 配置HTTP请求头 -///--------------------------------------- - -/** - 要应用于序列化请求的默认HTTP标头字段值。 默认情况下,这些内容包括: - - -具有NSLocale + preferredLanguages内容的`Accept-Language` - -`User-Agent`,其中包含各种捆绑包标识符和操作系统名称的内容 - - @discussion 要添加或删除默认请求头,请使用`setValue:forHTTPHeaderField:`。 - */ -@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; - -/** - 用默认配置创建并返回一个序列化器。 - */ -+ (instancetype)serializer; - -/** - 设置在HTTP客户端发出的请求对象中设置的HTTP标头的值。 如果为nil,则删除该标头的现有值。 - - @param field 用于设置默认值的HTTP标头 - @param value 为指定的标头设置的默认值,或者为'nil' - */ -- (void)setValue:(nullable NSString *)value -forHTTPHeaderField:(NSString *)field; - -/** - 返回在请求序列化程序中设置的HTTP标头的值。 - - @param field 用于检索默认值的HTTP标头 - - @return 为指定标题设置的默认值,或者为'nil' - */ -- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; - -/** - 将HTTP客户端在请求对象中设置的“ Authorization” HTTP标头设置为具有Base64编码的用户名和密码的基本身份验证值。 这将覆盖此标头的任何现有值。 - - @param username HTTP基本身份验证用户名 - @param password HTTP基本身份验证密码 - */ -- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username - password:(NSString *)password; - -/** - 清除“Authorization” HTTP标头的任何现有值。 - */ -- (void)clearAuthorizationHeader; - -///------------------------------------------------------- -/// @name 配置查询字符串参数序列化 -///------------------------------------------------------- - -/** - 序列化请求的HTTP方法会将参数编码为查询字符串。 默认情况下,`GET`,`HEAD`和`DELETE`。 - */ -@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; - -/** - 根据预定义的样式之一设置查询字符串序列化的方法。 - - @param style 序列化样式。 - - @see AFHTTPRequestQueryStringSerializationStyle - */ -- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style; - -/** - 根据指定的块设置查询字符串序列化的自定义方法。 - - @param block 定义将参数编码为查询字符串的过程的块。 该块返回查询字符串,并接受三个参数:请求,要编码的参数以及尝试对给定请求的参数进行编码时发生的错误。 - */ -- (void)setQueryStringSerializationWithBlock:(nullable NSString * _Nullable (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; - -///------------------------------- -/// @name 创建请求对象 -///------------------------------- - -/** - 使用指定的HTTP方法和URL字符串创建一个NSMutableURLRequest对象。 - - 如果HTTP方法是`GET`,`HEAD`或`DELETE`,则参数将用于构造附加到请求URL的url编码查询字符串。 否则,将根据“ parameterEncoding”属性的值对参数进行编码,并将其设置为请求正文。 - - @param method 请求的HTTP方法,例如“ GET”,“ POST”,“ PUT”或“ DELETE”。 该参数不能为“ nil”。 - @param URLString 用于创建请求URL的URL字符串。 - @param parameters 将被设置为GET请求的查询字符串或请求HTTP正文的参数。 - @param error 构造请求时发生的错误。 - - @return 一个NSMutableURLRequest对象。 - */ -- (nullable NSMutableURLRequest *)requestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(nullable id)parameters - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 使用指定的HTTP方法和URLString创建一个“ NSMutableURLRequest”对象,并使用指定的参数和多部分表单数据块构造一个“ multipart / form-data” HTTP正文。参见http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 - - 多部分表单请求会自动进行流传输,直接从磁盘读取文件以及单个HTTP正文中的内存数据。产生的NSMutableURLRequest对象具有HTTPBodyStream属性,因此请不要在此请求对象上设置HTTPBodyStream或HTTPBody,因为它将清除多部分表单主体流。 - - @param method 请求的HTTP方法。此参数不能为“ GET”,“ HEAD”或“ nil”。 - @param URLString 用于创建请求URL的URL字符串。 - @param parameters 在请求HTTP正文中要编码和设置的参数。 - @param block 一个接受单个参数并将数据附加到HTTP正文的块。 block参数是采用AFMultipartFormData协议的对象。 - @param error 构造请求时发生的错误。 - - @return 一个NSMutableURLRequest对象 - */ -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(nullable NSDictionary *)parameters - constructingBodyWithBlock:(nullable void (^)(id formData))block - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 通过从请求中删除HTTPBodyStream来创建NSMutableURLRequest,并将其内容异步写入指定的文件,并在完成时调用完成处理程序。 - - @param request 多部分表单请求。 request的HTTPBodyStream属性不能为nil。 - @param fileURL 要写入多部分表单内容的文件URL。 - @param handler 要执行的处理程序块。 - - @discussion NSURLSessionTask中存在一个错误,该错误导致请求从HTTP正文流传输内容时请求不发送Content-Length标头,这在与Amazon S3 Web服务进行交互时尤其成问题。解决方法是,此方法采用一个由multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:构造的请求,或带有HTTPBodyStream的任何其他请求,将内容写入指定的文件,并返回原始请求的副本。 HTTPBodyStream属性设置为nil。在这里,文件可以传递到AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`,或将其内容读入分配给请求的HTTPBody属性的NSData中。 - - @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 - - -/** - AFMultipartFormData协议定义了AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:的block参数中参数所支持的方法。 - */ -@protocol AFMultipartFormData - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{生成的文件名}; name =#{name}”和“ Content-Type:#{生成的mimeType}”,然后是编码的文件数据和多部分表单边界。 - - 表单中此数据的文件名和MIME类型将分别使用`fileURL`的最后一个路径部分和`fileURL`扩展名与系统相关的MIME类型自动生成。 - - @param fileURL 对应于其内容将附加到表单的文件的URL。 该参数不能为“ nil”。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - @param error 如果发生错误,返回时将包含一个描述问题的NSError对象。 - - @如果文件数据已成功添加,则返回“是”,否则返回“否”。 - */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{filename}; name =#{name}”和“ Content-Type:#{mimeType}”,然后是编码文件数据和多部分表单边界。 - - @param fileURL 对应于其内容将附加到表单的文件的URL。 该参数不能为“ nil”。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - @param fileName 在Content-Disposition标头中使用的文件名。 该参数不能为“ nil”。 - @param mimeType 文件数据的声明的MIME类型。 该参数不能为“ nil”。 - @param error 如果发生错误,返回时将包含一个描述问题的NSError对象。 - - @如果文件数据已成功添加,则返回“是”,否则返回“否”。 - */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{filename}; name =#{name}”和“ Content-Type:#{mimeType}”,然后是来自输入流的数据和多部分表单边界。 - - @param inputStream 要添加到表单数据的输入流 - @param name 与指定的输入流关联的名称。 该参数不能为“ nil”。 - @param fileName 与指定输入流关联的文件名。 该参数不能为“ nil”。 - @param length 以字节为单位的指定输入流的长度。 - @param mimeType 指定数据的MIME类型。 (例如,JPEG图像的MIME类型为image / jpeg。)有关有效MIME类型的列表,请参见http://www.iana.org/assignments/media-types/。 该参数不能为“ nil”。 - */ -- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream - name:(NSString *)name - fileName:(NSString *)fileName - length:(int64_t)length - mimeType:(NSString *)mimeType; - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{filename}; name =#{name}”和“ Content-Type:#{mimeType}”,然后是编码文件数据和多部分表单边界。 - - @param data 要编码并附加到表单数据的数据。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - @param fileName 与指定数据关联的文件名。 该参数不能为“ nil”。 - @param mimeType 指定数据的MIME类型。 (例如,JPEG图像的MIME类型为image / jpeg。)有关有效MIME类型的列表,请参见http://www.iana.org/assignments/media-types/。 该参数不能为“ nil”。 - */ -- (void)appendPartWithFileData:(NSData *)data - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType; - -/** - 附加HTTP标头`Content-Disposition:form-data; name =#{name}“`,后跟编码数据和多部分表单边界。 - - @param data 要编码并附加到表单数据的数据。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - */ - -- (void)appendPartWithFormData:(NSData *)data - name:(NSString *)name; - - -/** - 附加HTTP标头,后跟编码数据和多部分表单边界。 - - @param headers 要附加到表单数据的HTTP标头。 - @param body 要编码并附加到表单数据的数据。 该参数不能为“ nil”。 - */ -- (void)appendPartWithHeaders:(nullable NSDictionary *)headers - body:(NSData *)body; - -/** - 节流通过限制数据包大小并为从上传流中读取的每个数据块增加延迟来请求带宽。 - - 通过3G或EDGE连接上载时,请求可能会失败,并显示“请求正文流已耗尽”。根据建议值(kAFUploadStream3GSuggestedPacketSize和kAFUploadStream3GSuggestedDelay)设置最大数据包大小和延迟,可降低输入流超过其分配带宽的风险。不幸的是,没有确定的方法来区分通过NSURLConnection的3G,EDGE或LTE连接。因此,不建议您仅根据网络可达性来限制带宽。相反,您应该考虑在故障块中检查“请求正文流已耗尽”,然后使用限制带宽重试该请求。 - - @param numberOfBytes 最大数据包大小,以字节数为单位。输入流的默认数据包大小为16kb。 - @param delay 每次读取数据包时的延迟持续时间。默认情况下,不设置延迟。 - */ -- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes - delay:(NSTimeInterval)delay; - -@end - -#pragma mark - - -/** - AFJSONRequestSerializer是AFHTTPRequestSerializer的子类,它使用NSJSONSerialization将参数编码为JSON,将编码请求的Content-Type设置为application / json。 - */ -@interface AFJSONRequestSerializer : AFHTTPRequestSerializer - -/** - 用于从Foundation对象写入请求JSON数据的选项。 有关可能的值,请参见“ NSJSONSerialization”文档部分“ NSJSONWritingOptions”。 默认为0。 - */ -@property (nonatomic, assign) NSJSONWritingOptions writingOptions; - -/** - 创建并返回带有指定读写选项的JSON序列化程序。 - - @param writingOptions 指定的JSON写入选项。 - */ -+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions; - -@end - -#pragma mark - - -/** - AFPropertyListRequestSerializer是AFHTTPRequestSerializer的子类,它使用NSPropertyListSerializer将参数编码为JSON,并将编码后的请求的Content-Type设置为application / x-plist。 - */ -@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer - -/** - 属性列表格式。 可能的值在“ NSPropertyListFormat”中描述。 - */ -@property (nonatomic, assign) NSPropertyListFormat format; - -/** - @warning`writeOptions`属性当前未使用。 - */ -@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions; - -/** - 创建并返回具有指定格式,读取选项和写入选项的属性列表序列化程序。 - - @param format 属性列表格式。 - @param writeOptions 属性列表写入选项。 - - @warning`writeOptions`属性当前未使用。 - */ -+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format - writeOptions:(NSPropertyListWriteOptions)writeOptions; - -@end - -#pragma mark - - -///---------------- -/// @name 常数 -///---------------- - -/** - ##错误域 - - 以下错误域是预定义的。 - - -`NSString * const AFURLRequestSerializationErrorDomain` - - ###常数 - - AFURLRequestSerializationErrorDomain AFURLRequestSerializer错误。 - AFURLRequestSerializationErrorDomain的错误代码对应于NSURLErrorDomain的代码。 - */ -FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; - -/** - ##用户信息字典键 - - 除了为NSError定义的密钥外,这些密钥还可以存在于用户信息字典中。 - - -`NSString * const AFNetworkingOperationFailingURLRequestErrorKey` - - ###常数 - - AFNetworkingOperationFailingURLRequestErrorKey - 相应的值为“ NSURLRequest”,其中包含与错误相关联的操作请求。 该密钥仅存在于“ AFURLRequestSerializationErrorDomain”中。 - */ -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey; - -/** - ## HTTP请求输入流的限制带宽 - - @see -throttleBandwidthWithPacketSize:delay: - - ###常数 - - kAFUploadStream3GSuggestedPacketSize - 最大数据包大小,以字节数为单位。 等于16kb。 - - kAFUploadStream3GSuggestedDelay - 每次读取数据包的延迟时间。 等于0.2秒。 - */ -FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize; -FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay; - -NS_ASSUME_NONNULL_END diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLRequestSerialization.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLRequestSerialization.m deleted file mode 100644 index ea2dd09d..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLRequestSerialization.m +++ /dev/null @@ -1,1397 +0,0 @@ -// 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); - -/** - 返回遵循RFC 3986的查询字符串键或值的百分比转义字符串。 - RFC 3986声明以下字符为“保留”字符。 - -通用分隔符:“:”,“#”,“ [”,“]”,“ @”,“?”,“ /” - -子定界符:“!”,“ $”,“&”,“'”,“(”,“)”,“ *”,“ +”,“,”,“,”,“ =” - - 在RFC 3986-3.4节中,它指出“?” 和“ /”字符不应转义以允许查询字符串包含URL。 因此,所有“保留”字符(“?”除外) 和“ /”应该在查询字符串中转义。 - -参数字符串:要百分号转义的字符串。 - -返回:转义百分比的字符串。 - */ -NSString * AFPercentEscapedStringFromString(NSString *string) { - static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // 不包括 ”?” 或“ /”(由于RFC 3986-第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); - - //为了避免破坏诸如👴🏻👮🏽之类的字符序列 - 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; - // 对字典键进行排序以确保查询字符串中的顺序一致,这在反序列化可能含糊的序列(例如字典数组)时很重要 - 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 { - // 如果AFMultipartFormFinalBoundary不适合可用缓冲区,则允许再次调用read:maxLength: - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLResponseSerialization.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLResponseSerialization.h deleted file mode 100644 index 56a4d28a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLResponseSerialization.h +++ /dev/null @@ -1,313 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLResponseSerialization.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLResponseSerialization.m deleted file mode 100755 index 2715a1b3..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLResponseSerialization.m +++ /dev/null @@ -1,836 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLSessionManager.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLSessionManager.h deleted file mode 100644 index 88700c39..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLSessionManager.h +++ /dev/null @@ -1,516 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLSessionManager.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLSessionManager.m deleted file mode 100644 index c8b6810e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/AFNetworking/AFURLSessionManager.m +++ /dev/null @@ -1,1274 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/CHANGELOG.md b/SQDebug/AFNetworking/AFNetworking-4.0.1/CHANGELOG.md deleted file mode 100644 index 4bc56a22..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/CHANGELOG.md +++ /dev/null @@ -1,2244 +0,0 @@ -# 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/SQDebug/AFNetworking/AFNetworking-4.0.1/CONTRIBUTING.md b/SQDebug/AFNetworking/AFNetworking-4.0.1/CONTRIBUTING.md deleted file mode 100644 index 9bb98ead..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/CONTRIBUTING.md +++ /dev/null @@ -1,96 +0,0 @@ -# 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/SQDebug/AFNetworking/AFNetworking-4.0.1/CONTRIBUTING_CH.md b/SQDebug/AFNetworking/AFNetworking-4.0.1/CONTRIBUTING_CH.md deleted file mode 100644 index 165da75a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/CONTRIBUTING_CH.md +++ /dev/null @@ -1,97 +0,0 @@ -# 贡献指南 -本文档包含有关为此项目做出贡献的信息和指南。 -请在开始参加之前阅读。 - -**主题** - -* [提问](#提问) -* [报告安全问题](#报告安全问题) -* [报告其他问题](#报告其他问题) -* [提交拉取请求](#提交拉取请求) -* [开发人员原产地证书](#开发人员原产地证书-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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.entitlements b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.entitlements deleted file mode 100644 index 7a2230dc..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.network.client - - com.apple.security.network.server - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/project.pbxproj b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/project.pbxproj deleted file mode 100644 index 5ccf69af..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1401 +0,0 @@ -// !$*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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme deleted file mode 100644 index af3dda85..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme deleted file mode 100644 index 0efa6c9b..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/iOS Today Extension Example.xcscheme +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme deleted file mode 100644 index 528b143c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/macOS Example.xcscheme +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme deleted file mode 100644 index c0bf75f8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme deleted file mode 100644 index aa19a807..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking Example.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj deleted file mode 100644 index a2ecb47c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking tvOS Example.xcodeproj/project.pbxproj +++ /dev/null @@ -1,438 +0,0 @@ -// !$*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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 2a9dea21..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard deleted file mode 100644 index 5f52cb6c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Base.lproj/Interface.storyboard +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Info.plist deleted file mode 100644 index 6c4f88c5..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/AFNetworking watchOS/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index f2c3885f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40.png deleted file mode 100644 index 3cf6c5dd..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png deleted file mode 100644 index 9e573ac6..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png deleted file mode 100644 index e647adb1..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png deleted file mode 100644 index e647adb1..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png deleted file mode 100644 index bf024e75..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-76.png deleted file mode 100644 index 0cdf6723..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png deleted file mode 100644 index fe0be25b..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small.png deleted file mode 100644 index c4003bfd..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png deleted file mode 100644 index 6f525983..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png deleted file mode 100644 index d7ea8401..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/Contents.json deleted file mode 100644 index 1e91b3a0..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "profile-image-placeholder.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "profile-image-placeholder@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder.png deleted file mode 100644 index 4503b5b9..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder@2x.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder@2x.png deleted file mode 100644 index ee6e24f5..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Assets.xcassets/profile-image-placeholder.imageset/profile-image-placeholder@2x.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/adn.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/adn.cer deleted file mode 100644 index 5cbf610f..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/adn.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/digicert_ca_3.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/digicert_ca_3.cer deleted file mode 100644 index 683d5ff3..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/digicert_ca_3.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/root_ca.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/root_ca.cer deleted file mode 100644 index dae01965..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Certificates/root_ca.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/Post.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/Post.h deleted file mode 100644 index 2f1c381a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/Post.h +++ /dev/null @@ -1,41 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/Post.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/Post.m deleted file mode 100644 index d922f3ff..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/Post.m +++ /dev/null @@ -1,92 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/User.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/User.h deleted file mode 100644 index 2b1e733c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/User.h +++ /dev/null @@ -1,42 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/User.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/User.m deleted file mode 100644 index 5565b71c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Models/User.m +++ /dev/null @@ -1,130 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h deleted file mode 100644 index 7dbe92df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.h +++ /dev/null @@ -1,30 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m deleted file mode 100644 index 658a1f6c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Classes/Networking Extensions/AFAppDotNetAPIClient.m +++ /dev/null @@ -1,40 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Prefix.pch b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Prefix.pch deleted file mode 100644 index 241af5dc..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Prefix.pch +++ /dev/null @@ -1,21 +0,0 @@ -#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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/Base.lproj/MainInterface.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/Base.lproj/MainInterface.storyboard deleted file mode 100644 index d72de0f6..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/Base.lproj/MainInterface.storyboard +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/Info.plist deleted file mode 100644 index 95742422..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/Info.plist +++ /dev/null @@ -1,48 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/TodayViewController.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/TodayViewController.h deleted file mode 100644 index 26e472f3..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/TodayViewController.h +++ /dev/null @@ -1,27 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/TodayViewController.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/TodayViewController.m deleted file mode 100644 index 0aa96f8e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/Today Extension Example/TodayViewController.m +++ /dev/null @@ -1,106 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/en.lproj/MainMenu.xib b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/en.lproj/MainMenu.xib deleted file mode 100644 index 1285ad34..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/en.lproj/MainMenu.xib +++ /dev/null @@ -1,4587 +0,0 @@ - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/AppDelegate.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/AppDelegate.h deleted file mode 100644 index 36bab424..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/AppDelegate.h +++ /dev/null @@ -1,30 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/AppDelegate.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/AppDelegate.m deleted file mode 100644 index 8ee01ebb..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/AppDelegate.m +++ /dev/null @@ -1,49 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Controllers/GlobalTimelineViewController.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Controllers/GlobalTimelineViewController.h deleted file mode 100644 index 7f566496..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Controllers/GlobalTimelineViewController.h +++ /dev/null @@ -1,27 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Controllers/GlobalTimelineViewController.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Controllers/GlobalTimelineViewController.m deleted file mode 100644 index ec41e890..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Controllers/GlobalTimelineViewController.m +++ /dev/null @@ -1,103 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Info.plist deleted file mode 100644 index 0d2fa5c4..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Info.plist +++ /dev/null @@ -1,68 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Launchscreen.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Launchscreen.storyboard deleted file mode 100644 index 1295c8ca..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Launchscreen.storyboard +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Views/PostTableViewCell.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Views/PostTableViewCell.h deleted file mode 100644 index 1b58f214..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Views/PostTableViewCell.h +++ /dev/null @@ -1,33 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Views/PostTableViewCell.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Views/PostTableViewCell.m deleted file mode 100644 index 42ce04fd..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/iOS Example/Views/PostTableViewCell.m +++ /dev/null @@ -1,82 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/AppDelegate.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/AppDelegate.h deleted file mode 100644 index 01c995fd..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/AppDelegate.h +++ /dev/null @@ -1,31 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/AppDelegate.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/AppDelegate.m deleted file mode 100644 index d4658dbf..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/AppDelegate.m +++ /dev/null @@ -1,64 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 2db2b1c7..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/Info.plist deleted file mode 100644 index d872f1eb..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/MainMenu.xib b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/MainMenu.xib deleted file mode 100644 index 407b43c0..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/MainMenu.xib +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/main.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/main.m deleted file mode 100644 index 0d0c93cb..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/macOS Example/main.m +++ /dev/null @@ -1,26 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/main.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/main.m deleted file mode 100644 index 74e3fdfa..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/main.m +++ /dev/null @@ -1,38 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h deleted file mode 100644 index a719231d..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/AFNetworking tvOS Example-Bridging-Header.h +++ /dev/null @@ -1,6 +0,0 @@ -// -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/AppDelegate.swift b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/AppDelegate.swift deleted file mode 100644 index 10587662..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/AppDelegate.swift +++ /dev/null @@ -1,59 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json deleted file mode 100644 index 8bf75d9f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "layers" : [ - { - "filename" : "Front.imagestacklayer" - }, - { - "filename" : "Middle.imagestacklayer" - }, - { - "filename" : "Back.imagestacklayer" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json deleted file mode 100644 index 8bf75d9f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "layers" : [ - { - "filename" : "Front.imagestacklayer" - }, - { - "filename" : "Middle.imagestacklayer" - }, - { - "filename" : "Back.imagestacklayer" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json deleted file mode 100644 index dea6e49f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json deleted file mode 100644 index 16a370df..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "images" : [ - { - "idiom" : "tv", - "scale" : "1x" - }, - { - "idiom" : "tv", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index d746a609..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Base.lproj/Main.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Base.lproj/Main.storyboard deleted file mode 100644 index d6200058..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Base.lproj/Main.storyboard +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Gravatar.swift b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Gravatar.swift deleted file mode 100644 index 4b5304b1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Gravatar.swift +++ /dev/null @@ -1,113 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Info.plist deleted file mode 100644 index 4f338601..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/ViewController.swift b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/ViewController.swift deleted file mode 100644 index c56f475f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/tvOS Example/ViewController.swift +++ /dev/null @@ -1,79 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ deleted file mode 100644 index b601d383..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/Assets.xcassets/README__ignoredByTemplate__ +++ /dev/null @@ -1 +0,0 @@ -Did you know that git does not support storing empty directories? diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/ExtensionDelegate.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/ExtensionDelegate.h deleted file mode 100644 index 8c3167be..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/ExtensionDelegate.h +++ /dev/null @@ -1,26 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/ExtensionDelegate.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/ExtensionDelegate.m deleted file mode 100644 index cbae3797..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/ExtensionDelegate.m +++ /dev/null @@ -1,39 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/Info.plist deleted file mode 100644 index c45a46e9..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/Info.plist +++ /dev/null @@ -1,40 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/InterfaceController.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/InterfaceController.h deleted file mode 100644 index 3d040b56..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/InterfaceController.h +++ /dev/null @@ -1,27 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/InterfaceController.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/InterfaceController.m deleted file mode 100644 index a14d85dd..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example Extension/InterfaceController.m +++ /dev/null @@ -1,51 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 2a9dea21..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "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/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Base.lproj/Interface.storyboard b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Base.lproj/Interface.storyboard deleted file mode 100644 index 5f52cb6c..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Base.lproj/Interface.storyboard +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Info.plist deleted file mode 100644 index 6935147d..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Example/watchOS Example/Info.plist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/AFNetworking.h deleted file mode 100644 index 65f3fcf8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/AFNetworking.h +++ /dev/null @@ -1,66 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/Info.plist deleted file mode 100644 index 36e42855..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/module.modulemap b/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/module.modulemap deleted file mode 100644 index a9200e1d..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Framework/module.modulemap +++ /dev/null @@ -1,5 +0,0 @@ -framework module AFNetworking { - umbrella header "AFNetworking.h" - export * - module * { export * } -} \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Gemfile b/SQDebug/AFNetworking/AFNetworking-4.0.1/Gemfile deleted file mode 100644 index a43c93aa..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source "https://rubygems.org" - -gem "fastlane" -gem "cocoapods" -gem "xcode-install" \ No newline at end of file diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Gemfile.lock b/SQDebug/AFNetworking/AFNetworking-4.0.1/Gemfile.lock deleted file mode 100644 index b589bdec..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Gemfile.lock +++ /dev/null @@ -1,248 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/LICENSE b/SQDebug/AFNetworking/AFNetworking-4.0.1/LICENSE deleted file mode 100644 index f611f42f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/Package.swift b/SQDebug/AFNetworking/AFNetworking-4.0.1/Package.swift deleted file mode 100644 index fd6d31ae..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Package.swift +++ /dev/null @@ -1,37 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/README.md b/SQDebug/AFNetworking/AFNetworking-4.0.1/README.md deleted file mode 100644 index d193dfe8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/README.md +++ /dev/null @@ -1,298 +0,0 @@ -

- 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Info.plist b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Info.plist deleted file mode 100644 index 169b6f71..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_0.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_0.cer deleted file mode 100644 index 5cbf610f..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_0.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_1.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_1.cer deleted file mode 100644 index 683d5ff3..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_1.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_2.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_2.cer deleted file mode 100644 index dae01965..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/ADN.net/ADNNetServerTrustChain/adn_2.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/Equifax_Secure_Certificate_Authority_Root.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/Equifax_Secure_Certificate_Authority_Root.cer deleted file mode 100644 index c44db274..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/Equifax_Secure_Certificate_Authority_Root.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GeoTrust_Global_CA-cross.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GeoTrust_Global_CA-cross.cer deleted file mode 100644 index 82e50046..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GeoTrust_Global_CA-cross.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GeoTrust_Global_CA_Root.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GeoTrust_Global_CA_Root.cer deleted file mode 100644 index 4ae42e81..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GeoTrust_Global_CA_Root.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_0.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_0.cer deleted file mode 100644 index ab4002a2..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_0.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_1.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_1.cer deleted file mode 100644 index 521e4393..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath1/googlecom_1.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_0.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_0.cer deleted file mode 100644 index ab4002a2..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_0.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_1.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_1.cer deleted file mode 100644 index 521e4393..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_1.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_2.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_2.cer deleted file mode 100644 index 82e50046..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleComServerTrustChainPath2/googlecom_2.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleInternetAuthorityG2.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleInternetAuthorityG2.cer deleted file mode 100644 index 521e4393..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/GoogleInternetAuthorityG2.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/google.com.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/google.com.cer deleted file mode 100644 index ab4002a2..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/Google.com/google.com.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Amazon Root CA 1.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Amazon Root CA 1.cer deleted file mode 100644 index 1dfb0e70..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Amazon Root CA 1.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Amazon.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Amazon.cer deleted file mode 100644 index 93f1fb0c..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Amazon.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer deleted file mode 100644 index 8ba123fb..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_0.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_1.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_1.cer deleted file mode 100644 index 93f1fb0c..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_1.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_2.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_2.cer deleted file mode 100644 index 1dfb0e70..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_2.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_3.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_3.cer deleted file mode 100644 index 75df0cc7..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/HTTPBinOrgServerTrustChain/httpbin_3.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Starfield Services Root Certificate Authority - G2.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Starfield Services Root Certificate Authority - G2.cer deleted file mode 100644 index 75df0cc7..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/Starfield Services Root Certificate Authority - G2.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/httpbinorg_02182021.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/httpbinorg_02182021.cer deleted file mode 100644 index 8ba123fb..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/HTTPBin.org/httpbinorg_02182021.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/AltName.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/AltName.cer deleted file mode 100644 index 3ba9d337..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/AltName.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/NoDomains.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/NoDomains.cer deleted file mode 100644 index 6b6cce65..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/NoDomains.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/foobar.com.cer b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/foobar.com.cer deleted file mode 100644 index a9ca08ea..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/SelfSigned/foobar.com.cer and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/logo.png b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/logo.png deleted file mode 100644 index 4fc5a3c9..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Resources/logo.png and /dev/null differ diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests-Prefix.pch b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests-Prefix.pch deleted file mode 100644 index eb2007ec..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests-Prefix.pch +++ /dev/null @@ -1,9 +0,0 @@ -// -// Prefix header -// -// The contents of this file are implicitly included at the beginning of every source file. -// - -#ifdef __OBJC__ - #import -#endif diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFAutoPurgingImageCacheTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFAutoPurgingImageCacheTests.m deleted file mode 100644 index 2e2b83f9..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFAutoPurgingImageCacheTests.m +++ /dev/null @@ -1,241 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFCompoundResponseSerializerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFCompoundResponseSerializerTests.m deleted file mode 100644 index 894158f3..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFCompoundResponseSerializerTests.m +++ /dev/null @@ -1,94 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFHTTPRequestSerializationTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFHTTPRequestSerializationTests.m deleted file mode 100644 index 2d9ef130..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFHTTPRequestSerializationTests.m +++ /dev/null @@ -1,244 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFImageDownloaderTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFImageDownloaderTests.m deleted file mode 100644 index 7eee82e3..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFImageDownloaderTests.m +++ /dev/null @@ -1,600 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFImageResponseSerializerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFImageResponseSerializerTests.m deleted file mode 100644 index c65587c6..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFImageResponseSerializerTests.m +++ /dev/null @@ -1,98 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFJSONSerializationTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFJSONSerializationTests.m deleted file mode 100644 index e17b1932..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFJSONSerializationTests.m +++ /dev/null @@ -1,228 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFNetworkActivityManagerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFNetworkActivityManagerTests.m deleted file mode 100644 index 152eae65..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFNetworkActivityManagerTests.m +++ /dev/null @@ -1,201 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFNetworkReachabilityManagerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFNetworkReachabilityManagerTests.m deleted file mode 100644 index 49fca9bb..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFNetworkReachabilityManagerTests.m +++ /dev/null @@ -1,141 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFPropertyListRequestSerializerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFPropertyListRequestSerializerTests.m deleted file mode 100644 index f8590db9..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFPropertyListRequestSerializerTests.m +++ /dev/null @@ -1,56 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFPropertyListResponseSerializerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFPropertyListResponseSerializerTests.m deleted file mode 100644 index 7bbeb57f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFPropertyListResponseSerializerTests.m +++ /dev/null @@ -1,94 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFSecurityPolicyTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFSecurityPolicyTests.m deleted file mode 100644 index 06867cab..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFSecurityPolicyTests.m +++ /dev/null @@ -1,548 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFTestCase.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFTestCase.h deleted file mode 100644 index 3efca6ef..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFTestCase.h +++ /dev/null @@ -1,41 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFTestCase.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFTestCase.m deleted file mode 100644 index 52023ef1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFTestCase.m +++ /dev/null @@ -1,97 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIActivityIndicatorViewTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIActivityIndicatorViewTests.m deleted file mode 100644 index ed591c9e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIActivityIndicatorViewTests.m +++ /dev/null @@ -1,121 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIButtonTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIButtonTests.m deleted file mode 100644 index de2664e7..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIButtonTests.m +++ /dev/null @@ -1,110 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIImageViewTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIImageViewTests.m deleted file mode 100644 index 8bc044a4..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIImageViewTests.m +++ /dev/null @@ -1,174 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIRefreshControlTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIRefreshControlTests.m deleted file mode 100644 index c5ab5af7..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFUIRefreshControlTests.m +++ /dev/null @@ -1,116 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFURLSessionManagerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFURLSessionManagerTests.m deleted file mode 100644 index fc4d3bfc..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFURLSessionManagerTests.m +++ /dev/null @@ -1,550 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFWKWebViewTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFWKWebViewTests.m deleted file mode 100644 index 80c10b56..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFWKWebViewTests.m +++ /dev/null @@ -1,136 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFXMLDocumentResponseSerializerTests.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFXMLDocumentResponseSerializerTests.m deleted file mode 100644 index 06829439..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/Tests/Tests/AFXMLDocumentResponseSerializerTests.m +++ /dev/null @@ -1,101 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFAutoPurgingImageCache.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFAutoPurgingImageCache.h deleted file mode 100644 index 1a27bb43..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFAutoPurgingImageCache.h +++ /dev/null @@ -1,160 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFAutoPurgingImageCache.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFAutoPurgingImageCache.m deleted file mode 100644 index a09e87c8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFAutoPurgingImageCache.m +++ /dev/null @@ -1,205 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFImageDownloader.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFImageDownloader.h deleted file mode 100644 index 3bf5a320..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFImageDownloader.h +++ /dev/null @@ -1,171 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFImageDownloader.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFImageDownloader.m deleted file mode 100644 index 008a7828..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFImageDownloader.m +++ /dev/null @@ -1,421 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h deleted file mode 100644 index 3bcf2895..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h +++ /dev/null @@ -1,103 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m deleted file mode 100644 index 8cb5677e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.m +++ /dev/null @@ -1,239 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h deleted file mode 100644 index d424c9b8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h +++ /dev/null @@ -1,48 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m deleted file mode 100644 index 602a72d0..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m +++ /dev/null @@ -1,114 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIButton+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIButton+AFNetworking.h deleted file mode 100644 index d33e0d4a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIButton+AFNetworking.h +++ /dev/null @@ -1,175 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIButton+AFNetworking.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIButton+AFNetworking.m deleted file mode 100644 index 03aaf2a8..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIButton+AFNetworking.m +++ /dev/null @@ -1,302 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIImageView+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIImageView+AFNetworking.h deleted file mode 100644 index 8929252e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIImageView+AFNetworking.h +++ /dev/null @@ -1,109 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIImageView+AFNetworking.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIImageView+AFNetworking.m deleted file mode 100644 index 8ae49509..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIImageView+AFNetworking.m +++ /dev/null @@ -1,159 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIKit+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIKit+AFNetworking.h deleted file mode 100644 index aa9c0b02..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIKit+AFNetworking.h +++ /dev/null @@ -1,43 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIProgressView+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIProgressView+AFNetworking.h deleted file mode 100644 index 8ea0a731..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIProgressView+AFNetworking.h +++ /dev/null @@ -1,64 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIProgressView+AFNetworking.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIProgressView+AFNetworking.m deleted file mode 100644 index 2ae753ec..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIProgressView+AFNetworking.m +++ /dev/null @@ -1,126 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h deleted file mode 100644 index 215eafcf..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h +++ /dev/null @@ -1,53 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m deleted file mode 100644 index cd46916a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m +++ /dev/null @@ -1,113 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/WKWebView+AFNetworking.h b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/WKWebView+AFNetworking.h deleted file mode 100644 index 680fedff..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/WKWebView+AFNetworking.h +++ /dev/null @@ -1,80 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/WKWebView+AFNetworking.m b/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/WKWebView+AFNetworking.m deleted file mode 100644 index 6eca3c3a..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/UIKit+AFNetworking/WKWebView+AFNetworking.m +++ /dev/null @@ -1,154 +0,0 @@ -// 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/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env deleted file mode 100644 index 5b1917c1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env +++ /dev/null @@ -1,11 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.catalyst b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.catalyst deleted file mode 100644 index 37ecfc1f..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.catalyst +++ /dev/null @@ -1,2 +0,0 @@ -SCAN_SCHEME="AFNetworking iOS" -SCAN_DESTINATION="platform=macOS" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.default b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.default deleted file mode 100644 index 4abfaec1..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.default +++ /dev/null @@ -1,4 +0,0 @@ -AF_CONFIGURATION=Release - -SCAN_WORKSPACE=$AF_WORKSPACE -SCAN_OUTPUT_DIRECTORY=fastlane/test-output diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.deploy b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.deploy deleted file mode 100644 index a123e622..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.deploy +++ /dev/null @@ -1,14 +0,0 @@ -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/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios11_xcode94 b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios11_xcode94 deleted file mode 100644 index f91d853e..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios11_xcode94 +++ /dev/null @@ -1,2 +0,0 @@ -SCAN_DEVICE="iPhone X" -SCAN_SCHEME="AFNetworking iOS" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios12_xcode10 b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios12_xcode10 deleted file mode 100644 index 85d5de09..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios12_xcode10 +++ /dev/null @@ -1,3 +0,0 @@ -SCAN_DEVICE="iPhone XS" -SCAN_SCHEME="AFNetworking iOS" -SCAN_DESTINATION="OS=12.4,name=iPhone XS" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios13_xcode11 b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios13_xcode11 deleted file mode 100644 index bcafbadf..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.ios13_xcode11 +++ /dev/null @@ -1,3 +0,0 @@ -SCAN_DEVICE="iPhone 11 Pro" -SCAN_SCHEME="AFNetworking iOS" -SCAN_DESTINATION="OS=13.3,name=iPhone 11 Pro" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.macos b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.macos deleted file mode 100644 index dded8b51..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.macos +++ /dev/null @@ -1,2 +0,0 @@ -SCAN_SCHEME="AFNetworking macOS" -SCAN_DESTINATION="platform=macOS" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.tvos13_xcode11 b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.tvos13_xcode11 deleted file mode 100644 index 7f797226..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/.env.tvos13_xcode11 +++ /dev/null @@ -1,3 +0,0 @@ -SCAN_SCHEME="AFNetworking tvOS" -SCAN_DEVICE="Apple TV 4K" -SCAN_DESTINATION="OS=13.3,name=Apple TV 4K" diff --git a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/Fastfile b/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/Fastfile deleted file mode 100644 index 5e532594..00000000 --- a/SQDebug/AFNetworking/AFNetworking-4.0.1/fastlane/Fastfile +++ /dev/null @@ -1,4 +0,0 @@ -import_from_git( - url: 'https://github.com/AFNetworking/fastlane.git', - branch: 'master' -) diff --git a/SQDebug/AFNetworking/AFNetworking.xmind b/SQDebug/AFNetworking/AFNetworking.xmind deleted file mode 100644 index 3ce8c7bd..00000000 Binary files a/SQDebug/AFNetworking/AFNetworking.xmind and /dev/null differ diff --git a/SQDebug/AFNetworking/README.md b/SQDebug/AFNetworking/README.md deleted file mode 100644 index 6f80a4e1..00000000 --- a/SQDebug/AFNetworking/README.md +++ /dev/null @@ -1,1709 +0,0 @@ -## AFNetworking - ->AFNetworking是一个适用于iOS,macOS,watchOS和tvOS的令人愉悦的网络库。它建立在Foundation URL loading System的基础上,扩展了Cocoa中内置的强大的高级网络抽象。它具有模块化的体系结构,以及精心设计的,功能丰富的API,使用起来很愉快。 - -- [Github 官方文档](https://github.com/AFNetworking/AFNetworking) -- [AFNetworking 4.0.1 源码下载](https://github.com/AFNetworking/AFNetworking/archive/4.0.1.zip) -- [关注我 获取中文版源码](https://github.com/coderZsq/coderZsq.project.ios/tree/master/SQDebug) - ->2020-11-21 - -## 0x00 准备工作 - -```shell -$ pod init -``` - -```ruby -# Uncomment the next line to define a global platform for your project -platform :ios, '14.0' - -target 'AFNetworking-Debug' do - # Comment the next line if you don't want to use dynamic frameworks - use_frameworks! - - # Pods for AFNetworking-Debug - pod 'AFNetworking', '~> 4.0' -end -``` - -```shell -$ pod install - -Analyzing dependencies -Downloading dependencies -Installing AFNetworking (4.0.1) -Generating Pods project -Integrating client project -Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed. -``` - -info.plist root \\中添加ATS - -```xml -NSAppTransportSecurity - - NSAllowsArbitraryLoads - - -``` - -```shell -$ npm i koa koa-router koa-send koa-multer -``` - -## 0x01 搭建服务器体验AFNetworking - -```js -const Router = require('koa-router'); -const send = require('koa-send'); - -const router = new Router({ prefix: '/afn' }); - -router.get('/downloadTask/:name', async (ctx, next) => { - const name = ctx.params.name; - console.log(name) - const path = `uploads/${name}`; - ctx.attachment(path); - await send(ctx, path); -}); -``` - -```objc -- (void)create_a_downloadTask { - 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 * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) { - NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error: nil]; - return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]]; - } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) { - NSLog(@"File downloaded to: %@", filePath); - }]; - [downloadTask resume]; -} -``` - -``` -download.zip -``` - -```c -File downloaded to: file:///Users/zhushuangquan/Library/Developer/CoreSimulator/Devices/384515F7-F815-4CD8-89F8-90481BD7EB0C/data/Containers/Data/Application/8E0DB155-CB63-4619-8A90-9565214E8E43/Documents/download.zip -``` - -``` -. -├── Documents -│   └── download.zip -├── Library -│   ├── Caches -│   │   └── coderZsq.AFNetworking-Debug -│   │   ├── Cache.db -│   │   ├── Cache.db-shm -│   │   └── Cache.db-wal -│   ├── Preferences -│   ├── Saved\ Application\ State -│   │   └── coderZsq.AFNetworking-Debug.savedState -│   │   └── KnownSceneSessions -│   │   └── data.data -│   └── SplashBoard -│   └── Snapshots -│   └── coderZsq.AFNetworking-Debug\ -\ {DEFAULT\ GROUP} -│   ├── 1E10EA2C-9182-4108-837A-78BDFD4C990F@2x.ktx -│   ├── 3047D744-C433-48AF-9659-1C6D069F4BD6@2x.ktx -│   ├── A112B466-ECE1-4D2C-8B28-593B850EF0C5@2x.ktx -│   └── A6E0B8E4-F5D8-4FB3-84A8-A3E327196816@2x.ktx -├── SystemData -└── tmp - -``` - -```js -const storage = multer.diskStorage({ - destination: (req, file, cb) => { - cb(null, 'uploads/'); - }, - filename: (req, file, cb) => { - cb(null, Date.now() + path.extname(file.originalname)); - } -}); - -const upload = multer({ - storage -}); - -router.post('/uploadTask/upload', upload.single('afn'), (ctx, next) => { - console.log(ctx.req.file); - ctx.response.body = { - msg: 'upload success!' - }; -}); -``` - -```objc -- (void)create_an_uploadTask { - AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; - manager.responseSerializer = [AFJSONResponseSerializer serializer]; - [manager POST:@"http://localhost:8080/afn/uploadTask/upload" parameters:nil headers:nil constructingBodyWithBlock:^(id _Nonnull formData) { - NSURL *filePath = [NSURL fileURLWithPath:@"/Users/zhushuangquan/Desktop/AFN.png"]; - [formData appendPartWithFileURL:filePath name:@"file" error:nil]; - } progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { - NSLog(@"Success: %@", responseObject); - } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { - NSLog(@"Error: %@", error); - }]; -} -``` - -```js -{ - fieldname: 'file', - originalname: 'AFN.jpg', - encoding: '7bit', - mimetype: 'image/jpeg', - destination: 'uploads/', - filename: '1606012485650.jpg', - path: 'uploads/1606012485650.jpg', - size: 88871 -} -``` - -```js -Success: { msg = 'upload success!' } -``` - ->2020-11-22 - -```objc -- (void)create_an_uploadTaskFor_a_MultiPartRequestWithProgress { - NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] multipartFormRequestWithMethod:@"POST" URLString:@"http://localhost:8080/afn/uploadTask/upload" parameters:nil constructingBodyWithBlock:^(id formData) { - [formData appendPartWithFileURL:[NSURL fileURLWithPath:@"/Users/zhushuangquan/Desktop/AFN.png"] 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 - [self.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]; -} -``` - -```objc - { URL: http://localhost:8080/afn/uploadTask/upload } { Status Code: 200, Headers { - Connection = ( - "keep-alive" - ); - "Content-Length" = ( - 25 - ); - "Content-Type" = ( - "application/json; charset=utf-8" - ); - Date = ( - "Sun, 22 Nov 2020 02:47:06 GMT" - ); - "Keep-Alive" = ( - "timeout=5" - ); -} } { - msg = "upload success!"; -} -``` - -```objc -- (void)create_a_dataTask { - NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; - AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; - manager.responseSerializer = [AFJSONResponseSerializer serializer]; - - NSURL *URL = [NSURL URLWithString:@"http://localhost:8080/afn/dataTask/get"]; - NSURLRequest *request = [NSURLRequest requestWithURL:URL]; - NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { - if (error) { - NSLog(@"Error: %@", error); - } else { - NSLog(@"%@ %@", response, responseObject); - } - }]; - [dataTask resume]; -} -``` - -```js -router.get('/dataTask/get', (ctx, next) => { - ctx.status = 200; - ctx.body = { - msg: 'get success!' - } -}); -``` - -```objc - { URL: http://localhost:8080/afn/dataTask/get } { Status Code: 200, Headers { - Connection = ( - "keep-alive" - ); - "Content-Length" = ( - 22 - ); - "Content-Type" = ( - "application/json; charset=utf-8" - ); - Date = ( - "Sun, 22 Nov 2020 02:55:30 GMT" - ); - "Keep-Alive" = ( - "timeout=5" - ); -} } { - msg = "get success!"; -} -``` - -```objc -/* - * NSURLSession的配置选项。 创建会话后,将创建配置对象的副本-创建会话后,您将无法修改会话的配置。 - * - * 共享会话使用全局单例凭证,缓存和cookie存储对象。 - * - * 临时会话没有用于cookie,缓存或凭据的持久磁盘存储。 - * - * 在某些约束下,后台会话可用于代表暂停的应用程序执行联网操作。 - */ -API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)) -@interface NSURLSessionConfiguration : NSObject -``` - -```objc -@interface NSURL: NSObject -{ - NSString *_urlString; - NSURL *_baseURL; - void *_clients; - void *_reserved; -} -``` - -```objc -@interface NSURLRequest : NSObject -{ - @private - NSURLRequestInternal *_internal; -} -``` - -```objc -@interface NSMutableURLRequest : NSURLRequest -``` - -```objc -@interface NSURLSessionDownloadTask : NSURLSessionTask -``` - -```objc -@interface NSURLSessionUploadTask : NSURLSessionDataTask -``` - -```objc -@interface NSURLSessionDataTask : NSURLSessionTask -``` - -```objc -- (void)sharedNetworkReachability { - [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { - NSLog(@"Reachability: %@", AFStringFromNetworkReachabilityStatus(status)); - }]; - - [[AFNetworkReachabilityManager sharedManager] startMonitoring]; -} -``` - -``` -Reachability: Reachable via WiFi -Reachability: Not Reachable -``` - -## 0x02 导览AFNetworing知识架构 - -```shell -$ cd AFNetworking-4.0.1 -$ tree -``` - -``` -. -├── AFNetworking -│   ├── AFNetworking.h -│   ├── AFCompatibilityMacros.h -│   ├── AFHTTPSessionManager.h -│   ├── AFHTTPSessionManager.m -│   ├── AFNetworkReachabilityManager.h -│   ├── AFNetworkReachabilityManager.m -│   ├── AFSecurityPolicy.h -│   ├── AFSecurityPolicy.m -│   ├── AFURLRequestSerialization.h -│   ├── AFURLRequestSerialization.m -│   ├── AFURLResponseSerialization.h -│   ├── AFURLResponseSerialization.m -│   ├── AFURLSessionManager.h -│   └── AFURLSessionManager.m -└── UIKit+AFNetworking - ├── AFAutoPurgingImageCache.h - ├── AFAutoPurgingImageCache.m - ├── AFImageDownloader.h - ├── AFImageDownloader.m - ├── AFNetworkActivityIndicatorManager.h - ├── AFNetworkActivityIndicatorManager.m - ├── UIActivityIndicatorView+AFNetworking.h - ├── UIActivityIndicatorView+AFNetworking.m - ├── UIButton+AFNetworking.h - ├── UIButton+AFNetworking.m - ├── UIImageView+AFNetworking.h - ├── UIImageView+AFNetworking.m - ├── UIKit+AFNetworking.h - ├── UIProgressView+AFNetworking.h - ├── UIProgressView+AFNetworking.m - ├── UIRefreshControl+AFNetworking.h - ├── UIRefreshControl+AFNetworking.m - ├── WKWebView+AFNetworking.h - └── WKWebView+AFNetworking.m -``` - -``` -. -├── AFNetworking.h -├── NSURLSession -│   ├── AFCompatibilityMacros.h -│   ├── AFHTTPSessionManager.h -│   ├── AFHTTPSessionManager.m -│   ├── AFURLSessionManager.h -│   └── AFURLSessionManager.m -├── Reachability -│   ├── AFNetworkReachabilityManager.h -│   └── AFNetworkReachabilityManager.m -├── Security -│   ├── AFSecurityPolicy.h -│   └── AFSecurityPolicy.m -└── Serialization - ├── AFURLRequestSerialization.h - ├── AFURLRequestSerialization.m - ├── AFURLResponseSerialization.h - └── AFURLResponseSerialization.m -``` - -```objc -#import <"AFNetworking.h"> -``` - -```objc -#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_ */ -``` - -```objc -#import -``` - -``` -这些宏用于OS头文件。 它们使函数原型和Objective-C方法可以使用首次使用的OS版本进行标记。 以及不适用的操作系统版本(如果适用)。 -``` - -```objc -#import -``` - -``` -File: TargetConditionals.h - -Contains: Mac OS X和iPhone的TARGET_条件的自动配置 - - Note: 3.4通用接口中的TargetConditionals.h适用于所有编译器。 - 此标头仅识别已知可在Mac OS X上运行的编译器。 - - +----------------------------------------------------------------+ - | TARGET_OS_MAC | - | +---+ +-----------------------------------------------------+ | - | | | | TARGET_OS_IPHONE | | - | |OSX| | +-----+ +----+ +-------+ +--------+ +-------------+ | | - | | | | | IOS | | TV | | WATCH | | BRIDGE | | MACCATALYST | | | - | | | | +-----+ +----+ +-------+ +--------+ +-------------+ | | - | +---+ +-----------------------------------------------------+ | - +----------------------------------------------------------------+ -``` - -```objc - #import "AFURLRequestSerialization.h" - #import "AFURLResponseSerialization.h" - #import "AFSecurityPolicy.h" - -#if !TARGET_OS_WATCH - #import "AFNetworkReachabilityManager.h" -#endif - - #import "AFURLSessionManager.h" - #import "AFHTTPSessionManager.h" -``` - -## 0x03 AFNetworking请求序列化.h文件详解 - -```objc -#import "AFURLRequestSerialization.h" -``` - -```objc -/** - 返回遵循RFC 3986的查询字符串键或值的百分比转义字符串。 - RFC 3986声明以下字符为“保留”字符。 - -通用分隔符:“:”,“#”,“ [”,“]”,“ @”,“?”,“ /” - -子定界符:“!”,“ $”,“&”,“'”,“(”,“)”,“ *”,“ +”,“,”,“,”,“ =” - - 在RFC 3986-3.4节中,它指出“?” 和“ /”字符不应转义以允许查询字符串包含URL。 因此,所有“保留”字符(“?”除外) 和“ /”应该在查询字符串中转义。 - - @param string 要百分号转义的字符串。 - - @return换码百分比的字符串。 - */ -FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string); -``` - -```objc -NSLog(@"URL: %@", AFPercentEscapedStringFromString(@"http://localhost:8080/afn/dataTask/get?a=1&b=2&c=3")); -``` - -``` -URL: http%3A//localhost%3A8080/afn/dataTask/get?a%3D1%26b%3D2%26c%3D3 -``` - -```objc -/** - 一种辅助方法,用于生成编码后的URL查询参数,以附加到URL的末尾。 - - @param parameters 要编码的键/值的字典。 - - @return网址编码的查询字符串 - */ -FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters); -``` - -```objc -NSLog(@"QueryString: %@", AFQueryStringFromParameters(@{@"a": @1, @"b": @2, @"c": @3})); -``` - -``` -QueryString: a=1&b=2&c=3 -``` - -```objc -/** - 对象采用“ AFURLRequestSerialization”协议,该协议对指定HTTP请求的参数进行编码。 请求序列化程序可以将参数编码为查询字符串,HTTP正文,并根据需要设置适当的HTTP标头字段。 - - 例如,JSON请求序列化程序可以将请求的HTTP主体设置为JSON表示,并将“ Content-Type” HTTP标头字段值设置为“ application / json”。 - */ -@protocol AFURLRequestSerialization - -/** - 返回带有已编码为原始请求副本的指定参数的请求。 - - @param request 原始请求。 - @param parameters 要编码的参数。 - @param error 尝试对请求参数进行编码时发生的错误。 - - @return 序列化的请求。 - */ -- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request - withParameters:(nullable id)parameters - error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW; - -@end -``` - -```objc -/** - AFURLRequestSerialization.h line: 210 - 默认请求参数序列化样式 - */ -typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) { - AFHTTPRequestQueryStringDefaultStyle = 0, -}; -``` - -```objc -/** - AFURLRequestSerialization.h line: 281 - */ -@protocol AFMultipartFormData; -``` - -```objc -/** - AFMultipartFormData协议定义了AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:的block参数中参数所支持的方法。 - */ -@protocol AFMultipartFormData - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{生成的文件名}; name =#{name}”和“ Content-Type:#{生成的mimeType}”,然后是编码的文件数据和多部分表单边界。 - - 表单中此数据的文件名和MIME类型将分别使用`fileURL`的最后一个路径部分和`fileURL`扩展名与系统相关的MIME类型自动生成。 - - @param fileURL 对应于其内容将附加到表单的文件的URL。 该参数不能为“ nil”。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - @param error 如果发生错误,返回时将包含一个描述问题的NSError对象。 - - @如果文件数据已成功添加,则返回“是”,否则返回“否”。 - */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{filename}; name =#{name}”和“ Content-Type:#{mimeType}”,然后是编码文件数据和多部分表单边界。 - - @param fileURL 对应于其内容将附加到表单的文件的URL。 该参数不能为“ nil”。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - @param fileName 在Content-Disposition标头中使用的文件名。 该参数不能为“ nil”。 - @param mimeType 文件数据的声明的MIME类型。 该参数不能为“ nil”。 - @param error 如果发生错误,返回时将包含一个描述问题的NSError对象。 - - @如果文件数据已成功添加,则返回“是”,否则返回“否”。 - */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{filename}; name =#{name}”和“ Content-Type:#{mimeType}”,然后是来自输入流的数据和多部分表单边界。 - - @param inputStream 要添加到表单数据的输入流 - @param name 与指定的输入流关联的名称。 该参数不能为“ nil”。 - @param fileName 与指定输入流关联的文件名。 该参数不能为“ nil”。 - @param length 以字节为单位的指定输入流的长度。 - @param mimeType 指定数据的MIME类型。 (例如,JPEG图像的MIME类型为image / jpeg。)有关有效MIME类型的列表,请参见http://www.iana.org/assignments/media-types/。 该参数不能为“ nil”。 - */ -- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream - name:(NSString *)name - fileName:(NSString *)fileName - length:(int64_t)length - mimeType:(NSString *)mimeType; - -/** - 附加HTTP标头`Content-Disposition:file; filename =#{filename}; name =#{name}”和“ Content-Type:#{mimeType}”,然后是编码文件数据和多部分表单边界。 - - @param data 要编码并附加到表单数据的数据。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - @param fileName 与指定数据关联的文件名。 该参数不能为“ nil”。 - @param mimeType 指定数据的MIME类型。 (例如,JPEG图像的MIME类型为image / jpeg。)有关有效MIME类型的列表,请参见http://www.iana.org/assignments/media-types/。 该参数不能为“ nil”。 - */ -- (void)appendPartWithFileData:(NSData *)data - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType; - -/** - 附加HTTP标头`Content-Disposition:form-data; name =#{name}“`,后跟编码数据和多部分表单边界。 - - @param data 要编码并附加到表单数据的数据。 - @param name 与指定数据关联的名称。 该参数不能为“ nil”。 - */ - -- (void)appendPartWithFormData:(NSData *)data - name:(NSString *)name; - - -/** - 附加HTTP标头,后跟编码数据和多部分表单边界。 - - @param headers 要附加到表单数据的HTTP标头。 - @param body 要编码并附加到表单数据的数据。 该参数不能为“ nil”。 - */ -- (void)appendPartWithHeaders:(nullable NSDictionary *)headers - body:(NSData *)body; - -/** - 节流通过限制数据包大小并为从上传流中读取的每个数据块增加延迟来请求带宽。 - - 通过3G或EDGE连接上载时,请求可能会失败,并显示“请求正文流已耗尽”。根据建议值(kAFUploadStream3GSuggestedPacketSize和kAFUploadStream3GSuggestedDelay)设置最大数据包大小和延迟,可降低输入流超过其分配带宽的风险。不幸的是,没有确定的方法来区分通过NSURLConnection的3G,EDGE或LTE连接。因此,不建议您仅根据网络可达性来限制带宽。相反,您应该考虑在故障块中检查“请求正文流已耗尽”,然后使用限制带宽重试该请求。 - - @param numberOfBytes 最大数据包大小,以字节数为单位。输入流的默认数据包大小为16kb。 - @param delay 每次读取数据包时的延迟持续时间。默认情况下,不设置延迟。 - */ -- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes - delay:(NSTimeInterval)delay; - -@end -``` - -```objc -/** - AFHTTPRequestSerializer符合AFURLRequestSerialization和AFURLResponseSerialization协议,提供查询字符串/ URL格式编码的参数序列化和默认请求标头的具体基础实现,以及响应状态代码和内容类型验证。 - - 鼓励任何处理HTTP的请求或响应序列化器都继承AFHTTPRequestSerializer的子类,以确保一致的默认行为。 - */ -@interface AFHTTPRequestSerializer : NSObject - -/** - 用于序列化参数的字符串编码。 默认情况下,`NSUTF8StringEncoding`。 - */ -@property (nonatomic, assign) NSStringEncoding stringEncoding; - -/** - 创建的请求是否可以使用设备的蜂窝无线电(如果有)。 默认为YES。 - - @see NSMutableURLRequest -setAllowsCellularAccess: - */ -@property (nonatomic, assign) BOOL allowsCellularAccess; - -/** - 创建的请求的缓存策略。 默认情况下,`NSURLRequestUseProtocolCachePolicy`。 - - @see NSMutableURLRequest -setCachePolicy: - */ -@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy; - -/** - 创建的请求是否应使用默认的cookie处理。 默认为YES。 - - @see NSMutableURLRequest -setHTTPShouldHandleCookies: - */ -@property (nonatomic, assign) BOOL HTTPShouldHandleCookies; - -/** -在收到来自较早传输的响应之前,创建的请求是否可以继续传输数据。 默认为“否” - - @see NSMutableURLRequest -setHTTPShouldUsePipelining: - */ -@property (nonatomic, assign) BOOL HTTPShouldUsePipelining; - -/** -创建的请求的网络服务类型。 默认情况下为“ NSURLNetworkServiceTypeDefault”。 - - @see NSMutableURLRequest -setNetworkServiceType: - */ -@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType; - -/** - 创建的请求的超时间隔(以秒为单位)。 默认超时间隔为60秒。 - - @see NSMutableURLRequest -setTimeoutInterval: - */ -@property (nonatomic, assign) NSTimeInterval timeoutInterval; - -///--------------------------------------- -/// @name 配置HTTP请求头 -///--------------------------------------- - -/** - 要应用于序列化请求的默认HTTP标头字段值。 默认情况下,这些内容包括: - - -具有NSLocale + preferredLanguages内容的`Accept-Language` - -`User-Agent`,其中包含各种捆绑包标识符和操作系统名称的内容 - - @discussion 要添加或删除默认请求头,请使用`setValue:forHTTPHeaderField:`。 - */ -@property (readonly, nonatomic, strong) NSDictionary *HTTPRequestHeaders; - -/** - 用默认配置创建并返回一个序列化器。 - */ -+ (instancetype)serializer; - -/** - 设置在HTTP客户端发出的请求对象中设置的HTTP标头的值。 如果为nil,则删除该标头的现有值。 - - @param field 用于设置默认值的HTTP标头 - @param value 为指定的标头设置的默认值,或者为'nil' - */ -- (void)setValue:(nullable NSString *)value -forHTTPHeaderField:(NSString *)field; - -/** - 返回在请求序列化程序中设置的HTTP标头的值。 - - @param field 用于检索默认值的HTTP标头 - - @return 为指定标题设置的默认值,或者为'nil' - */ -- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; - -/** - 将HTTP客户端在请求对象中设置的“ Authorization” HTTP标头设置为具有Base64编码的用户名和密码的基本身份验证值。 这将覆盖此标头的任何现有值。 - - @param username HTTP基本身份验证用户名 - @param password HTTP基本身份验证密码 - */ -- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username - password:(NSString *)password; - -/** - 清除“Authorization” HTTP标头的任何现有值。 - */ -- (void)clearAuthorizationHeader; - -///------------------------------------------------------- -/// @name 配置查询字符串参数序列化 -///------------------------------------------------------- - -/** - 序列化请求的HTTP方法会将参数编码为查询字符串。 默认情况下,`GET`,`HEAD`和`DELETE`。 - */ -@property (nonatomic, strong) NSSet *HTTPMethodsEncodingParametersInURI; - -/** - 根据预定义的样式之一设置查询字符串序列化的方法。 - - @param style 序列化样式。 - - @see AFHTTPRequestQueryStringSerializationStyle - */ -- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style; - -/** - 根据指定的块设置查询字符串序列化的自定义方法。 - - @param block 定义将参数编码为查询字符串的过程的块。 该块返回查询字符串,并接受三个参数:请求,要编码的参数以及尝试对给定请求的参数进行编码时发生的错误。 - */ -- (void)setQueryStringSerializationWithBlock:(nullable NSString * _Nullable (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block; - -///------------------------------- -/// @name 创建请求对象 -///------------------------------- - -/** - 使用指定的HTTP方法和URL字符串创建一个NSMutableURLRequest对象。 - - 如果HTTP方法是`GET`,`HEAD`或`DELETE`,则参数将用于构造附加到请求URL的url编码查询字符串。 否则,将根据“ parameterEncoding”属性的值对参数进行编码,并将其设置为请求正文。 - - @param method 请求的HTTP方法,例如“ GET”,“ POST”,“ PUT”或“ DELETE”。 该参数不能为“ nil”。 - @param URLString 用于创建请求URL的URL字符串。 - @param parameters 将被设置为GET请求的查询字符串或请求HTTP正文的参数。 - @param error 构造请求时发生的错误。 - - @return 一个NSMutableURLRequest对象。 - */ -- (nullable NSMutableURLRequest *)requestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(nullable id)parameters - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 使用指定的HTTP方法和URLString创建一个“ NSMutableURLRequest”对象,并使用指定的参数和多部分表单数据块构造一个“ multipart / form-data” HTTP正文。参见http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 - - 多部分表单请求会自动进行流传输,直接从磁盘读取文件以及单个HTTP正文中的内存数据。产生的NSMutableURLRequest对象具有HTTPBodyStream属性,因此请不要在此请求对象上设置HTTPBodyStream或HTTPBody,因为它将清除多部分表单主体流。 - - @param method 请求的HTTP方法。此参数不能为“ GET”,“ HEAD”或“ nil”。 - @param URLString 用于创建请求URL的URL字符串。 - @param parameters 在请求HTTP正文中要编码和设置的参数。 - @param block 一个接受单个参数并将数据附加到HTTP正文的块。 block参数是采用AFMultipartFormData协议的对象。 - @param error 构造请求时发生的错误。 - - @return 一个NSMutableURLRequest对象 - */ -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method - URLString:(NSString *)URLString - parameters:(nullable NSDictionary *)parameters - constructingBodyWithBlock:(nullable void (^)(id formData))block - error:(NSError * _Nullable __autoreleasing *)error; - -/** - 通过从请求中删除HTTPBodyStream来创建NSMutableURLRequest,并将其内容异步写入指定的文件,并在完成时调用完成处理程序。 - - @param request 多部分表单请求。 request的HTTPBodyStream属性不能为nil。 - @param fileURL 要写入多部分表单内容的文件URL。 - @param handler 要执行的处理程序块。 - - @discussion NSURLSessionTask中存在一个错误,该错误导致请求从HTTP正文流传输内容时请求不发送Content-Length标头,这在与Amazon S3 Web服务进行交互时尤其成问题。解决方法是,此方法采用一个由multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:构造的请求,或带有HTTPBodyStream的任何其他请求,将内容写入指定的文件,并返回原始请求的副本。 HTTPBodyStream属性设置为nil。在这里,文件可以传递到AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`,或将其内容读入分配给请求的HTTPBody属性的NSData中。 - - @see https://github.com/AFNetworking/AFNetworking/issues/1398 - */ -- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request - writingStreamContentsToFile:(NSURL *)fileURL - completionHandler:(nullable void (^)(NSError * _Nullable error))handler; - -@end -``` - -```objc -/** - AFJSONRequestSerializer是AFHTTPRequestSerializer的子类,它使用NSJSONSerialization将参数编码为JSON,将编码请求的Content-Type设置为application / json。 - */ -@interface AFJSONRequestSerializer : AFHTTPRequestSerializer - -/** - 用于从Foundation对象写入请求JSON数据的选项。 有关可能的值,请参见“ NSJSONSerialization”文档部分“ NSJSONWritingOptions”。 默认为0。 - */ -@property (nonatomic, assign) NSJSONWritingOptions writingOptions; - -/** - 创建并返回带有指定读写选项的JSON序列化程序。 - - @param writingOptions 指定的JSON写入选项。 - */ -+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions; -``` - -```objc -/** -AFPropertyListRequestSerializer是AFHTTPRequestSerializer的子类,它使用NSPropertyListSerializer将参数编码为JSON,并将编码后的请求的Content-Type设置为application / x-plist。 - */ -@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer - -/** - 属性列表格式。 可能的值在“ NSPropertyListFormat”中描述。 - */ -@property (nonatomic, assign) NSPropertyListFormat format; - -/** - @warning`writeOptions`属性当前未使用。 - */ -@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions; - -/** - 创建并返回具有指定格式,读取选项和写入选项的属性列表序列化程序。 - - @param format 属性列表格式。 - @param writeOptions 属性列表写入选项。 - - @warning`writeOptions`属性当前未使用。 - */ -+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format - writeOptions:(NSPropertyListWriteOptions)writeOptions; - -@end -``` - -```objc -///---------------- -/// @name 常数 -///---------------- - -/** - ##错误域 - - 以下错误域是预定义的。 - - -`NSString * const AFURLRequestSerializationErrorDomain` - - ###常数 - - AFURLRequestSerializationErrorDomain AFURLRequestSerializer错误。 - AFURLRequestSerializationErrorDomain的错误代码对应于NSURLErrorDomain的代码。 - */ -FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain; - -/** - ##用户信息字典键 - - 除了为NSError定义的密钥外,这些密钥还可以存在于用户信息字典中。 - - -`NSString * const AFNetworkingOperationFailingURLRequestErrorKey` - - ###常数 - - AFNetworkingOperationFailingURLRequestErrorKey - 相应的值为“ NSURLRequest”,其中包含与错误相关联的操作请求。 该密钥仅存在于“ AFURLRequestSerializationErrorDomain”中。 - */ -FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey; - -/** - ## HTTP请求输入流的限制带宽 - - @see -throttleBandwidthWithPacketSize:delay: - - ###常数 - - kAFUploadStream3GSuggestedPacketSize - 最大数据包大小,以字节数为单位。 等于16kb。 - - kAFUploadStream3GSuggestedDelay - 每次读取数据包的延迟时间。 等于0.2秒。 - */ -FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize; -FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay; -``` - -```objc -NSLog(@"AFURLRequestSerializationErrorDomain: %@", AFURLRequestSerializationErrorDomain); -``` - -``` -AFURLRequestSerializationErrorDomain: com.alamofire.error.serialization.request -``` - -```objc -NSLog(@"AFNetworkingOperationFailingURLRequestErrorKey: %@", AFNetworkingOperationFailingURLRequestErrorKey); -``` - -``` -AFNetworkingOperationFailingURLRequestErrorKey: com.alamofire.serialization.request.error.response -``` - -```objc -NSLog(@"kAFUploadStream3GSuggestedPacketSize: %lu", kAFUploadStream3GSuggestedPacketSize); -``` - -``` -kAFUploadStream3GSuggestedPacketSize: 16384 -``` - -```objc -NSLog(@"kAFUploadStream3GSuggestedDelay: %f", kAFUploadStream3GSuggestedDelay); -``` - -``` -kAFUploadStream3GSuggestedDelay: 0.200000 -``` - -## 0x04 AFNetworking请求序列化.m详解 - -```objc -NSString * const AFURLRequestSerializationErrorDomain = @"com.alamofire.error.serialization.request"; -NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofire.serialization.request.error.response"; -``` - -```objc -/** - AFURLRequestSerialization.m line: 191 - */ -typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error); -``` - -```objc -/** - 返回遵循RFC 3986的查询字符串键或值的百分比转义字符串。 - RFC 3986声明以下字符为“保留”字符。 - -通用分隔符:“:”,“#”,“ [”,“]”,“ @”,“?”,“ /” - -子定界符:“!”,“ $”,“&”,“'”,“(”,“)”,“ *”,“ +”,“,”,“,”,“ =” - - 在RFC 3986-3.4节中,它指出“?” 和“ /”字符不应转义以允许查询字符串包含URL。 因此,所有“保留”字符(“?”除外) 和“ /”应该在查询字符串中转义。 - -参数字符串:要百分号转义的字符串。 - -返回:转义百分比的字符串。 - */ -NSString * AFPercentEscapedStringFromString(NSString *string) { - static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // 不包括 ”?” 或“ /”(由于RFC 3986-第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); - - //为了避免破坏诸如👴🏻👮🏽之类的字符序列 - range = [string rangeOfComposedCharacterSequencesForRange:range]; - - NSString *substring = [string substringWithRange:range]; - NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet]; - [escaped appendString:encoded]; - - index += range.length; - } - - return escaped; -} -``` - -```objc -@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 -``` - -```objc -SQQueryStringPair *pair = [[SQQueryStringPair alloc] initWithField:@"a" value:@1]; -``` - -```objc -NSLog(@"%@", [pair URLEncodedStringValue]); -``` - -``` -a=1 -``` - -```objc -SQQueryStringPair *pair2 = [[SQQueryStringPair alloc] initWithField:@"b" value:nil]; -``` - -```objc -NSLog(@"%@", [pair2 URLEncodedStringValue]); -``` - -``` -b -``` - -```objc -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; - // 对字典键进行排序以确保查询字符串中的顺序一致,这在反序列化可能含糊的序列(例如字典数组)时很重要 - 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; -} -``` - -```objc -NSLog(@"%@", SQQueryStringPairsFromKeyAndValue(@"a", @1)); -``` -``` -( - "a=1" -) -``` - -```objc -NSLog(@"%@", SQQueryStringPairsFromKeyAndValue(@"a", @{@"b": @{@"c": @3}, @"d": @""})); -``` - -``` -( - "a[b][c]=3", - "a[d]=" -) -``` - -```objc -NSLog(@"%@", SQQueryStringPairsFromKeyAndValue(@"a", @[@"b", @{@"c": @3}, @"d"])); -``` - -``` -( - "a[]=b", - "a[][c]=3", - "a[]=d" -) -``` - -```objc -NSLog(@"%@", SQQueryStringPairFromDictionary(@{@"a": @{@"b": @{@"c": @3}, @"d": @""}})); -``` - -``` -( - "a[b][c]=3", - "a[d]=" -) -``` - -```objc -NSLog(@"%@", SQQueryStringFromParameters(@{@"a": @{@"b": @{@"c": @3}, @"d": @""}})); -``` - -``` -a[b][c]=3&a[d]= -``` - ->2020-11-23 - -```objc -@interface AFStreamingMultipartFormData : NSObject -- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest - stringEncoding:(NSStringEncoding)encoding; - -- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; -@end -``` - -```objc -AFMultipartFormData -> AFURLRequestSerialization.h line 281 -AFStreamingMultipartFormData -> AFURLRequestSerialization.m line 663 -AFMultipartBodyStream -> AFURLRequestSerialization.m line 642 -AFHTTPBodyPart -> AFURLRequestSerialization.m line 624 -``` - -```objc -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; -``` - -```objc -@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 -``` - -```objc -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 { - // 如果AFMultipartFormFinalBoundary不适合可用缓冲区,则允许再次调用read:maxLength: - 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 -``` - -```objc -SQHTTPBodyPart *bodyPart = [[SQHTTPBodyPart alloc] init]; -bodyPart.headers = @{ - @"accept": @"application/json, text/javascript, */*; q=0.01", - @"accept-encoding": @"gzip, deflate, br", - @"accept-language": @"en-US,en;q=0.9,zh;q=0.8", - @"content-length": @"9", - @"content-type": @"application/json; charset=UTF-8" -}; -NSLog(@"%@", [bodyPart stringForHeaders]); -``` - -``` -accept: application/json, text/javascript, */*; q=0.01 -accept-language: en-US,en;q=0.9,zh;q=0.8 -content-length: 9 -accept-encoding: gzip, deflate, br -content-type: application/json; charset=UTF-8 - -``` - ->2020-11-25 - -```objc -@interface NSStream () -@property (readwrite) NSStreamStatus streamStatus; -@property (readwrite, copy) NSError *streamError; -@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 -``` - -```objc -@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 -``` - -```objc -#import "AFURLSessionManager.h" -``` - -``` -AFURLSessionManager基于指定的NSURLSessionConfiguration对象创建和管理NSURLSession对象,该对象符合。 -``` diff --git a/SQDebug/CTMediator-44.zip b/SQDebug/CTMediator-44.zip deleted file mode 100644 index 0c6837ef..00000000 Binary files a/SQDebug/CTMediator-44.zip and /dev/null differ diff --git a/SQDebug/Masonry-1.1.0.zip b/SQDebug/Masonry-1.1.0.zip deleted file mode 100644 index 288db2f1..00000000 Binary files a/SQDebug/Masonry-1.1.0.zip and /dev/null differ diff --git a/SQDebug/SDWebImage-5.9.5.zip b/SQDebug/SDWebImage-5.9.5.zip deleted file mode 100644 index e880dd6a..00000000 Binary files a/SQDebug/SDWebImage-5.9.5.zip and /dev/null differ diff --git a/SQDebug/debug/index.js b/SQDebug/debug/index.js deleted file mode 100644 index 1a88791f..00000000 --- a/SQDebug/debug/index.js +++ /dev/null @@ -1,13 +0,0 @@ -const Koa = require('koa'); -const bodyParser = require('koa-bodyparser'); -const userRouter = require('./router/afnetworking'); - -const app = new Koa(); - -app.use(bodyParser()); -app.use(userRouter.routes()); -app.use(userRouter.allowedMethods()); - -app.listen('8080', () => { - console.log('服务器启动成功'); -}); \ No newline at end of file diff --git a/SQDebug/debug/package-lock.json b/SQDebug/debug/package-lock.json deleted file mode 100644 index 7a44186e..00000000 --- a/SQDebug/debug/package-lock.json +++ /dev/null @@ -1,659 +0,0 @@ -{ - "name": "debug", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "requires": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - } - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" - }, - "append-field": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/append-field/-/append-field-0.1.0.tgz", - "integrity": "sha1-bdxY+gg8e8VF08WZWygwzCNm1Eo=" - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" - }, - "busboy": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", - "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", - "requires": { - "dicer": "0.2.5", - "readable-stream": "1.1.x" - } - }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "cache-content-type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", - "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", - "requires": { - "mime-types": "^2.1.18", - "ylru": "^1.2.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "co-body": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.1.0.tgz", - "integrity": "sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==", - "requires": { - "inflation": "^2.0.0", - "qs": "^6.5.2", - "raw-body": "^2.3.3", - "type-is": "^1.6.16" - } - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "content-disposition": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", - "requires": { - "safe-buffer": "5.1.2" - } - }, - "content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" - }, - "cookies": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", - "integrity": "sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==", - "requires": { - "depd": "~2.0.0", - "keygrip": "~1.1.0" - }, - "dependencies": { - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==" - } - } - }, - "copy-to": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz", - "integrity": "sha1-JoD7uAaKSNCGVrYJgJK9r8kG9KU=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "destroy": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" - }, - "dicer": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", - "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", - "requires": { - "readable-stream": "1.1.x", - "streamsearch": "0.1.2" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" - }, - "http-assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.4.1.tgz", - "integrity": "sha512-rdw7q6GTlibqVVbXr0CKelfV5iY8G2HqEUkhSk297BMbSpSL8crXC+9rjKoMcZZEsksX30le6f/4ul4E28gegw==", - "requires": { - "deep-equal": "~1.0.1", - "http-errors": "~1.7.2" - }, - "dependencies": { - "http-errors": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", - "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - } - } - }, - "http-errors": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.0.tgz", - "integrity": "sha512-4I8r0C5JDhT5VkvI47QktDW75rNlGVsUf/8hzjCC/wkWI/jdTRmBb9aI7erSG82r1bjKY3F6k28WnsVxB1C73A==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - } - } - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "inflation": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.0.0.tgz", - "integrity": "sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8=" - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-generator-function": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz", - "integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw==" - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "keygrip": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", - "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", - "requires": { - "tsscmp": "1.0.6" - } - }, - "koa": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/koa/-/koa-2.13.0.tgz", - "integrity": "sha512-i/XJVOfPw7npbMv67+bOeXr3gPqOAw6uh5wFyNs3QvJ47tUx3M3V9rIE0//WytY42MKz4l/MXKyGkQ2LQTfLUQ==", - "requires": { - "accepts": "^1.3.5", - "cache-content-type": "^1.0.0", - "content-disposition": "~0.5.2", - "content-type": "^1.0.4", - "cookies": "~0.8.0", - "debug": "~3.1.0", - "delegates": "^1.0.0", - "depd": "^1.1.2", - "destroy": "^1.0.4", - "encodeurl": "^1.0.2", - "escape-html": "^1.0.3", - "fresh": "~0.5.2", - "http-assert": "^1.3.0", - "http-errors": "^1.6.3", - "is-generator-function": "^1.0.7", - "koa-compose": "^4.1.0", - "koa-convert": "^1.2.0", - "on-finished": "^2.3.0", - "only": "~0.0.2", - "parseurl": "^1.3.2", - "statuses": "^1.5.0", - "type-is": "^1.6.16", - "vary": "^1.1.2" - } - }, - "koa-bodyparser": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/koa-bodyparser/-/koa-bodyparser-4.3.0.tgz", - "integrity": "sha512-uyV8G29KAGwZc4q/0WUAjH+Tsmuv9ImfBUF2oZVyZtaeo0husInagyn/JH85xMSxM0hEk/mbCII5ubLDuqW/Rw==", - "requires": { - "co-body": "^6.0.0", - "copy-to": "^2.0.1" - } - }, - "koa-compose": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", - "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==" - }, - "koa-convert": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz", - "integrity": "sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=", - "requires": { - "co": "^4.6.0", - "koa-compose": "^3.0.0" - }, - "dependencies": { - "koa-compose": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-3.2.1.tgz", - "integrity": "sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec=", - "requires": { - "any-promise": "^1.1.0" - } - } - } - }, - "koa-multer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/koa-multer/-/koa-multer-1.0.2.tgz", - "integrity": "sha512-0kFzN4atVd+9oiG+4fYxQ9S2T3dPhKNvmhITIY606Qn9wLEmfhW0DhSpOzRYhddN//4rh/TCK95TMtflmFa5lA==", - "requires": { - "multer": "1.3.0" - } - }, - "koa-router": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/koa-router/-/koa-router-10.0.0.tgz", - "integrity": "sha512-gAE5J1gBQTvfR8rMMtMUkE26+1MbO3DGpGmvfmM2pR9Z7w2VIb2Ecqeal98yVO7+4ltffby7gWOzpCmdNOQe0w==", - "requires": { - "debug": "^4.1.1", - "http-errors": "^1.7.3", - "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.1.0" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "koa-send": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-5.0.1.tgz", - "integrity": "sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==", - "requires": { - "debug": "^4.1.1", - "http-errors": "^1.7.3", - "resolve-path": "^1.4.0" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "requires": { - "ms": "2.1.2" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "multer": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/multer/-/multer-1.3.0.tgz", - "integrity": "sha1-CSsmcPaEb6SRSWXvyM+Uwg/sbNI=", - "requires": { - "append-field": "^0.1.0", - "busboy": "^0.2.11", - "concat-stream": "^1.5.0", - "mkdirp": "^0.5.1", - "object-assign": "^3.0.0", - "on-finished": "^2.3.0", - "type-is": "^1.6.4", - "xtend": "^4.0.0" - } - }, - "negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - }, - "only": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", - "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=" - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-to-regexp": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", - "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==" - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" - }, - "qs": { - "version": "6.9.4", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", - "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==" - }, - "raw-body": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", - "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.3", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "dependencies": { - "http-errors": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", - "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - } - } - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "resolve-path": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", - "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc=", - "requires": { - "http-errors": "~1.6.2", - "path-is-absolute": "1.0.1" - }, - "dependencies": { - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" - } - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "tsscmp": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", - "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==" - }, - "type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "requires": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - } - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" - }, - "ylru": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz", - "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==" - } - } -} diff --git a/SQDebug/debug/package.json b/SQDebug/debug/package.json deleted file mode 100644 index 14f00006..00000000 --- a/SQDebug/debug/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "debug", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "koa": "^2.13.0", - "koa-bodyparser": "^4.3.0", - "koa-multer": "^1.0.2", - "koa-router": "^10.0.0", - "koa-send": "^5.0.1" - } -} diff --git a/SQDebug/debug/router/afnetworking.js b/SQDebug/debug/router/afnetworking.js deleted file mode 100644 index 94bb3475..00000000 --- a/SQDebug/debug/router/afnetworking.js +++ /dev/null @@ -1,44 +0,0 @@ -const path = require('path'); - -const Router = require('koa-router'); -const send = require('koa-send'); -const multer = require('koa-multer'); - -const router = new Router({ prefix: '/afn' }); - -router.get('/downloadTask/:name', async (ctx, next) => { - const name = ctx.params.name; - console.log(name) - const path = `uploads/${name}`; - ctx.attachment(path); - await send(ctx, path); -}); - -const storage = multer.diskStorage({ - destination: (req, file, cb) => { - cb(null, 'uploads/'); - }, - filename: (req, file, cb) => { - cb(null, Date.now() + path.extname(file.originalname)); - } -}); - -const upload = multer({ - storage -}); - -router.post('/uploadTask/upload', upload.single('file'), (ctx, next) => { - console.log(ctx.req.file); - ctx.response.body = { - msg: 'upload success!' - }; -}); - -router.get('/dataTask/get', (ctx, next) => { - ctx.status = 200; - ctx.body = { - msg: 'get success!' - } -}); - -module.exports = router; \ No newline at end of file diff --git a/SQDebug/debug/uploads/1606012485650.jpg b/SQDebug/debug/uploads/1606012485650.jpg deleted file mode 100644 index 280b41e2..00000000 Binary files a/SQDebug/debug/uploads/1606012485650.jpg and /dev/null differ diff --git a/SQDebug/debug/uploads/1606013226170.jpg b/SQDebug/debug/uploads/1606013226170.jpg deleted file mode 100644 index 280b41e2..00000000 Binary files a/SQDebug/debug/uploads/1606013226170.jpg and /dev/null differ diff --git a/SQDebug/debug/uploads/download.zip b/SQDebug/debug/uploads/download.zip deleted file mode 100644 index 0ccc90cd..00000000 Binary files a/SQDebug/debug/uploads/download.zip and /dev/null differ