diff --git a/Cartfile b/Cartfile index c7e4eea..35f0dfa 100644 --- a/Cartfile +++ b/Cartfile @@ -1,5 +1,5 @@ -github "Alamofire/Alamofire" ~> 4.0 -github "radex/SwiftyUserDefaults" ~> 3.0 -github "Hearst-DD/ObjectMapper" ~> 2.0 -github "SwiftyJSON/SwiftyJSON" ~> 3.0 -github "Alamofire/AlamofireImage" ~> 3.1 +github "Alamofire/Alamofire" +github "radex/SwiftyUserDefaults" +github "Hearst-DD/ObjectMapper" +github "SwiftyJSON/SwiftyJSON" +github "Alamofire/AlamofireImage" diff --git a/Cartfile.resolved b/Cartfile.resolved index 4ac8dc4..971aead 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,5 @@ -github "Alamofire/Alamofire" "4.2.0" -github "Hearst-DD/ObjectMapper" "2.2.2" +github "Alamofire/Alamofire" "4.5.1" +github "Alamofire/AlamofireImage" "3.3.0" +github "Hearst-DD/ObjectMapper" "2.2.8" github "SwiftyJSON/SwiftyJSON" "3.1.4" github "radex/SwiftyUserDefaults" "3.0.1" -github "Alamofire/AlamofireImage" "3.2.0" diff --git a/Carthage/Checkouts/Alamofire b/Carthage/Checkouts/Alamofire index 5fe5b20..b899544 160000 --- a/Carthage/Checkouts/Alamofire +++ b/Carthage/Checkouts/Alamofire @@ -1 +1 @@ -Subproject commit 5fe5b201057b0d009d168074ea886b1b59d41626 +Subproject commit b8995447518fd57af14c88a47f27434a16f60403 diff --git a/Carthage/Checkouts/AlamofireImage/.swift-version b/Carthage/Checkouts/AlamofireImage/.swift-version index 9f55b2c..a3ec5a4 100644 --- a/Carthage/Checkouts/AlamofireImage/.swift-version +++ b/Carthage/Checkouts/AlamofireImage/.swift-version @@ -1 +1 @@ -3.0 +3.2 diff --git a/Carthage/Checkouts/AlamofireImage/.travis.yml b/Carthage/Checkouts/AlamofireImage/.travis.yml index b2d56b6..f56fb2a 100644 --- a/Carthage/Checkouts/AlamofireImage/.travis.yml +++ b/Carthage/Checkouts/AlamofireImage/.travis.yml @@ -1,5 +1,8 @@ language: objective-c -osx_image: xcode8 +osx_image: xcode8.3 +branches: + only: + - master env: global: - LC_CTYPE=en_US.UTF-8 @@ -9,25 +12,19 @@ env: - MACOS_FRAMEWORK_SCHEME="AlamofireImage macOS" - TVOS_FRAMEWORK_SCHEME="AlamofireImage tvOS" - WATCHOS_FRAMEWORK_SCHEME="AlamofireImage watchOS" - - IOS_SDK=iphonesimulator10.0 - - MACOS_SDK=macosx10.12 - - TVOS_SDK=appletvsimulator10.0 - - WATCHOS_SDK=watchsimulator3.0 - EXAMPLE_SCHEME="iOS Example" matrix: - - DESTINATION="OS=3.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=2.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=2.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=10.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES" - - DESTINATION="OS=10.0,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=9.2,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=9.0,name=iPad 2" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES" + - DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=10.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$MACOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" before_install: - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet script: @@ -38,26 +35,26 @@ script: # Build Framework in Debug and Run Tests if specified - if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test ENABLE_TESTABILITY=YES test | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test ENABLE_TESTABILITY=YES test | xcpretty; else - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Build Framework in ReleaseTest and Run Tests if specified - if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO test ENABLE_TESTABILITY=YES test | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO test ENABLE_TESTABILITY=YES test | xcpretty; else - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Build Example in Debug if specified - if [ $BUILD_EXAMPLE == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Build Example in Release if specified - if [ $BUILD_EXAMPLE == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Run `pod lib lint` if specified diff --git a/Carthage/Checkouts/AlamofireImage/AlamofireImage.podspec b/Carthage/Checkouts/AlamofireImage/AlamofireImage.podspec index 6c4f83f..277e776 100644 --- a/Carthage/Checkouts/AlamofireImage/AlamofireImage.podspec +++ b/Carthage/Checkouts/AlamofireImage/AlamofireImage.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'AlamofireImage' - s.version = '3.2.0' + s.version = '3.3.0' s.license = 'MIT' s.summary = 'AlamofireImage is an image component library for Alamofire' s.homepage = 'https://github.com/Alamofire/AlamofireImage' @@ -15,5 +15,5 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.0' s.watchos.deployment_target = '2.0' - s.dependency 'Alamofire', '~> 4.1' + s.dependency 'Alamofire', '~> 4.5' end diff --git a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/project.pbxproj b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/project.pbxproj index cd77e94..e373f62 100644 --- a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/project.pbxproj +++ b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/project.pbxproj @@ -607,6 +607,11 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 314354491F4A16FE00266E5F /* PULL_REQUEST_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = PULL_REQUEST_TEMPLATE.md; sourceTree = ""; }; + 3143544A1F4A16FE00266E5F /* ISSUE_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ISSUE_TEMPLATE.md; sourceTree = ""; }; + 3143544B1F4A16FE00266E5F /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 3143544C1F4A16FE00266E5F /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + 314354501F4A16FE00266E5F /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; 4C0893EB1B936A7A005125D9 /* UIImage+AlamofireImageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+AlamofireImageTests.swift"; sourceTree = ""; }; 4C0893F41B937404005125D9 /* UIImageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIImageTests.swift; sourceTree = ""; }; 4C0894501B9382EB005125D9 /* apple.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = apple.jpg; sourceTree = ""; }; @@ -618,6 +623,11 @@ 4C1624841AABE8E600A0385D /* BaseTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseTestCase.swift; sourceTree = ""; }; 4C16B37D1BA9399500A66EF0 /* AlamofireImage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireImage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4C16B3861BA9399500A66EF0 /* AlamofireImage tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "AlamofireImage tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4C1E864C1F5FC150004FF7F8 /* AlamofireImage 3.0 Migration Guide.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = "AlamofireImage 3.0 Migration Guide.md"; path = "Documentation/AlamofireImage 3.0 Migration Guide.md"; sourceTree = ""; }; + 4C1E864D1F5FC150004FF7F8 /* AlamofireImage 2.0 Migration Guide.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = "AlamofireImage 2.0 Migration Guide.md"; path = "Documentation/AlamofireImage 2.0 Migration Guide.md"; sourceTree = ""; }; + 4C1E864F1F5FC16A004FF7F8 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + 4C1E86501F5FC16A004FF7F8 /* AlamofireImage.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = AlamofireImage.podspec; sourceTree = ""; }; + 4C1E86511F5FC16A004FF7F8 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 4C4D4EC11B92976900C96855 /* AlamofireImage.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AlamofireImage.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4C53084F1AB561BF0051DBAC /* UIImage+AlamofireImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+AlamofireImage.swift"; sourceTree = ""; }; 4C54EE8F1AABC04900CD894C /* AlamofireImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlamofireImage.h; sourceTree = ""; }; @@ -835,6 +845,19 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 314354481F4A16E800266E5F /* Documentation */ = { + isa = PBXGroup; + children = ( + 3143544C1F4A16FE00266E5F /* CHANGELOG.md */, + 314354501F4A16FE00266E5F /* CONTRIBUTING.md */, + 3143544A1F4A16FE00266E5F /* ISSUE_TEMPLATE.md */, + 314354491F4A16FE00266E5F /* PULL_REQUEST_TEMPLATE.md */, + 3143544B1F4A16FE00266E5F /* README.md */, + 4C1E86471F5FC13E004FF7F8 /* Migration Guides */, + ); + name = Documentation; + sourceTree = ""; + }; 4C0893EA1B936A4D005125D9 /* Extensions */ = { isa = PBXGroup; children = ( @@ -864,6 +887,25 @@ path = "Original Images"; sourceTree = ""; }; + 4C1E86471F5FC13E004FF7F8 /* Migration Guides */ = { + isa = PBXGroup; + children = ( + 4C1E864D1F5FC150004FF7F8 /* AlamofireImage 2.0 Migration Guide.md */, + 4C1E864C1F5FC150004FF7F8 /* AlamofireImage 3.0 Migration Guide.md */, + ); + name = "Migration Guides"; + sourceTree = ""; + }; + 4C1E864E1F5FC15D004FF7F8 /* Deployment */ = { + isa = PBXGroup; + children = ( + 4C1E86501F5FC16A004FF7F8 /* AlamofireImage.podspec */, + 4C1E86511F5FC16A004FF7F8 /* LICENSE */, + 4C1E864F1F5FC16A004FF7F8 /* Package.swift */, + ); + name = Deployment; + sourceTree = ""; + }; 4C54EE8E1AABC04900CD894C /* Source */ = { isa = PBXGroup; children = ( @@ -1136,6 +1178,8 @@ 4C90436D1AABBFC5001B4E60 = { isa = PBXGroup; children = ( + 4C1E864E1F5FC15D004FF7F8 /* Deployment */, + 314354481F4A16E800266E5F /* Documentation */, 4C54EE8E1AABC04900CD894C /* Source */, 4C54EE941AABC08B00CD894C /* Tests */, 4C9043781AABBFC5001B4E60 /* Products */, @@ -1389,40 +1433,40 @@ attributes = { LastSwiftMigration = 0700; LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = Alamofire; TargetAttributes = { 4C16B37C1BA9399500A66EF0 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; - ProvisioningStyle = Automatic; + LastSwiftMigration = 0900; + ProvisioningStyle = Manual; }; 4C16B3851BA9399500A66EF0 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 4C4D4EC01B92976900C96855 = { CreatedOnToolsVersion = 7.0; - ProvisioningStyle = Automatic; + ProvisioningStyle = Manual; }; 4C9043761AABBFC5001B4E60 = { CreatedOnToolsVersion = 6.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 4C9043811AABBFC5001B4E60 = { CreatedOnToolsVersion = 6.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 4CD589AB1D45B0F500ADEF90 = { CreatedOnToolsVersion = 7.3.1; }; 4CE611281AABC24E00D35044 = { - LastSwiftMigration = 0800; - ProvisioningStyle = Automatic; + LastSwiftMigration = 0900; + ProvisioningStyle = Manual; }; 4CE611461AABC5C900D35044 = { CreatedOnToolsVersion = 6.2; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -2143,8 +2187,6 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = marker; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -2164,8 +2206,6 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = bitcode; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -2184,7 +2224,6 @@ 4C16B3901BA9399500A66EF0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.AlamofireImage-tvOSTests"; @@ -2196,7 +2235,6 @@ 4C16B3911BA9399500A66EF0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.AlamofireImage-tvOSTests"; @@ -2209,17 +2247,14 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = marker; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.AlamofireImage-watchOS"; + PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.AlamofireImage; PRODUCT_NAME = AlamofireImage; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -2231,17 +2266,14 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = bitcode; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.AlamofireImage-watchOS"; + PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.AlamofireImage; PRODUCT_NAME = AlamofireImage; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -2257,14 +2289,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = 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__DUPLICATE_METHOD_MATCH = YES; @@ -2295,6 +2333,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -2312,14 +2351,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = 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__DUPLICATE_METHOD_MATCH = YES; @@ -2343,6 +2388,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -2357,19 +2403,16 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = marker; - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.AlamofireImage; PRODUCT_NAME = AlamofireImage; + SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; @@ -2378,19 +2421,16 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = bitcode; - CLANG_ENABLE_MODULES = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.AlamofireImage; PRODUCT_NAME = AlamofireImage; + SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; @@ -2398,26 +2438,22 @@ 4C9043911AABBFC5001B4E60 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = Debug; }; 4C9043921AABBFC5001B4E60 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = Release; }; @@ -2439,16 +2475,12 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = marker; - CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -2463,16 +2495,12 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = YES; - BITCODE_GENERATION_MODE = bitcode; - CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -2488,15 +2516,6 @@ buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; @@ -2510,11 +2529,6 @@ buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; diff --git a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage iOS.xcscheme b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage iOS.xcscheme index 0e39a0c..8c94a9f 100644 --- a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage iOS.xcscheme +++ b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/AlamofireImage iOS.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme index e1bd92b..984e5a3 100644 --- a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme +++ b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcworkspace/xcshareddata/AlamofireImage.xcscmblueprint b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcworkspace/xcshareddata/AlamofireImage.xcscmblueprint new file mode 100644 index 0000000..280b62b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/AlamofireImage.xcworkspace/xcshareddata/AlamofireImage.xcscmblueprint @@ -0,0 +1,30 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "67620B5EFA902936DF04070AF595B76AB0333747" : 0, + "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "7F9607B6-9202-46E7-BEBE-95D4C2A36284", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "67620B5EFA902936DF04070AF595B76AB0333747" : "AlamofireImage\/Carthage\/Checkouts\/Alamofire\/", + "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86" : "AlamofireImage\/" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "AlamofireImage", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "AlamofireImage.xcworkspace", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Alamofire\/Alamofire.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "67620B5EFA902936DF04070AF595B76AB0333747" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:cnoon\/AlamofireImage.git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D2AD29AE1B693121D0EDBB4855C96B75ECBB0D86" + } + ] +} \ No newline at end of file diff --git a/Carthage/Checkouts/AlamofireImage/CHANGELOG.md b/Carthage/Checkouts/AlamofireImage/CHANGELOG.md index 156f3c9..0bdabaa 100644 --- a/Carthage/Checkouts/AlamofireImage/CHANGELOG.md +++ b/Carthage/Checkouts/AlamofireImage/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. `AlamofireImage` adheres to [Semantic Versioning](http://semver.org/). #### 3.x Releases +- `3.3.x` Releases - [3.3.0](#330) - `3.2.x` Releases - [3.2.0](#320) - `3.1.x` Releases - [3.1.0](#310) - `3.0.x` Releases - [3.0.0](#300) @@ -23,6 +24,49 @@ All notable changes to this project will be documented in this file. --- +## [3.3.0](https://github.com/Alamofire/AlamofireImage/releases/tag/3.3.0) +Released on 2017-09-06. All issues associated with this milestone can be found using this +[filter](https://github.com/Alamofire/AlamofireImage/milestone/21?closed=1). + +#### Added +- Gitter badge to the README to direct users to the group. + - Added by [Christian Noon](https://github.com/cnoon). +- Optional `queue` parameter to `responseImage` function. + - Added by [Timur Galimov](https://github.com/timaktimak) in Pull Request + [#227](https://github.com/Alamofire/AlamofireImage/pull/227). +- Asserts to scaling functions as well as production fallbacks. + - Added by [Christian Noon](https://github.com/cnoon) in regards to Issue + [#226](https://github.com/Alamofire/AlamofireImage/issues/226). +- GitHub templates for issues and pull requests. + - Added by [Jon Shier](https://github.com/jshier). + +#### Updated +- Alamofire submodule and dependency to `~> 4.5`. + - Updated by [Christian Noon](https://github.com/cnoon). +- The project and codebase to support Swift 3 / 4 simultaneously. + - Updated by [Jon Shier](https://github.com/jshier) in Pull Requests + [#269](https://github.com/Alamofire/AlamofireImage/pull/269) and + [#283](https://github.com/Alamofire/AlamofireImage/pull/283). +- The README to use the current version throughout the installation section. + - Updated by [Kim de Vos](https://github.com/kimdv) in Pull Request + [#274](https://github.com/Alamofire/AlamofireImage/pull/274). +- Image response serializers code sample in the README to `import Alamofire`. + - Updated by [Brian Schermerhorn](https://github.com/elderbas) in Pull Request + [#276](https://github.com/Alamofire/AlamofireImage/pull/276). + +#### Fixed +- The Swift Package Manager (SPM) integration by excluding `Tests` folder. + - Fixed by [Jon Shier](https://github.com/jshier) in Pull Request + [#252](https://github.com/Alamofire/AlamofireImage/pull/252). +- Issue in the embedded framework section of the README where `bash` specifier was incorrect. + - Fixed by [Chris Schepman](https://github.com/cschep) in Pull Request + [#253](https://github.com/Alamofire/AlamofireImage/pull/253). +- Various typos throughout the project using `misspell`. + - Fixed by [Wolfgang Lutz](https://github.com/Lutzifer) in Pull Request + [#259](https://github.com/Alamofire/AlamofireImage/pull/259). + +--- + ## [3.2.0](https://github.com/Alamofire/AlamofireImage/releases/tag/3.2.0) Released on 2016-11-20. All issues associated with this milestone can be found using this [filter](https://github.com/Alamofire/AlamofireImage/milestone/20?closed=1). diff --git a/Carthage/Checkouts/AlamofireImage/Cartfile b/Carthage/Checkouts/AlamofireImage/Cartfile index d33abff..2baf0ab 100644 --- a/Carthage/Checkouts/AlamofireImage/Cartfile +++ b/Carthage/Checkouts/AlamofireImage/Cartfile @@ -1 +1 @@ -github "Alamofire/Alamofire" ~> 4.1 +github "Alamofire/Alamofire" ~> 4.5 diff --git a/Carthage/Checkouts/AlamofireImage/Cartfile.resolved b/Carthage/Checkouts/AlamofireImage/Cartfile.resolved index 93f4453..a8c2ced 100644 --- a/Carthage/Checkouts/AlamofireImage/Cartfile.resolved +++ b/Carthage/Checkouts/AlamofireImage/Cartfile.resolved @@ -1 +1 @@ -github "Alamofire/Alamofire" "4.2.0" +github "Alamofire/Alamofire" "4.5.1" diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Build b/Carthage/Checkouts/AlamofireImage/Carthage/Build new file mode 120000 index 0000000..76f9ba2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Build @@ -0,0 +1 @@ +../../../../Carthage/Build \ No newline at end of file diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.jazzy.yaml b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.jazzy.yaml new file mode 100644 index 0000000..1fa4beb --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.jazzy.yaml @@ -0,0 +1,8 @@ +author: Alamofire Software Foundation +author_url: http://alamofire.org/ +github_url: https://github.com/Alamofire/Alamofire +root_url: https://alamofire.github.io/Alamofire/ +module: Alamofire +output: docs +theme: fullwidth +xcodebuild_arguments: [-workspace, 'Alamofire.xcworkspace', -scheme, 'Alamofire iOS'] diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.ruby-gemset b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.ruby-gemset new file mode 100644 index 0000000..bbc11e1 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.ruby-gemset @@ -0,0 +1 @@ +Alamofire diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.ruby-version b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.ruby-version new file mode 100644 index 0000000..55bc983 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.ruby-version @@ -0,0 +1 @@ +ruby-2.4.1 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.swift-version b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.swift-version index 9f55b2c..a3ec5a4 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.swift-version +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.swift-version @@ -1 +1 @@ -3.0 +3.2 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.travis.yml b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.travis.yml index a79a308..7e24fe2 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.travis.yml +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/.travis.yml @@ -1,5 +1,8 @@ language: objective-c -osx_image: xcode8 +osx_image: xcode8.3 +branches: + only: + - master env: global: - LC_CTYPE=en_US.UTF-8 @@ -9,23 +12,19 @@ env: - MACOS_FRAMEWORK_SCHEME="Alamofire macOS" - TVOS_FRAMEWORK_SCHEME="Alamofire tvOS" - WATCHOS_FRAMEWORK_SCHEME="Alamofire watchOS" - - IOS_SDK=iphonesimulator10.0 - - MACOS_SDK=macosx10.12 - - TVOS_SDK=appletvsimulator10.0 - - WATCHOS_SDK=watchsimulator3.0 - EXAMPLE_SCHEME="iOS Example" matrix: - - DESTINATION="OS=3.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=2.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" SDK="$WATCHOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=3.2,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=2.0,name=Apple Watch - 42mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=10.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES" - - DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES" + - DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" + - DESTINATION="OS=8.1,name=iPhone 4S" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO" - - DESTINATION="OS=10.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=10.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="OS=9.0,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" - - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" SDK="$MACOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" + - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" POD_LINT="NO" before_install: - gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet script: @@ -35,21 +34,21 @@ script: # Build Framework in Debug and Run Tests if specified - if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; else - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Build Framework in Release and Run Tests if specified - if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty; else - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Build Example in Debug if specified - if [ $BUILD_EXAMPLE == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; + xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty; fi # Run `pod lib lint` if specified diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.podspec b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.podspec index 22774c5..b5a16a8 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.podspec +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Alamofire' - s.version = '4.2.0' + s.version = '4.5.1' s.license = 'MIT' s.summary = 'Elegant HTTP Networking in Swift' s.homepage = 'https://github.com/Alamofire/Alamofire' diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/project.pbxproj b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/project.pbxproj index 1a82bb8..b028837 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/project.pbxproj +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/project.pbxproj @@ -57,8 +57,6 @@ 4C43669C1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C43669A1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift */; }; 4C43669D1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C43669A1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift */; }; 4C43669E1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C43669A1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift */; }; - 4C4CBE7B1BAF700C0024D659 /* String+AlamofireTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4CBE7A1BAF700C0024D659 /* String+AlamofireTests.swift */; }; - 4C4CBE7C1BAF700C0024D659 /* String+AlamofireTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4CBE7A1BAF700C0024D659 /* String+AlamofireTests.swift */; }; 4C574E6A1C67D207000B3128 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C574E691C67D207000B3128 /* Timeline.swift */; }; 4C574E6B1C67D207000B3128 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C574E691C67D207000B3128 /* Timeline.swift */; }; 4C574E6C1C67D207000B3128 /* Timeline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C574E691C67D207000B3128 /* Timeline.swift */; }; @@ -121,7 +119,6 @@ 4C743D331C22772F00BCB23E /* valid-dns-name.cer in Resources */ = {isa = PBXBuildFile; fileRef = 4C812C521B535F540017E0BF /* valid-dns-name.cer */; }; 4C743D341C22772F00BCB23E /* valid-uri.cer in Resources */ = {isa = PBXBuildFile; fileRef = 4C812C531B535F540017E0BF /* valid-uri.cer */; }; 4C80F9F81BB730EF001B46D2 /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0B62501BB1001C009302D3 /* Response.swift */; }; - 4C80F9F91BB730F6001B46D2 /* String+AlamofireTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C4CBE7A1BAF700C0024D659 /* String+AlamofireTests.swift */; }; 4C811F8D1B51856D00E0F59A /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C811F8C1B51856D00E0F59A /* ServerTrustPolicy.swift */; }; 4C811F8E1B51856D00E0F59A /* ServerTrustPolicy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C811F8C1B51856D00E0F59A /* ServerTrustPolicy.swift */; }; 4C9DCE781CB1BCE2003E6463 /* SessionDelegateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C9DCE771CB1BCE2003E6463 /* SessionDelegateTests.swift */; }; @@ -288,6 +285,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 316250E41F00ABE900E207A6 /* ISSUE_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = ISSUE_TEMPLATE.md; sourceTree = ""; }; + 316250E51F00ACD000E207A6 /* PULL_REQUEST_TEMPLATE.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = PULL_REQUEST_TEMPLATE.md; sourceTree = ""; }; 31ED52E61D73889D00199085 /* AFError+AlamofireTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AFError+AlamofireTests.swift"; sourceTree = ""; }; 4C0B58381B747A4400C0B99C /* ResponseSerializationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResponseSerializationTests.swift; sourceTree = ""; }; 4C0B62501BB1001C009302D3 /* Response.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Response.swift; sourceTree = ""; }; @@ -304,7 +303,6 @@ 4C3D00531C66A63000D1F709 /* NetworkReachabilityManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkReachabilityManager.swift; sourceTree = ""; }; 4C3D00571C66A8B900D1F709 /* NetworkReachabilityManagerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkReachabilityManagerTests.swift; sourceTree = ""; }; 4C43669A1D7BB93D00C38AAD /* DispatchQueue+Alamofire.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DispatchQueue+Alamofire.swift"; sourceTree = ""; }; - 4C4CBE7A1BAF700C0024D659 /* String+AlamofireTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+AlamofireTests.swift"; sourceTree = ""; }; 4C574E691C67D207000B3128 /* Timeline.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timeline.swift; sourceTree = ""; }; 4C811F8C1B51856D00E0F59A /* ServerTrustPolicy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerTrustPolicy.swift; sourceTree = ""; }; 4C812C3A1B535F220017E0BF /* alamofire-root-ca.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = "alamofire-root-ca.cer"; path = "alamofire.org/alamofire-root-ca.cer"; sourceTree = ""; }; @@ -320,6 +318,9 @@ 4C812C521B535F540017E0BF /* valid-dns-name.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = "valid-dns-name.cer"; path = "alamofire.org/valid-dns-name.cer"; sourceTree = ""; }; 4C812C531B535F540017E0BF /* valid-uri.cer */ = {isa = PBXFileReference; lastKnownFileType = file; name = "valid-uri.cer"; path = "alamofire.org/valid-uri.cer"; sourceTree = ""; }; 4C9DCE771CB1BCE2003E6463 /* SessionDelegateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SessionDelegateTests.swift; sourceTree = ""; }; + 4C9E88371F5FB3B0000BEC61 /* Alamofire 2.0 Migration Guide.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = "Alamofire 2.0 Migration Guide.md"; path = "Documentation/Alamofire 2.0 Migration Guide.md"; sourceTree = ""; }; + 4C9E88381F5FB3B0000BEC61 /* Alamofire 3.0 Migration Guide.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = "Alamofire 3.0 Migration Guide.md"; path = "Documentation/Alamofire 3.0 Migration Guide.md"; sourceTree = ""; }; + 4C9E88391F5FB3B0000BEC61 /* Alamofire 4.0 Migration Guide.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = "Alamofire 4.0 Migration Guide.md"; path = "Documentation/Alamofire 4.0 Migration Guide.md"; sourceTree = ""; }; 4CA028C41B7466C500C84163 /* ResultTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResultTests.swift; sourceTree = ""; }; 4CB928281C66BFBC00CE5F08 /* Notifications.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Notifications.swift; sourceTree = ""; }; 4CCB20681D4549E000C64D5B /* expired.badssl.com-leaf.cer */ = {isa = PBXFileReference; lastKnownFileType = file; path = "expired.badssl.com-leaf.cer"; sourceTree = ""; }; @@ -332,6 +333,12 @@ 4CDE2C421AF89F0900BABAE5 /* Validation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Validation.swift; sourceTree = ""; }; 4CDE2C451AF89FF300BABAE5 /* ResponseSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ResponseSerialization.swift; sourceTree = ""; }; 4CE2724E1AF88FB500F1D59A /* ParameterEncoding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ParameterEncoding.swift; sourceTree = ""; }; + 4CE292311EF4A393008DA555 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 4CE292321EF4A393008DA555 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = ""; }; + 4CE292331EF4A393008DA555 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = ""; }; + 4CE292391EF4B12B008DA555 /* Alamofire.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Alamofire.podspec; sourceTree = ""; }; + 4CE2923A1EF4B12B008DA555 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = ""; }; + 4CF3B4281F5FC7900075BE59 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 4CF626EF1BA7CB3E0011A099 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4CF626F81BA7CB3E0011A099 /* Alamofire tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Alamofire tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 4CFB028F1D7CF28F0056F249 /* FileManager+AlamofireTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "FileManager+AlamofireTests.swift"; sourceTree = ""; }; @@ -554,7 +561,6 @@ children = ( 31ED52E61D73889D00199085 /* AFError+AlamofireTests.swift */, 4CFB028F1D7CF28F0056F249 /* FileManager+AlamofireTests.swift */, - 4C4CBE7A1BAF700C0024D659 /* String+AlamofireTests.swift */, ); name = Extensions; sourceTree = ""; @@ -569,6 +575,16 @@ name = alamofire.org; sourceTree = ""; }; + 4C9E88361F5FB39F000BEC61 /* Migration Guides */ = { + isa = PBXGroup; + children = ( + 4C9E88371F5FB3B0000BEC61 /* Alamofire 2.0 Migration Guide.md */, + 4C9E88381F5FB3B0000BEC61 /* Alamofire 3.0 Migration Guide.md */, + 4C9E88391F5FB3B0000BEC61 /* Alamofire 4.0 Migration Guide.md */, + ); + name = "Migration Guides"; + sourceTree = ""; + }; 4CCB20671D4549E000C64D5B /* expired.badssl.com */ = { isa = PBXGroup; children = ( @@ -609,6 +625,29 @@ name = Features; sourceTree = ""; }; + 4CE292301EF4A386008DA555 /* Documentation */ = { + isa = PBXGroup; + children = ( + 4CE292321EF4A393008DA555 /* CHANGELOG.md */, + 4CE292331EF4A393008DA555 /* CONTRIBUTING.md */, + 316250E41F00ABE900E207A6 /* ISSUE_TEMPLATE.md */, + 316250E51F00ACD000E207A6 /* PULL_REQUEST_TEMPLATE.md */, + 4CE292311EF4A393008DA555 /* README.md */, + 4C9E88361F5FB39F000BEC61 /* Migration Guides */, + ); + name = Documentation; + sourceTree = ""; + }; + 4CE292381EF4B116008DA555 /* Deployment */ = { + isa = PBXGroup; + children = ( + 4CE292391EF4B12B008DA555 /* Alamofire.podspec */, + 4CF3B4281F5FC7900075BE59 /* LICENSE */, + 4CE2923A1EF4B12B008DA555 /* Package.swift */, + ); + name = Deployment; + sourceTree = ""; + }; 4CFB02E81D7D2FA20056F249 /* Responses */ = { isa = PBXGroup; children = ( @@ -667,6 +706,8 @@ F8111E2919A95C8B0040E7D1 = { isa = PBXGroup; children = ( + 4CE292381EF4B116008DA555 /* Deployment */, + 4CE292301EF4A386008DA555 /* Documentation */, F8111E3519A95C8B0040E7D1 /* Source */, F8111E3F19A95C8B0040E7D1 /* Tests */, F8111E3419A95C8B0040E7D1 /* Products */, @@ -905,7 +946,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0810; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = Alamofire; TargetAttributes = { 4CCB207C1D45563900C64D5B = { @@ -913,31 +954,31 @@ }; 4CF626EE1BA7CB3E0011A099 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 4CF626F71BA7CB3E0011A099 = { CreatedOnToolsVersion = 7.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; 4DD67C0A1A5C55C900ED2280 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; ProvisioningStyle = Manual; }; E4202FCD1B667AA100C997FB = { - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; F8111E3219A95C8B0040E7D1 = { CreatedOnToolsVersion = 6.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; F8111E3D19A95C8B0040E7D1 = { CreatedOnToolsVersion = 6.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; F829C6B11A7A94F100A2CD59 = { CreatedOnToolsVersion = 6.1.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -1169,7 +1210,6 @@ 4CF627211BA7CC240011A099 /* TLSEvaluationTests.swift in Sources */, 4CF627221BA7CC240011A099 /* UploadTests.swift in Sources */, 4C9DCE7A1CB1BCE2003E6463 /* SessionDelegateTests.swift in Sources */, - 4C80F9F91BB730F6001B46D2 /* String+AlamofireTests.swift in Sources */, 4CF6271E1BA7CC240011A099 /* MultipartFormDataTests.swift in Sources */, 31ED52EA1D73891C00199085 /* AFError+AlamofireTests.swift in Sources */, 4CF627201BA7CC240011A099 /* ServerTrustPolicyTests.swift in Sources */, @@ -1269,7 +1309,6 @@ 4C33A1431B52089C00873DFF /* ServerTrustPolicyTests.swift in Sources */, 4C341BBA1B1A865A00C1B34D /* CacheTests.swift in Sources */, 4C9DCE781CB1BCE2003E6463 /* SessionDelegateTests.swift in Sources */, - 4C4CBE7B1BAF700C0024D659 /* String+AlamofireTests.swift in Sources */, 4CA028C51B7466C500C84163 /* ResultTests.swift in Sources */, 31ED52E81D73891B00199085 /* AFError+AlamofireTests.swift in Sources */, 4CCFA79A1B2BE71600B6F460 /* URLProtocolTests.swift in Sources */, @@ -1297,7 +1336,6 @@ 4C33A1441B52089C00873DFF /* ServerTrustPolicyTests.swift in Sources */, 4C341BBB1B1A865A00C1B34D /* CacheTests.swift in Sources */, 4C9DCE791CB1BCE2003E6463 /* SessionDelegateTests.swift in Sources */, - 4C4CBE7C1BAF700C0024D659 /* String+AlamofireTests.swift in Sources */, 4CA028C61B7466C500C84163 /* ResultTests.swift in Sources */, 31ED52E91D73891C00199085 /* AFError+AlamofireTests.swift in Sources */, 4CCFA79B1B2BE71600B6F460 /* URLProtocolTests.swift in Sources */, @@ -1355,7 +1393,6 @@ 4CF627001BA7CB3E0011A099 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = marker; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1374,7 +1411,6 @@ 4CF627011BA7CB3E0011A099 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = bitcode; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1394,7 +1430,6 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = NO; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.Alamofire-tvOSTests"; @@ -1407,7 +1442,6 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = NO; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.Alamofire-tvOSTests"; @@ -1419,19 +1453,12 @@ 4DD67C1F1A5C55C900ED2280 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = marker; CODE_SIGN_IDENTITY = ""; - 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; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; @@ -1445,11 +1472,8 @@ 4DD67C201A5C55C900ED2280 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = bitcode; CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -1467,16 +1491,13 @@ E4202FDE1B667AA100C997FB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = marker; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULE_NAME = ""; PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.Alamofire; PRODUCT_NAME = Alamofire; SDKROOT = watchos; @@ -1488,16 +1509,13 @@ E4202FDF1B667AA100C997FB /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = bitcode; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = Source/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULE_NAME = ""; PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.Alamofire; PRODUCT_NAME = Alamofire; SDKROOT = watchos; @@ -1515,14 +1533,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = 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__DUPLICATE_METHOD_MATCH = YES; @@ -1553,6 +1579,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -1571,14 +1598,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_INTEGER = YES; + CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = 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__DUPLICATE_METHOD_MATCH = YES; @@ -1601,6 +1636,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -1614,7 +1650,6 @@ F8111E4719A95C8B0040E7D1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = marker; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1624,6 +1659,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.Alamofire; PRODUCT_NAME = Alamofire; + SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Debug; @@ -1631,7 +1667,6 @@ F8111E4819A95C8B0040E7D1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - BITCODE_GENERATION_MODE = bitcode; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1641,6 +1676,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.alamofire.Alamofire; PRODUCT_NAME = Alamofire; + SDKROOT = iphoneos; SKIP_INSTALL = YES; }; name = Release; @@ -1649,16 +1685,11 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = NO; - DEVELOPMENT_TEAM = ""; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = Debug; }; @@ -1666,12 +1697,11 @@ isa = XCBuildConfiguration; buildSettings = { APPLICATION_EXTENSION_API_ONLY = NO; - DEVELOPMENT_TEAM = ""; - FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; }; name = Release; }; @@ -1680,15 +1710,6 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = NO; CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; @@ -1702,11 +1723,6 @@ buildSettings = { APPLICATION_EXTENSION_API_ONLY = NO; CODE_SIGN_IDENTITY = ""; - COMBINE_HIDPI_IMAGES = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(DEVELOPER_FRAMEWORKS_DIR)", - "$(inherited)", - ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.$(PRODUCT_NAME:rfc1034identifier)"; diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire iOS.xcscheme b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire iOS.xcscheme index a48d654..ea18a45 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire iOS.xcscheme +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Alamofire iOS.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme index 33f938e..a8115ad 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Alamofire.xcodeproj/xcshareddata/xcschemes/Cleanup Whitespace.xcscheme @@ -1,6 +1,6 @@ @@ -36,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/CHANGELOG.md b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/CHANGELOG.md index 51da7fa..cf703af 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/CHANGELOG.md +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. `Alamofire` adheres to [Semantic Versioning](http://semver.org/). #### 4.x Releases +- `4.5.x` Releases - [4.5.0](#450) | [4.5.1](#451) +- `4.4.x` Releases - [4.4.0](#440) +- `4.3.x` Releases - [4.3.0](#430) - `4.2.x` Releases - [4.2.0](#420) - `4.1.x` Releases - [4.1.0](#410) - `4.0.x` Releases - [4.0.0](#400) | [4.0.1](#401) @@ -29,6 +32,227 @@ All notable changes to this project will be documented in this file. --- +## [4.5.1](https://github.com/Alamofire/Alamofire/releases/tag/4.5.1) +Released on 2017-09-06. All issues associated with this milestone can be found using this +[filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A4.5.1). + +#### Added +- GitHub templates for issues and pull requests. + - Added by [Jon Shier](https://github.com/jshier) in Pull Request + [#2179](https://github.com/Alamofire/Alamofire/pull/2179). +- Jazzy docs for the release to work with GitHub Pages. + - Added by [Aaron McTavish](https://github.com/aamctustwo) in Pull Request + [#2250](https://github.com/Alamofire/Alamofire/pull/2250). +- Dash support for Jazzy docs. + - Added by [Jon Shier](https://github.com/jshier). + +#### Updated +- The project to work with Xcode 9 beta 6 on Swift 3.2 and 4.0. + - Updated by [Jon Shier](https://github.com/jshier) in Pull Request + [#2198](https://github.com/Alamofire/Alamofire/pull/2198). +- The Travis CI config to work with Xcode 9 beta 6. + - Updated by [Jon Shier](https://github.com/jshier). +- The cURL representation logic to no longer force unwrap `URLCredential` values. + - Updated by [Andrey Chernoprudov](https://github.com/achernoprudov) in Pull Request + [#2184](https://github.com/Alamofire/Alamofire/pull/2184). +- The radars section of the README to split out open vs. resolved radars. + - Updated by [Christian Noon](https://github.com/cnoon) in Pull Request + [#2263](https://github.com/Alamofire/Alamofire/pull/2263). +- The installation section of the README to use the current version. + - Updated by [Kim de Vos](https://github.com/kimdv) in Pull Request + [#2266](https://github.com/Alamofire/Alamofire/pull/2266). + +#### Fixed +- Issue in `TaskDelegate` where task access was not thread safe. + - Fixed by [Jon Shier](https://github.com/jshier) in Pull Request + [#2190](https://github.com/Alamofire/Alamofire/pull/2190). +- Issue in AF 4 migration guide where supported iOS versions was incorrect. + - Fixed by [Antoine Cœur](https://github.com/Coeur) in Pull Request + [#2212](https://github.com/Alamofire/Alamofire/pull/2212). +- Issue in README sample code where PNG representation API was incorrect. + - Fixed by [Andy Ron](https://github.com/andyRon) in Pull Request + [#2244](https://github.com/Alamofire/Alamofire/pull/2244). +- Swift 3.2+ API warnings for `substring` APIs. + - Fixed by [htinlinn](https://github.com/htinlinn) in Pull Request + [#2240](https://github.com/Alamofire/Alamofire/pull/2240). + +## [4.5.0](https://github.com/Alamofire/Alamofire/releases/tag/4.5.0) +Released on 2017-06-16. All issues associated with this milestone can be found using this +[filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A4.5.0). + +#### Added +- Missing `@escaping` annotation for session delegate closures. + - Added by [Alexey Aleshkov](https://github.com/djmadcat) in Pull Request + [#1951](https://github.com/Alamofire/Alamofire/pull/1951). +- New `mapError`, `flatMapError`, `withValue`, `withError`, `ifSuccess`, and `ifFailure` APIs to `Result`. + - Added by [Jon Shier](https://github.com/jshier) in Pull Request + [#2135](https://github.com/Alamofire/Alamofire/pull/2135). + +#### Updated +- The Travis config file to Xcode 8.3. + - Updated by [Jon Shier](https://github.com/jshier) in Pull Request + [#2059](https://github.com/Alamofire/Alamofire/pull/2059). +- Response serialization implementation to use separate internal variable. + - Updated by [Eunju Amy Sohn](https://github.com/EJSohn) in Pull Request + [#2125](https://github.com/Alamofire/Alamofire/pull/2125). +- `SessionDelegate` internal implementation by removing redundant optional unwrap. + - Updated by [Boris Dušek](https://github.com/dusek) in Pull Request + [#2056](https://github.com/Alamofire/Alamofire/pull/2056). +- The `debugPrintable` implementation of `Request` to use `curl -v` instead of `curl -i` to be more verbose. + - Updated by [Simon Warta](https://github.com/webmaster128) in Pull Request + [#2070](https://github.com/Alamofire/Alamofire/pull/2070). +- The `MultipartFormData` contentType property to be mutable. + - Updated by [Eric Desa](https://github.com/ericdesa) in Pull Request + [#2072](https://github.com/Alamofire/Alamofire/pull/2072). +- Travis CI yaml file to enable watchOS 3.2 builds. + - Updated by [Jon Shier](https://github.com/jshier) in Pull Request + [#2135](https://github.com/Alamofire/Alamofire/pull/2135). +- Alamofire to build with Xcode 9 with Swift 3.2 and 4.0 in addition to Xcode 8.3 and Swift 3.1. + - Updated by [Jon Shier](https://github.com/jshier) in Pull Request + [#2163](https://github.com/Alamofire/Alamofire/pull/2163). + +#### Removed +- Custom string extension no longer needed in the test suite. + - Removed by [Nicholas Maccharoli](https://github.com/Nirma) in Pull Request + [#1994](https://github.com/Alamofire/Alamofire/pull/1994). + +#### Fixed +- Issue in the `URLProtocolTestCase` where HTTP header capitalization was wrong due to httpbin.org change. + - Fixed by [Natascha Fadeeva](https://github.com/Tanaschita) in Pull Request + [#2025](https://github.com/Alamofire/Alamofire/pull/2025). +- Issues and typos throughout the README documentation and sample code and source code docstrings. + - Fixed by + [Raphael R.](https://github.com/reitzig), + [helloyako](https://github.com/helloyako), + [DongHyuk Kim](https://github.com/sss989870), + [Bas Broek](https://github.com/BasThomas), + [Jorge Lucena](https://github.com/jorgifumi), + [MasahitoMizogaki](https://github.com/MMizogaki), + [José Manuel Sánchez](https://github.com/buscarini), + [SabinLee](https://github.com/SabinLee), + [Mat Trudel](https://github.com/mtrudel), + [Wolfgang Lutz](https://github.com/Lutzifer), and + [Christian Noon](https://github.com/cnoon) in Pull Requests + [#1995](https://github.com/Alamofire/Alamofire/pull/1995), + [#1997](https://github.com/Alamofire/Alamofire/pull/1997), + [#1998](https://github.com/Alamofire/Alamofire/pull/1998), + [#2022](https://github.com/Alamofire/Alamofire/pull/2022), + [#2031](https://github.com/Alamofire/Alamofire/pull/2031), + [#2035](https://github.com/Alamofire/Alamofire/pull/2035), + [#2080](https://github.com/Alamofire/Alamofire/pull/2080), + [#2081](https://github.com/Alamofire/Alamofire/pull/2081), + [#2092](https://github.com/Alamofire/Alamofire/pull/2092), + [#2095](https://github.com/Alamofire/Alamofire/pull/2095), + [#2104](https://github.com/Alamofire/Alamofire/pull/2104). +- Several warnings in the test suite related to Xcode 8.3. + - Fixed by [Jon Shier](https://github.com/jshier) in Pull Request + [#2057](https://github.com/Alamofire/Alamofire/pull/2057). +- Issue where reachability calculation incorrectly reported `.reachable` status with [`.connectionRequired`, `.isWWAN`] combination. + - Fixed by [Marco Santarossa](https://github.com/MarcoSantarossa) in Pull Request + [#2060](https://github.com/Alamofire/Alamofire/pull/2060). + +--- + +## [4.4.0](https://github.com/Alamofire/Alamofire/releases/tag/4.4.0) +Released on 2017-02-26. All issues associated with this milestone can be found using this +[filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A4.4.0). + +#### Added +- A new `Alamofire/Alamofire` Gitter channel and also added badge to the README. + - Added by [Christian Noon](https://github.com/cnoon). +- Functional extensions for Result, Data and Download Response. + - Added by [Gwendal Roué](https://github.com/groue) in Pull Request + [#1836](https://github.com/Alamofire/Alamofire/pull/1836). + +### Fixed +- Typo in the README in the Swift Package Manager section. + - Fixed by [Sebastian Limbach](https://github.com/bastilimbach) in Pull Request + [#1918](https://github.com/Alamofire/Alamofire/pull/1918). +- Issue in the "Modifying the Session Configuration" example code of the README where the + `defaultHTTPHeaders` property was called incorrectly. + - Fixed by [Artur Antonov](https://github.com/goingreen) in Pull Request + [#1927](https://github.com/Alamofire/Alamofire/pull/1927). +- Issue in the "Security" section of the README where some example code was outdated. + - Fixed by [Jon Shier](https://github.com/jshier) in Pull Request + [#1973](https://github.com/Alamofire/Alamofire/pull/1973). +- Issue in the README where the POST request with parameters example was using the wrong method. + - Fixed by [Pablo Bartolome](https://github.com/pbartolome) in Pull Request + [#1984](https://github.com/Alamofire/Alamofire/pull/1984). +- Issue where `taskDidComplete` override closure was not calling task delegate leading to + potential memory leaks. + - Fixed by [Jon Shier](https://github.com/jshier) in regards to Issue + [#1938](https://github.com/Alamofire/Alamofire/pull/1938). + +--- + +## [4.3.0](https://github.com/Alamofire/Alamofire/releases/tag/4.3.0) +Released on 2017-01-15. All issues associated with this milestone can be found using this +[filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A4.3.0). + +#### Added +- The host and path to router example in README. + - Added by [Michael](https://github.com/muescha) in Pull Request + [#1830](https://github.com/Alamofire/Alamofire/pull/1830). +- A `macOS` disclaimer to download request example in README. + - Added by [Christian Noon](https://github.com/cnoon) in regards to Issue + [#1818](https://github.com/Alamofire/Alamofire/issues/1818). +- New `value` and `error` computed properties to data and download responses. + - Added by [Christian Noon](https://github.com/cnoon) in Pull request + [#1865](https://github.com/Alamofire/Alamofire/pull/1865). +- The HTTP method to the data and download response debug descriptions. + - Added by [Jon Shier](https://github.com/jshier) in Pull request + [#1880](https://github.com/Alamofire/Alamofire/pull/1880). +- A README entry about installing through SPM. + - Added by [Jon Shier](https://github.com/jshier) in Pull request + [#1898](https://github.com/Alamofire/Alamofire/pull/1898). +- The `dependencies` parameter to `Package` file for SPM since it's now required. + - Added by [Arnaldo Capo](https://github.com/cyberdude) in Pull request + [#1905](https://github.com/Alamofire/Alamofire/pull/1905). +- TLS evaluation tests for revoked certs for no policy and default policy. + - Added by [Christian Noon](https://github.com/cnoon). +- New server trust policy for revoked certificates along with matching tests. + - Added by [Wataru Suzuki](https://github.com/WataruSuzuki) in Pull request + [#1822](https://github.com/Alamofire/Alamofire/pull/1822). + +#### Updated +- Project to Xcode 8.2 recommend settings. + - Updated by [Jon Shier](https://github.com/jshier) in Pull request + [#1854](https://github.com/Alamofire/Alamofire/pull/1854). +- The `NetworkReachabilityManager` to have a `public` instead of `open` ACL. + - Updated by [Christian Noon](https://github.com/cnoon) in regards to Issue + [#1809](https://github.com/Alamofire/Alamofire/issues/1809). +- The initializers for both default responses public and added metrics parameter. + - Updated by [Christian Noon](https://github.com/cnoon) in Pull Request + [#1865](https://github.com/Alamofire/Alamofire/pull/1865). +- Internals by replacing `syncResult` extension with DispatchQueue `sync`. + - Updated by [Alexander Ignition](https://github.com/Alexander-Ignition) in Pull Request + [#1893](https://github.com/Alamofire/Alamofire/pull/1893). +- TLS tests for tvOS 10.1 and added expiration test for revoked evaluation. + - Updated by [Christian Noon](https://github.com/cnoon). + +#### Fixed +- `DownloadRequest` sample code issue in AF 4 migration guide. + - Fixed by [Luca Torella](https://github.com/lucatorella) in Pull Request + [#1802](https://github.com/Alamofire/Alamofire/pull/1802). +- `URLConvertible` compiler issue in the README example. + - Fixed by [Wu Zhong](https://github.com/zhongwuzw) in Pull Request + [#1844](https://github.com/Alamofire/Alamofire/pull/1844). +- An invalid comment in AF 4 migration guide. + - Fixed by [Tom Brow](https://github.com/brow) in Pull Request + [#1863](https://github.com/Alamofire/Alamofire/pull/1863). +- An issue where the `SessionManager` did not respect retry time delay. + - Fixed by [Christian Noon](https://github.com/cnoon) in Pull Request + [#1864](https://github.com/Alamofire/Alamofire/pull/1864) in regards to Issue + [#1853](https://github.com/Alamofire/Alamofire/issues/1853). +- A broken reference link in the README. + - Fixed by [Ulug'bek Ro'zimboyev](https://github.com/ulugbekrozimboyev) in Pull Request + [#1866](https://github.com/Alamofire/Alamofire/pull/1866). +- Compiler issues in `RequestAdapter` and `RequestRetrier` examples in README. + - Fixed by [William Entriken](https://github.com/fulldecent) in Pull Request + [#1916](https://github.com/Alamofire/Alamofire/pull/1916). + +--- + ## [4.2.0](https://github.com/Alamofire/Alamofire/releases/tag/4.2.0) Released on 2016-11-20. All issues associated with this milestone can be found using this [filter](https://github.com/Alamofire/Alamofire/issues?utf8=✓&q=milestone%3A4.2.0). @@ -641,7 +865,7 @@ Released on 2016-03-23. All issues associated with this milestone can be found u [#1099](https://github.com/Alamofire/Alamofire/pull/1099). #### Updated -- The `User-Agent` header implementation to use more aggresive type-safety checks. +- The `User-Agent` header implementation to use more aggressive type-safety checks. - Updated by [Christian Noon](https://github.com/cnoon) in regards to Issue [#1100](https://github.com/Alamofire/Alamofire/issues/1100). - All shared response serializers to accept a custom queue for execution. diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Documentation/Alamofire 4.0 Migration Guide.md b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Documentation/Alamofire 4.0 Migration Guide.md index 4ec266c..2902dc6 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Documentation/Alamofire 4.0 Migration Guide.md +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Documentation/Alamofire 4.0 Migration Guide.md @@ -28,7 +28,7 @@ This guide is provided in order to ease the transition of existing applications - Xcode 8.1+ - Swift 3.0+ -For those of you that would like to use Alamofire on iOS 8 or macOS 10.9, please use the latest tagged 3.x release which supports both Swift 2.2 and 2.3. +For those of you that would like to use Alamofire on macOS 10.9, please use the latest tagged 3.x release which supports both Swift 2.2 and 2.3. ## Benefits of Upgrading @@ -120,7 +120,7 @@ Alamofire.request(urlString, method: .get, parameters: parameters, encoding: JSO ```swift // Alamofire 3 -let destination = Request.suggestedDownloadDestination() +let destination = DownloadRequest.suggestedDownloadDestination() Alamofire.download(.GET, urlString, destination: destination).response { request, response, data, error in // What is fileURL...not easy to get @@ -131,7 +131,7 @@ Alamofire.download(.GET, urlString, destination: destination).response { request } // Alamofire 4 -let destination = Request.suggestedDownloadDestination() +let destination = DownloadRequest.suggestedDownloadDestination() Alamofire.download(urlString, to: destination).response { response in // method defaults to `.get` print(response.request) @@ -146,7 +146,7 @@ Alamofire.download(urlString, to: destination).response { response in // method ```swift // Alamofire 3 -let destination = Request.suggestedDownloadDestination() +let destination = DownloadRequest.suggestedDownloadDestination() Alamofire.download(urlRequest, destination: destination).validate().responseData { response in // What is fileURL...not easy to get @@ -457,7 +457,7 @@ Alamofire 4 contains many new features and enhancements on existing ones. This s ### Errors -Alamofire 4 contains a completely new error system that adopts the new pattern proposed in [SE-0112](https://github.com/apple/swift-evolution/blob/master/proposals/0112-nserror-bridging.md). At the heart of the new error system is `AFError`, a new `Error` type enumeration backed by four main cases. +Alamofire 4 contains a completely new error system that adopts the new pattern proposed in [SE-0112](https://github.com/apple/swift-evolution/blob/master/proposals/0112-nserror-bridging.md). At the heart of the new error system is `AFError`, a new `Error` type enumeration backed by five main cases. - `.invalidURL(url: URLConvertible)` - Returned when a `URLConvertible` type fails to create a valid `URL`. - `.parameterEncodingFailed(reason: ParameterEncodingFailureReason)` - Returned when a parameter encoding object throws an error during the encoding process. @@ -699,7 +699,7 @@ Alamofire.download(urlString).responseData { response in } ``` -> We'll cover the `DownloadResponse` type in more detail in the [Reponse Serializers](#response-serializers) section. +> We'll cover the `DownloadResponse` type in more detail in the [Response Serializers](#response-serializers) section. #### Download Options diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/AppDelegate.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/AppDelegate.swift index 63b1744..3e8f12f 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/AppDelegate.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/AppDelegate.swift @@ -1,7 +1,7 @@ // // AppDelegate.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/DetailViewController.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/DetailViewController.swift index 90f47be..342b244 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/DetailViewController.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/DetailViewController.swift @@ -1,7 +1,7 @@ // // DetailViewController.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/MasterViewController.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/MasterViewController.swift index ae29480..1a134ff 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/MasterViewController.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/Source/MasterViewController.swift @@ -1,7 +1,7 @@ // // MasterViewController.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/project.pbxproj b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/project.pbxproj index 9ca6f0e..3c1704b 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/project.pbxproj +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/project.pbxproj @@ -163,8 +163,7 @@ 4C6D2C7F1C67EFE100846168 /* MasterViewController.swift */, F8111E0819A951050040E7D1 /* Supporting Files */, ); - name = Source; - path = Example; + path = Source; sourceTree = ""; }; F8111E0819A951050040E7D1 /* Supporting Files */ = { @@ -206,12 +205,12 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0900; ORGANIZATIONNAME = Alamofire; TargetAttributes = { F8111E0419A951050040E7D1 = { CreatedOnToolsVersion = 6.0; - LastSwiftMigration = 0800; + LastSwiftMigration = 0900; }; }; }; @@ -344,14 +343,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = 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__DUPLICATE_METHOD_MATCH = YES; @@ -375,12 +380,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -396,14 +402,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = 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_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = 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__DUPLICATE_METHOD_MATCH = YES; @@ -420,10 +432,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.11; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -437,14 +451,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = Resources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.iOS-Example"; PRODUCT_NAME = "iOS Example"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -453,14 +463,10 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - CLANG_ENABLE_MODULES = YES; INFOPLIST_FILE = Resources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.alamofire.iOS-Example"; PRODUCT_NAME = "iOS Example"; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme index 47467c4..a322c5a 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Example/iOS Example.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme @@ -1,6 +1,6 @@ 0.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + claide (1.0.2) + cocoapods (1.3.1) + activesupport (>= 4.0.2, < 5) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.3.1) + cocoapods-deintegrate (>= 1.0.1, < 2.0) + cocoapods-downloader (>= 1.1.3, < 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.2.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (~> 2.0.1) + gh_inspector (~> 1.0) + molinillo (~> 0.5.7) + nap (~> 1.0) + ruby-macho (~> 1.1) + xcodeproj (>= 1.5.1, < 2.0) + cocoapods-core (1.3.1) + activesupport (>= 4.0.2, < 6) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + cocoapods-deintegrate (1.0.1) + cocoapods-downloader (1.1.3) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.0) + cocoapods-stats (1.0.0) + cocoapods-trunk (1.2.0) + nap (>= 0.8, < 2.0) + netrc (= 0.7.8) + cocoapods-try (1.1.0) + colored2 (3.1.2) + escape (0.0.4) + ffi (1.9.18) + fourflusher (2.0.1) + fuzzy_match (2.0.4) + gh_inspector (1.0.3) + i18n (0.8.6) + jazzy (0.8.3) + cocoapods (~> 1.0) + mustache (~> 0.99) + open4 + redcarpet (~> 3.2) + rouge (~> 1.5) + sass (~> 3.4) + sqlite3 (~> 1.3) + xcinvoke (~> 0.3.0) + liferaft (0.0.6) + minitest (5.10.3) + molinillo (0.5.7) + mustache (0.99.8) + nanaimo (0.2.3) + nap (1.1.0) + netrc (0.7.8) + open4 (1.3.4) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + redcarpet (3.4.0) + rouge (1.11.1) + ruby-macho (1.1.0) + sass (3.5.1) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sqlite3 (1.3.13) + thread_safe (0.3.6) + tzinfo (1.2.3) + thread_safe (~> 0.1) + xcinvoke (0.3.0) + liferaft (~> 0.0.6) + xcodeproj (1.5.1) + CFPropertyList (~> 2.3.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.2.3) + +PLATFORMS + ruby + +DEPENDENCIES + cocoapods + jazzy + +BUNDLED WITH + 1.15.4 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/ISSUE_TEMPLATE.md b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..e7576da --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/ISSUE_TEMPLATE.md @@ -0,0 +1,33 @@ +> ℹ Please fill out this template when filing an issue. +> All lines beginning with an ℹ symbol instruct you with what info we expect. You can delete those lines once you've filled in the info. +> +> Per our [*CONTRIBUTING guidelines](https://github.com/Alamofire/Alamofire/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 `alamofire`. +> +> 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/Alamofire/Alamofire/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. + +## Alamofire Environment + +**Alamofire version:** +**Xcode version:** +**Swift version:** +**Platform(s) running Alamofire:** +**macOS version running Xcode:** + +## Demo Project + +ℹ Please link to or upload a project we can download that reproduces the issue. diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/LICENSE b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/LICENSE index 4cfbf72..1654602 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/LICENSE +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/PULL_REQUEST_TEMPLATE.md b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6e04c37 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,13 @@ +### Issue Link :link: + + +### Goals :soccer: + + + +### Implementation Details :construction: + + + +### Testing Details :mag: + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Package.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Package.swift index c8f82ee..e8bd6d6 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Package.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Package.swift @@ -1,28 +1,27 @@ -// Package.swift // -// Copyright (c) 2014–2016 Alamofire Software Foundation (http://alamofire.org/) +// Package.swift // -// 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: +// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/) // -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. +// 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. // -// 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: "Alamofire", - exclude: ["Tests"] -) +let package = Package(name: "Alamofire", dependencies : [], exclude: ["Tests"]) diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/README.md b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/README.md index f16157e..f190df9 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/README.md +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/README.md @@ -1,10 +1,11 @@ -![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/assets/alamofire.png) +![Alamofire: Elegant Networking in Swift](https://raw.githubusercontent.com/Alamofire/Alamofire/master/alamofire.png) [![Build Status](https://travis-ci.org/Alamofire/Alamofire.svg?branch=master)](https://travis-ci.org/Alamofire/Alamofire) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Alamofire.svg)](https://img.shields.io/cocoapods/v/Alamofire.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/Alamofire.svg?style=flat)](http://cocoadocs.org/docsets/Alamofire) +[![Platform](https://img.shields.io/cocoapods/p/Alamofire.svg?style=flat)](https://alamofire.github.io/Alamofire) [![Twitter](https://img.shields.io/badge/twitter-@AlamofireSF-blue.svg?style=flat)](http://twitter.com/AlamofireSF) +[![Gitter](https://badges.gitter.im/Alamofire/Alamofire.svg)](https://gitter.im/Alamofire/Alamofire?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) Alamofire is an HTTP networking library written in Swift. @@ -44,7 +45,7 @@ Alamofire is an HTTP networking library written in Swift. - [x] TLS Certificate and Public Key Pinning - [x] Network Reachability - [x] Comprehensive Unit and Integration Test Coverage -- [x] [Complete Documentation](http://cocoadocs.org/docsets/Alamofire) +- [x] [Complete Documentation](https://alamofire.github.io/Alamofire) ## Component Libraries @@ -56,8 +57,8 @@ In order to keep Alamofire focused specifically on core networking implementatio ## Requirements - iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Xcode 8.1+ -- Swift 3.0+ +- Xcode 8.3+ +- Swift 3.1+ ## Migration Guides @@ -83,7 +84,7 @@ In order to keep Alamofire focused specifically on core networking implementatio $ gem install cocoapods ``` -> CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+. +> CocoaPods 1.1+ is required to build Alamofire 4.0+. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your `Podfile`: @@ -93,7 +94,7 @@ platform :ios, '10.0' use_frameworks! target '' do - pod 'Alamofire', '~> 4.0' + pod 'Alamofire', '~> 4.5' end ``` @@ -117,28 +118,40 @@ $ brew install carthage To integrate Alamofire into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "Alamofire/Alamofire" ~> 4.0 +github "Alamofire/Alamofire" ~> 4.5 ``` Run `carthage update` to build the framework and drag the built `Alamofire.framework` into your Xcode project. +### Swift Package Manager + +The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Alamofire does support its use on supported platforms. + +Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. + +```swift +dependencies: [ + .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4) +] +``` + ### Manually -If you prefer not to use either of the aforementioned dependency managers, you can integrate Alamofire into your project manually. +If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually. #### Embedded Framework - Open up Terminal, `cd` into your top-level project directory, and run the following command "if" your project is not initialized as a git repository: ```bash -$ git init -``` + $ git init + ``` - Add Alamofire as a git [submodule](http://git-scm.com/docs/git-submodule) by running the following command: ```bash -$ git submodule add https://github.com/Alamofire/Alamofire.git -``` + $ git submodule add https://github.com/Alamofire/Alamofire.git + ``` - Open the new `Alamofire` folder, and drag the `Alamofire.xcodeproj` into the Project Navigator of your application's Xcode project. @@ -178,13 +191,16 @@ Handling the `Response` of a `Request` made in Alamofire involves chaining a res ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - print(response.request) // original URL request - print(response.response) // HTTP URL response - print(response.data) // server data - print(response.result) // result of response serialization + print("Request: \(String(describing: response.request))") // original url request + print("Response: \(String(describing: response.response))") // http url response + print("Result: \(response.result)") // response serialization result - if let JSON = response.result.value { - print("JSON: \(JSON)") + if let json = response.result.value { + print("JSON: \(json)") // serialized json response + } + + if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) { + print("Data: \(utf8Text)") // original server data as UTF8 string } } ``` @@ -230,7 +246,7 @@ func responsePropertyList( None of the response handlers perform any validation of the `HTTPURLResponse` it gets back from the server. -> For example, response status codes in the `400..<499` and `500..<599` ranges do NOT automatically trigger an `Error`. Alamofire uses [Response Validation](#response-validation) method chaining to achieve this. +> For example, response status codes in the `400..<500` and `500..<600` ranges do NOT automatically trigger an `Error`. Alamofire uses [Response Validation](#response-validation) method chaining to achieve this. #### Response Handler @@ -332,18 +348,18 @@ Alamofire.request("https://httpbin.org/get") .validate(statusCode: 200..<300) .validate(contentType: ["application/json"]) .responseData { response in - switch response.result { - case .success: - print("Validation Successful") - case .failure(let error): - print(error) - } + switch response.result { + case .success: + print("Validation Successful") + case .failure(let error): + print(error) + } } ``` #### Automatic Validation -Automatically validates status code within `200...299` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. +Automatically validates status code within `200..<300` range, and that the `Content-Type` header of the response matches the `Accept` header of the request, if one is provided. ```swift Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in @@ -433,9 +449,9 @@ let parameters: Parameters = [ ] // All three of these calls are equivalent -Alamofire.request("https://httpbin.org/post", parameters: parameters) -Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.default) -Alamofire.request("https://httpbin.org/post", parameters: parameters, encoding: URLEncoding.httpBody) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: URLEncoding.default) +Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: URLEncoding.httpBody) // HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3 ``` @@ -478,7 +494,7 @@ struct JSONStringArrayEncoding: ParameterEncoding { } func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { - var urlRequest = urlRequest.urlRequest + var urlRequest = try urlRequest.asURLRequest() let data = try JSONSerialization.data(withJSONObject: array, options: []) @@ -595,11 +611,13 @@ Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)") Requests made in Alamofire that fetch data from a server can download the data in-memory or on-disk. The `Alamofire.request` APIs used in all the examples so far always downloads the server data in-memory. This is great for smaller payloads because it's more efficient, but really bad for larger payloads because the download could run your entire application out-of-memory. Because of this, you can also use the `Alamofire.download` APIs to download the server data to a temporary file on-disk. +> This will only work on `macOS` as is. Other platforms don't allow access to the filesystem outside of your app's sandbox. To download files on other platforms, see the [Download File Destination](#download-file-destination) section. + ```swift Alamofire.download("https://httpbin.org/image/png").responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -614,8 +632,8 @@ You can also provide a `DownloadFileDestination` closure to move the file from t ```swift let destination: DownloadRequest.DownloadFileDestination = { _, _ in - let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] - let fileURL = documentsURL.appendPathComponent("pig.png") + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendingPathComponent("pig.png") return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) } @@ -623,16 +641,16 @@ let destination: DownloadRequest.DownloadFileDestination = { _, _ in Alamofire.download(urlString, to: destination).response { response in print(response) - if response.error == nil, let imagePath = response.destinationURL?.path { - let image = UIImage(contentsOfFile: imagePath) - } + if response.error == nil, let imagePath = response.destinationURL?.path { + let image = UIImage(contentsOfFile: imagePath) + } } ``` You can also use the suggested download destination API. ```swift -let destination = DownloadRequest.suggestedDownloadDestination(directory: .documentDirectory) +let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory) Alamofire.download("https://httpbin.org/image/png", to: destination) ``` @@ -646,9 +664,9 @@ Alamofire.download("https://httpbin.org/image/png") print("Download Progress: \(progress.fractionCompleted)") } .responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -662,9 +680,9 @@ Alamofire.download("https://httpbin.org/image/png") print("Download Progress: \(progress.fractionCompleted)") } .responseData { response in - if let data = response.result.value { - let image = UIImage(data: data) - } + if let data = response.result.value { + let image = UIImage(data: data) + } } ``` @@ -676,34 +694,34 @@ If a `DownloadRequest` is cancelled or interrupted, the underlying URL session m ```swift class ImageRequestor { - private var resumeData: Data? - private var image: UIImage? + private var resumeData: Data? + private var image: UIImage? func fetchImage(completion: (UIImage?) -> Void) { - guard image == nil else { completion(image) ; return } + guard image == nil else { completion(image) ; return } - let destination: DownloadRequest.DownloadFileDestination = { _, _ in - let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] - let fileURL = documentsURL.appendPathComponent("pig.png") + let destination: DownloadRequest.DownloadFileDestination = { _, _ in + let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0] + let fileURL = documentsURL.appendingPathComponent("pig.png") - return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) - } + return (fileURL, [.removePreviousFile, .createIntermediateDirectories]) + } - let request: DownloadRequest + let request: DownloadRequest if let resumeData = resumeData { - request = Alamofire.download(resumingWith: resumeData) - } else { - request = Alamofire.download("https://httpbin.org/image/png") + request = Alamofire.download(resumingWith: resumeData) + } else { + request = Alamofire.download("https://httpbin.org/image/png") } request.responseData { response in - switch response.result { - case .success(let data): - self.image = UIImage(data: data) - case .failure: - self.resumeData = response.resumeData - } + switch response.result { + case .success(let data): + self.image = UIImage(data: data) + case .failure: + self.resumeData = response.resumeData + } } } } @@ -718,7 +736,7 @@ When sending relatively small amounts of data to a server using JSON or URL enco #### Uploading Data ```swift -let imageData = UIPNGRepresentation(image)! +let imageData = UIImagePNGRepresentation(image)! Alamofire.upload(imageData, to: "https://httpbin.org/post").responseJSON { response in debugPrint(response) @@ -801,7 +819,7 @@ In iOS and tvOS 10 and macOS 10.12, Apple introduced the new [URLSessionTaskMetr ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - print(response.metrics) + print(response.metrics) } ``` @@ -809,8 +827,8 @@ It's important to note that these APIs are only available on iOS and tvOS 10 and ```swift Alamofire.request("https://httpbin.org/get").responseJSON { response in - if #available(iOS 10.0. *) { - print(response.metrics) + if #available(iOS 10.0, *) { + print(response.metrics) } } ``` @@ -839,10 +857,10 @@ Outputs: ```bash $ curl -i \ - -H "User-Agent: Alamofire/4.0.0" \ - -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \ - -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ - "https://httpbin.org/get?foo=bar" + -H "User-Agent: Alamofire/4.0.0" \ + -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \ + -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \ + "https://httpbin.org/get?foo=bar" ``` --- @@ -899,7 +917,7 @@ let sessionManager = Alamofire.SessionManager(configuration: configuration) #### Modifying the Session Configuration ```swift -var defaultHeaders = Alamofire.SessionManager.default.defaultHTTPHeaders +var defaultHeaders = Alamofire.SessionManager.defaultHTTPHeaders defaultHeaders["DNT"] = "1 (Do Not Track Enabled)" let configuration = URLSessionConfiguration.default @@ -1010,8 +1028,8 @@ Alamofire.request(urlString, method: .post) let url = URL(string: urlString)! Alamofire.request(url, method: .post) -let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true) -Alamofire.request(.post, URLComponents) +let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true)! +Alamofire.request(urlComponents, method: .post) ``` Applications interacting with web applications in a significant manner are encouraged to have custom types conform to `URLConvertible` as a convenient way to map domain-specific models to server resources. @@ -1088,7 +1106,7 @@ enum Router: URLRequestConvertible { ``` ```swift -Alamofire.request(Router.search(query: "foo bar", page: 1)) // ?q=foo%20bar&offset=50 +Alamofire.request(Router.search(query: "foo bar", page: 1)) // https://example.com/search?q=foo%20bar&offset=50 ``` ##### CRUD & Authorization @@ -1153,7 +1171,7 @@ enum Router: URLRequestConvertible { ``` ```swift -Alamofire.request(Router.readUser("mattt")) // GET /users/mattt +Alamofire.request(Router.readUser("mattt")) // GET https://example.com/users/mattt ``` ### Adapting and Retrying Requests @@ -1168,20 +1186,20 @@ The `RequestAdapter` protocol allows each `Request` made on a `SessionManager` t ```swift class AccessTokenAdapter: RequestAdapter { - private let accessToken: String + private let accessToken: String - init(accessToken: String) { - self.accessToken = accessToken - } + init(accessToken: String) { + self.accessToken = accessToken + } - func adapt(_ urlRequest: URLRequest) throws -> URLRequest { - var urlRequest = urlRequest + func adapt(_ urlRequest: URLRequest) throws -> URLRequest { + var urlRequest = urlRequest - if urlRequest.urlString.hasPrefix("https://httpbin.org") { - urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") - } + if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix("https://httpbin.org") { + urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") + } - return urlRequest + return urlRequest } } ``` @@ -1234,7 +1252,7 @@ class OAuth2Handler: RequestAdapter, RequestRetrier { // MARK: - RequestAdapter func adapt(_ urlRequest: URLRequest) throws -> URLRequest { - if let url = urlRequest.url, url.urlString.hasPrefix(baseURLString) { + if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix(baseURLString) { var urlRequest = urlRequest urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization") return urlRequest @@ -1248,7 +1266,7 @@ class OAuth2Handler: RequestAdapter, RequestRetrier { func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) { lock.lock() ; defer { lock.unlock() } - if let response = request.task.response as? HTTPURLResponse, response.statusCode == 401 { + if let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401 { requestsToRetry.append(completion) if !isRefreshing { @@ -1338,6 +1356,94 @@ Another important note is that this authentication system could be shared betwee ### Custom Response Serialization +Alamofire provides built-in response serialization for data, strings, JSON, and property lists: + +```swift +Alamofire.request(...).responseData { (resp: DataResponse) in ... } +Alamofire.request(...).responseString { (resp: DataResponse) in ... } +Alamofire.request(...).responseJSON { (resp: DataResponse) in ... } +Alamofire.request(...).responsePropertyList { resp: DataResponse) in ... } +``` + +Those responses wrap deserialized *values* (Data, String, Any) or *errors* (network, validation errors), as well as *meta-data* (URL request, HTTP headers, status code, [metrics](#statistical-metrics), ...). + +You have several ways to customize all of those response elements: + +- [Response Mapping](#response-mapping) +- [Handling Errors](#handling-errors) +- [Creating a Custom Response Serializer](#creating-a-custom-response-serializer) +- [Generic Response Object Serialization](#generic-response-object-serialization) + +#### Response Mapping + +Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response `DataResponse` into a response that holds an application model, such as `DataResponse`. You perform response mapping with the `DataResponse.map` method: + +```swift +Alamofire.request("https://example.com/users/mattt").responseJSON { (response: DataResponse) in + let userResponse = response.map { json in + // We assume an existing User(json: Any) initializer + return User(json: json) + } + + // Process userResponse, of type DataResponse: + if let user = userResponse.value { + print("User: { username: \(user.username), name: \(user.name) }") + } +} +``` + +When the transformation may throw an error, use `flatMap` instead: + +```swift +Alamofire.request("https://example.com/users/mattt").responseJSON { response in + let userResponse = response.flatMap { json in + try User(json: json) + } +} +``` + +Response mapping is a good fit for your custom completion handlers: + +```swift +@discardableResult +func loadUser(completionHandler: @escaping (DataResponse) -> Void) -> Alamofire.DataRequest { + return Alamofire.request("https://example.com/users/mattt").responseJSON { response in + let userResponse = response.flatMap { json in + try User(json: json) + } + + completionHandler(userResponse) + } +} + +loadUser { response in + if let user = response.value { + print("User: { username: \(user.username), name: \(user.name) }") + } +} +``` + +When the map/flatMap closure may process a big amount of data, make sure you execute it outside of the main thread: + +```swift +@discardableResult +func loadUser(completionHandler: @escaping (DataResponse) -> Void) -> Alamofire.DataRequest { + let utilityQueue = DispatchQueue.global(qos: .utility) + + return Alamofire.request("https://example.com/users/mattt").responseJSON(queue: utilityQueue) { response in + let userResponse = response.flatMap { json in + try User(json: json) + } + + DispatchQueue.main.async { + completionHandler(userResponse) + } + } +} +``` + +`map` and `flatMap` are also available for [download responses](#downloading-data-to-a-file). + #### Handling Errors Before implementing custom response serializers or object serialization methods, it's important to consider how to handle any errors that may occur. There are two basic options: passing existing errors along unmodified, to be dealt with at response time; or, wrapping all errors in an `Error` type specific to your app. @@ -1564,7 +1670,7 @@ The `ServerTrustPolicy` enumeration evaluates the server trust generally provide ```swift let serverTrustPolicy = ServerTrustPolicy.pinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), + certificates: ServerTrustPolicy.certificates(), validateCertificateChain: true, validateHost: true ) @@ -1585,7 +1691,7 @@ The `ServerTrustPolicyManager` is responsible for storing an internal mapping of ```swift let serverTrustPolicies: [String: ServerTrustPolicy] = [ "test.example.com": .pinCertificates( - certificates: ServerTrustPolicy.certificatesInBundle(), + certificates: ServerTrustPolicy.certificates(), validateCertificateChain: true, validateHost: true ), @@ -1646,24 +1752,24 @@ If you run into this problem (high probability with self-signed certificates), y ```xml - NSAppTransportSecurity - - NSExceptionDomains - - example.com - - NSExceptionAllowsInsecureHTTPLoads - - NSExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - NSTemporaryExceptionMinimumTLSVersion - TLSv1.2 - - - + NSAppTransportSecurity + + NSExceptionDomains + + example.com + + NSExceptionAllowsInsecureHTTPLoads + + NSExceptionRequiresForwardSecrecy + + NSIncludesSubdomains + + + NSTemporaryExceptionMinimumTLSVersion + TLSv1.2 + + + ``` @@ -1686,6 +1792,7 @@ manager?.startListening() ``` > Make sure to remember to retain the `manager` in the above example, or no status changes will be reported. +> Also, do not include the scheme in the `host` string or reachability won't function correctly. There are some important things to remember when using network reachability to determine what to do next. @@ -1705,10 +1812,15 @@ There are some important things to remember when using network reachability to d The following radars have some effect on the current implementation of Alamofire. - [`rdar://21349340`](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case -- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage - `rdar://26870455` - Background URL Session Configurations do not work in the simulator - `rdar://26849668` - Some URLProtocol APIs do not properly handle `URLRequest` +## Resolved Radars + +The following radars have been resolved over time after being filed against the Alamofire project. + +- [`rdar://26761490`](http://www.openradar.me/radar?id=5010235949318144) - Swift string interpolation causing memory leak with common usage (Resolved on 9/1/17 in Xcode 9 beta 6). + ## FAQ ### What's the origin of the name Alamofire? @@ -1747,4 +1859,4 @@ The community adoption of the ASF libraries has been amazing. We are greatly hum ## License -Alamofire is released under the MIT license. See LICENSE for details. +Alamofire is released under the MIT license. [See LICENSE](https://github.com/Alamofire/Alamofire/blob/master/LICENSE) for details. diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/AFError.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/AFError.swift index f047695..585ae14 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/AFError.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/AFError.swift @@ -1,7 +1,7 @@ // // AFError.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.h b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.h index 8d45b77..4e651df 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.h +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.h @@ -1,7 +1,7 @@ // // Alamofire.h // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.swift index 86d54d8..e971613 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Alamofire.swift @@ -1,7 +1,7 @@ // // Alamofire.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -53,7 +53,7 @@ extension URL: URLConvertible { } extension URLComponents: URLConvertible { - /// Returns a URL if `url` is not nil, otherise throws an `Error`. + /// Returns a URL if `url` is not nil, otherwise throws an `Error`. /// /// - throws: An `AFError.invalidURL` if `url` is `nil`. /// diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/DispatchQueue+Alamofire.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/DispatchQueue+Alamofire.swift index 5019d0d..9031395 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/DispatchQueue+Alamofire.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/DispatchQueue+Alamofire.swift @@ -1,7 +1,7 @@ // // DispatchQueue+Alamofire.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -34,10 +34,4 @@ extension DispatchQueue { func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) { asyncAfter(deadline: .now() + delay, execute: closure) } - - func syncResult(_ closure: () -> T) -> T { - var result: T! - sync { result = closure() } - return result - } } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info-tvOS.plist b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info-tvOS.plist index d25faeb..995b1b2 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info-tvOS.plist +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.0 + 4.5.1 CFBundleSignature ???? CFBundleVersion diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info.plist b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info.plist index b6ba904..3050683 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info.plist +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.2.0 + 4.5.1 CFBundleSignature ???? CFBundleVersion diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/MultipartFormData.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/MultipartFormData.swift index 1ce4d19..ba02d24 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/MultipartFormData.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/MultipartFormData.swift @@ -1,7 +1,7 @@ // // MultipartFormData.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -92,7 +92,7 @@ open class MultipartFormData { // MARK: - Properties /// The `Content-Type` header value containing the boundary used to generate the `multipart/form-data`. - open var contentType: String { return "multipart/form-data; boundary=\(boundary)" } + open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)" /// The content length of all body parts used to generate the `multipart/form-data` not including the boundaries. public var contentLength: UInt64 { return bodyParts.reduce(0) { $0 + $1.bodyContentLength } } @@ -257,8 +257,7 @@ open class MultipartFormData { var isDirectory: ObjCBool = false let path = fileURL.path - guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else - { + guard FileManager.default.fileExists(atPath: path, isDirectory: &isDirectory) && !isDirectory.boolValue else { setBodyPartError(withReason: .bodyPartFileIsDirectory(at: fileURL)) return } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift index c06a60e..cdb5a02 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/NetworkReachabilityManager.swift @@ -1,7 +1,7 @@ // // NetworkReachabilityManager.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -33,17 +33,7 @@ import SystemConfiguration /// Reachability can be used to determine background information about why a network operation failed, or to retry /// network requests 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. -open class NetworkReachabilityManager { - /** - Defines the various states of network reachability. - - - Unknown: It is unknown whether the network is reachable. - - NotReachable: The network is not reachable. - - ReachableOnWWAN: The network is reachable over the WWAN connection. - - ReachableOnWiFi: The network is reachable over the WiFi connection. - */ - - +public class NetworkReachabilityManager { /// Defines the various states of network reachability. /// /// - unknown: It is unknown whether the network is reachable. @@ -71,25 +61,25 @@ open class NetworkReachabilityManager { // MARK: - Properties /// Whether the network is currently reachable. - open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } + public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi } /// Whether the network is currently reachable over the WWAN interface. - open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } + public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) } /// Whether the network is currently reachable over Ethernet or WiFi interface. - open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } + public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) } /// The current network reachability status. - open var networkReachabilityStatus: NetworkReachabilityStatus { + public var networkReachabilityStatus: NetworkReachabilityStatus { guard let flags = self.flags else { return .unknown } return networkReachabilityStatusForFlags(flags) } /// The dispatch queue to execute the `listener` closure on. - open var listenerQueue: DispatchQueue = DispatchQueue.main + public var listenerQueue: DispatchQueue = DispatchQueue.main /// A closure executed when the network reachability status changes. - open var listener: Listener? + public var listener: Listener? private var flags: SCNetworkReachabilityFlags? { var flags = SCNetworkReachabilityFlags() @@ -151,7 +141,7 @@ open class NetworkReachabilityManager { /// /// - returns: `true` if listening was started successfully, `false` otherwise. @discardableResult - open func startListening() -> Bool { + public func startListening() -> Bool { var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil) context.info = Unmanaged.passUnretained(self).toOpaque() @@ -175,7 +165,7 @@ open class NetworkReachabilityManager { } /// Stops listening for changes in network reachability status. - open func stopListening() { + public func stopListening() { SCNetworkReachabilitySetCallback(reachability, nil, nil) SCNetworkReachabilitySetDispatchQueue(reachability, nil) } @@ -192,21 +182,24 @@ open class NetworkReachabilityManager { // MARK: - Internal - Network Reachability Status func networkReachabilityStatusForFlags(_ flags: SCNetworkReachabilityFlags) -> NetworkReachabilityStatus { - guard flags.contains(.reachable) else { return .notReachable } + guard isNetworkReachable(with: flags) else { return .notReachable } - var networkStatus: NetworkReachabilityStatus = .notReachable + var networkStatus: NetworkReachabilityStatus = .reachable(.ethernetOrWiFi) - if !flags.contains(.connectionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } + #if os(iOS) + if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } + #endif - if flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) { - if !flags.contains(.interventionRequired) { networkStatus = .reachable(.ethernetOrWiFi) } - } + return networkStatus + } - #if os(iOS) - if flags.contains(.isWWAN) { networkStatus = .reachable(.wwan) } - #endif + func isNetworkReachable(with flags: SCNetworkReachabilityFlags) -> Bool { + let isReachable = flags.contains(.reachable) + let needsConnection = flags.contains(.connectionRequired) + let canConnectAutomatically = flags.contains(.connectionOnDemand) || flags.contains(.connectionOnTraffic) + let canConnectWithoutUserInteraction = canConnectAutomatically && !flags.contains(.interventionRequired) - return networkStatus + return isReachable && (!needsConnection || canConnectWithoutUserInteraction) } } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Notifications.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Notifications.swift index 81f6e37..df41505 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Notifications.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Notifications.swift @@ -1,7 +1,7 @@ // // Notifications.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ParameterEncoding.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ParameterEncoding.swift index 242f6a8..dabb562 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ParameterEncoding.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ParameterEncoding.swift @@ -1,7 +1,7 @@ // // ParameterEncoding.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -223,9 +223,9 @@ public struct URLEncoding: ParameterEncoding { let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex let range = startIndex.. String { - var components = ["$ curl -i"] + var components = ["$ curl -v"] guard let request = self.request, let url = request.url, @@ -293,11 +293,12 @@ extension Request: CustomDebugStringConvertible { if let credentials = credentialStorage.credentials(for: protectionSpace)?.values { for credential in credentials { - components.append("-u \(credential.user!):\(credential.password!)") + guard let user = credential.user, let password = credential.password else { continue } + components.append("-u \(user):\(password)") } } else { - if let credential = delegate.credential { - components.append("-u \(credential.user!):\(credential.password!)") + if let credential = delegate.credential, let user = credential.user, let password = credential.password { + components.append("-u \(user):\(password)") } } } @@ -308,7 +309,12 @@ extension Request: CustomDebugStringConvertible { let cookies = cookieStorage.cookies(for: url), !cookies.isEmpty { let string = cookies.reduce("") { $0 + "\($1.name)=\($1.value);" } + + #if swift(>=3.2) + components.append("-b \"\(string[.. URLSessionTask { do { let urlRequest = try self.urlRequest.adapt(using: adapter) - return queue.syncResult { session.dataTask(with: urlRequest) } + return queue.sync { session.dataTask(with: urlRequest) } } catch { throw AdaptError(error: error) } @@ -459,9 +465,9 @@ open class DownloadRequest: Request { switch self { case let .request(urlRequest): let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.downloadTask(with: urlRequest) } + task = queue.sync { session.downloadTask(with: urlRequest) } case let .resumeData(resumeData): - task = queue.syncResult { session.downloadTask(withResumeData: resumeData) } + task = queue.sync { session.downloadTask(withResumeData: resumeData) } } return task @@ -564,13 +570,13 @@ open class UploadRequest: DataRequest { switch self { case let .data(data, urlRequest): let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.uploadTask(with: urlRequest, from: data) } + task = queue.sync { session.uploadTask(with: urlRequest, from: data) } case let .file(url, urlRequest): let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.uploadTask(with: urlRequest, fromFile: url) } + task = queue.sync { session.uploadTask(with: urlRequest, fromFile: url) } case let .stream(_, urlRequest): let urlRequest = try urlRequest.adapt(using: adapter) - task = queue.syncResult { session.uploadTask(withStreamedRequest: urlRequest) } + task = queue.sync { session.uploadTask(withStreamedRequest: urlRequest) } } return task @@ -634,9 +640,9 @@ open class StreamRequest: Request { switch self { case let .stream(hostName, port): - task = queue.syncResult { session.streamTask(withHostName: hostName, port: port) } + task = queue.sync { session.streamTask(withHostName: hostName, port: port) } case let .netService(netService): - task = queue.syncResult { session.streamTask(with: netService) } + task = queue.sync { session.streamTask(with: netService) } } return task diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Response.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Response.swift index ba45f6b..703eeb4 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Response.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Response.swift @@ -1,7 +1,7 @@ // // Response.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -43,7 +43,23 @@ public struct DefaultDataResponse { var _metrics: AnyObject? - init(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?, timeline: Timeline = Timeline()) { + /// Creates a `DefaultDataResponse` instance from the specified parameters. + /// + /// - Parameters: + /// - request: The URL request sent to the server. + /// - response: The server's response to the URL request. + /// - data: The data returned by the server. + /// - error: The error encountered while executing or validating the request. + /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. + /// - metrics: The task metrics containing the request / response statistics. `nil` by default. + public init( + request: URLRequest?, + response: HTTPURLResponse?, + data: Data?, + error: Error?, + timeline: Timeline = Timeline(), + metrics: AnyObject? = nil) + { self.request = request self.response = response self.data = data @@ -71,6 +87,12 @@ public struct DataResponse { /// The timeline of the complete lifecycle of the request. public let timeline: Timeline + /// Returns the associated value of the result if it is a success, `nil` otherwise. + public var value: Value? { return result.value } + + /// Returns the associated error value if the result if it is a failure, `nil` otherwise. + public var error: Error? { return result.error } + var _metrics: AnyObject? /// Creates a `DataResponse` instance with the specified parameters derived from response serialization. @@ -111,7 +133,7 @@ extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { public var debugDescription: String { var output: [String] = [] - output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") output.append("[Data]: \(data?.count ?? 0) bytes") output.append("[Result]: \(result.debugDescription)") @@ -123,6 +145,64 @@ extension DataResponse: CustomStringConvertible, CustomDebugStringConvertible { // MARK: - +extension DataResponse { + /// Evaluates the specified closure when the result of this `DataResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleInt = possibleData.map { $0.count } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A `DataResponse` whose result wraps the value returned by the given closure. If this instance's + /// result is a failure, returns a response wrapping the same failure. + public func map(_ transform: (Value) -> T) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.map(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the given closure when the result of this `DataResponse` is a success, passing the unwrapped result + /// value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: DataResponse = ... + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A success or failure `DataResponse` depending on the result of the given closure. If this instance's + /// result is a failure, returns the same failure. + public func flatMap(_ transform: (Value) throws -> T) -> DataResponse { + var response = DataResponse( + request: request, + response: self.response, + data: data, + result: result.flatMap(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } +} + +// MARK: - + /// Used to store all data associated with an non-serialized response of a download request. public struct DefaultDownloadResponse { /// The URL request sent to the server. @@ -148,14 +228,26 @@ public struct DefaultDownloadResponse { var _metrics: AnyObject? - init( + /// Creates a `DefaultDownloadResponse` instance from the specified parameters. + /// + /// - Parameters: + /// - request: The URL request sent to the server. + /// - response: The server's response to the URL request. + /// - temporaryURL: The temporary destination URL of the data returned from the server. + /// - destinationURL: The final destination URL of the data returned from the server if it was moved. + /// - resumeData: The resume data generated if the request was cancelled. + /// - error: The error encountered while executing or validating the request. + /// - timeline: The timeline of the complete lifecycle of the request. `Timeline()` by default. + /// - metrics: The task metrics containing the request / response statistics. `nil` by default. + public init( request: URLRequest?, response: HTTPURLResponse?, temporaryURL: URL?, destinationURL: URL?, resumeData: Data?, error: Error?, - timeline: Timeline = Timeline()) + timeline: Timeline = Timeline(), + metrics: AnyObject? = nil) { self.request = request self.response = response @@ -192,6 +284,12 @@ public struct DownloadResponse { /// The timeline of the complete lifecycle of the request. public let timeline: Timeline + /// Returns the associated value of the result if it is a success, `nil` otherwise. + public var value: Value? { return result.value } + + /// Returns the associated error value if the result if it is a failure, `nil` otherwise. + public var error: Error? { return result.error } + var _metrics: AnyObject? /// Creates a `DownloadResponse` instance with the specified parameters derived from response serialization. @@ -239,7 +337,7 @@ extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertibl public var debugDescription: String { var output: [String] = [] - output.append(request != nil ? "[Request]: \(request!)" : "[Request]: nil") + output.append(request != nil ? "[Request]: \(request!.httpMethod ?? "GET") \(request!)" : "[Request]: nil") output.append(response != nil ? "[Response]: \(response!)" : "[Response]: nil") output.append("[TemporaryURL]: \(temporaryURL?.path ?? "nil")") output.append("[DestinationURL]: \(destinationURL?.path ?? "nil")") @@ -253,6 +351,68 @@ extension DownloadResponse: CustomStringConvertible, CustomDebugStringConvertibl // MARK: - +extension DownloadResponse { + /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleInt = possibleData.map { $0.count } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A `DownloadResponse` whose result wraps the value returned by the given closure. If this instance's + /// result is a failure, returns a response wrapping the same failure. + public func map(_ transform: (Value) -> T) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.map(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } + + /// Evaluates the given closure when the result of this `DownloadResponse` is a success, passing the unwrapped + /// result value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: DownloadResponse = ... + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance's result. + /// + /// - returns: A success or failure `DownloadResponse` depending on the result of the given closure. If this + /// instance's result is a failure, returns the same failure. + public func flatMap(_ transform: (Value) throws -> T) -> DownloadResponse { + var response = DownloadResponse( + request: request, + response: self.response, + temporaryURL: temporaryURL, + destinationURL: destinationURL, + resumeData: resumeData, + result: result.flatMap(transform), + timeline: timeline + ) + + response._metrics = _metrics + + return response + } +} + +// MARK: - + protocol Response { /// The task metrics containing the request / response statistics. var _metrics: AnyObject? { get set } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ResponseSerialization.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ResponseSerialization.swift index 47780fd..1f29ed8 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ResponseSerialization.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ResponseSerialization.swift @@ -1,7 +1,7 @@ // // ResponseSerialization.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -88,11 +88,12 @@ public struct DownloadResponseSerializer: DownloadResponseSerializerProto extension Request { var timeline: Timeline { + let requestStartTime = self.startTime ?? CFAbsoluteTimeGetCurrent() let requestCompletedTime = self.endTime ?? CFAbsoluteTimeGetCurrent() let initialResponseTime = self.delegate.initialResponseTime ?? requestCompletedTime return Timeline( - requestStartTime: self.startTime ?? CFAbsoluteTimeGetCurrent(), + requestStartTime: requestStartTime, initialResponseTime: initialResponseTime, requestCompletedTime: requestCompletedTime, serializationCompletedTime: CFAbsoluteTimeGetCurrent() diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Result.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Result.swift index 2293308..bbd3c61 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Result.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Result.swift @@ -1,7 +1,7 @@ // // Result.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -100,3 +100,201 @@ extension Result: CustomDebugStringConvertible { } } } + +// MARK: - Functional APIs + +extension Result { + /// Creates a `Result` instance from the result of a closure. + /// + /// A failure result is created when the closure throws, and a success result is created when the closure + /// succeeds without throwing an error. + /// + /// func someString() throws -> String { ... } + /// + /// let result = Result(value: { + /// return try someString() + /// }) + /// + /// // The type of result is Result + /// + /// The trailing closure syntax is also supported: + /// + /// let result = Result { try someString() } + /// + /// - parameter value: The closure to execute and create the result for. + public init(value: () throws -> Value) { + do { + self = try .success(value()) + } catch { + self = .failure(error) + } + } + + /// Returns the success value, or throws the failure error. + /// + /// let possibleString: Result = .success("success") + /// try print(possibleString.unwrap()) + /// // Prints "success" + /// + /// let noString: Result = .failure(error) + /// try print(noString.unwrap()) + /// // Throws error + public func unwrap() throws -> Value { + switch self { + case .success(let value): + return value + case .failure(let error): + throw error + } + } + + /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. + /// + /// Use the `map` method with a closure that does not throw. For example: + /// + /// let possibleData: Result = .success(Data()) + /// let possibleInt = possibleData.map { $0.count } + /// try print(possibleInt.unwrap()) + /// // Prints "0" + /// + /// let noData: Result = .failure(error) + /// let noInt = noData.map { $0.count } + /// try print(noInt.unwrap()) + /// // Throws error + /// + /// - parameter transform: A closure that takes the success value of the `Result` instance. + /// + /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the + /// same failure. + public func map(_ transform: (Value) -> T) -> Result { + switch self { + case .success(let value): + return .success(transform(value)) + case .failure(let error): + return .failure(error) + } + } + + /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. + /// + /// Use the `flatMap` method with a closure that may throw an error. For example: + /// + /// let possibleData: Result = .success(Data(...)) + /// let possibleObject = possibleData.flatMap { + /// try JSONSerialization.jsonObject(with: $0) + /// } + /// + /// - parameter transform: A closure that takes the success value of the instance. + /// + /// - returns: A `Result` containing the result of the given closure. If this instance is a failure, returns the + /// same failure. + public func flatMap(_ transform: (Value) throws -> T) -> Result { + switch self { + case .success(let value): + do { + return try .success(transform(value)) + } catch { + return .failure(error) + } + case .failure(let error): + return .failure(error) + } + } + + /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `mapError` function with a closure that does not throw. For example: + /// + /// let possibleData: Result = .failure(someError) + /// let withMyError: Result = possibleData.mapError { MyError.error($0) } + /// + /// - Parameter transform: A closure that takes the error of the instance. + /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns + /// the same instance. + public func mapError(_ transform: (Error) -> T) -> Result { + switch self { + case .failure(let error): + return .failure(transform(error)) + case .success: + return self + } + } + + /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `flatMapError` function with a closure that may throw an error. For example: + /// + /// let possibleData: Result = .success(Data(...)) + /// let possibleObject = possibleData.flatMapError { + /// try someFailableFunction(taking: $0) + /// } + /// + /// - Parameter transform: A throwing closure that takes the error of the instance. + /// + /// - Returns: A `Result` instance containing the result of the transform. If this instance is a success, returns + /// the same instance. + public func flatMapError(_ transform: (Error) throws -> T) -> Result { + switch self { + case .failure(let error): + do { + return try .failure(transform(error)) + } catch { + return .failure(error) + } + case .success: + return self + } + } + + /// Evaluates the specified closure when the `Result` is a success, passing the unwrapped value as a parameter. + /// + /// Use the `withValue` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A closure that takes the success value of this instance. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func withValue(_ closure: (Value) -> Void) -> Result { + if case let .success(value) = self { closure(value) } + + return self + } + + /// Evaluates the specified closure when the `Result` is a failure, passing the unwrapped error as a parameter. + /// + /// Use the `withError` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A closure that takes the success value of this instance. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func withError(_ closure: (Error) -> Void) -> Result { + if case let .failure(error) = self { closure(error) } + + return self + } + + /// Evaluates the specified closure when the `Result` is a success. + /// + /// Use the `ifSuccess` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A `Void` closure. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func ifSuccess(_ closure: () -> Void) -> Result { + if isSuccess { closure() } + + return self + } + + /// Evaluates the specified closure when the `Result` is a failure. + /// + /// Use the `ifFailure` function to evaluate the passed closure without modifying the `Result` instance. + /// + /// - Parameter closure: A `Void` closure. + /// - Returns: This `Result` instance, unmodified. + @discardableResult + public func ifFailure(_ closure: () -> Void) -> Result { + if isFailure { closure() } + + return self + } +} diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ServerTrustPolicy.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ServerTrustPolicy.swift index 4d5030f..1ad3530 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ServerTrustPolicy.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/ServerTrustPolicy.swift @@ -1,7 +1,7 @@ // // ServerTrustPolicy.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -88,6 +88,13 @@ extension URLSession { /// validate the host in production environments to guarantee the validity of the server's /// certificate chain. /// +/// - performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to +/// validate the host provided by the challenge as well as specify the revocation flags for +/// testing for revoked certificates. Apple platforms did not start testing for revoked +/// certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is +/// demonstrated in our TLS tests. Applications are encouraged to always validate the host +/// in production environments to guarantee the validity of the server's certificate chain. +/// /// - pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is /// considered valid if one of the pinned certificates match one of the server certificates. /// By validating both the certificate chain and host, certificate pinning provides a very @@ -107,6 +114,7 @@ extension URLSession { /// - customEvaluation: Uses the associated closure to evaluate the validity of the server trust. public enum ServerTrustPolicy { case performDefaultEvaluation(validateHost: Bool) + case performRevokedEvaluation(validateHost: Bool, revocationFlags: CFOptionFlags) case pinCertificates(certificates: [SecCertificate], validateCertificateChain: Bool, validateHost: Bool) case pinPublicKeys(publicKeys: [SecKey], validateCertificateChain: Bool, validateHost: Bool) case disableEvaluation @@ -171,6 +179,12 @@ public enum ServerTrustPolicy { let policy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) SecTrustSetPolicies(serverTrust, policy) + serverTrustIsValid = trustIsValid(serverTrust) + case let .performRevokedEvaluation(validateHost, revocationFlags): + let defaultPolicy = SecPolicyCreateSSL(true, validateHost ? host as CFString : nil) + let revokedPolicy = SecPolicyCreateRevocation(revocationFlags) + SecTrustSetPolicies(serverTrust, [defaultPolicy, revokedPolicy] as CFTypeRef) + serverTrustIsValid = trustIsValid(serverTrust) case let .pinCertificates(pinnedCertificates, validateCertificateChain, validateHost): if validateCertificateChain { diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionDelegate.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionDelegate.swift index f40bf89..d38c253 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionDelegate.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionDelegate.swift @@ -1,7 +1,7 @@ // // SessionDelegate.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -36,7 +36,7 @@ open class SessionDelegate: NSObject { open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? /// Overrides all behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)` and requires the caller to call the `completionHandler`. - open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + open var sessionDidReceiveChallengeWithCompletion: ((URLSession, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? /// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`. open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)? @@ -48,21 +48,21 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)` and /// requires the caller to call the `completionHandler`. - open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, (URLRequest?) -> Void) -> Void)? + open var taskWillPerformHTTPRedirectionWithCompletion: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void)? /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)`. open var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:didReceive:completionHandler:)` and /// requires the caller to call the `completionHandler`. - open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? + open var taskDidReceiveChallengeWithCompletion: ((URLSession, URLSessionTask, URLAuthenticationChallenge, @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -> Void)? /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)`. open var taskNeedNewBodyStream: ((URLSession, URLSessionTask) -> InputStream?)? /// Overrides all behavior for URLSessionTaskDelegate method `urlSession(_:task:needNewBodyStream:)` and /// requires the caller to call the `completionHandler`. - open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, (InputStream?) -> Void) -> Void)? + open var taskNeedNewBodyStreamWithCompletion: ((URLSession, URLSessionTask, @escaping (InputStream?) -> Void) -> Void)? /// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:)`. open var taskDidSendBodyData: ((URLSession, URLSessionTask, Int64, Int64, Int64) -> Void)? @@ -77,7 +77,7 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didReceive:completionHandler:)` and /// requires caller to call the `completionHandler`. - open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, (URLSession.ResponseDisposition) -> Void) -> Void)? + open var dataTaskDidReceiveResponseWithCompletion: ((URLSession, URLSessionDataTask, URLResponse, @escaping (URLSession.ResponseDisposition) -> Void) -> Void)? /// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:didBecome:)`. open var dataTaskDidBecomeDownloadTask: ((URLSession, URLSessionDataTask, URLSessionDownloadTask) -> Void)? @@ -90,7 +90,7 @@ open class SessionDelegate: NSObject { /// Overrides all behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)` and /// requires caller to call the `completionHandler`. - open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, (CachedURLResponse?) -> Void) -> Void)? + open var dataTaskWillCacheResponseWithCompletion: ((URLSession, URLSessionDataTask, CachedURLResponse, @escaping (CachedURLResponse?) -> Void) -> Void)? // MARK: URLSessionDownloadDelegate Overrides @@ -438,11 +438,9 @@ extension SessionDelegate: URLSessionTaskDelegate { let completeTask: (URLSession, URLSessionTask, Error?) -> Void = { [weak self] session, task, error in guard let strongSelf = self else { return } - if let taskDidComplete = strongSelf.taskDidComplete { - taskDidComplete(session, task, error) - } else if let delegate = strongSelf[task]?.delegate { - delegate.urlSession(session, task: task, didCompleteWithError: error) - } + strongSelf.taskDidComplete?(session, task, error) + + strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error) NotificationCenter.default.post( name: Notification.Name.Task.DidComplete, @@ -464,17 +462,17 @@ extension SessionDelegate: URLSessionTaskDelegate { // Determine whether an error has occurred var error: Error? = error - if let taskDelegate = self[task]?.delegate, taskDelegate.error != nil { - error = taskDelegate.error + if request.delegate.error != nil { + error = request.delegate.error } /// If an error occurred and the retrier is set, asynchronously ask the retrier if the request /// should be retried. Otherwise, complete the task by notifying the task delegate. if let retrier = retrier, let error = error { - retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, delay in + retrier.should(sessionManager, retry: request, with: error) { [weak self] shouldRetry, timeDelay in guard shouldRetry else { completeTask(session, task, error) ; return } - DispatchQueue.utility.after(delay) { [weak self] in + DispatchQueue.utility.after(timeDelay) { [weak self] in guard let strongSelf = self else { return } let retrySucceeded = strongSelf.sessionManager?.retry(request) ?? false diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionManager.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionManager.swift index 2984033..9bd8b54 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionManager.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/SessionManager.swift @@ -1,7 +1,7 @@ // // SessionManager.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -874,12 +874,16 @@ open class SessionManager { return } - let retrySucceeded = strongSelf.retry(request) + DispatchQueue.utility.after(timeDelay) { + guard let strongSelf = self else { return } - if retrySucceeded, let task = request.task { - strongSelf.delegate[task] = request - } else { - if strongSelf.startRequestsImmediately { request.resume() } + let retrySucceeded = strongSelf.retry(request) + + if retrySucceeded, let task = request.task { + strongSelf.delegate[task] = request + } else { + if strongSelf.startRequestsImmediately { request.resume() } + } } } } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/TaskDelegate.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/TaskDelegate.swift index d4fd216..0607758 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/TaskDelegate.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/TaskDelegate.swift @@ -1,7 +1,7 @@ // // TaskDelegate.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -40,17 +40,30 @@ open class TaskDelegate: NSObject { public var error: Error? var task: URLSessionTask? { - didSet { reset() } + set { + taskLock.lock(); defer { taskLock.unlock() } + _task = newValue + } + get { + taskLock.lock(); defer { taskLock.unlock() } + return _task + } } var initialResponseTime: CFAbsoluteTime? var credential: URLCredential? var metrics: AnyObject? // URLSessionTaskMetrics + private var _task: URLSessionTask? { + didSet { reset() } + } + + private let taskLock = NSLock() + // MARK: Lifecycle init(task: URLSessionTask?) { - self.task = task + _task = task self.queue = { let operationQueue = OperationQueue() diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Timeline.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Timeline.swift index 1440989..c5dabd1 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Timeline.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Timeline.swift @@ -1,7 +1,7 @@ // // Timeline.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Validation.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Validation.swift index c405d02..989ac20 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Validation.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Source/Validation.swift @@ -1,7 +1,7 @@ // // Validation.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -48,7 +48,13 @@ extension Request { init?(_ string: String) { let components: [String] = { let stripped = string.trimmingCharacters(in: .whitespacesAndNewlines) + + #if swift(>=3.2) + let split = stripped[..<(stripped.range(of: ";")?.lowerBound ?? stripped.endIndex)] + #else let split = stripped.substring(to: stripped.range(of: ";")?.lowerBound ?? stripped.endIndex) + #endif + return split.components(separatedBy: "/") }() diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AFError+AlamofireTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AFError+AlamofireTests.swift index 11bcf28..c66a590 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AFError+AlamofireTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AFError+AlamofireTests.swift @@ -1,7 +1,7 @@ // // AFError+AlamofireTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AuthenticationTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AuthenticationTests.swift index b04b94f..4c77d32 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AuthenticationTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/AuthenticationTests.swift @@ -1,7 +1,7 @@ // // AuthenticationTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/BaseTestCase.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/BaseTestCase.swift index c3ee100..17263aa 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/BaseTestCase.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/BaseTestCase.swift @@ -1,7 +1,7 @@ // // BaseTestCase.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/CacheTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/CacheTests.swift index f9cbe1a..aacf2ed 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/CacheTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/CacheTests.swift @@ -1,7 +1,7 @@ // // CacheTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/DownloadTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/DownloadTests.swift index 5618b13..b3cdc8d 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/DownloadTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/DownloadTests.swift @@ -1,7 +1,7 @@ // // DownloadTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -543,3 +543,172 @@ class DownloadResumeDataTestCase: BaseTestCase { progressValues.forEach { XCTAssertGreaterThanOrEqual($0, 0.4) } } } + +// MARK: - + +class DownloadResponseMapTestCase: BaseTestCase { + func testThatMapTransformsSuccessValue() { + // Given + let urlString = "https://httpbin.org/get" + let expectation = self.expectation(description: "request should succeed") + + var response: DownloadResponse? + + // When + Alamofire.download(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.map { json in + // json["args"]["foo"] is "bar": use this invariant to test the map function + return ((json as? [String: Any])?["args"] as? [String: Any])?["foo"] as? String ?? "invalid" + } + + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNotNil(response?.response) + XCTAssertNotNil(response?.temporaryURL) + XCTAssertNil(response?.destinationURL) + XCTAssertNil(response?.resumeData) + XCTAssertNil(response?.error) + XCTAssertEqual(response?.result.value, "bar") + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } + + func testThatMapPreservesFailureError() { + // Given + let urlString = "https://invalid-url-here.org/this/does/not/exist" + let expectation = self.expectation(description: "request should fail with 404") + + var response: DownloadResponse? + + // When + Alamofire.download(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.map { _ in "ignored" } + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNil(response?.response) + XCTAssertNil(response?.temporaryURL) + XCTAssertNil(response?.destinationURL) + XCTAssertNil(response?.resumeData) + XCTAssertNotNil(response?.error) + XCTAssertEqual(response?.result.isFailure, true) + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } +} + +// MARK: - + +class DownloadResponseFlatMapTestCase: BaseTestCase { + func testThatFlatMapTransformsSuccessValue() { + // Given + let urlString = "https://httpbin.org/get" + let expectation = self.expectation(description: "request should succeed") + + var response: DownloadResponse? + + // When + Alamofire.download(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.flatMap { json in + // json["args"]["foo"] is "bar": use this invariant to test the map function + return ((json as? [String: Any])?["args"] as? [String: Any])?["foo"] as? String ?? "invalid" + } + + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNotNil(response?.response) + XCTAssertNotNil(response?.temporaryURL) + XCTAssertNil(response?.destinationURL) + XCTAssertNil(response?.resumeData) + XCTAssertNil(response?.error) + XCTAssertEqual(response?.result.value, "bar") + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } + + func testThatFlatMapCatchesTransformationError() { + // Given + struct TransformError: Error {} + + let urlString = "https://httpbin.org/get" + let expectation = self.expectation(description: "request should succeed") + + var response: DownloadResponse? + + // When + Alamofire.download(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.flatMap { json in + throw TransformError() + } + + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNotNil(response?.response) + XCTAssertNotNil(response?.temporaryURL) + XCTAssertNil(response?.destinationURL) + XCTAssertNil(response?.resumeData) + if let error = response?.result.error { + XCTAssertTrue(error is TransformError) + } else { + XCTFail("flatMap should catch the transformation error") + } + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } + + func testThatFlatMapPreservesFailureError() { + // Given + let urlString = "https://invalid-url-here.org/this/does/not/exist" + let expectation = self.expectation(description: "request should fail with 404") + + var response: DownloadResponse? + + // When + Alamofire.download(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.flatMap { _ in "ignored" } + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNil(response?.response) + XCTAssertNil(response?.temporaryURL) + XCTAssertNil(response?.destinationURL) + XCTAssertNil(response?.resumeData) + XCTAssertNotNil(response?.error) + XCTAssertEqual(response?.result.isFailure, true) + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } +} diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/FileManager+AlamofireTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/FileManager+AlamofireTests.swift index 18777c1..13f7c21 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/FileManager+AlamofireTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/FileManager+AlamofireTests.swift @@ -1,7 +1,7 @@ // // FileManager+AlamofireTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/MultipartFormDataTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/MultipartFormDataTests.swift index 53c3067..cfe091c 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/MultipartFormDataTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/MultipartFormDataTests.swift @@ -1,7 +1,7 @@ // // MultipartFormDataTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -794,7 +794,7 @@ class MultipartFormDataWriteEncodedDataToDiskTestCase: BaseTestCase { class MultipartFormDataFailureTestCase: BaseTestCase { func testThatAppendingFileBodyPartWithInvalidLastPathComponentReturnsError() { // Given - let fileURL = NSURL(string: "") as! URL + let fileURL = NSURL(string: "")! as URL let multipartFormData = MultipartFormData() multipartFormData.append(fileURL, withName: "empty_data") diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/NetworkReachabilityManagerTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/NetworkReachabilityManagerTests.swift index 013a583..3fc62da 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/NetworkReachabilityManagerTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/NetworkReachabilityManagerTests.swift @@ -1,7 +1,7 @@ // // NetworkReachabilityManagerTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -162,10 +162,22 @@ class NetworkReachabilityManagerTestCase: BaseTestCase { XCTAssertEqual(networkReachabilityStatus, .notReachable) } + func testThatManagerReturnsNotReachableStatusWhenConnectionIsRequired() { + // Given + let manager = NetworkReachabilityManager() + let flags: SCNetworkReachabilityFlags = [.reachable, .connectionRequired] + + // When + let networkReachabilityStatus = manager?.networkReachabilityStatusForFlags(flags) + + // Then + XCTAssertEqual(networkReachabilityStatus, .notReachable) + } + func testThatManagerReturnsNotReachableStatusWhenInterventionIsRequired() { // Given let manager = NetworkReachabilityManager() - let flags: SCNetworkReachabilityFlags = [.reachable, .connectionRequired, .connectionOnDemand, .interventionRequired] + let flags: SCNetworkReachabilityFlags = [.reachable, .connectionRequired, .interventionRequired] // When let networkReachabilityStatus = manager?.networkReachabilityStatusForFlags(flags) @@ -222,5 +234,17 @@ class NetworkReachabilityManagerTestCase: BaseTestCase { // Then XCTAssertEqual(networkReachabilityStatus, .reachable(.wwan)) } + + func testThatManagerReturnsNotReachableOnWWANStatusWhenIsWWANAndConnectionIsRequired() { + // Given + let manager = NetworkReachabilityManager() + let flags: SCNetworkReachabilityFlags = [.reachable, .isWWAN, .connectionRequired] + + // When + let networkReachabilityStatus = manager?.networkReachabilityStatusForFlags(flags) + + // Then + XCTAssertEqual(networkReachabilityStatus, .notReachable) + } #endif } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ParameterEncodingTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ParameterEncodingTests.swift index 34213bf..b15bae3 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ParameterEncodingTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ParameterEncodingTests.swift @@ -1,7 +1,7 @@ // // ParameterEncodingTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -506,7 +506,7 @@ class URLParameterEncodingTestCase: ParameterEncodingTestCase { // Given let repeatedCount = 2_000 let url = URL(string: "https://example.com/movies")! - let parameters = ["chinese": String(count: repeatedCount, repeatedString: "一二三四五六七八九十")] + let parameters = ["chinese": String(repeating: "一二三四五六七八九十", count: repeatedCount)] // When let urlRequest = try encoding.encode(URLRequest(url: url), with: parameters) diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/RequestTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/RequestTests.swift index 51c9456..ce54936 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/RequestTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/RequestTests.swift @@ -1,7 +1,7 @@ // // RequestTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -382,7 +382,7 @@ class RequestResponseTestCase: BaseTestCase { // MARK: - extension Request { - fileprivate func preValidate(operation: @escaping (Void) -> Void) -> Self { + fileprivate func preValidate(operation: @escaping () -> Void) -> Self { delegate.queue.addOperation { operation() } @@ -390,7 +390,7 @@ extension Request { return self } - fileprivate func postValidate(operation: @escaping (Void) -> Void) -> Self { + fileprivate func postValidate(operation: @escaping () -> Void) -> Self { delegate.queue.addOperation { operation() } @@ -524,7 +524,7 @@ class RequestDebugDescriptionTestCase: BaseTestCase { let components = cURLCommandComponents(for: request) // Then - XCTAssertEqual(components[0..<3], ["$", "curl", "-i"]) + XCTAssertEqual(components[0..<3], ["$", "curl", "-v"]) XCTAssertFalse(components.contains("-X")) XCTAssertEqual(components.last, "\"\(urlString)\"") } @@ -539,7 +539,7 @@ class RequestDebugDescriptionTestCase: BaseTestCase { let components = cURLCommandComponents(for: request) // Then - XCTAssertEqual(components[0..<3], ["$", "curl", "-i"]) + XCTAssertEqual(components[0..<3], ["$", "curl", "-v"]) XCTAssertFalse(components.contains("-X")) XCTAssertEqual(components.last, "\"\(urlString)\"") @@ -558,7 +558,7 @@ class RequestDebugDescriptionTestCase: BaseTestCase { let components = cURLCommandComponents(for: request) // Then - XCTAssertEqual(components[0..<3], ["$", "curl", "-i"]) + XCTAssertEqual(components[0..<3], ["$", "curl", "-v"]) XCTAssertEqual(components[3..<5], ["-X", "POST"]) XCTAssertEqual(components.last, "\"\(urlString)\"") } @@ -578,7 +578,7 @@ class RequestDebugDescriptionTestCase: BaseTestCase { let components = cURLCommandComponents(for: request) // Then - XCTAssertEqual(components[0..<3], ["$", "curl", "-i"]) + XCTAssertEqual(components[0..<3], ["$", "curl", "-v"]) XCTAssertEqual(components[3..<5], ["-X", "POST"]) XCTAssertNotNil(request.debugDescription.range(of: "-H \"Content-Type: application/json\"")) @@ -609,7 +609,7 @@ class RequestDebugDescriptionTestCase: BaseTestCase { let components = cURLCommandComponents(for: request) // Then - XCTAssertEqual(components[0..<3], ["$", "curl", "-i"]) + XCTAssertEqual(components[0..<3], ["$", "curl", "-v"]) XCTAssertEqual(components[3..<5], ["-X", "POST"]) XCTAssertEqual(components.last, "\"\(urlString)\"") XCTAssertEqual(components[5..<6], ["-b"]) @@ -671,7 +671,7 @@ class RequestDebugDescriptionTestCase: BaseTestCase { debugPrint(request!) // Then - XCTAssertEqual(components[0..<3], ["$", "curl", "-i"]) + XCTAssertEqual(components[0..<3], ["$", "curl", "-v"]) XCTAssertTrue(components.contains("-X")) XCTAssertEqual(components.last, "\"\(urlString)\"") diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseSerializationTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseSerializationTests.swift index 2cdc748..104b1c2 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseSerializationTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseSerializationTests.swift @@ -1,7 +1,7 @@ // // ResponseSerializationTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseTests.swift index ffcd091..86a5f1a 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResponseTests.swift @@ -1,7 +1,7 @@ // // ResponseTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -272,13 +272,14 @@ class ResponseJSONTestCase: BaseTestCase { XCTAssertNotNil(response?.data) XCTAssertEqual(response?.result.isSuccess, true) - if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, watchOS 3.0, *) { XCTAssertNotNil(response?.metrics) } - // The `as NSString` cast is necessary due to a compiler bug. See the following rdar for more info. - // - https://openradar.appspot.com/radar?id=5517037090635776 - if let args = (response?.result.value as AnyObject?)?["args" as NSString] as? [String: String] { + if + let responseDictionary = response?.result.value as? [String: Any], + let args = responseDictionary["args"] as? [String: String] + { XCTAssertEqual(args, ["foo": "bar"], "args should match parameters") } else { XCTFail("args should not be nil") @@ -311,12 +312,172 @@ class ResponseJSONTestCase: BaseTestCase { XCTAssertNotNil(response?.metrics) } - // The `as NSString` cast is necessary due to a compiler bug. See the following rdar for more info. - // - https://openradar.appspot.com/radar?id=5517037090635776 - if let form = (response?.result.value as AnyObject?)?["form" as NSString] as? [String: String] { + if + let responseDictionary = response?.result.value as? [String: Any], + let form = responseDictionary["form"] as? [String: String] + { XCTAssertEqual(form, ["foo": "bar"], "form should match parameters") } else { XCTFail("form should not be nil") } } } + +// MARK: - + +class ResponseMapTestCase: BaseTestCase { + func testThatMapTransformsSuccessValue() { + // Given + let urlString = "https://httpbin.org/get" + let expectation = self.expectation(description: "request should succeed") + + var response: DataResponse? + + // When + Alamofire.request(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.map { json in + // json["args"]["foo"] is "bar": use this invariant to test the map function + return ((json as? [String: Any])?["args"] as? [String: Any])?["foo"] as? String ?? "invalid" + } + + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNotNil(response?.response) + XCTAssertNotNil(response?.data) + XCTAssertEqual(response?.result.isSuccess, true) + XCTAssertEqual(response?.result.value, "bar") + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } + + func testThatMapPreservesFailureError() { + // Given + let urlString = "https://invalid-url-here.org/this/does/not/exist" + let expectation = self.expectation(description: "request should fail with 404") + + var response: DataResponse? + + // When + Alamofire.request(urlString, parameters: ["foo": "bar"]).responseData { resp in + response = resp.map { _ in "ignored" } + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNil(response?.response) + XCTAssertNotNil(response?.data) + XCTAssertEqual(response?.result.isFailure, true) + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } +} + +// MARK: - + +class ResponseFlatMapTestCase: BaseTestCase { + func testThatFlatMapTransformsSuccessValue() { + // Given + let urlString = "https://httpbin.org/get" + let expectation = self.expectation(description: "request should succeed") + + var response: DataResponse? + + // When + Alamofire.request(urlString, parameters: ["foo": "bar"]).responseJSON { resp in + response = resp.flatMap { json in + // json["args"]["foo"] is "bar": use this invariant to test the flatMap function + return ((json as? [String: Any])?["args"] as? [String: Any])?["foo"] as? String ?? "invalid" + } + + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNotNil(response?.response) + XCTAssertNotNil(response?.data) + XCTAssertEqual(response?.result.isSuccess, true) + XCTAssertEqual(response?.result.value, "bar") + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } + + func testThatFlatMapCatchesTransformationError() { + // Given + struct TransformError: Error {} + + let urlString = "https://httpbin.org/get" + let expectation = self.expectation(description: "request should succeed") + + var response: DataResponse? + + // When + Alamofire.request(urlString, parameters: ["foo": "bar"]).responseData { resp in + response = resp.flatMap { json in + throw TransformError() + } + + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNotNil(response?.response) + XCTAssertNotNil(response?.data) + XCTAssertEqual(response?.result.isFailure, true) + + if let error = response?.result.error { + XCTAssertTrue(error is TransformError) + } else { + XCTFail("flatMap should catch the transformation error") + } + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } + + func testThatFlatMapPreservesFailureError() { + // Given + let urlString = "https://invalid-url-here.org/this/does/not/exist" + let expectation = self.expectation(description: "request should fail with 404") + + var response: DataResponse? + + // When + Alamofire.request(urlString, parameters: ["foo": "bar"]).responseData { resp in + response = resp.flatMap { _ in "ignored" } + expectation.fulfill() + } + + waitForExpectations(timeout: timeout, handler: nil) + + // Then + XCTAssertNotNil(response?.request) + XCTAssertNil(response?.response) + XCTAssertNotNil(response?.data) + XCTAssertEqual(response?.result.isFailure, true) + + if #available(iOS 10.0, macOS 10.12, tvOS 10.0, *) { + XCTAssertNotNil(response?.metrics) + } + } +} diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResultTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResultTests.swift index 1e67570..d43c5ba 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResultTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ResultTests.swift @@ -1,7 +1,7 @@ // // ResultTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -144,4 +144,340 @@ class ResultTestCase: BaseTestCase { "result debug description should match expected value for failure case" ) } + + // MARK: - Initializer Tests + + func testThatInitializerFromThrowingClosureStoresResultAsASuccess() { + // Given + let value = "success value" + + // When + let result1 = Result(value: { value }) + let result2 = Result { value } + + // Then + for result in [result1, result2] { + XCTAssertTrue(result.isSuccess) + XCTAssertEqual(result.value, value) + } + } + + func testThatInitializerFromThrowingClosureCatchesErrorAsAFailure() { + // Given + struct ResultError: Error {} + + // When + let result1 = Result(value: { throw ResultError() }) + let result2 = Result { throw ResultError() } + + // Then + for result in [result1, result2] { + XCTAssertTrue(result.isFailure) + XCTAssertTrue(result.error! is ResultError) + } + } + + // MARK: - Unwrap Tests + + func testThatUnwrapReturnsSuccessValue() { + // Given + let result = Result.success("success value") + + // When + let unwrappedValue = try? result.unwrap() + + // Then + XCTAssertEqual(unwrappedValue, "success value") + } + + func testThatUnwrapThrowsFailureError() { + // Given + struct ResultError: Error {} + + // When + let result = Result.failure(ResultError()) + + // Then + do { + _ = try result.unwrap() + XCTFail("result unwrapping should throw the failure error") + } catch { + XCTAssertTrue(error is ResultError) + } + } + + // MARK: - Map Tests + + func testThatMapTransformsSuccessValue() { + // Given + let result = Result.success("success value") + + // When + let mappedResult = result.map { $0.characters.count } + + // Then + XCTAssertEqual(mappedResult.value, 13) + } + + func testThatMapPreservesFailureError() { + // Given + struct ResultError: Error {} + let result = Result.failure(ResultError()) + + // When + let mappedResult = result.map { $0.characters.count } + + // Then + if let error = mappedResult.error { + XCTAssertTrue(error is ResultError) + } else { + XCTFail("map should preserve the failure error") + } + } + + // MARK: - FlatMap Tests + + func testThatFlatMapTransformsSuccessValue() { + // Given + let result = Result.success("success value") + + // When + let mappedResult = result.flatMap { $0.characters.count } + + // Then + XCTAssertEqual(mappedResult.value, 13) + } + + func testThatFlatMapCatchesTransformationError() { + // Given + struct TransformError: Error {} + let result = Result.success("success value") + + // When + let mappedResult = result.flatMap { _ in throw TransformError() } + + // Then + if let error = mappedResult.error { + XCTAssertTrue(error is TransformError) + } else { + XCTFail("flatMap should catch the transformation error") + } + } + + func testThatFlatMapPreservesFailureError() { + // Given + struct ResultError: Error {} + struct TransformError: Error {} + let result = Result.failure(ResultError()) + + // When + let mappedResult = result.flatMap { _ in throw TransformError() } + + // Then + if let error = mappedResult.error { + XCTAssertTrue(error is ResultError) + } else { + XCTFail("flatMap should preserve the failure error") + } + } + + // MARK: - Error Mapping Tests + + func testMapErrorTransformsErrorValue() { + // Given + struct ResultError: Error {} + struct OtherError: Error { let error: Error } + let result: Result = .failure(ResultError()) + + // When + let mappedResult = result.mapError { OtherError(error: $0) } + + // Then + if let error = mappedResult.error { + XCTAssertTrue(error is OtherError) + } else { + XCTFail("mapError should transform error value") + } + } + + func testMapErrorPreservesSuccessError() { + // Given + struct ResultError: Error {} + struct OtherError: Error { let error: Error } + let result: Result = .success("success") + + // When + let mappedResult = result.mapError { OtherError(error: $0) } + + // Then + XCTAssertEqual(mappedResult.value, "success") + } + + func testFlatMapErrorTransformsErrorValue() { + // Given + struct ResultError: Error {} + struct OtherError: Error { let error: Error } + let result: Result = .failure(ResultError()) + + // When + let mappedResult = result.flatMapError { OtherError(error: $0) } + + // Then + if let error = mappedResult.error { + XCTAssertTrue(error is OtherError) + } else { + XCTFail("mapError should transform error value") + } + } + + func testFlatMapErrorCapturesThrownError() { + // Given + struct ResultError: Error {} + struct OtherError: Error { + let error: Error + init(error: Error) throws { throw ThrownError() } + } + struct ThrownError: Error {} + let result: Result = .failure(ResultError()) + + // When + let mappedResult = result.flatMapError { try OtherError(error: $0) } + + // Then + if let error = mappedResult.error { + XCTAssertTrue(error is ThrownError) + } else { + XCTFail("mapError should capture thrown error value") + } + } + + // MARK: - With Value or Error Tests + + func testWithValueExecutesWhenSuccess() { + // Given + let result: Result = .success("success") + var string = "failure" + + // When + result.withValue { string = $0 } + + // Then + XCTAssertEqual(string, "success") + } + + func testWithValueDoesNotExecutesWhenFailure() { + // Given + struct ResultError: Error {} + let result: Result = .failure(ResultError()) + var string = "failure" + + // When + result.withValue { string = $0 } + + // Then + XCTAssertEqual(string, "failure") + } + + func testWithErrorExecutesWhenFailure() { + // Given + struct ResultError: Error {} + let result: Result = .failure(ResultError()) + var string = "success" + + // When + result.withError { string = "\(type(of: $0))" } + + // Then + #if swift(>=3.2) + XCTAssertEqual(string, "ResultError #1") + #else + XCTAssertEqual(string, "(ResultError #1)") + #endif + } + + func testWithErrorDoesNotExecuteWhenSuccess() { + // Given + let result: Result = .success("success") + var string = "success" + + // When + result.withError { string = "\(type(of: $0))" } + + // Then + XCTAssertEqual(string, "success") + } + + // MARK: - If Success or Failure Tests + + func testIfSuccessExecutesWhenSuccess() { + // Given + let result: Result = .success("success") + var string = "failure" + + // When + result.ifSuccess { string = "success" } + + // Then + XCTAssertEqual(string, "success") + } + + func testIfSuccessDoesNotExecutesWhenFailure() { + // Given + struct ResultError: Error {} + let result: Result = .failure(ResultError()) + var string = "failure" + + // When + result.ifSuccess { string = "success" } + + // Then + XCTAssertEqual(string, "failure") + } + + func testIfFailureExecutesWhenFailure() { + // Given + struct ResultError: Error {} + let result: Result = .failure(ResultError()) + var string = "success" + + // When + result.ifFailure { string = "failure" } + + // Then + XCTAssertEqual(string, "failure") + } + + func testIfFailureDoesNotExecuteWhenSuccess() { + // Given + let result: Result = .success("success") + var string = "success" + + // When + result.ifFailure { string = "failure" } + + // Then + XCTAssertEqual(string, "success") + } + + // MARK: - Functional Chaining Tests + + func testFunctionalMethodsCanBeChained() { + // Given + struct ResultError: Error {} + let result: Result = .success("first") + var string = "first" + var success = false + + // When + let endResult = result + .map { _ in "second" } + .flatMap { _ in "third" } + .withValue { if $0 == "third" { string = "fourth" } } + .ifSuccess { success = true } + + // Then + XCTAssertEqual(endResult.value, "third") + XCTAssertEqual(string, "fourth") + XCTAssertTrue(success) + } } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ServerTrustPolicyTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ServerTrustPolicyTests.swift index 89868f4..4afe411 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ServerTrustPolicyTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/ServerTrustPolicyTests.swift @@ -1,7 +1,7 @@ // // MultipartFormDataTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -579,6 +579,206 @@ class ServerTrustPolicyPerformDefaultEvaluationTestCase: ServerTrustPolicyTestCa // MARK: - +class ServerTrustPolicyPerformRevokedEvaluationTestCase: ServerTrustPolicyTestCase { + + // MARK: Do NOT Validate Host + + func testThatValidCertificateChainPassesEvaluationWithoutHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafValidDNSName.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: false, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertTrue(serverTrustIsValid, "server trust should pass evaluation") + } + + func testThatNonAnchoredRootCertificateChainFailsEvaluationWithoutHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.trustWithCertificates([ + TestCertificates.leafValidDNSName, + TestCertificates.intermediateCA2 + ]) + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: false, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } + + func testThatMissingDNSNameLeafCertificatePassesEvaluationWithoutHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafMissingDNSNameAndURI.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: false, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertTrue(serverTrustIsValid, "server trust should pass evaluation") + } + + func testThatExpiredCertificateChainFailsEvaluationWithoutHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafExpired.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: false, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } + + func testThatMissingIntermediateCertificateInChainFailsEvaluationWithoutHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafValidDNSNameMissingIntermediate.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: false, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } + + // MARK: Validate Host + + func testThatValidCertificateChainPassesEvaluationWithHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafValidDNSName.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: true, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertTrue(serverTrustIsValid, "server trust should pass evaluation") + } + + func testThatNonAnchoredRootCertificateChainFailsEvaluationWithHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.trustWithCertificates([ + TestCertificates.leafValidDNSName, + TestCertificates.intermediateCA2 + ]) + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: true, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } + + func testThatMissingDNSNameLeafCertificateFailsEvaluationWithHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafMissingDNSNameAndURI.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: true, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } + + func testThatWildcardedLeafCertificateChainPassesEvaluationWithHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafWildcard.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: true, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertTrue(serverTrustIsValid, "server trust should pass evaluation") + } + + func testThatExpiredCertificateChainFailsEvaluationWithHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafExpired.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: true, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } + + func testThatMissingIntermediateCertificateInChainFailsEvaluationWithHostValidation() { + // Given + let host = "test.alamofire.org" + let serverTrust = TestTrusts.leafValidDNSNameMissingIntermediate.trust + let serverTrustPolicy = ServerTrustPolicy.performRevokedEvaluation( + validateHost: true, + revocationFlags: kSecRevocationUseAnyAvailableMethod + ) + + // When + setRootCertificateAsLoneAnchorCertificateForTrust(serverTrust) + let serverTrustIsValid = serverTrustPolicy.evaluate(serverTrust, forHost: host) + + // Then + XCTAssertFalse(serverTrustIsValid, "server trust should not pass evaluation") + } +} + +// MARK: - + class ServerTrustPolicyPinCertificatesTestCase: ServerTrustPolicyTestCase { // MARK: Validate Certificate Chain Without Validating Host diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionDelegateTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionDelegateTests.swift index 829ac15..4f1fbce 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionDelegateTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionDelegateTests.swift @@ -1,7 +1,7 @@ // // SessionDelegateTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -422,7 +422,7 @@ class SessionDelegateTestCase: BaseTestCase { let headers = [ "Authorization": "1234", "Custom-Header": "foobar", - ] + ] // NOTE: It appears that most headers are maintained during a redirect with the exception of the `Authorization` // header. It appears that Apple's strips the `Authorization` header from the redirected URL request. If you diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionManagerTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionManagerTests.swift index 9278af7..c06b93f 100644 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionManagerTests.swift +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/SessionManagerTests.swift @@ -1,7 +1,7 @@ // // SessionManagerTests.swift // -// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/) +// Copyright (c) 2014-2017 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 @@ -787,12 +787,12 @@ class SessionManagerConfigurationHeadersTestCase: BaseTestCase { // Given, When, Then executeAuthorizationHeaderTest(for: .ephemeral) } - -// ⚠️ This test has been removed as a result of rdar://26870455 in Xcode 8 Seed 1 -// func testThatBackgroundConfigurationHeadersAreSentWithRequest() { -// // Given, When, Then -// executeAuthorizationHeaderTest(for: .background) -// } +#if os(macOS) + func testThatBackgroundConfigurationHeadersAreSentWithRequest() { + // Given, When, Then + executeAuthorizationHeaderTest(for: .background) + } +#endif private func executeAuthorizationHeaderTest(for type: ConfigurationType) { // Given @@ -840,10 +840,9 @@ class SessionManagerConfigurationHeadersTestCase: BaseTestCase { XCTAssertNotNil(response.data, "data should not be nil") XCTAssertTrue(response.result.isSuccess, "result should be a success") - // The `as NSString` cast is necessary due to a compiler bug. See the following rdar for more info. - // - https://openradar.appspot.com/radar?id=5517037090635776 if - let headers = (response.result.value as AnyObject?)?["headers" as NSString] as? [String: String], + let response = response.result.value as? [String: Any], + let headers = response["headers"] as? [String: String], let authorization = headers["Authorization"] { XCTAssertEqual(authorization, "Bearer 123456", "authorization header value does not match") diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/String+AlamofireTests.swift b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/String+AlamofireTests.swift deleted file mode 100644 index f0e1632..0000000 --- a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/Tests/String+AlamofireTests.swift +++ /dev/null @@ -1,33 +0,0 @@ -// -// NSURLSessionConfiguration+AlamofireTests.swift -// -// Copyright (c) 2014-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 - -extension String { - init(count: Int, repeatedString: String) { - var value = "" - for _ in 0.. + + + Classes Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Classes

+

The following classes are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SessionDelegate + +
    +
    +
    +
    +
    +
    +

    Responsible for handling all delegate callbacks for the underlying session.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class SessionDelegate: NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Request + +
    +
    +
    +
    +
    +
    +

    Responsible for sending a request and receiving the response and associated data from the server, as well as +managing its underlying URLSessionTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DataRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionDataTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class DataRequest: Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DownloadRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionDownloadTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class DownloadRequest: Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + UploadRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionUploadTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class UploadRequest: DataRequest
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + StreamRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionStreamTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class StreamRequest: Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SessionManager + +
    +
    +
    +
    +
    +
    +

    Responsible for creating and managing Request objects, as well as their underlying NSURLSession.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class SessionManager
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + MultipartFormData + +
    +
    +
    +
    +
    +
    +

    Constructs multipart/form-data for uploads within an HTTP or HTTPS body. There are currently two ways to encode +multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.

    + +

    For more information on multipart/form-data in general, please refer to the RFC-2388 and RFC-2045 specs as well +and the w3 form documentation.

    + + + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class MultipartFormData
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The NetworkReachabilityManager class listens for reachability changes of hosts 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 retry +network requests 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 more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NetworkReachabilityManager
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + TaskDelegate + +
    +
    +
    +
    +
    +
    +

    The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +executing all operations attached to the serial operation queue upon task completion.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class TaskDelegate: NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DataRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DataRequest.html new file mode 100644 index 0000000..f861305 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DataRequest.html @@ -0,0 +1,1357 @@ + + + + DataRequest Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataRequest

+
+
+
open class DataRequest: Request
+ +
+
+

Specific type of Request that manages an underlying URLSessionDataTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + progress + +
    +
    +
    +
    +
    +
    +

    The progress of fetching the response data from the server for the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var progress: Progress
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + + +

Stream

+
+
+
    +
  • +
    + + + + stream(closure:) + +
    +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the request as data is read from the server.

    + +

    This closure returns the bytes most recently received from the server, not including data from previous calls. +If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is +also important to note that the server data in any Response object will be nil.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func stream(closure: ((Data) -> Void)? = nil) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    The code to be executed periodically during the lifecycle of the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the Request as data is read from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The dispatch queue to execute the closure on.

    +
    +
    + + closure + + +
    +

    The code to be executed periodically as data is read from the server.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response<T: DataResponseSerializerProtocol>(
    +        queue: DispatchQueue? = nil,
    +        responseSerializer: T,
    +        completionHandler: @escaping (DataResponse<T.SerializedObject>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + responseSerializer + + +
    +

    The response serializer responsible for serializing the request, response, + and data.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns the associated data as-is.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func dataResponseSerializer() -> DataResponseSerializer<Data>
    + +
    +
    +
    +

    Return Value

    +

    A data response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseData(
    +        queue: DispatchQueue? = nil,
    +        completionHandler: @escaping (DataResponse<Data>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a result string type initialized from the response data with +the specified string encoding.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer<String>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1.

    +
    +
    +
    +
    +

    Return Value

    +

    A string response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseString(
    +        queue: DispatchQueue? = nil,
    +        encoding: String.Encoding? = nil,
    +        completionHandler: @escaping (DataResponse<String>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the + server response, falling back to the default HTTP default character set, + ISO-8859-1.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a JSON object result type constructed from the response data using +JSONSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func jsonResponseSerializer(
    +        options: JSONSerialization.ReadingOptions = .allowFragments)
    +        -> DataResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    +
    +
    +

    Return Value

    +

    A JSON object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseJSON(
    +        queue: DispatchQueue? = nil,
    +        options: JSONSerialization.ReadingOptions = .allowFragments,
    +        completionHandler: @escaping (DataResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns an object constructed from the response data using +PropertyListSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func propertyListResponseSerializer(
    +        options: PropertyListSerialization.ReadOptions = [])
    +        -> DataResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    +
    +
    +

    Return Value

    +

    A property list object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responsePropertyList(
    +        queue: DispatchQueue? = nil,
    +        options: PropertyListSerialization.ReadOptions = [],
    +        completionHandler: @escaping (DataResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Validation + +
    +
    +
    +
    +
    +
    +

    A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the +request was valid.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + validate(_:) + +
    +
    +
    +
    +
    +
    +

    Validates the request, using the specified closure.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate(_ validation: @escaping Validation) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + validation + + +
    +

    A closure to validate the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate(statusCode:) + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + range + + +
    +

    The range of acceptable status codes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Validates that the response has a content type in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + contentType + + +
    +

    The acceptable content types, which may specify wildcard types and/or subtypes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate() + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the default acceptable range of 200…299, and that the content +type matches any specified in the Accept HTTP header field.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate() -> Self
    + +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DownloadRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DownloadRequest.html new file mode 100644 index 0000000..4f7c673 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DownloadRequest.html @@ -0,0 +1,1507 @@ + + + + DownloadRequest Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadRequest

+
+
+
open class DownloadRequest: Request
+ +
+
+

Specific type of Request that manages an underlying URLSessionDownloadTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + DownloadOptions + +
    +
    +
    +
    +
    +
    +

    A collection of options to be executed prior to moving a downloaded file from the temporary URL to the +destination URL.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DownloadOptions: OptionSet
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A closure executed once a download request has successfully completed in order to determine where to move the +temporary file written to during the download process. The closure takes two arguments: the temporary file URL +and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and +the options defining how the file should be moved.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias DownloadFileDestination = (
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + resumeData + +
    +
    +
    +
    +
    +
    +

    The resume data of the underlying download task if available after a failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var resumeData: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + progress + +
    +
    +
    +
    +
    +
    +

    The progress of downloading the response data from the server for the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var progress: Progress
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + + +

State

+
+
+
    +
  • +
    + + + + cancel() + +
    +
    +
    +
    +
    +
    +

    Cancels the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override func cancel()
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the Request as data is read from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The dispatch queue to execute the closure on.

    +
    +
    + + closure + + +
    +

    The code to be executed periodically as data is read from the server.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a download file destination closure which uses the default file manager to move the temporary file to a +file URL in the first available directory with the specified search path directory and search path domain mask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class func suggestedDownloadDestination(
    +        for directory: FileManager.SearchPathDirectory = .documentDirectory,
    +        in domain: FileManager.SearchPathDomainMask = .userDomainMask)
    +        -> DownloadFileDestination
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + directory + + +
    +

    The search path directory. .DocumentDirectory by default.

    +
    +
    + + domain + + +
    +

    The search path domain mask. .UserDomainMask by default.

    +
    +
    +
    +
    +

    Return Value

    +

    A download file destination closure.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response(
    +        queue: DispatchQueue? = nil,
    +        completionHandler: @escaping (DefaultDownloadResponse) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response<T: DownloadResponseSerializerProtocol>(
    +        queue: DispatchQueue? = nil,
    +        responseSerializer: T,
    +        completionHandler: @escaping (DownloadResponse<T.SerializedObject>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + responseSerializer + + +
    +

    The response serializer responsible for serializing the request, response, + and data contained in the destination url.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns the associated data as-is.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func dataResponseSerializer() -> DownloadResponseSerializer<Data>
    + +
    +
    +
    +

    Return Value

    +

    A data response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseData(
    +        queue: DispatchQueue? = nil,
    +        completionHandler: @escaping (DownloadResponse<Data>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a result string type initialized from the response data with +the specified string encoding.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer<String>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1.

    +
    +
    +
    +
    +

    Return Value

    +

    A string response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseString(
    +        queue: DispatchQueue? = nil,
    +        encoding: String.Encoding? = nil,
    +        completionHandler: @escaping (DownloadResponse<String>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the + server response, falling back to the default HTTP default character set, + ISO-8859-1.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a JSON object result type constructed from the response data using +JSONSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func jsonResponseSerializer(
    +        options: JSONSerialization.ReadingOptions = .allowFragments)
    +        -> DownloadResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    +
    +
    +

    Return Value

    +

    A JSON object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseJSON(
    +        queue: DispatchQueue? = nil,
    +        options: JSONSerialization.ReadingOptions = .allowFragments,
    +        completionHandler: @escaping (DownloadResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns an object constructed from the response data using +PropertyListSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func propertyListResponseSerializer(
    +        options: PropertyListSerialization.ReadOptions = [])
    +        -> DownloadResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    +
    +
    +

    Return Value

    +

    A property list object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responsePropertyList(
    +        queue: DispatchQueue? = nil,
    +        options: PropertyListSerialization.ReadOptions = [],
    +        completionHandler: @escaping (DownloadResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Validation + +
    +
    +
    +
    +
    +
    +

    A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a +destination URL, and returns whether the request was valid.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Validation = (
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + validate(_:) + +
    +
    +
    +
    +
    +
    +

    Validates the request, using the specified closure.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate(_ validation: @escaping Validation) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + validation + + +
    +

    A closure to validate the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate(statusCode:) + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + range + + +
    +

    The range of acceptable status codes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Validates that the response has a content type in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + contentType + + +
    +

    The acceptable content types, which may specify wildcard types and/or subtypes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate() + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the default acceptable range of 200…299, and that the content +type matches any specified in the Accept HTTP header field.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate() -> Self
    + +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DownloadRequest/DownloadOptions.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DownloadRequest/DownloadOptions.html new file mode 100644 index 0000000..d5ee1f3 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/DownloadRequest/DownloadOptions.html @@ -0,0 +1,465 @@ + + + + DownloadOptions Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadOptions

+
+
+
public struct DownloadOptions: OptionSet
+ +
+
+

A collection of options to be executed prior to moving a downloaded file from the temporary URL to the +destination URL.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    +

    Returns the raw bitmask value of the option and satisfies the RawRepresentable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let rawValue: UInt
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A DownloadOptions flag that creates intermediate directories for the destination URL if specified.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + removePreviousFile + +
    +
    +
    +
    +
    +
    +

    A DownloadOptions flag that removes a previous file from the destination URL if specified.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    +

    Creates a DownloadFileDestinationOptions instance with the specified raw value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(rawValue: UInt)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + rawValue + + +
    +

    The raw bitmask value for the option.

    +
    +
    +
    +
    +

    Return Value

    +

    A new log level instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/MultipartFormData.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/MultipartFormData.html new file mode 100644 index 0000000..facabd2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/MultipartFormData.html @@ -0,0 +1,1176 @@ + + + + MultipartFormData Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultipartFormData

+
+
+
open class MultipartFormData
+ +
+
+

Constructs multipart/form-data for uploads within an HTTP or HTTPS body. There are currently two ways to encode +multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.

+ +

For more information on multipart/form-data in general, please refer to the RFC-2388 and RFC-2045 specs as well +and the w3 form documentation.

+ + + +
+
+ +
+
+
+ +
    +
  • +
    + + + + contentType + +
    +
    +
    +
    +
    +
    +

    The Content-Type header value containing the boundary used to generate the multipart/form-data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)"
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contentLength + +
    +
    +
    +
    +
    +
    +

    The content length of all body parts used to generate the multipart/form-data not including the boundaries.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var contentLength: UInt64
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + boundary + +
    +
    +
    +
    +
    +
    +

    The boundary used to separate the body parts in the encoded form data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let boundary: String
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Creates a multipart form data object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    +
    +

    Return Value

    +

    The multipart form data object.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + append(_:withName:) + +
    +
    +
    +
    +
    +
    +

    Creates a body part from the data and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name} (HTTP Header)
    • +
    • Encoded data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ data: Data, withName name: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    The data to encode into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the data in the Content-Disposition HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the data and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name} (HTTP Header)
    • +
    • Content-Type: #{generated mimeType} (HTTP Header)
    • +
    • Encoded data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ data: Data, withName name: String, mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to encode into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the data in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the data content type in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the data and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
    • +
    • Content-Type: #{mimeType} (HTTP Header)
    • +
    • Encoded file data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ data: Data, withName name: String, fileName: String, mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to encode into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the data in the Content-Disposition HTTP header.

    +
    +
    + + fileName + + +
    +

    The filename to associate with the data in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the data in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + append(_:withName:) + +
    +
    +
    +
    +
    +
    +

    Creates a body part from the file and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{generated filename} (HTTP Header)
    • +
    • Content-Type: #{generated mimeType} (HTTP Header)
    • +
    • Encoded file data
    • +
    • Multipart form boundary
    • +
    + +

    The filename in the Content-Disposition HTTP header is generated from the last path component of the +fileURL. The Content-Type HTTP header MIME type is generated by mapping the fileURL extension to the +system associated MIME type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ fileURL: URL, withName name: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + fileURL + + +
    +

    The URL of the file whose content will be encoded into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the file content in the Content-Disposition HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the file and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
    • +
    • Content-Type: #{mimeType} (HTTP Header)
    • +
    • Encoded file data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + fileURL + + +
    +

    The URL of the file whose content will be encoded into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the file content in the Content-Disposition HTTP header.

    +
    +
    + + fileName + + +
    +

    The filename to associate with the file content in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the file content in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the stream and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
    • +
    • Content-Type: #{mimeType} (HTTP Header)
    • +
    • Encoded stream data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(
    +        _ stream: InputStream,
    +        withLength length: UInt64,
    +        name: String,
    +        fileName: String,
    +        mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The input stream to encode in the multipart form data.

    +
    +
    + + length + + +
    +

    The content length of the stream.

    +
    +
    + + name + + +
    +

    The name to associate with the stream content in the Content-Disposition HTTP header.

    +
    +
    + + fileName + + +
    +

    The filename to associate with the stream content in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the stream content in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part with the headers, stream and length and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • HTTP headers
    • +
    • Encoded stream data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The input stream to encode in the multipart form data.

    +
    +
    + + length + + +
    +

    The content length of the stream.

    +
    +
    + + headers + + +
    +

    The HTTP headers for the body part.

    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode() + +
    +
    +
    +
    +
    +
    +

    Encodes all the appended body parts into a single Data value.

    + +

    It is important to note that this method will load all the appended body parts into memory all at the same +time. This method should only be used when the encoded data will have a small memory footprint. For large data +cases, please use the writeEncodedDataToDisk(fileURL:completionHandler:) method.

    +
    +

    Throws

    +

    An AFError if encoding encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode() throws -> Data
    + +
    +
    +
    +

    Return Value

    +

    The encoded Data if encoding is successful.

    +
    +
    +
    +
  • +
  • +
    + + + + writeEncodedData(to:) + +
    +
    +
    +
    +
    +
    +

    Writes the appended body parts into the given file URL.

    + +

    This process is facilitated by reading and writing with input and output streams, respectively. Thus, +this approach is very memory efficient and should be used for large body part data.

    +
    +

    Throws

    +

    An AFError if encoding encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func writeEncodedData(to fileURL: URL) throws
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + fileURL + + +
    +

    The file URL to write the multipart form data into.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager.html new file mode 100644 index 0000000..12bf245 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager.html @@ -0,0 +1,770 @@ + + + + NetworkReachabilityManager Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

NetworkReachabilityManager

+
+
+
public class NetworkReachabilityManager
+ +
+
+

The NetworkReachabilityManager class listens for reachability changes of hosts 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 retry +network requests 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.

+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Defines the various states of network reachability.

    + +
      +
    • unknown: It is unknown whether the network is reachable.
    • +
    • notReachable: The network is not reachable.
    • +
    • reachable: The network is reachable.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ConnectionType + +
    +
    +
    +
    +
    +
    +

    Defines the various connection types detected by reachability flags.

    + +
      +
    • ethernetOrWiFi: The connection type is either over Ethernet or WiFi.
    • +
    • wwan: The connection type is a WWAN connection.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ConnectionType
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Listener + +
    +
    +
    +
    +
    +
    +

    A closure executed when the network reachability status changes. The closure takes a single argument: the +network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Listener = (NetworkReachabilityStatus) -> Void
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + isReachable + +
    +
    +
    +
    +
    +
    +

    Whether the network is currently reachable.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isReachable: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isReachableOnWWAN + +
    +
    +
    +
    +
    +
    +

    Whether the network is currently reachable over the WWAN interface.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isReachableOnWWAN: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Whether the network is currently reachable over Ethernet or WiFi interface.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isReachableOnEthernetOrWiFi: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The current network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var networkReachabilityStatus: NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + listenerQueue + +
    +
    +
    +
    +
    +
    +

    The dispatch queue to execute the listener closure on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var listenerQueue: DispatchQueue = DispatchQueue.main
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + listener + +
    +
    +
    +
    +
    +
    +

    A closure executed when the network reachability status changes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var listener: Listener?
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(host:) + +
    +
    +
    +
    +
    +
    +

    Creates a NetworkReachabilityManager instance with the specified host.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init?(host: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + host + + +
    +

    The host used to evaluate network reachability.

    +
    +
    +
    +
    +

    Return Value

    +

    The new NetworkReachabilityManager instance.

    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Creates a NetworkReachabilityManager instance that monitors the address 0.0.0.0.

    + +

    Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing +status of the device, both IPv4 and IPv6.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init?()
    + +
    +
    +
    +

    Return Value

    +

    The new NetworkReachabilityManager instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + startListening() + +
    +
    +
    +
    +
    +
    +

    Starts listening for changes in network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func startListening() -> Bool
    + +
    +
    +
    +

    Return Value

    +

    true if listening was started successfully, false otherwise.

    +
    +
    +
    +
  • +
  • +
    + + + + stopListening() + +
    +
    +
    +
    +
    +
    +

    Stops listening for changes in network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stopListening()
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager/ConnectionType.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager/ConnectionType.html new file mode 100644 index 0000000..d5c1b15 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager/ConnectionType.html @@ -0,0 +1,396 @@ + + + + ConnectionType Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ConnectionType

+
+
+
public enum ConnectionType
+ +
+
+

Defines the various connection types detected by reachability flags.

+ +
    +
  • ethernetOrWiFi: The connection type is either over Ethernet or WiFi.
  • +
  • wwan: The connection type is a WWAN connection.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + ethernetOrWiFi + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ConnectionType
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + wwan + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ConnectionType
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager/NetworkReachabilityStatus.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager/NetworkReachabilityStatus.html new file mode 100644 index 0000000..6146fdc --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/NetworkReachabilityManager/NetworkReachabilityStatus.html @@ -0,0 +1,428 @@ + + + + NetworkReachabilityStatus Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

NetworkReachabilityStatus

+
+
+
public enum NetworkReachabilityStatus
+ +
+
+

Defines the various states of network reachability.

+ +
    +
  • unknown: It is unknown whether the network is reachable.
  • +
  • notReachable: The network is not reachable.
  • +
  • reachable: The network is reachable.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + unknown + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + notReachable + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + reachable + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/Request.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/Request.html new file mode 100644 index 0000000..a9770bb --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/Request.html @@ -0,0 +1,1307 @@ + + + + Request Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Request

+
+
+
open class Request
+ +
+
+

Responsible for sending a request and receiving the response and associated data from the server, as well as +managing its underlying URLSessionTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + ProgressHandler + +
    +
    +
    +
    +
    +
    +

    A closure executed when monitoring upload or download progress of a request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias ProgressHandler = (Progress) -> Void
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    The delegate for the underlying task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open internal(set) var delegate: TaskDelegate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + task + +
    +
    +
    +
    +
    +
    +

    The underlying task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var task: URLSessionTask?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + session + +
    +
    +
    +
    +
    +
    +

    The session belonging to the underlying task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let session: URLSession
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The response received from the server, if any.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + retryCount + +
    +
    +
    +
    +
    +
    +

    The number of times the request has been retried.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open internal(set) var retryCount: UInt = 0
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Associates an HTTP Basic credential with the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func authenticate(
    +        user: String,
    +        password: String,
    +        persistence: URLCredential.Persistence = .forSession)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + user + + +
    +

    The user.

    +
    +
    + + password + + +
    +

    The password.

    +
    +
    + + persistence + + +
    +

    The URL credential persistence. .ForSession by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Associates a specified credential with the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func authenticate(usingCredential credential: URLCredential) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + credential + + +
    +

    The credential.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a base64 encoded basic authentication credential as an authorization header tuple.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)?
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + user + + +
    +

    The user.

    +
    +
    + + password + + +
    +

    The password.

    +
    +
    +
    +
    +

    Return Value

    +

    A tuple with Authorization header and credential value if encoding succeeds, nil otherwise.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

State

+
+
+
    +
  • +
    + + + + resume() + +
    +
    +
    +
    +
    +
    +

    Resumes the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func resume()
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + suspend() + +
    +
    +
    +
    +
    +
    +

    Suspends the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func suspend()
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cancel() + +
    +
    +
    +
    +
    +
    +

    Cancels the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func cancel()
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes the HTTP method and URL, as +well as the response status code if a response has been received.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var description: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, in the form of a cURL command.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a result data type that contains the response data as-is.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result<Data>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a result string type initialized from the response data with the specified string encoding.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponseString(
    +        encoding: String.Encoding?,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?)
    +        -> Result<String>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1.

    +
    +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a JSON object contained in a result type constructed from the response data using JSONSerialization +with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponseJSON(
    +        options: JSONSerialization.ReadingOptions,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?)
    +        -> Result<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a plist object contained in a result type constructed from the response data using +PropertyListSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponsePropertyList(
    +        options: PropertyListSerialization.ReadOptions,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?)
    +        -> Result<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + ValidationResult + +
    +
    +
    +
    +
    +
    +

    Used to represent whether validation was successful or encountered an error resulting in a failure.

    + +
      +
    • success: The validation was successful.
    • +
    • failure: The validation failed encountering the provided error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ValidationResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/Request/ValidationResult.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/Request/ValidationResult.html new file mode 100644 index 0000000..bd90810 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/Request/ValidationResult.html @@ -0,0 +1,396 @@ + + + + ValidationResult Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ValidationResult

+
+
+
public enum ValidationResult
+ +
+
+

Used to represent whether validation was successful or encountered an error resulting in a failure.

+ +
    +
  • success: The validation was successful.
  • +
  • failure: The validation failed encountering the provided error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ValidationResult
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + failure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ValidationResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/ServerTrustPolicyManager.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/ServerTrustPolicyManager.html new file mode 100644 index 0000000..cbf6dee --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/ServerTrustPolicyManager.html @@ -0,0 +1,468 @@ + + + + ServerTrustPolicyManager Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ServerTrustPolicyManager

+
+
+
open class ServerTrustPolicyManager
+ +
+
+

Responsible for managing the mapping of ServerTrustPolicy objects to a given host.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + policies + +
    +
    +
    +
    +
    +
    +

    The dictionary of policies mapped to a particular host.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let policies: [String: ServerTrustPolicy]
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(policies:) + +
    +
    +
    +
    +
    +
    +

    Initializes the ServerTrustPolicyManager instance with the given policies.

    + +

    Since different servers and web services can have different leaf certificates, intermediate and even root +certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This +allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key +pinning for host3 and disabling evaluation for host4.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(policies: [String: ServerTrustPolicy])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + policies + + +
    +

    A dictionary of all policies mapped to a particular host.

    +
    +
    +
    +
    +

    Return Value

    +

    The new ServerTrustPolicyManager instance.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the ServerTrustPolicy for the given host if applicable.

    + +

    By default, this method will return the policy that perfectly matches the given host. Subclasses could override +this method and implement more complex mapping implementations such as wildcards.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + host + + +
    +

    The host to use when searching for a matching policy.

    +
    +
    +
    +
    +

    Return Value

    +

    The server trust policy for the given host if found.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionDelegate.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionDelegate.html new file mode 100644 index 0000000..30b3a25 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionDelegate.html @@ -0,0 +1,2754 @@ + + + + SessionDelegate Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

SessionDelegate

+
+
+
open class SessionDelegate: NSObject
+ +
+
+

Responsible for handling all delegate callbacks for the underlying session.

+ +
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
    +
  • +
    + + + + subscript(_:) + +
    +
    +
    +
    +
    +
    +

    Access the task delegate for the specified task in a thread-safe manner.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open subscript(task: URLSessionTask) -> Request?
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Initializes the SessionDelegate instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override init()
    + +
    +
    +
    +

    Return Value

    +

    The new SessionDelegate instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + responds(to:) + +
    +
    +
    +
    +
    +
    +

    Returns a Bool indicating whether the SessionDelegate implements or inherits a method that can respond +to a specified message.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override func responds(to selector: Selector) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + selector + + +
    +

    A selector that identifies a message.

    +
    +
    +
    +
    +

    Return Value

    +

    true if the receiver implements or inherits a method that can respond to selector, otherwise false.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the session has been invalidated.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session object that was invalidated.

    +
    +
    + + error + + +
    +

    The error that caused invalidation, or nil if the invalidation was explicit.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Requests credentials from the delegate in response to a session-level authentication request from the +remote server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        didReceive challenge: URLAuthenticationChallenge,
    +        completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task that requested authentication.

    +
    +
    + + challenge + + +
    +

    An object that contains the request for authentication.

    +
    +
    + + completionHandler + + +
    +

    A handler that your delegate method must call providing the disposition + and credential.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that all messages enqueued for a session have been delivered.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + session + + +
    +

    The session that no longer has any outstanding requests.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the remote server requested an HTTP redirect.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        willPerformHTTPRedirection response: HTTPURLResponse,
    +        newRequest request: URLRequest,
    +        completionHandler: @escaping (URLRequest?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task whose request resulted in a redirect.

    +
    +
    + + task + + +
    +

    The task whose request resulted in a redirect.

    +
    +
    + + response + + +
    +

    An object containing the server’s response to the original request.

    +
    +
    + + request + + +
    +

    A URL request object filled out with the new location.

    +
    +
    + + completionHandler + + +
    +

    A closure that your handler should call with either the value of the request + parameter, a modified URL request object, or NULL to refuse the redirect and + return the body of the redirect response.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Requests credentials from the delegate in response to an authentication request from the remote server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        didReceive challenge: URLAuthenticationChallenge,
    +        completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task whose request requires authentication.

    +
    +
    + + task + + +
    +

    The task whose request requires authentication.

    +
    +
    + + challenge + + +
    +

    An object that contains the request for authentication.

    +
    +
    + + completionHandler + + +
    +

    A handler that your delegate method must call providing the disposition + and credential.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate when a task requires a new request body stream to send to the remote server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        needNewBodyStream completionHandler: @escaping (InputStream?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task that needs a new body stream.

    +
    +
    + + task + + +
    +

    The task that needs a new body stream.

    +
    +
    + + completionHandler + + +
    +

    A completion handler that your delegate method should call with the new body stream.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Periodically informs the delegate of the progress of sending body content to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        didSendBodyData bytesSent: Int64,
    +        totalBytesSent: Int64,
    +        totalBytesExpectedToSend: Int64)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data task.

    +
    +
    + + task + + +
    +

    The data task.

    +
    +
    + + bytesSent + + +
    +

    The number of bytes sent since the last time this delegate method was called.

    +
    +
    + + totalBytesSent + + +
    +

    The total number of bytes sent so far.

    +
    +
    + + totalBytesExpectedToSend + + +
    +

    The expected length of the body data.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the session finished collecting metrics for the task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session collecting the metrics.

    +
    +
    + + task + + +
    +

    The task whose metrics have been collected.

    +
    +
    + + metrics + + +
    +

    The collected metrics.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the task finished transferring data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task whose request finished transferring data.

    +
    +
    + + task + + +
    +

    The task whose request finished transferring data.

    +
    +
    + + error + + +
    +

    If an error occurred, an error object indicating how the transfer failed, otherwise nil.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the data task received the initial reply (headers) from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        dataTask: URLSessionDataTask,
    +        didReceive response: URLResponse,
    +        completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data task that received an initial reply.

    +
    +
    + + dataTask + + +
    +

    The data task that received an initial reply.

    +
    +
    + + response + + +
    +

    A URL response object populated with headers.

    +
    +
    + + completionHandler + + +
    +

    A completion handler that your code calls to continue the transfer, passing a + constant to indicate whether the transfer should continue as a data task or + should become a download task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the data task was changed to a download task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        dataTask: URLSessionDataTask,
    +        didBecome downloadTask: URLSessionDownloadTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task that was replaced by a download task.

    +
    +
    + + dataTask + + +
    +

    The data task that was replaced by a download task.

    +
    +
    + + downloadTask + + +
    +

    The new download task that replaced the data task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the data task has received some of the expected data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data task that provided data.

    +
    +
    + + dataTask + + +
    +

    The data task that provided data.

    +
    +
    + + data + + +
    +

    A data object containing the transferred data.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Asks the delegate whether the data (or upload) task should store the response in the cache.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        dataTask: URLSessionDataTask,
    +        willCacheResponse proposedResponse: CachedURLResponse,
    +        completionHandler: @escaping (CachedURLResponse?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data (or upload) task.

    +
    +
    + + dataTask + + +
    +

    The data (or upload) task.

    +
    +
    + + proposedResponse + + +
    +

    The default caching behavior. This behavior is determined based on the current + caching policy and the values of certain received headers, such as the Pragma + and Cache-Control headers.

    +
    +
    + + completionHandler + + +
    +

    A block that your handler must call, providing either the original proposed + response, a modified version of that response, or NULL to prevent caching the + response. If your delegate implements this method, it must call this completion + handler; otherwise, your app leaks memory.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that a download task has finished downloading.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        downloadTask: URLSessionDownloadTask,
    +        didFinishDownloadingTo location: URL)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the download task that finished.

    +
    +
    + + downloadTask + + +
    +

    The download task that finished.

    +
    +
    + + location + + +
    +

    A file URL for the temporary file. Because the file is temporary, you must either + open the file for reading or move it to a permanent location in your app’s sandbox + container directory before returning from this delegate method.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Periodically informs the delegate about the download’s progress.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        downloadTask: URLSessionDownloadTask,
    +        didWriteData bytesWritten: Int64,
    +        totalBytesWritten: Int64,
    +        totalBytesExpectedToWrite: Int64)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the download task.

    +
    +
    + + downloadTask + + +
    +

    The download task.

    +
    +
    + + bytesWritten + + +
    +

    The number of bytes transferred since the last time this delegate + method was called.

    +
    +
    + + totalBytesWritten + + +
    +

    The total number of bytes transferred so far.

    +
    +
    + + totalBytesExpectedToWrite + + +
    +

    The expected length of the file, as provided by the Content-Length + header. If this header was not provided, the value is + NSURLSessionTransferSizeUnknown.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the download task has resumed downloading.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        downloadTask: URLSessionDownloadTask,
    +        didResumeAtOffset fileOffset: Int64,
    +        expectedTotalBytes: Int64)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the download task that finished.

    +
    +
    + + downloadTask + + +
    +

    The download task that resumed. See explanation in the discussion.

    +
    +
    + + fileOffset + + +
    +

    If the file’s cache policy or last modified date prevents reuse of the + existing content, then this value is zero. Otherwise, this value is an + integer representing the number of bytes on disk that do not need to be + retrieved again.

    +
    +
    + + expectedTotalBytes + + +
    +

    The expected length of the file, as provided by the Content-Length header. + If this header was not provided, the value is NSURLSessionTransferSizeUnknown.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the read side of the connection has been closed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the write side of the connection has been closed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the system has determined that a better route to the host is available.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the stream task has been completed and provides the unopened stream objects.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        streamTask: URLSessionStreamTask,
    +        didBecome inputStream: InputStream,
    +        outputStream: OutputStream)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    + + inputStream + + +
    +

    The new input stream.

    +
    +
    + + outputStream + + +
    +

    The new output stream.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionManager.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionManager.html new file mode 100644 index 0000000..b45fa7a --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionManager.html @@ -0,0 +1,2159 @@ + + + + SessionManager Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

SessionManager

+
+
+
open class SessionManager
+ +
+
+

Responsible for creating and managing Request objects, as well as their underlying NSURLSession.

+ +
+
+ +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Defines whether the MultipartFormData encoding was successful and contains result of the encoding as +associated values.

    + +
      +
    • Success: Represents a successful MultipartFormData encoding and contains the new UploadRequest along with + streaming information.
    • +
    • Failure: Used to represent a failure in the MultipartFormData encoding and also contains the encoding + error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartFormDataEncodingResult
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    A default instance of SessionManager, used by top-level Alamofire request methods, and suitable for use +directly for any ad hoc requests.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static let `default`: SessionManager =
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + defaultHTTPHeaders + +
    +
    +
    +
    +
    +
    +

    Creates default values for the Accept-Encoding, Accept-Language and User-Agent headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static let defaultHTTPHeaders: HTTPHeaders =
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Default memory threshold used when encoding MultipartFormData in bytes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + session + +
    +
    +
    +
    +
    +
    +

    The underlying session.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let session: URLSession
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    The session delegate handling all the task and session delegate callbacks.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let delegate: SessionDelegate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Whether to start requests immediately after being constructed. true by default.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var startRequestsImmediately: Bool = true
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + adapter + +
    +
    +
    +
    +
    +
    +

    The request adapter called each time a new request is created.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var adapter: RequestAdapter?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + retrier + +
    +
    +
    +
    +
    +
    +

    The request retrier called each time a request encounters an error to determine whether to retry the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var retrier: RequestRetrier?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The background completion handler closure provided by the UIApplicationDelegate +application:handleEventsForBackgroundURLSession:completionHandler: method. By setting the background +completion handler, the SessionDelegate sessionDidFinishEventsForBackgroundURLSession closure implementation +will automatically call the handler.

    + +

    If you need to handle your own events before the handler is called, then you need to override the +SessionDelegate sessionDidFinishEventsForBackgroundURLSession and manually call the handler when finished.

    + +

    nil by default.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var backgroundCompletionHandler: (() -> Void)?
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates an instance with the specified configuration, delegate and serverTrustPolicyManager.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        configuration: URLSessionConfiguration = URLSessionConfiguration.default,
    +        delegate: SessionDelegate = SessionDelegate(),
    +        serverTrustPolicyManager: ServerTrustPolicyManager? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + configuration + + +
    +

    The configuration used to construct the managed session. + URLSessionConfiguration.default by default.

    +
    +
    + + delegate + + +
    +

    The delegate used when initializing the session. SessionDelegate() by + default.

    +
    +
    + + serverTrustPolicyManager + + +
    +

    The server trust policy manager to use for evaluating all server trust + challenges. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The new SessionManager instance.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates an instance with the specified session, delegate and serverTrustPolicyManager.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(
    +        session: URLSession,
    +        delegate: SessionDelegate,
    +        serverTrustPolicyManager: ServerTrustPolicyManager? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The URL session.

    +
    +
    + + delegate + + +
    +

    The delegate of the URL session. Must equal the URL session’s delegate.

    +
    +
    + + serverTrustPolicyManager + + +
    +

    The server trust policy manager to use for evaluating all server trust + challenges. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The new SessionManager instance if the URL session’s delegate matches; nil otherwise.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DataRequest to retrieve the contents of the specified url, method, parameters, encoding +and headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func request(
    +        _ url: URLConvertible,
    +        method: HTTPMethod = .get,
    +        parameters: Parameters? = nil,
    +        encoding: ParameterEncoding = URLEncoding.default,
    +        headers: HTTPHeaders? = nil)
    +        -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + request(_:) + +
    +
    +
    +
    +
    +
    +

    Creates a DataRequest to retrieve the contents of a URL based on the specified urlRequest.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func request(_ urlRequest: URLRequestConvertible) -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest to retrieve the contents the specified url, method, parameters, encoding, +headers and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func download(
    +        _ url: URLConvertible,
    +        method: HTTPMethod = .get,
    +        parameters: Parameters? = nil,
    +        encoding: ParameterEncoding = URLEncoding.default,
    +        headers: HTTPHeaders? = nil,
    +        to destination: DownloadRequest.DownloadFileDestination? = nil)
    +        -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + download(_:to:) + +
    +
    +
    +
    +
    +
    +

    Creates a DownloadRequest to retrieve the contents of a URL based on the specified urlRequest and save +them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func download(
    +        _ urlRequest: URLRequestConvertible,
    +        to destination: DownloadRequest.DownloadFileDestination? = nil)
    +        -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The URL request

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest from the resumeData produced from a previous request cancellation to retrieve +the contents of the original request and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +

    On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken +on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the +data is written incorrectly and will always fail to resume the download. For more information about the bug and +possible workarounds, please refer to the following Stack Overflow post:

    + + + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func download(
    +        resumingWith resumeData: Data,
    +        to destination: DownloadRequest.DownloadFileDestination? = nil)
    +        -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + resumeData + + +
    +

    The resume data. This is an opaque data blob produced by URLSessionDownloadTask + when a task is cancelled. See URLSession -downloadTask(withResumeData:) for + additional information.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

File

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified url, method and headers for uploading the file.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        _ fileURL: URL,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil)
    +        -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a UploadRequest from the specified urlRequest for uploading the file.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

Data

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified url, method and headers for uploading the data.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        _ data: Data,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil)
    +        -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified urlRequest for uploading the data.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified url, method and headers for uploading the stream.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        _ stream: InputStream,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil)
    +        -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified urlRequest for uploading the stream.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold and calls encodingCompletion with new +UploadRequest using the url, method and headers.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        multipartFormData: @escaping (MultipartFormData) -> Void,
    +        usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil,
    +        encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold and calls encodingCompletion with new +UploadRequest using the urlRequest.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        multipartFormData: @escaping (MultipartFormData) -> Void,
    +        usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +        with urlRequest: URLRequestConvertible,
    +        encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a StreamRequest for bidirectional streaming using the hostname and port.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func stream(withHostName hostName: String, port: Int) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + hostName + + +
    +

    The hostname of the server to connect to.

    +
    +
    + + port + + +
    +

    The port of the server to connect to.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + stream(with:) + +
    +
    +
    +
    +
    +
    +

    Creates a StreamRequest for bidirectional streaming using the netService.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func stream(with netService: NetService) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + netService + + +
    +

    The net service used to identify the endpoint.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionManager/MultipartFormDataEncodingResult.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionManager/MultipartFormDataEncodingResult.html new file mode 100644 index 0000000..b541b1d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/SessionManager/MultipartFormDataEncodingResult.html @@ -0,0 +1,399 @@ + + + + MultipartFormDataEncodingResult Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultipartFormDataEncodingResult

+
+
+
public enum MultipartFormDataEncodingResult
+ +
+
+

Defines whether the MultipartFormData encoding was successful and contains result of the encoding as +associated values.

+ +
    +
  • Success: Represents a successful MultipartFormData encoding and contains the new UploadRequest along with + streaming information.
  • +
  • Failure: Used to represent a failure in the MultipartFormData encoding and also contains the encoding + error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartFormDataEncodingResult
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + failure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartFormDataEncodingResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/TaskDelegate.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/TaskDelegate.html new file mode 100644 index 0000000..c137be5 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/TaskDelegate.html @@ -0,0 +1,422 @@ + + + + TaskDelegate Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

TaskDelegate

+
+
+
open class TaskDelegate: NSObject
+ +
+
+

The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +executing all operations attached to the serial operation queue upon task completion.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + queue + +
    +
    +
    +
    +
    +
    +

    The serial operation queue used to execute all operations after the task completes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let queue: OperationQueue
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + data + +
    +
    +
    +
    +
    +
    +

    The data returned by the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var data: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    The error generated throughout the lifecyle of the task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/UploadRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/UploadRequest.html new file mode 100644 index 0000000..129666d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Classes/UploadRequest.html @@ -0,0 +1,471 @@ + + + + UploadRequest Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

UploadRequest

+
+
+
open class UploadRequest: DataRequest
+ +
+
+

Specific type of Request that manages an underlying URLSessionUploadTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + uploadProgress + +
    +
    +
    +
    +
    +
    +

    The progress of uploading the payload to the server for the upload request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var uploadProgress: Progress
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the UploadRequest as data is sent to +the server.

    + +

    After the data is sent to the server, the progress(queue:closure:) APIs can be used to monitor the progress +of data being read from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The dispatch queue to execute the closure on.

    +
    +
    + + closure + + +
    +

    The code to be executed periodically as data is sent to the server.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums.html new file mode 100644 index 0000000..b8030bb --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums.html @@ -0,0 +1,508 @@ + + + + Enums Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Enums

+

The following enums are available globally.

+ +
+
+ +
+
+
+ +
+
+
    +
  • +
    + + + + AFError + +
    +
    +
    +
    +
    +
    +

    AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with +their own associated reasons.

    + +
      +
    • invalidURL: Returned when a URLConvertible type fails to create a valid URL.
    • +
    • parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process.
    • +
    • multipartEncodingFailed: Returned when some step in the multipart encoding process fails.
    • +
    • responseValidationFailed: Returned when a validate() call fails.
    • +
    • responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + ServerTrustPolicy + +
    +
    +
    +
    +
    +
    +

    The ServerTrustPolicy evaluates the server trust generally provided by an NSURLAuthenticationChallenge when +connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +with a given set of criteria to determine whether the server trust is valid and the connection should be made.

    + +

    Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) 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 pinning enabled.

    + +
      +
    • performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to + validate the host provided by the challenge. Applications are encouraged to always + validate the host in production environments to guarantee the validity of the server’s + certificate chain.

    • +
    • performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to + validate the host provided by the challenge as well as specify the revocation flags for + testing for revoked certificates. Apple platforms did not start testing for revoked + certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is + demonstrated in our TLS tests. Applications are encouraged to always validate the host + in production environments to guarantee the validity of the server’s certificate chain.

    • +
    • pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is + considered valid if one of the pinned certificates match one of the server certificates. + By validating both the certificate chain and host, certificate pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

    • +
    • pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered + valid if one of the pinned public keys match one of the server certificate public keys. + By validating both the certificate chain and host, public key pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

    • +
    • disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid.

    • +
    • customEvaluation: Uses the associated closure to evaluate the validity of the server trust.

    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Result + +
    +
    +
    +
    +
    +
    +

    Used to represent whether a request was successful or encountered an error.

    + +
      +
    • success: The request and all post processing operations were successful resulting in the serialization of the + provided associated value.

    • +
    • failure: The request encountered an error resulting in a failure. The associated values are the original data + provided by the server as well as the error that caused the failure.

    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Result<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError.html new file mode 100644 index 0000000..80ea5d2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError.html @@ -0,0 +1,1030 @@ + + + + AFError Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

AFError

+
+
+
public enum AFError: Error
+ +
+
+

AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with +their own associated reasons.

+ +
    +
  • invalidURL: Returned when a URLConvertible type fails to create a valid URL.
  • +
  • parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process.
  • +
  • multipartEncodingFailed: Returned when some step in the multipart encoding process fails.
  • +
  • responseValidationFailed: Returned when a validate() call fails.
  • +
  • responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process.
  • +
+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the parameter encoding error occurred.

    + +
      +
    • missingURL: The URL request did not have a URL to encode.
    • +
    • jsonEncodingFailed: JSON serialization failed with an underlying system error during the + encoding process.
    • +
    • propertyListEncodingFailed: Property list serialization failed with an underlying system error during + encoding process.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the multipart encoding error occurred.

    + +
      +
    • bodyPartURLInvalid: The fileURL provided for reading an encodable body part isn’t a + file URL.
    • +
    • bodyPartFilenameInvalid: The filename of the fileURL provided has either an empty + lastPathComponent or `pathExtension.
    • +
    • bodyPartFileNotReachable: The file at the fileURL provided was not reachable.
    • +
    • bodyPartFileNotReachableWithError: Attempting to check the reachability of the fileURL provided threw + an error.
    • +
    • bodyPartFileIsDirectory: The file at the fileURL provided is actually a directory.
    • +
    • bodyPartFileSizeNotAvailable: The size of the file at the fileURL provided was not returned by + the system.
    • +
    • bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the fileURL provided + threw an error.
    • +
    • bodyPartInputStreamCreationFailed: An InputStream could not be created for the provided fileURL.
    • +
    • outputStreamCreationFailed: An OutputStream could not be created when attempting to write the + encoded data to disk.
    • +
    • outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file + already exists at the provided fileURL.
    • +
    • outputStreamURLInvalid: The fileURL provided for writing the encoded body data to disk is + not a file URL.
    • +
    • outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an + underlying error.
    • +
    • inputStreamReadFailed: The attempt to read an encoded body part InputStream failed with + underlying system error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the response validation error occurred.

    + +
      +
    • dataFileNil: The data file containing the server response did not exist.
    • +
    • dataFileReadFailed: The data file containing the server response could not be read.
    • +
    • missingContentType: The response did not contain a Content-Type and the acceptableContentTypes + provided did not contain wildcard type.
    • +
    • unacceptableContentType: The response Content-Type did not match any type in the provided + acceptableContentTypes.
    • +
    • unacceptableStatusCode: The response status code was not acceptable.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the response serialization error occurred.

    + +
      +
    • inputDataNil: The server response contained no data.
    • +
    • inputDataNilOrZeroLength: The server response contained no data or the data was zero length.
    • +
    • inputFileNil: The file containing the server response did not exist.
    • +
    • inputFileReadFailed: The file containing the server response could not be read.
    • +
    • stringSerializationFailed: String serialization failed using the provided String.Encoding.
    • +
    • jsonSerializationFailed: JSON serialization failed with an underlying system error.
    • +
    • propertyListSerializationFailed: Property list serialization failed with an underlying system error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + invalidURL + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + isInvalidURLError + +
    +
    +
    +
    +
    +
    +

    Returns whether the AFError is an invalid URL error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isInvalidURLError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a parameter encoding error. When true, the underlyingError property will +contain the associated value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isParameterEncodingError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a multipart encoding error. When true, the url and underlyingError properties +will contain the associated values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isMultipartEncodingError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a response validation error. When true, the acceptableContentTypes, +responseContentType, and responseCode properties will contain the associated values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isResponseValidationError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a response serialization error. When true, the failedStringEncoding and +underlyingError properties will contain the associated values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isResponseSerializationError: Bool
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+
    +
  • +
    + + + + errorDescription + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var errorDescription: String?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/MultipartEncodingFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/MultipartEncodingFailureReason.html new file mode 100644 index 0000000..ce047fd --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/MultipartEncodingFailureReason.html @@ -0,0 +1,758 @@ + + + + MultipartEncodingFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultipartEncodingFailureReason

+
+
+
public enum MultipartEncodingFailureReason
+ +
+
+

The underlying reason the multipart encoding error occurred.

+ +
    +
  • bodyPartURLInvalid: The fileURL provided for reading an encodable body part isn’t a + file URL.
  • +
  • bodyPartFilenameInvalid: The filename of the fileURL provided has either an empty + lastPathComponent or `pathExtension.
  • +
  • bodyPartFileNotReachable: The file at the fileURL provided was not reachable.
  • +
  • bodyPartFileNotReachableWithError: Attempting to check the reachability of the fileURL provided threw + an error.
  • +
  • bodyPartFileIsDirectory: The file at the fileURL provided is actually a directory.
  • +
  • bodyPartFileSizeNotAvailable: The size of the file at the fileURL provided was not returned by + the system.
  • +
  • bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the fileURL provided + threw an error.
  • +
  • bodyPartInputStreamCreationFailed: An InputStream could not be created for the provided fileURL.
  • +
  • outputStreamCreationFailed: An OutputStream could not be created when attempting to write the + encoded data to disk.
  • +
  • outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file + already exists at the provided fileURL.
  • +
  • outputStreamURLInvalid: The fileURL provided for writing the encoded body data to disk is + not a file URL.
  • +
  • outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an + underlying error.
  • +
  • inputStreamReadFailed: The attempt to read an encoded body part InputStream failed with + underlying system error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + bodyPartURLInvalid + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + inputStreamReadFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ParameterEncodingFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ParameterEncodingFailureReason.html new file mode 100644 index 0000000..d6817d8 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ParameterEncodingFailureReason.html @@ -0,0 +1,430 @@ + + + + ParameterEncodingFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ParameterEncodingFailureReason

+
+
+
public enum ParameterEncodingFailureReason
+ +
+
+

The underlying reason the parameter encoding error occurred.

+ +
    +
  • missingURL: The URL request did not have a URL to encode.
  • +
  • jsonEncodingFailed: JSON serialization failed with an underlying system error during the + encoding process.
  • +
  • propertyListEncodingFailed: Property list serialization failed with an underlying system error during + encoding process.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + missingURL + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + jsonEncodingFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ResponseSerializationFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ResponseSerializationFailureReason.html new file mode 100644 index 0000000..775567d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ResponseSerializationFailureReason.html @@ -0,0 +1,556 @@ + + + + ResponseSerializationFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ResponseSerializationFailureReason

+
+
+
public enum ResponseSerializationFailureReason
+ +
+
+

The underlying reason the response serialization error occurred.

+ +
    +
  • inputDataNil: The server response contained no data.
  • +
  • inputDataNilOrZeroLength: The server response contained no data or the data was zero length.
  • +
  • inputFileNil: The file containing the server response did not exist.
  • +
  • inputFileReadFailed: The file containing the server response could not be read.
  • +
  • stringSerializationFailed: String serialization failed using the provided String.Encoding.
  • +
  • jsonSerializationFailed: JSON serialization failed with an underlying system error.
  • +
  • propertyListSerializationFailed: Property list serialization failed with an underlying system error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + inputDataNil + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + inputFileNil + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + inputFileReadFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ResponseValidationFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ResponseValidationFailureReason.html new file mode 100644 index 0000000..6bff647 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/AFError/ResponseValidationFailureReason.html @@ -0,0 +1,494 @@ + + + + ResponseValidationFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ResponseValidationFailureReason

+
+
+
public enum ResponseValidationFailureReason
+ +
+
+

The underlying reason the response validation error occurred.

+ +
    +
  • dataFileNil: The data file containing the server response did not exist.
  • +
  • dataFileReadFailed: The data file containing the server response could not be read.
  • +
  • missingContentType: The response did not contain a Content-Type and the acceptableContentTypes + provided did not contain wildcard type.
  • +
  • unacceptableContentType: The response Content-Type did not match any type in the provided + acceptableContentTypes.
  • +
  • unacceptableStatusCode: The response status code was not acceptable.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + dataFileNil + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + dataFileReadFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + missingContentType + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/HTTPMethod.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/HTTPMethod.html new file mode 100644 index 0000000..4aebca8 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/HTTPMethod.html @@ -0,0 +1,610 @@ + + + + HTTPMethod Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

HTTPMethod

+
+
+
public enum HTTPMethod: String
+ +
+
+

HTTP method definitions.

+ +

See https://tools.ietf.org/html/rfc7231#section-4.3

+ +
+
+ +
+
+
+
    +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + get + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + head + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + post + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + put + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + patch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + delete + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + trace + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + connect + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/Result.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/Result.html new file mode 100644 index 0000000..92da939 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/Result.html @@ -0,0 +1,1117 @@ + + + + Result Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Result

+
+
+
public enum Result<Value>
+ +
+
+

Used to represent whether a request was successful or encountered an error.

+ +
    +
  • success: The request and all post processing operations were successful resulting in the serialization of the + provided associated value.

  • +
  • failure: The request encountered an error resulting in a failure. The associated values are the original data + provided by the server as well as the error that caused the failure.

  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Result<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + failure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Result<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + isSuccess + +
    +
    +
    +
    +
    +
    +

    Returns true if the result is a success, false otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isSuccess: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isFailure + +
    +
    +
    +
    +
    +
    +

    Returns true if the result is a failure, false otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isFailure: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Returns the associated value if the result is a success, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: Value?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Returns the associated error value if the result is a failure, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes whether the result was a +success or failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The debug textual representation used when written to an output stream, which includes whether the result was a +success or failure in addition to the value or error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + init(value:) + +
    +
    +
    +
    +
    +
    +

    Creates a Result instance from the result of a closure.

    + +

    A failure result is created when the closure throws, and a success result is created when the closure +succeeds without throwing an error.

    +
    func someString() throws -> String { ... }
    +
    +let result = Result(value: {
    +    return try someString()
    +})
    +
    +// The type of result is Result<String>
    +
    + +

    The trailing closure syntax is also supported:

    +
    let result = Result { try someString() }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(value: () throws -> Value)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + value + + +
    +

    The closure to execute and create the result for.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + unwrap() + +
    +
    +
    +
    +
    +
    +

    Returns the success value, or throws the failure error.

    +
    let possibleString: Result<String> = .success("success")
    +try print(possibleString.unwrap())
    +// Prints "success"
    +
    +let noString: Result<String> = .failure(error)
    +try print(noString.unwrap())
    +// Throws error
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func unwrap() throws -> Value
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + map(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success, passing the unwrapped value as a parameter.

    + +

    Use the map method with a closure that does not throw. For example:

    +
    let possibleData: Result<Data> = .success(Data())
    +let possibleInt = possibleData.map { $0.count }
    +try print(possibleInt.unwrap())
    +// Prints "0"
    +
    +let noData: Result<Data> = .failure(error)
    +let noInt = noData.map { $0.count }
    +try print(noInt.unwrap())
    +// Throws error
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func map<T>(_ transform: (Value) -> T) -> Result<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the Result instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result containing the result of the given closure. If this instance is a failure, returns the + same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMap(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success, passing the unwrapped value as a parameter.

    + +

    Use the flatMap method with a closure that may throw an error. For example:

    +
    let possibleData: Result<Data> = .success(Data(...))
    +let possibleObject = possibleData.flatMap {
    +    try JSONSerialization.jsonObject(with: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMap<T>(_ transform: (Value) throws -> T) -> Result<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result containing the result of the given closure. If this instance is a failure, returns the + same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + mapError(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure, passing the unwrapped error as a parameter.

    + +

    Use the mapError function with a closure that does not throw. For example:

    +
    let possibleData: Result<Data> = .failure(someError)
    +let withMyError: Result<Data> = possibleData.mapError { MyError.error($0) }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func mapError<T: Error>(_ transform: (Error) -> T) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the error of the instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result instance containing the result of the transform. If this instance is a success, returns + the same instance.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMapError(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure, passing the unwrapped error as a parameter.

    + +

    Use the flatMapError function with a closure that may throw an error. For example:

    +
    let possibleData: Result<Data> = .success(Data(...))
    +let possibleObject = possibleData.flatMapError {
    +    try someFailableFunction(taking: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMapError<T: Error>(_ transform: (Error) throws -> T) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A throwing closure that takes the error of the instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result instance containing the result of the transform. If this instance is a success, returns + the same instance.

    +
    +
    +
    +
  • +
  • +
    + + + + withValue(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success, passing the unwrapped value as a parameter.

    + +

    Use the withValue function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withValue(_ closure: (Value) -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A closure that takes the success value of this instance.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
  • +
    + + + + withError(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure, passing the unwrapped error as a parameter.

    + +

    Use the withError function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withError(_ closure: (Error) -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A closure that takes the success value of this instance.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
  • +
    + + + + ifSuccess(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success.

    + +

    Use the ifSuccess function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ifSuccess(_ closure: () -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A Void closure.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
  • +
    + + + + ifFailure(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure.

    + +

    Use the ifFailure function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ifFailure(_ closure: () -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A Void closure.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/ServerTrustPolicy.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/ServerTrustPolicy.html new file mode 100644 index 0000000..dda06fd --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Enums/ServerTrustPolicy.html @@ -0,0 +1,732 @@ + + + + ServerTrustPolicy Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ServerTrustPolicy

+
+
+
public enum ServerTrustPolicy
+ +
+
+

The ServerTrustPolicy evaluates the server trust generally provided by an NSURLAuthenticationChallenge when +connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +with a given set of criteria to determine whether the server trust is valid and the connection should be made.

+ +

Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) 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 pinning enabled.

+ +
    +
  • performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to + validate the host provided by the challenge. Applications are encouraged to always + validate the host in production environments to guarantee the validity of the server’s + certificate chain.

  • +
  • performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to + validate the host provided by the challenge as well as specify the revocation flags for + testing for revoked certificates. Apple platforms did not start testing for revoked + certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is + demonstrated in our TLS tests. Applications are encouraged to always validate the host + in production environments to guarantee the validity of the server’s certificate chain.

  • +
  • pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is + considered valid if one of the pinned certificates match one of the server certificates. + By validating both the certificate chain and host, certificate pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

  • +
  • pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered + valid if one of the pinned public keys match one of the server certificate public keys. + By validating both the certificate chain and host, public key pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

  • +
  • disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid.

  • +
  • customEvaluation: Uses the associated closure to evaluate the validity of the server trust.

  • +
+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + pinCertificates + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + pinPublicKeys + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + disableEvaluation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + customEvaluation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + certificates(in:) + +
    +
    +
    +
    +
    +
    +

    Returns all certificates within the given bundle with a .cer file extension.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bundle + + +
    +

    The bundle to search for all .cer files.

    +
    +
    +
    +
    +

    Return Value

    +

    All certificates within the given bundle.

    +
    +
    +
    +
  • +
  • +
    + + + + publicKeys(in:) + +
    +
    +
    +
    +
    +
    +

    Returns all public keys within the given bundle with a .cer file extension.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bundle + + +
    +

    The bundle to search for all *.cer files.

    +
    +
    +
    +
    +

    Return Value

    +

    All public keys within the given bundle.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + evaluate(_:forHost:) + +
    +
    +
    +
    +
    +
    +

    Evaluates whether the server trust is valid for the given host.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + serverTrust + + +
    +

    The server trust to evaluate.

    +
    +
    + + host + + +
    +

    The host of the challenge protection space.

    +
    +
    +
    +
    +

    Return Value

    +

    Whether the server trust is valid.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions.html new file mode 100644 index 0000000..da0e8b7 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions.html @@ -0,0 +1,453 @@ + + + + Extensions Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + String + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + URL + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct URL : ReferenceConvertible, Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + URLComponents + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct URLComponents : ReferenceConvertible, Hashable, Equatable
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification.html new file mode 100644 index 0000000..f73e63d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification.html @@ -0,0 +1,377 @@ + + + + Notification Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Notification

+ +
+
+ +
+
+
+ +
+
+
    +
  • +
    + + + + Key + +
    +
    +
    +
    +
    +
    +

    Used as a namespace for all Notification user info dictionary keys.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Key
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Key.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Key.html new file mode 100644 index 0000000..678167b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Key.html @@ -0,0 +1,360 @@ + + + + Key Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Key

+
+
+
public struct Key
+ +
+
+

Used as a namespace for all Notification user info dictionary keys.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Task + +
    +
    +
    +
    +
    +
    +

    User info dictionary key representing the URLSessionTask associated with the notification.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let Task = "org.alamofire.notification.key.task"
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Name.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Name.html new file mode 100644 index 0000000..2da0b12 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Name.html @@ -0,0 +1,354 @@ + + + + Name Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Name

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Task + +
    +
    +
    +
    +
    +
    +

    Used as a namespace for all URLSessionTask related notifications.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Task
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Name/Task.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Name/Task.html new file mode 100644 index 0000000..e07d38a --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/Notification/Name/Task.html @@ -0,0 +1,441 @@ + + + + Task Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Task

+
+
+
public struct Task
+ +
+
+

Used as a namespace for all URLSessionTask related notifications.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + DidResume + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is resumed. The notification object contains the resumed URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume")
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DidSuspend + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is suspended. The notification object contains the suspended URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend")
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DidCancel + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is cancelled. The notification object contains the cancelled URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel")
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DidComplete + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is completed. The notification object contains the completed URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete")
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/String.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/String.html new file mode 100644 index 0000000..3c264b0 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/String.html @@ -0,0 +1,368 @@ + + + + String Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

String

+
+
+
struct String
+ +
+
+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns a URL if self represents a valid URL string that conforms to RFC 2396 or throws an AFError.

    +
    +

    Throws

    +

    An AFError.invalidURL if self is not a valid URL string.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURL() throws -> URL
    + +
    +
    +
    +

    Return Value

    +

    A URL or throws an AFError.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URL.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URL.html new file mode 100644 index 0000000..db21443 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URL.html @@ -0,0 +1,359 @@ + + + + URL Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URL

+
+
+
struct URL : ReferenceConvertible, Equatable
+ +
+
+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns self.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURL() throws -> URL
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URLComponents.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URLComponents.html new file mode 100644 index 0000000..6515724 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URLComponents.html @@ -0,0 +1,368 @@ + + + + URLComponents Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLComponents

+
+
+
struct URLComponents : ReferenceConvertible, Hashable, Equatable
+ +
+
+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns a URL if url is not nil, otherwise throws an Error.

    +
    +

    Throws

    +

    An AFError.invalidURL if url is nil.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURL() throws -> URL
    + +
    +
    +
    +

    Return Value

    +

    A URL or throws an AFError.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URLRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URLRequest.html new file mode 100644 index 0000000..6b820f2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Extensions/URLRequest.html @@ -0,0 +1,431 @@ + + + + URLRequest Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLRequest

+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURLRequest() + +
    +
    +
    +
    +
    +
    +

    Returns a URL request or throws if an Error was encountered.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURLRequest() throws -> URLRequest
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an instance with the specified method, urlString and headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The new URLRequest instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Functions.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Functions.html new file mode 100644 index 0000000..3adda42 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Functions.html @@ -0,0 +1,1726 @@ + + + + Functions Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Functions

+

The following functions are available globally.

+ +
+
+ +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DataRequest using the default SessionManager to retrieve the contents of the specified url, +method, parameters, encoding and headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func request(
    +    _ url: URLConvertible,
    +    method: HTTPMethod = .get,
    +    parameters: Parameters? = nil,
    +    encoding: ParameterEncoding = URLEncoding.default,
    +    headers: HTTPHeaders? = nil)
    +    -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + request(_:) + +
    +
    +
    +
    +
    +
    +

    Creates a DataRequest using the default SessionManager to retrieve the contents of a URL based on the +specified urlRequest.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func request(_ urlRequest: URLRequestConvertible) -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + urlRequest + + +
    +

    The URL request

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest using the default SessionManager to retrieve the contents of the specified url, +method, parameters, encoding, headers and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func download(
    +    _ url: URLConvertible,
    +    method: HTTPMethod = .get,
    +    parameters: Parameters? = nil,
    +    encoding: ParameterEncoding = URLEncoding.default,
    +    headers: HTTPHeaders? = nil,
    +    to destination: DownloadRequest.DownloadFileDestination? = nil)
    +    -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + download(_:to:) + +
    +
    +
    +
    +
    +
    +

    Creates a DownloadRequest using the default SessionManager to retrieve the contents of a URL based on the +specified urlRequest and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func download(
    +    _ urlRequest: URLRequestConvertible,
    +    to destination: DownloadRequest.DownloadFileDestination? = nil)
    +    -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest using the default SessionManager from the resumeData produced from a +previous request cancellation to retrieve the contents of the original request and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken +on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the +data is written incorrectly and will always fail to resume the download. For more information about the bug and +possible workarounds, please refer to the following Stack Overflow post:

    + + + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func download(
    +    resumingWith resumeData: Data,
    +    to destination: DownloadRequest.DownloadFileDestination? = nil)
    +    -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + resumeData + + +
    +

    The resume data. This is an opaque data blob produced by URLSessionDownloadTask + when a task is cancelled. See URLSession -downloadTask(withResumeData:) for additional + information.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

File

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified url, method and headers +for uploading the file.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    _ fileURL: URL,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil)
    +    -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a UploadRequest using the default SessionManager from the specified urlRequest for +uploading the file.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

Data

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified url, method and headers +for uploading the data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    _ data: Data,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil)
    +    -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified urlRequest for +uploading the data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified url, method and headers +for uploading the stream.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    _ stream: InputStream,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil)
    +    -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified urlRequest for +uploading the stream.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold with the default SessionManager and calls +encodingCompletion with new UploadRequest using the url, method and headers.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    multipartFormData: @escaping (MultipartFormData) -> Void,
    +    usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil,
    +    encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold and the default SessionManager and +calls encodingCompletion with new UploadRequest using the urlRequest.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    multipartFormData: @escaping (MultipartFormData) -> Void,
    +    usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +    with urlRequest: URLRequestConvertible,
    +    encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a StreamRequest using the default SessionManager for bidirectional streaming with the hostname +and port.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stream(withHostName hostName: String, port: Int) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + hostName + + +
    +

    The hostname of the server to connect to.

    +
    +
    + + port + + +
    +

    The port of the server to connect to.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + stream(with:) + +
    +
    +
    +
    +
    +
    +

    Creates a StreamRequest using the default SessionManager for bidirectional streaming with the netService.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stream(with netService: NetService) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + netService + + +
    +

    The net service used to identify the endpoint.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Returns whether the two network reachability status values are equal.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==(
    +    lhs: NetworkReachabilityManager.NetworkReachabilityStatus,
    +    rhs: NetworkReachabilityManager.NetworkReachabilityStatus)
    +    -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + lhs + + +
    +

    The left-hand side value to compare.

    +
    +
    + + rhs + + +
    +

    The right-hand side value to compare.

    +
    +
    +
    +
    +

    Return Value

    +

    true if the two values are equal, false otherwise.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols.html new file mode 100644 index 0000000..d54c5dd --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols.html @@ -0,0 +1,548 @@ + + + + Protocols Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + ParameterEncoding + +
    +
    +
    +
    +
    +
    +

    A type used to define how a set of parameters are applied to a URLRequest.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + RequestAdapter + +
    +
    +
    +
    +
    +
    +

    A type that can inspect and optionally adapt a URLRequest in some manner if necessary.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol RequestAdapter
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + RequestRetrier + +
    +
    +
    +
    +
    +
    +

    A type that determines whether a request should be retried after being executed by the specified session manager +and encountering an error.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol RequestRetrier
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The type in which all data response serializers must conform to in order to serialize a response.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol DataResponseSerializerProtocol
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The type in which all download response serializers must conform to in order to serialize a response.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol DownloadResponseSerializerProtocol
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + URLConvertible + +
    +
    +
    +
    +
    +
    +

    Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct +URL requests.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol URLConvertible
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + URLRequestConvertible + +
    +
    +
    +
    +
    +
    +

    Types adopting the URLRequestConvertible protocol can be used to construct URL requests.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol URLRequestConvertible
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/DataResponseSerializerProtocol.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/DataResponseSerializerProtocol.html new file mode 100644 index 0000000..3e3f5a0 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/DataResponseSerializerProtocol.html @@ -0,0 +1,387 @@ + + + + DataResponseSerializerProtocol Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataResponseSerializerProtocol

+
+
+
public protocol DataResponseSerializerProtocol
+ +
+
+

The type in which all data response serializers must conform to in order to serialize a response.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DataResponseSerializerType.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    associatedtype SerializedObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, data and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<SerializedObject>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/DownloadResponseSerializerProtocol.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/DownloadResponseSerializerProtocol.html new file mode 100644 index 0000000..97f92e3 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/DownloadResponseSerializerProtocol.html @@ -0,0 +1,387 @@ + + + + DownloadResponseSerializerProtocol Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadResponseSerializerProtocol

+
+
+
public protocol DownloadResponseSerializerProtocol
+ +
+
+

The type in which all download response serializers must conform to in order to serialize a response.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DownloadResponseSerializerType.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    associatedtype SerializedObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, url and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<SerializedObject>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/ParameterEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/ParameterEncoding.html new file mode 100644 index 0000000..b34c4e5 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/ParameterEncoding.html @@ -0,0 +1,400 @@ + + + + ParameterEncoding Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ParameterEncoding

+
+
+
public protocol ParameterEncoding
+ +
+
+

A type used to define how a set of parameters are applied to a URLRequest.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An AFError.parameterEncodingFailed error if encoding fails.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/RequestAdapter.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/RequestAdapter.html new file mode 100644 index 0000000..fd434e9 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/RequestAdapter.html @@ -0,0 +1,388 @@ + + + + RequestAdapter Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

RequestAdapter

+
+
+
public protocol RequestAdapter
+ +
+
+

A type that can inspect and optionally adapt a URLRequest in some manner if necessary.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + adapt(_:) + +
    +
    +
    +
    +
    +
    +

    Inspects and adapts the specified URLRequest in some manner if necessary and returns the result.

    +
    +

    Throws

    +

    An Error if the adaptation encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func adapt(_ urlRequest: URLRequest) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + urlRequest + + +
    +

    The URL request to adapt.

    +
    +
    +
    +
    +

    Return Value

    +

    The adapted URLRequest.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/RequestRetrier.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/RequestRetrier.html new file mode 100644 index 0000000..ad246db --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/RequestRetrier.html @@ -0,0 +1,420 @@ + + + + RequestRetrier Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

RequestRetrier

+
+
+
public protocol RequestRetrier
+ +
+
+

A type that determines whether a request should be retried after being executed by the specified session manager +and encountering an error.

+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Determines whether the Request should be retried by calling the completion closure.

    + +

    This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs +to be retried. The one requirement is that the completion closure is called to ensure the request is properly +cleaned up after.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + manager + + +
    +

    The session manager the request was executed on.

    +
    +
    + + request + + +
    +

    The request that failed due to the encountered error.

    +
    +
    + + error + + +
    +

    The error encountered when executing the request.

    +
    +
    + + completion + + +
    +

    The completion closure to be executed when retry decision has been determined.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/URLConvertible.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/URLConvertible.html new file mode 100644 index 0000000..1ac7a84 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/URLConvertible.html @@ -0,0 +1,370 @@ + + + + URLConvertible Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLConvertible

+
+
+
public protocol URLConvertible
+ +
+
+

Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct +URL requests.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns a URL that conforms to RFC 2396 or throws an Error.

    +
    +

    Throws

    +

    An Error if the type cannot be converted to a URL.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func asURL() throws -> URL
    + +
    +
    +
    +

    Return Value

    +

    A URL or throws an Error.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/URLRequestConvertible.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/URLRequestConvertible.html new file mode 100644 index 0000000..2a8cebe --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Protocols/URLRequestConvertible.html @@ -0,0 +1,403 @@ + + + + URLRequestConvertible Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLRequestConvertible

+
+
+
public protocol URLRequestConvertible
+ +
+
+

Types adopting the URLRequestConvertible protocol can be used to construct URL requests.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURLRequest() + +
    +
    +
    +
    +
    +
    +

    Returns a URL request or throws if an Error was encountered.

    +
    +

    Throws

    +

    An Error if the underlying URLRequest is nil.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func asURLRequest() throws -> URLRequest
    + +
    +
    +
    +

    Return Value

    +

    A URL request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + urlRequest + + + Extension method + +
    +
    +
    +
    +
    +
    +

    The URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var urlRequest: URLRequest?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs.html new file mode 100644 index 0000000..ab65031 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs.html @@ -0,0 +1,652 @@ + + + + Structs Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Structs

+

The following structs are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Timeline + +
    +
    +
    +
    +
    +
    +

    Responsible for computing the timing metrics for the complete lifecycle of a Request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Timeline
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + URLEncoding + +
    +
    +
    +
    +
    +
    +

    Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +the HTTP body depends on the destination of the encoding.

    + +

    The Content-Type HTTP header field of an encoded request with HTTP body is set to +application/x-www-form-urlencoded; charset=utf-8. Since there is no published specification for how to encode +collection types, the convention of appending [] to the key for array values (foo[]=1&foo[]=2), and appending +the key surrounded by square brackets for nested dictionary values (foo[bar]=baz).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct URLEncoding: ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + JSONEncoding + +
    +
    +
    +
    +
    +
    +

    Uses JSONSerialization to create a JSON representation of the parameters object, which is set as the body of the +request. The Content-Type HTTP header field of an encoded request is set to application/json.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct JSONEncoding: ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + PropertyListEncoding + +
    +
    +
    +
    +
    +
    +

    Uses PropertyListSerialization to create a plist representation of the parameters object, according to the +associated format and write options values, which is set as the body of the request. The Content-Type HTTP header +field of an encoded request is set to application/x-plist.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct PropertyListEncoding: ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ +
+
+
    +
  • +
    + + + + DefaultDataResponse + +
    +
    +
    +
    +
    +
    +

    Used to store all data associated with an non-serialized response of a data or upload request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DefaultDataResponse
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DataResponse + +
    +
    +
    +
    +
    +
    +

    Used to store all data associated with a serialized response of a data or upload request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DataResponse<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Used to store all data associated with an non-serialized response of a download request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DefaultDownloadResponse
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DownloadResponse + +
    +
    +
    +
    +
    +
    +

    Used to store all data associated with a serialized response of a download request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DownloadResponse<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DataResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DataResponse.html new file mode 100644 index 0000000..7d73119 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DataResponse.html @@ -0,0 +1,836 @@ + + + + DataResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataResponse

+
+
+
public struct DataResponse<Value>
+ +
+
+

Used to store all data associated with a serialized response of a data or upload request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + data + +
    +
    +
    +
    +
    +
    +

    The data returned by the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let data: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + result + +
    +
    +
    +
    +
    +
    +

    The result of response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let result: Result<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Returns the associated value of the result if it is a success, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: Value?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Returns the associated error value if the result if it is a failure, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DataResponse instance with the specified parameters derived from response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        result: Result<Value>,
    +        timeline: Timeline = Timeline())
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + data + + +
    +

    The data returned by the server.

    +
    +
    + + result + + +
    +

    The result of response serialization.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the Request. Defaults to Timeline().

    +
    +
    +
    +
    +

    Return Value

    +

    The new DataResponse instance.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes whether the result was a +success or failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The debug textual representation used when written to an output stream, which includes the URL request, the URL +response, the server data, the response serialization result and the timeline.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + map(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the result of this DataResponse is a success, passing the unwrapped +result value as a parameter.

    + +

    Use the map method with a closure that does not throw. For example:

    +
    let possibleData: DataResponse<Data> = ...
    +let possibleInt = possibleData.map { $0.count }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func map<T>(_ transform: (Value) -> T) -> DataResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A DataResponse whose result wraps the value returned by the given closure. If this instance’s + result is a failure, returns a response wrapping the same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMap(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the given closure when the result of this DataResponse is a success, passing the unwrapped result +value as a parameter.

    + +

    Use the flatMap method with a closure that may throw an error. For example:

    +
    let possibleData: DataResponse<Data> = ...
    +let possibleObject = possibleData.flatMap {
    +    try JSONSerialization.jsonObject(with: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMap<T>(_ transform: (Value) throws -> T) -> DataResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A success or failure DataResponse depending on the result of the given closure. If this instance’s + result is a failure, returns the same failure.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DataResponseSerializer.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DataResponseSerializer.html new file mode 100644 index 0000000..3e3f299 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DataResponseSerializer.html @@ -0,0 +1,437 @@ + + + + DataResponseSerializer Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataResponseSerializer

+
+
+
public struct DataResponseSerializer<Value>: DataResponseSerializerProtocol
+ +
+
+

A generic DataResponseSerializerType used to serialize a request, response, and data into a serialized object.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DataResponseSerializer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias SerializedObject = Value
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, data and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<Value>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes the ResponseSerializer instance with the given serialize response closure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<Value>)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + serializeResponse + + +
    +

    The closure used to serialize the response.

    +
    +
    +
    +
    +

    Return Value

    +

    The new generic response serializer instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DefaultDataResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DefaultDataResponse.html new file mode 100644 index 0000000..637657a --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DefaultDataResponse.html @@ -0,0 +1,611 @@ + + + + DefaultDataResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DefaultDataResponse

+
+
+
public struct DefaultDataResponse
+ +
+
+

Used to store all data associated with an non-serialized response of a data or upload request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + data + +
    +
    +
    +
    +
    +
    +

    The data returned by the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let data: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    The error encountered while executing or validating the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let error: Error?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DefaultDataResponse instance from the specified parameters.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?,
    +        timeline: Timeline = Timeline(),
    +        metrics: AnyObject? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + data + + +
    +

    The data returned by the server.

    +
    +
    + + error + + +
    +

    The error encountered while executing or validating the request.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the request. Timeline() by default.

    +
    +
    + + metrics + + +
    +

    The task metrics containing the request / response statistics. nil by default.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DefaultDownloadResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DefaultDownloadResponse.html new file mode 100644 index 0000000..dfe52c4 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DefaultDownloadResponse.html @@ -0,0 +1,691 @@ + + + + DefaultDownloadResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DefaultDownloadResponse

+
+
+
public struct DefaultDownloadResponse
+ +
+
+

Used to store all data associated with an non-serialized response of a download request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + temporaryURL + +
    +
    +
    +
    +
    +
    +

    The temporary destination URL of the data returned from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let temporaryURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + destinationURL + +
    +
    +
    +
    +
    +
    +

    The final destination URL of the data returned from the server if it was moved.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let destinationURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + resumeData + +
    +
    +
    +
    +
    +
    +

    The resume data generated if the request was cancelled.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let resumeData: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    The error encountered while executing or validating the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let error: Error?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DefaultDownloadResponse instance from the specified parameters.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        temporaryURL: URL?,
    +        destinationURL: URL?,
    +        resumeData: Data?,
    +        error: Error?,
    +        timeline: Timeline = Timeline(),
    +        metrics: AnyObject? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + temporaryURL + + +
    +

    The temporary destination URL of the data returned from the server.

    +
    +
    + + destinationURL + + +
    +

    The final destination URL of the data returned from the server if it was moved.

    +
    +
    + + resumeData + + +
    +

    The resume data generated if the request was cancelled.

    +
    +
    + + error + + +
    +

    The error encountered while executing or validating the request.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the request. Timeline() by default.

    +
    +
    + + metrics + + +
    +

    The task metrics containing the request / response statistics. nil by default.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DownloadResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DownloadResponse.html new file mode 100644 index 0000000..eeba814 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DownloadResponse.html @@ -0,0 +1,917 @@ + + + + DownloadResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadResponse

+
+
+
public struct DownloadResponse<Value>
+ +
+
+

Used to store all data associated with a serialized response of a download request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + temporaryURL + +
    +
    +
    +
    +
    +
    +

    The temporary destination URL of the data returned from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let temporaryURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + destinationURL + +
    +
    +
    +
    +
    +
    +

    The final destination URL of the data returned from the server if it was moved.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let destinationURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + resumeData + +
    +
    +
    +
    +
    +
    +

    The resume data generated if the request was cancelled.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let resumeData: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + result + +
    +
    +
    +
    +
    +
    +

    The result of response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let result: Result<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Returns the associated value of the result if it is a success, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: Value?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Returns the associated error value if the result if it is a failure, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadResponse instance with the specified parameters derived from response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        temporaryURL: URL?,
    +        destinationURL: URL?,
    +        resumeData: Data?,
    +        result: Result<Value>,
    +        timeline: Timeline = Timeline())
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + temporaryURL + + +
    +

    The temporary destination URL of the data returned from the server.

    +
    +
    + + destinationURL + + +
    +

    The final destination URL of the data returned from the server if it was moved.

    +
    +
    + + resumeData + + +
    +

    The resume data generated if the request was cancelled.

    +
    +
    + + result + + +
    +

    The result of response serialization.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the Request. Defaults to Timeline().

    +
    +
    +
    +
    +

    Return Value

    +

    The new DownloadResponse instance.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes whether the result was a +success or failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The debug textual representation used when written to an output stream, which includes the URL request, the URL +response, the temporary and destination URLs, the resume data, the response serialization result and the +timeline.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + map(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the given closure when the result of this DownloadResponse is a success, passing the unwrapped +result value as a parameter.

    + +

    Use the map method with a closure that does not throw. For example:

    +
    let possibleData: DownloadResponse<Data> = ...
    +let possibleInt = possibleData.map { $0.count }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func map<T>(_ transform: (Value) -> T) -> DownloadResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A DownloadResponse whose result wraps the value returned by the given closure. If this instance’s + result is a failure, returns a response wrapping the same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMap(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the given closure when the result of this DownloadResponse is a success, passing the unwrapped +result value as a parameter.

    + +

    Use the flatMap method with a closure that may throw an error. For example:

    +
    let possibleData: DownloadResponse<Data> = ...
    +let possibleObject = possibleData.flatMap {
    +    try JSONSerialization.jsonObject(with: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMap<T>(_ transform: (Value) throws -> T) -> DownloadResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A success or failure DownloadResponse depending on the result of the given closure. If this +instance’s result is a failure, returns the same failure.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DownloadResponseSerializer.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DownloadResponseSerializer.html new file mode 100644 index 0000000..5d68cff --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/DownloadResponseSerializer.html @@ -0,0 +1,437 @@ + + + + DownloadResponseSerializer Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadResponseSerializer

+
+
+
public struct DownloadResponseSerializer<Value>: DownloadResponseSerializerProtocol
+ +
+
+

A generic DownloadResponseSerializerType used to serialize a request, response, and data into a serialized object.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DownloadResponseSerializer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias SerializedObject = Value
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, url and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<Value>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes the ResponseSerializer instance with the given serialize response closure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<Value>)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + serializeResponse + + +
    +

    The closure used to serialize the response.

    +
    +
    +
    +
    +

    Return Value

    +

    The new generic response serializer instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/JSONEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/JSONEncoding.html new file mode 100644 index 0000000..175ff1d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/JSONEncoding.html @@ -0,0 +1,628 @@ + + + + JSONEncoding Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

JSONEncoding

+
+
+
public struct JSONEncoding: ParameterEncoding
+ +
+
+

Uses JSONSerialization to create a JSON representation of the parameters object, which is set as the body of the +request. The Content-Type HTTP header field of an encoded request is set to application/json.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    Returns a JSONEncoding instance with default writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var `default`: JSONEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + prettyPrinted + +
    +
    +
    +
    +
    +
    +

    Returns a JSONEncoding instance with .prettyPrinted writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var prettyPrinted: JSONEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    The options for writing the parameters as JSON data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let options: JSONSerialization.WritingOptions
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(options:) + +
    +
    +
    +
    +
    +
    +

    Creates a JSONEncoding instance using the specified options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(options: JSONSerialization.WritingOptions = [])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The options for writing the parameters as JSON data.

    +
    +
    +
    +
    +

    Return Value

    +

    The new JSONEncoding instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to apply the JSON object to.

    +
    +
    + + jsonObject + + +
    +

    The JSON object to apply to the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/PropertyListEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/PropertyListEncoding.html new file mode 100644 index 0000000..0cd00ba --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/PropertyListEncoding.html @@ -0,0 +1,630 @@ + + + + PropertyListEncoding Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

PropertyListEncoding

+
+
+
public struct PropertyListEncoding: ParameterEncoding
+ +
+
+

Uses PropertyListSerialization to create a plist representation of the parameters object, according to the +associated format and write options values, which is set as the body of the request. The Content-Type HTTP header +field of an encoded request is set to application/x-plist.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    Returns a default PropertyListEncoding instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var `default`: PropertyListEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + xml + +
    +
    +
    +
    +
    +
    +

    Returns a PropertyListEncoding instance with xml formatting and default writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var xml: PropertyListEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + binary + +
    +
    +
    +
    +
    +
    +

    Returns a PropertyListEncoding instance with binary formatting and default writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var binary: PropertyListEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + format + +
    +
    +
    +
    +
    +
    +

    The property list serialization format.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let format: PropertyListSerialization.PropertyListFormat
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    The options for writing the parameters as plist data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let options: PropertyListSerialization.WriteOptions
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(format:options:) + +
    +
    +
    +
    +
    +
    +

    Creates a PropertyListEncoding instance using the specified format and options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        format: PropertyListSerialization.PropertyListFormat = .xml,
    +        options: PropertyListSerialization.WriteOptions = 0)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + format + + +
    +

    The property list serialization format.

    +
    +
    + + options + + +
    +

    The options for writing the parameters as plist data.

    +
    +
    +
    +
    +

    Return Value

    +

    The new PropertyListEncoding instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/Timeline.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/Timeline.html new file mode 100644 index 0000000..0095bba --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/Timeline.html @@ -0,0 +1,706 @@ + + + + Timeline Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Timeline

+
+
+
public struct Timeline
+ +
+
+

Responsible for computing the timing metrics for the complete lifecycle of a Request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + requestStartTime + +
    +
    +
    +
    +
    +
    +

    The time the request was initialized.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let requestStartTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + initialResponseTime + +
    +
    +
    +
    +
    +
    +

    The time the first bytes were received from or sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let initialResponseTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + requestCompletedTime + +
    +
    +
    +
    +
    +
    +

    The time when the request was completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let requestCompletedTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The time when the response serialization was completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let serializationCompletedTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + latency + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request started to the initial response from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let latency: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + requestDuration + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request started to the time the request completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let requestDuration: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializationDuration + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request completed to the time response serialization completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let serializationDuration: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + totalDuration + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request started to the time response serialization completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let totalDuration: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new Timeline instance with the specified request times.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        requestStartTime: CFAbsoluteTime = 0.0,
    +        initialResponseTime: CFAbsoluteTime = 0.0,
    +        requestCompletedTime: CFAbsoluteTime = 0.0,
    +        serializationCompletedTime: CFAbsoluteTime = 0.0)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + requestStartTime + + +
    +

    The time the request was initialized. Defaults to 0.0.

    +
    +
    + + initialResponseTime + + +
    +

    The time the first bytes were received from or sent to the server. + Defaults to 0.0.

    +
    +
    + + requestCompletedTime + + +
    +

    The time when the request was completed. Defaults to 0.0.

    +
    +
    + + serializationCompletedTime + + +
    +

    The time when the response serialization was completed. Defaults + to 0.0.

    +
    +
    +
    +
    +

    Return Value

    +

    The new Timeline instance.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes the latency, the request +duration and the total duration.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes the request start time, the +initial response time, the request completed time, the serialization completed time, the latency, the request +duration and the total duration.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/URLEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/URLEncoding.html new file mode 100644 index 0000000..cbee047 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/URLEncoding.html @@ -0,0 +1,791 @@ + + + + URLEncoding Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLEncoding

+
+
+
public struct URLEncoding: ParameterEncoding
+ +
+
+

Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +the HTTP body depends on the destination of the encoding.

+ +

The Content-Type HTTP header field of an encoded request with HTTP body is set to +application/x-www-form-urlencoded; charset=utf-8. Since there is no published specification for how to encode +collection types, the convention of appending [] to the key for array values (foo[]=1&foo[]=2), and appending +the key surrounded by square brackets for nested dictionary values (foo[bar]=baz).

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + Destination + +
    +
    +
    +
    +
    +
    +

    Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the +resulting URL request.

    + +
      +
    • methodDependent: Applies encoded query string result to existing query string for GET, HEAD and DELETE + requests and sets as the HTTP body for requests with any other HTTP method.
    • +
    • queryString: Sets or appends encoded query string result to existing query string.
    • +
    • httpBody: Sets encoded query string result as the HTTP body of the URL request.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    Returns a default URLEncoding instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var `default`: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + methodDependent + +
    +
    +
    +
    +
    +
    +

    Returns a URLEncoding instance with a .methodDependent destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var methodDependent: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + queryString + +
    +
    +
    +
    +
    +
    +

    Returns a URLEncoding instance with a .queryString destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var queryString: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + httpBody + +
    +
    +
    +
    +
    +
    +

    Returns a URLEncoding instance with an .httpBody destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var httpBody: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + destination + +
    +
    +
    +
    +
    +
    +

    The destination defining where the encoded query string is to be applied to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let destination: Destination
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(destination:) + +
    +
    +
    +
    +
    +
    +

    Creates a URLEncoding instance using the specified destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(destination: Destination = .methodDependent)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + destination + + +
    +

    The destination defining where the encoded query string is to be applied.

    +
    +
    +
    +
    +

    Return Value

    +

    The new URLEncoding instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func queryComponents(fromKey key: String, value: Any) -> [(String, String)]
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + key + + +
    +

    The key of the query component.

    +
    +
    + + value + + +
    +

    The value of the query component.

    +
    +
    +
    +
    +

    Return Value

    +

    The percent-escaped, URL encoded query string components.

    +
    +
    +
    +
  • +
  • +
    + + + + escape(_:) + +
    +
    +
    +
    +
    +
    +

    Returns a percent-escaped string following RFC 3986 for a query string key or value.

    + +

    RFC 3986 states that the following characters are reserved characters.

    + +
      +
    • General Delimiters: :, #, [, ], @, ?, /
    • +
    • Sub-Delimiters: !, $, &, , (, ), *, +, ,, ;, =
    • +
    + +

    In RFC 3986 - Section 3.4, it states that the ? and / characters should not be escaped to allow +query strings to include a URL. Therefore, all reserved characters with the exception of ? and / +should be percent-escaped in the query string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func escape(_ string: String) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + string + + +
    +

    The string to be percent-escaped.

    +
    +
    +
    +
    +

    Return Value

    +

    The percent-escaped string.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/URLEncoding/Destination.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/URLEncoding/Destination.html new file mode 100644 index 0000000..bbe4739 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Structs/URLEncoding/Destination.html @@ -0,0 +1,422 @@ + + + + Destination Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Destination

+
+
+
public enum Destination
+ +
+
+

Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the +resulting URL request.

+ +
    +
  • methodDependent: Applies encoded query string result to existing query string for GET, HEAD and DELETE + requests and sets as the HTTP body for requests with any other HTTP method.
  • +
  • queryString: Sets or appends encoded query string result to existing query string.
  • +
  • httpBody: Sets encoded query string result as the HTTP body of the URL request.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + methodDependent + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + queryString + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + httpBody + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Typealiases.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Typealiases.html new file mode 100644 index 0000000..2f7137c --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/Typealiases.html @@ -0,0 +1,415 @@ + + + + Typealiases Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Typealiases

+

The following typealiases are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Parameters + +
    +
    +
    +
    +
    +
    +

    A dictionary of parameters to apply to a URLRequest.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Parameters = [String: Any]
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    A closure executed when the RequestRetrier determines whether a Request should be retried or not.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + HTTPHeaders + +
    +
    +
    +
    +
    +
    +

    A dictionary of headers to apply to a URLRequest.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias HTTPHeaders = [String: String]
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/_config.yml b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/_config.yml new file mode 100644 index 0000000..2f7efbe --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/badge.svg b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/badge.svg new file mode 100644 index 0000000..5aff34b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/badge.svg @@ -0,0 +1 @@ +documentationdocumentation87%87% \ No newline at end of file diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/css/highlight.css b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/css/highlight.css new file mode 100644 index 0000000..d0db0e1 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/css/highlight.css @@ -0,0 +1,200 @@ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight { + /* Comment */ + /* Error */ + /* Keyword */ + /* Operator */ + /* Comment.Multiline */ + /* Comment.Preproc */ + /* Comment.Single */ + /* Comment.Special */ + /* Generic.Deleted */ + /* Generic.Deleted.Specific */ + /* Generic.Emph */ + /* Generic.Error */ + /* Generic.Heading */ + /* Generic.Inserted */ + /* Generic.Inserted.Specific */ + /* Generic.Output */ + /* Generic.Prompt */ + /* Generic.Strong */ + /* Generic.Subheading */ + /* Generic.Traceback */ + /* Keyword.Constant */ + /* Keyword.Declaration */ + /* Keyword.Pseudo */ + /* Keyword.Reserved */ + /* Keyword.Type */ + /* Literal.Number */ + /* Literal.String */ + /* Name.Attribute */ + /* Name.Builtin */ + /* Name.Class */ + /* Name.Constant */ + /* Name.Entity */ + /* Name.Exception */ + /* Name.Function */ + /* Name.Namespace */ + /* Name.Tag */ + /* Name.Variable */ + /* Operator.Word */ + /* Text.Whitespace */ + /* Literal.Number.Float */ + /* Literal.Number.Hex */ + /* Literal.Number.Integer */ + /* Literal.Number.Oct */ + /* Literal.String.Backtick */ + /* Literal.String.Char */ + /* Literal.String.Doc */ + /* Literal.String.Double */ + /* Literal.String.Escape */ + /* Literal.String.Heredoc */ + /* Literal.String.Interpol */ + /* Literal.String.Other */ + /* Literal.String.Regex */ + /* Literal.String.Single */ + /* Literal.String.Symbol */ + /* Name.Builtin.Pseudo */ + /* Name.Variable.Class */ + /* Name.Variable.Global */ + /* Name.Variable.Instance */ + /* Literal.Number.Integer.Long */ } + .highlight .c { + color: #999988; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + color: #000000; + font-weight: bold; } + .highlight .o { + color: #000000; + font-weight: bold; } + .highlight .cm { + color: #999988; + font-style: italic; } + .highlight .cp { + color: #999999; + font-weight: bold; } + .highlight .c1 { + color: #999988; + font-style: italic; } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .highlight .ge { + color: #000000; + font-style: italic; } + .highlight .gr { + color: #aa0000; } + .highlight .gh { + color: #999999; } + .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .highlight .go { + color: #888888; } + .highlight .gp { + color: #555555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaaaaa; } + .highlight .gt { + color: #aa0000; } + .highlight .kc { + color: #000000; + font-weight: bold; } + .highlight .kd { + color: #000000; + font-weight: bold; } + .highlight .kp { + color: #000000; + font-weight: bold; } + .highlight .kr { + color: #000000; + font-weight: bold; } + .highlight .kt { + color: #445588; } + .highlight .m { + color: #009999; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #445588; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #990000; + font-weight: bold; } + .highlight .nf { + color: #990000; } + .highlight .nn { + color: #555555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + color: #000000; + font-weight: bold; } + .highlight .w { + color: #bbbbbb; } + .highlight .mf { + color: #009999; } + .highlight .mh { + color: #009999; } + .highlight .mi { + color: #009999; } + .highlight .mo { + color: #009999; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #009999; } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/css/jazzy.css b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/css/jazzy.css new file mode 100644 index 0000000..c83db5b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/css/jazzy.css @@ -0,0 +1,368 @@ +*, *:before, *:after { + box-sizing: inherit; } + +body { + margin: 0; + background: #fff; + color: #333; + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + letter-spacing: .2px; + -webkit-font-smoothing: antialiased; + box-sizing: border-box; } + +h1 { + font-size: 2rem; + font-weight: 700; + margin: 1.275em 0 0.6em; } + +h2 { + font-size: 1.75rem; + font-weight: 700; + margin: 1.275em 0 0.3em; } + +h3 { + font-size: 1.5rem; + font-weight: 700; + margin: 1em 0 0.3em; } + +h4 { + font-size: 1.25rem; + font-weight: 700; + margin: 1.275em 0 0.85em; } + +h5 { + font-size: 1rem; + font-weight: 700; + margin: 1.275em 0 0.85em; } + +h6 { + font-size: 1rem; + font-weight: 700; + margin: 1.275em 0 0.85em; + color: #777; } + +p { + margin: 0 0 1em; } + +ul, ol { + padding: 0 0 0 2em; + margin: 0 0 0.85em; } + +blockquote { + margin: 0 0 0.85em; + padding: 0 15px; + color: #858585; + border-left: 4px solid #e5e5e5; } + +img { + max-width: 100%; } + +a { + color: #4183c4; + text-decoration: none; } + a:hover, a:focus { + outline: 0; + text-decoration: underline; } + +table { + background: #fff; + width: 100%; + border-collapse: collapse; + border-spacing: 0; + overflow: auto; + margin: 0 0 0.85em; } + +tr:nth-child(2n) { + background-color: #fbfbfb; } + +th, td { + padding: 6px 13px; + border: 1px solid #ddd; } + +pre { + margin: 0 0 1.275em; + padding: .85em 1em; + overflow: auto; + background: #f7f7f7; + font-size: .85em; + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +p > code, li > code { + background: #f7f7f7; + padding: .2em; } + p > code:before, p > code:after, li > code:before, li > code:after { + letter-spacing: -.2em; + content: "\00a0"; } + +pre code { + padding: 0; + white-space: pre; } + +.content-wrapper { + display: flex; + flex-direction: column; } + @media (min-width: 768px) { + .content-wrapper { + flex-direction: row; } } + +.header { + display: flex; + padding: 8px; + font-size: 0.875em; + background: #444; + color: #999; } + +.header-col { + margin: 0; + padding: 0 8px; } + +.header-col--primary { + flex: 1; } + +.header-link { + color: #fff; } + +.header-icon { + padding-right: 6px; + vertical-align: -4px; + height: 16px; } + +.breadcrumbs { + font-size: 0.875em; + padding: 8px 16px; + margin: 0; + background: #fbfbfb; + border-bottom: 1px solid #ddd; } + +.carat { + height: 10px; + margin: 0 5px; } + +.navigation { + order: 2; } + @media (min-width: 768px) { + .navigation { + order: 1; + width: 25%; + max-width: 300px; + padding-bottom: 64px; + overflow: hidden; + word-wrap: normal; + background: #fbfbfb; + border-right: 1px solid #ddd; } } + +.nav-groups { + list-style-type: none; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #ddd; + padding: 8px 0 8px 16px; } + +.nav-group-name-link { + color: #333; } + +.nav-group-tasks { + margin: 8px 0; + padding: 0 0 0 8px; } + +.nav-group-task { + font-size: 1em; + list-style-type: none; + white-space: nowrap; } + +.nav-group-task-link { + color: #808080; } + +.main-content { + order: 1; } + @media (min-width: 768px) { + .main-content { + order: 2; + flex: 1; + padding-bottom: 60px; } } + +.section { + padding: 0 32px; + border-bottom: 1px solid #ddd; } + +.section-content { + max-width: 834px; + margin: 0 auto; + padding: 16px 0; } + +.section-name { + color: #666; + display: block; } + +.declaration .highlight { + overflow-x: initial; + padding: 8px 0; + margin: 0; + background-color: transparent; + border: none; } + +.task-group-section { + border-top: 1px solid #ddd; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; } + +.item-container { + padding: 0; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; } + .item .token { + padding-left: 3px; + margin-left: 0px; + font-size: 1rem; } + .item .declaration-note { + font-size: .85em; + color: #808080; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #ddd; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + left: 21px; + top: 7px; + display: block; + position: absolute; + width: 12px; + height: 12px; + border-left: 1px solid #ddd; + border-top: 1px solid #ddd; + background: #fff; + transform: rotate(45deg); } + +.height-container { + display: none; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #fff; + border: 1px solid #ddd; + border-top-width: 0; + padding-top: 10px; + padding-bottom: 5px; + padding: 8px 16px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4183c4; } + +.aside-warning { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #ddd; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +.footer { + padding: 8px 16px; + background: #444; + color: #ddd; + font-size: 0.8em; } + .footer p { + margin: 8px 0; } + .footer a { + color: #fff; } + +html.dash .header, html.dash .breadcrumbs, html.dash .navigation { + display: none; } +html.dash .height-container { + display: block; } + +form[role=search] input { + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 24px; + padding: 0 10px; + margin: 0; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } +form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fbfbfb; + color: #333; + border: 1px solid #ddd; } +form[role=search] .tt-highlight { + font-weight: bold; } +form[role=search] .tt-suggestion { + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } +form[role=search] .tt-suggestion:hover, +form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } +form[role=search] .tt-suggestion:hover .doc-parent-name, +form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Info.plist b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Info.plist new file mode 100644 index 0000000..2710d06 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleIdentifier + com.jazzy.alamofire + CFBundleName + Alamofire + DocSetPlatformFamily + alamofire + isDashDocset + + dashIndexFilePath + index.html + isJavaScriptEnabled + + DashDocSetFamily + dashtoc + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes.html new file mode 100644 index 0000000..4a248d3 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes.html @@ -0,0 +1,693 @@ + + + + Classes Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Classes

+

The following classes are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SessionDelegate + +
    +
    +
    +
    +
    +
    +

    Responsible for handling all delegate callbacks for the underlying session.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class SessionDelegate: NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Request + +
    +
    +
    +
    +
    +
    +

    Responsible for sending a request and receiving the response and associated data from the server, as well as +managing its underlying URLSessionTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DataRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionDataTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class DataRequest: Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DownloadRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionDownloadTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class DownloadRequest: Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + UploadRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionUploadTask.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class UploadRequest: DataRequest
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + StreamRequest + +
    +
    +
    +
    +
    +
    +

    Specific type of Request that manages an underlying URLSessionStreamTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class StreamRequest: Request
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + SessionManager + +
    +
    +
    +
    +
    +
    +

    Responsible for creating and managing Request objects, as well as their underlying NSURLSession.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class SessionManager
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + MultipartFormData + +
    +
    +
    +
    +
    +
    +

    Constructs multipart/form-data for uploads within an HTTP or HTTPS body. There are currently two ways to encode +multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.

    + +

    For more information on multipart/form-data in general, please refer to the RFC-2388 and RFC-2045 specs as well +and the w3 form documentation.

    + + + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class MultipartFormData
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The NetworkReachabilityManager class listens for reachability changes of hosts 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 retry +network requests 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 more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public class NetworkReachabilityManager
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + TaskDelegate + +
    +
    +
    +
    +
    +
    +

    The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +executing all operations attached to the serial operation queue upon task completion.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class TaskDelegate: NSObject
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DataRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DataRequest.html new file mode 100644 index 0000000..f861305 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DataRequest.html @@ -0,0 +1,1357 @@ + + + + DataRequest Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataRequest

+
+
+
open class DataRequest: Request
+ +
+
+

Specific type of Request that manages an underlying URLSessionDataTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + progress + +
    +
    +
    +
    +
    +
    +

    The progress of fetching the response data from the server for the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var progress: Progress
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + + +

Stream

+
+
+
    +
  • +
    + + + + stream(closure:) + +
    +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the request as data is read from the server.

    + +

    This closure returns the bytes most recently received from the server, not including data from previous calls. +If this closure is set, data will only be available within this closure, and will not be saved elsewhere. It is +also important to note that the server data in any Response object will be nil.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func stream(closure: ((Data) -> Void)? = nil) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    The code to be executed periodically during the lifecycle of the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the Request as data is read from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The dispatch queue to execute the closure on.

    +
    +
    + + closure + + +
    +

    The code to be executed periodically as data is read from the server.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response(queue: DispatchQueue? = nil, completionHandler: @escaping (DefaultDataResponse) -> Void) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response<T: DataResponseSerializerProtocol>(
    +        queue: DispatchQueue? = nil,
    +        responseSerializer: T,
    +        completionHandler: @escaping (DataResponse<T.SerializedObject>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + responseSerializer + + +
    +

    The response serializer responsible for serializing the request, response, + and data.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns the associated data as-is.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func dataResponseSerializer() -> DataResponseSerializer<Data>
    + +
    +
    +
    +

    Return Value

    +

    A data response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseData(
    +        queue: DispatchQueue? = nil,
    +        completionHandler: @escaping (DataResponse<Data>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a result string type initialized from the response data with +the specified string encoding.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DataResponseSerializer<String>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1.

    +
    +
    +
    +
    +

    Return Value

    +

    A string response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseString(
    +        queue: DispatchQueue? = nil,
    +        encoding: String.Encoding? = nil,
    +        completionHandler: @escaping (DataResponse<String>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the + server response, falling back to the default HTTP default character set, + ISO-8859-1.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a JSON object result type constructed from the response data using +JSONSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func jsonResponseSerializer(
    +        options: JSONSerialization.ReadingOptions = .allowFragments)
    +        -> DataResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    +
    +
    +

    Return Value

    +

    A JSON object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseJSON(
    +        queue: DispatchQueue? = nil,
    +        options: JSONSerialization.ReadingOptions = .allowFragments,
    +        completionHandler: @escaping (DataResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns an object constructed from the response data using +PropertyListSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func propertyListResponseSerializer(
    +        options: PropertyListSerialization.ReadOptions = [])
    +        -> DataResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    +
    +
    +

    Return Value

    +

    A property list object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responsePropertyList(
    +        queue: DispatchQueue? = nil,
    +        options: PropertyListSerialization.ReadOptions = [],
    +        completionHandler: @escaping (DataResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Validation + +
    +
    +
    +
    +
    +
    +

    A closure used to validate a request that takes a URL request, a URL response and data, and returns whether the +request was valid.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Validation = (URLRequest?, HTTPURLResponse, Data?) -> ValidationResult
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + validate(_:) + +
    +
    +
    +
    +
    +
    +

    Validates the request, using the specified closure.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate(_ validation: @escaping Validation) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + validation + + +
    +

    A closure to validate the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate(statusCode:) + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + range + + +
    +

    The range of acceptable status codes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Validates that the response has a content type in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + contentType + + +
    +

    The acceptable content types, which may specify wildcard types and/or subtypes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate() + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the default acceptable range of 200…299, and that the content +type matches any specified in the Accept HTTP header field.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate() -> Self
    + +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest.html new file mode 100644 index 0000000..4f7c673 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest.html @@ -0,0 +1,1507 @@ + + + + DownloadRequest Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadRequest

+
+
+
open class DownloadRequest: Request
+ +
+
+

Specific type of Request that manages an underlying URLSessionDownloadTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + DownloadOptions + +
    +
    +
    +
    +
    +
    +

    A collection of options to be executed prior to moving a downloaded file from the temporary URL to the +destination URL.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DownloadOptions: OptionSet
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A closure executed once a download request has successfully completed in order to determine where to move the +temporary file written to during the download process. The closure takes two arguments: the temporary file URL +and the URL response, and returns a two arguments: the file URL where the temporary file should be moved and +the options defining how the file should be moved.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias DownloadFileDestination = (
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + resumeData + +
    +
    +
    +
    +
    +
    +

    The resume data of the underlying download task if available after a failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var resumeData: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + progress + +
    +
    +
    +
    +
    +
    +

    The progress of downloading the response data from the server for the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var progress: Progress
    + +
    +
    +
    +
    +
  • +
+
+
+
+ + + +

State

+
+
+
    +
  • +
    + + + + cancel() + +
    +
    +
    +
    +
    +
    +

    Cancels the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override func cancel()
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the Request as data is read from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func downloadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The dispatch queue to execute the closure on.

    +
    +
    + + closure + + +
    +

    The code to be executed periodically as data is read from the server.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a download file destination closure which uses the default file manager to move the temporary file to a +file URL in the first available directory with the specified search path directory and search path domain mask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open class func suggestedDownloadDestination(
    +        for directory: FileManager.SearchPathDirectory = .documentDirectory,
    +        in domain: FileManager.SearchPathDomainMask = .userDomainMask)
    +        -> DownloadFileDestination
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + directory + + +
    +

    The search path directory. .DocumentDirectory by default.

    +
    +
    + + domain + + +
    +

    The search path domain mask. .UserDomainMask by default.

    +
    +
    +
    +
    +

    Return Value

    +

    A download file destination closure.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response(
    +        queue: DispatchQueue? = nil,
    +        completionHandler: @escaping (DefaultDownloadResponse) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func response<T: DownloadResponseSerializerProtocol>(
    +        queue: DispatchQueue? = nil,
    +        responseSerializer: T,
    +        completionHandler: @escaping (DownloadResponse<T.SerializedObject>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + queue + + +
    +

    The queue on which the completion handler is dispatched.

    +
    +
    + + responseSerializer + + +
    +

    The response serializer responsible for serializing the request, response, + and data contained in the destination url.

    +
    +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns the associated data as-is.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func dataResponseSerializer() -> DownloadResponseSerializer<Data>
    + +
    +
    +
    +

    Return Value

    +

    A data response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseData(
    +        queue: DispatchQueue? = nil,
    +        completionHandler: @escaping (DownloadResponse<Data>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + completionHandler + + +
    +

    The code to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a result string type initialized from the response data with +the specified string encoding.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func stringResponseSerializer(encoding: String.Encoding? = nil) -> DownloadResponseSerializer<String>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1.

    +
    +
    +
    +
    +

    Return Value

    +

    A string response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseString(
    +        queue: DispatchQueue? = nil,
    +        encoding: String.Encoding? = nil,
    +        completionHandler: @escaping (DownloadResponse<String>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the + server response, falling back to the default HTTP default character set, + ISO-8859-1.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns a JSON object result type constructed from the response data using +JSONSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func jsonResponseSerializer(
    +        options: JSONSerialization.ReadingOptions = .allowFragments)
    +        -> DownloadResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    +
    +
    +

    Return Value

    +

    A JSON object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responseJSON(
    +        queue: DispatchQueue? = nil,
    +        options: JSONSerialization.ReadingOptions = .allowFragments,
    +        completionHandler: @escaping (DownloadResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates a response serializer that returns an object constructed from the response data using +PropertyListSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func propertyListResponseSerializer(
    +        options: PropertyListSerialization.ReadOptions = [])
    +        -> DownloadResponseSerializer<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    +
    +
    +

    Return Value

    +

    A property list object response serializer.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Adds a handler to be called once the request has finished.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func responsePropertyList(
    +        queue: DispatchQueue? = nil,
    +        options: PropertyListSerialization.ReadOptions = [],
    +        completionHandler: @escaping (DownloadResponse<Any>) -> Void)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    + + completionHandler + + +
    +

    A closure to be executed once the request has finished.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Validation + +
    +
    +
    +
    +
    +
    +

    A closure used to validate a request that takes a URL request, a URL response, a temporary URL and a +destination URL, and returns whether the request was valid.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Validation = (
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + validate(_:) + +
    +
    +
    +
    +
    +
    +

    Validates the request, using the specified closure.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate(_ validation: @escaping Validation) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + validation + + +
    +

    A closure to validate the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate(statusCode:) + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(statusCode acceptableStatusCodes: S) -> Self where S.Iterator.Element == Int
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + range + + +
    +

    The range of acceptable status codes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Validates that the response has a content type in the specified sequence.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate<S: Sequence>(contentType acceptableContentTypes: S) -> Self where S.Iterator.Element == String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + contentType + + +
    +

    The acceptable content types, which may specify wildcard types and/or subtypes.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • +
    + + + + validate() + +
    +
    +
    +
    +
    +
    +

    Validates that the response has a status code in the default acceptable range of 200…299, and that the content +type matches any specified in the Accept HTTP header field.

    + +

    If validation fails, subsequent calls to response handlers will have an associated error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func validate() -> Self
    + +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest/DownloadOptions.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest/DownloadOptions.html new file mode 100644 index 0000000..d5ee1f3 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/DownloadRequest/DownloadOptions.html @@ -0,0 +1,465 @@ + + + + DownloadOptions Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadOptions

+
+
+
public struct DownloadOptions: OptionSet
+ +
+
+

A collection of options to be executed prior to moving a downloaded file from the temporary URL to the +destination URL.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + rawValue + +
    +
    +
    +
    +
    +
    +

    Returns the raw bitmask value of the option and satisfies the RawRepresentable protocol.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let rawValue: UInt
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    A DownloadOptions flag that creates intermediate directories for the destination URL if specified.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let createIntermediateDirectories = DownloadOptions(rawValue: 1 << 0)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + removePreviousFile + +
    +
    +
    +
    +
    +
    +

    A DownloadOptions flag that removes a previous file from the destination URL if specified.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let removePreviousFile = DownloadOptions(rawValue: 1 << 1)
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(rawValue:) + +
    +
    +
    +
    +
    +
    +

    Creates a DownloadFileDestinationOptions instance with the specified raw value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(rawValue: UInt)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + rawValue + + +
    +

    The raw bitmask value for the option.

    +
    +
    +
    +
    +

    Return Value

    +

    A new log level instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/MultipartFormData.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/MultipartFormData.html new file mode 100644 index 0000000..facabd2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/MultipartFormData.html @@ -0,0 +1,1176 @@ + + + + MultipartFormData Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultipartFormData

+
+
+
open class MultipartFormData
+ +
+
+

Constructs multipart/form-data for uploads within an HTTP or HTTPS body. There are currently two ways to encode +multipart form data. The first way is to encode the data directly in memory. This is very efficient, but can lead +to memory issues if the dataset is too large. The second way is designed for larger datasets and will write all the +data to a single file on disk with all the proper boundary segmentation. The second approach MUST be used for +larger datasets such as video content, otherwise your app may run out of memory when trying to encode the dataset.

+ +

For more information on multipart/form-data in general, please refer to the RFC-2388 and RFC-2045 specs as well +and the w3 form documentation.

+ + + +
+
+ +
+
+
+ +
    +
  • +
    + + + + contentType + +
    +
    +
    +
    +
    +
    +

    The Content-Type header value containing the boundary used to generate the multipart/form-data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open lazy var contentType: String = "multipart/form-data; boundary=\(self.boundary)"
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + contentLength + +
    +
    +
    +
    +
    +
    +

    The content length of all body parts used to generate the multipart/form-data not including the boundaries.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var contentLength: UInt64
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + boundary + +
    +
    +
    +
    +
    +
    +

    The boundary used to separate the body parts in the encoded form data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let boundary: String
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Creates a multipart form data object.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init()
    + +
    +
    +
    +

    Return Value

    +

    The multipart form data object.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + append(_:withName:) + +
    +
    +
    +
    +
    +
    +

    Creates a body part from the data and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name} (HTTP Header)
    • +
    • Encoded data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ data: Data, withName name: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    The data to encode into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the data in the Content-Disposition HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the data and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name} (HTTP Header)
    • +
    • Content-Type: #{generated mimeType} (HTTP Header)
    • +
    • Encoded data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ data: Data, withName name: String, mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to encode into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the data in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the data content type in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the data and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
    • +
    • Content-Type: #{mimeType} (HTTP Header)
    • +
    • Encoded file data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ data: Data, withName name: String, fileName: String, mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to encode into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the data in the Content-Disposition HTTP header.

    +
    +
    + + fileName + + +
    +

    The filename to associate with the data in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the data in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + append(_:withName:) + +
    +
    +
    +
    +
    +
    +

    Creates a body part from the file and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{generated filename} (HTTP Header)
    • +
    • Content-Type: #{generated mimeType} (HTTP Header)
    • +
    • Encoded file data
    • +
    • Multipart form boundary
    • +
    + +

    The filename in the Content-Disposition HTTP header is generated from the last path component of the +fileURL. The Content-Type HTTP header MIME type is generated by mapping the fileURL extension to the +system associated MIME type.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ fileURL: URL, withName name: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + fileURL + + +
    +

    The URL of the file whose content will be encoded into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the file content in the Content-Disposition HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the file and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
    • +
    • Content-Type: #{mimeType} (HTTP Header)
    • +
    • Encoded file data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ fileURL: URL, withName name: String, fileName: String, mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + fileURL + + +
    +

    The URL of the file whose content will be encoded into the multipart form data.

    +
    +
    + + name + + +
    +

    The name to associate with the file content in the Content-Disposition HTTP header.

    +
    +
    + + fileName + + +
    +

    The filename to associate with the file content in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the file content in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part from the stream and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • Content-Disposition: form-data; name=#{name}; filename=#{filename} (HTTP Header)
    • +
    • Content-Type: #{mimeType} (HTTP Header)
    • +
    • Encoded stream data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(
    +        _ stream: InputStream,
    +        withLength length: UInt64,
    +        name: String,
    +        fileName: String,
    +        mimeType: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The input stream to encode in the multipart form data.

    +
    +
    + + length + + +
    +

    The content length of the stream.

    +
    +
    + + name + + +
    +

    The name to associate with the stream content in the Content-Disposition HTTP header.

    +
    +
    + + fileName + + +
    +

    The filename to associate with the stream content in the Content-Disposition HTTP header.

    +
    +
    + + mimeType + + +
    +

    The MIME type to associate with the stream content in the Content-Type HTTP header.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a body part with the headers, stream and length and appends it to the multipart form data object.

    + +

    The body part data will be encoded using the following format:

    + +
      +
    • HTTP headers
    • +
    • Encoded stream data
    • +
    • Multipart form boundary

    • +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func append(_ stream: InputStream, withLength length: UInt64, headers: HTTPHeaders)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The input stream to encode in the multipart form data.

    +
    +
    + + length + + +
    +

    The content length of the stream.

    +
    +
    + + headers + + +
    +

    The HTTP headers for the body part.

    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode() + +
    +
    +
    +
    +
    +
    +

    Encodes all the appended body parts into a single Data value.

    + +

    It is important to note that this method will load all the appended body parts into memory all at the same +time. This method should only be used when the encoded data will have a small memory footprint. For large data +cases, please use the writeEncodedDataToDisk(fileURL:completionHandler:) method.

    +
    +

    Throws

    +

    An AFError if encoding encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode() throws -> Data
    + +
    +
    +
    +

    Return Value

    +

    The encoded Data if encoding is successful.

    +
    +
    +
    +
  • +
  • +
    + + + + writeEncodedData(to:) + +
    +
    +
    +
    +
    +
    +

    Writes the appended body parts into the given file URL.

    + +

    This process is facilitated by reading and writing with input and output streams, respectively. Thus, +this approach is very memory efficient and should be used for large body part data.

    +
    +

    Throws

    +

    An AFError if encoding encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func writeEncodedData(to fileURL: URL) throws
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + fileURL + + +
    +

    The file URL to write the multipart form data into.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager.html new file mode 100644 index 0000000..12bf245 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager.html @@ -0,0 +1,770 @@ + + + + NetworkReachabilityManager Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

NetworkReachabilityManager

+
+
+
public class NetworkReachabilityManager
+ +
+
+

The NetworkReachabilityManager class listens for reachability changes of hosts 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 retry +network requests 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.

+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Defines the various states of network reachability.

    + +
      +
    • unknown: It is unknown whether the network is reachable.
    • +
    • notReachable: The network is not reachable.
    • +
    • reachable: The network is reachable.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + ConnectionType + +
    +
    +
    +
    +
    +
    +

    Defines the various connection types detected by reachability flags.

    + +
      +
    • ethernetOrWiFi: The connection type is either over Ethernet or WiFi.
    • +
    • wwan: The connection type is a WWAN connection.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ConnectionType
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + Listener + +
    +
    +
    +
    +
    +
    +

    A closure executed when the network reachability status changes. The closure takes a single argument: the +network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Listener = (NetworkReachabilityStatus) -> Void
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + isReachable + +
    +
    +
    +
    +
    +
    +

    Whether the network is currently reachable.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isReachable: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isReachableOnWWAN + +
    +
    +
    +
    +
    +
    +

    Whether the network is currently reachable over the WWAN interface.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isReachableOnWWAN: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Whether the network is currently reachable over Ethernet or WiFi interface.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isReachableOnEthernetOrWiFi: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The current network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var networkReachabilityStatus: NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + listenerQueue + +
    +
    +
    +
    +
    +
    +

    The dispatch queue to execute the listener closure on.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var listenerQueue: DispatchQueue = DispatchQueue.main
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + listener + +
    +
    +
    +
    +
    +
    +

    A closure executed when the network reachability status changes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var listener: Listener?
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(host:) + +
    +
    +
    +
    +
    +
    +

    Creates a NetworkReachabilityManager instance with the specified host.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init?(host: String)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + host + + +
    +

    The host used to evaluate network reachability.

    +
    +
    +
    +
    +

    Return Value

    +

    The new NetworkReachabilityManager instance.

    +
    +
    +
    +
  • +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Creates a NetworkReachabilityManager instance that monitors the address 0.0.0.0.

    + +

    Reachability treats the 0.0.0.0 address as a special token that causes it to monitor the general routing +status of the device, both IPv4 and IPv6.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public convenience init?()
    + +
    +
    +
    +

    Return Value

    +

    The new NetworkReachabilityManager instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + startListening() + +
    +
    +
    +
    +
    +
    +

    Starts listening for changes in network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func startListening() -> Bool
    + +
    +
    +
    +

    Return Value

    +

    true if listening was started successfully, false otherwise.

    +
    +
    +
    +
  • +
  • +
    + + + + stopListening() + +
    +
    +
    +
    +
    +
    +

    Stops listening for changes in network reachability status.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stopListening()
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager/ConnectionType.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager/ConnectionType.html new file mode 100644 index 0000000..d5c1b15 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager/ConnectionType.html @@ -0,0 +1,396 @@ + + + + ConnectionType Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ConnectionType

+
+
+
public enum ConnectionType
+ +
+
+

Defines the various connection types detected by reachability flags.

+ +
    +
  • ethernetOrWiFi: The connection type is either over Ethernet or WiFi.
  • +
  • wwan: The connection type is a WWAN connection.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + ethernetOrWiFi + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ConnectionType
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + wwan + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ConnectionType
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager/NetworkReachabilityStatus.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager/NetworkReachabilityStatus.html new file mode 100644 index 0000000..6146fdc --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/NetworkReachabilityManager/NetworkReachabilityStatus.html @@ -0,0 +1,428 @@ + + + + NetworkReachabilityStatus Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

NetworkReachabilityStatus

+
+
+
public enum NetworkReachabilityStatus
+ +
+
+

Defines the various states of network reachability.

+ +
    +
  • unknown: It is unknown whether the network is reachable.
  • +
  • notReachable: The network is not reachable.
  • +
  • reachable: The network is reachable.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + unknown + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + notReachable + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + reachable + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum NetworkReachabilityStatus
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request.html new file mode 100644 index 0000000..a9770bb --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request.html @@ -0,0 +1,1307 @@ + + + + Request Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Request

+
+
+
open class Request
+ +
+
+

Responsible for sending a request and receiving the response and associated data from the server, as well as +managing its underlying URLSessionTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + ProgressHandler + +
    +
    +
    +
    +
    +
    +

    A closure executed when monitoring upload or download progress of a request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias ProgressHandler = (Progress) -> Void
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    The delegate for the underlying task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open internal(set) var delegate: TaskDelegate
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + task + +
    +
    +
    +
    +
    +
    +

    The underlying task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var task: URLSessionTask?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + session + +
    +
    +
    +
    +
    +
    +

    The session belonging to the underlying task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let session: URLSession
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The response received from the server, if any.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + retryCount + +
    +
    +
    +
    +
    +
    +

    The number of times the request has been retried.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open internal(set) var retryCount: UInt = 0
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Associates an HTTP Basic credential with the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func authenticate(
    +        user: String,
    +        password: String,
    +        persistence: URLCredential.Persistence = .forSession)
    +        -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + user + + +
    +

    The user.

    +
    +
    + + password + + +
    +

    The password.

    +
    +
    + + persistence + + +
    +

    The URL credential persistence. .ForSession by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Associates a specified credential with the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func authenticate(usingCredential credential: URLCredential) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + credential + + +
    +

    The credential.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns a base64 encoded basic authentication credential as an authorization header tuple.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)?
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + user + + +
    +

    The user.

    +
    +
    + + password + + +
    +

    The password.

    +
    +
    +
    +
    +

    Return Value

    +

    A tuple with Authorization header and credential value if encoding succeeds, nil otherwise.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

State

+
+
+
    +
  • +
    + + + + resume() + +
    +
    +
    +
    +
    +
    +

    Resumes the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func resume()
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + suspend() + +
    +
    +
    +
    +
    +
    +

    Suspends the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func suspend()
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + cancel() + +
    +
    +
    +
    +
    +
    +

    Cancels the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func cancel()
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes the HTTP method and URL, as +well as the response status code if a response has been received.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var description: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, in the form of a cURL command.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a result data type that contains the response data as-is.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponseData(response: HTTPURLResponse?, data: Data?, error: Error?) -> Result<Data>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a result string type initialized from the response data with the specified string encoding.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponseString(
    +        encoding: String.Encoding?,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?)
    +        -> Result<String>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + encoding + + +
    +

    The string encoding. If nil, the string encoding will be determined from the server + response, falling back to the default HTTP default character set, ISO-8859-1.

    +
    +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a JSON object contained in a result type constructed from the response data using JSONSerialization +with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponseJSON(
    +        options: JSONSerialization.ReadingOptions,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?)
    +        -> Result<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + options + + +
    +

    The JSON serialization reading options. Defaults to .allowFragments.

    +
    +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Returns a plist object contained in a result type constructed from the response data using +PropertyListSerialization with the specified reading options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func serializeResponsePropertyList(
    +        options: PropertyListSerialization.ReadOptions,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?)
    +        -> Result<Any>
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + options + + +
    +

    The property list reading options. Defaults to [].

    +
    +
    + + response + + +
    +

    The response from the server.

    +
    +
    + + data + + +
    +

    The data returned from the server.

    +
    +
    + + error + + +
    +

    The error already encountered if it exists.

    +
    +
    +
    +
    +

    Return Value

    +

    The result data type.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + ValidationResult + +
    +
    +
    +
    +
    +
    +

    Used to represent whether validation was successful or encountered an error resulting in a failure.

    + +
      +
    • success: The validation was successful.
    • +
    • failure: The validation failed encountering the provided error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ValidationResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request/ValidationResult.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request/ValidationResult.html new file mode 100644 index 0000000..bd90810 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/Request/ValidationResult.html @@ -0,0 +1,396 @@ + + + + ValidationResult Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ValidationResult

+
+
+
public enum ValidationResult
+ +
+
+

Used to represent whether validation was successful or encountered an error resulting in a failure.

+ +
    +
  • success: The validation was successful.
  • +
  • failure: The validation failed encountering the provided error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ValidationResult
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + failure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ValidationResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/ServerTrustPolicyManager.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/ServerTrustPolicyManager.html new file mode 100644 index 0000000..cbf6dee --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/ServerTrustPolicyManager.html @@ -0,0 +1,468 @@ + + + + ServerTrustPolicyManager Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ServerTrustPolicyManager

+
+
+
open class ServerTrustPolicyManager
+ +
+
+

Responsible for managing the mapping of ServerTrustPolicy objects to a given host.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + policies + +
    +
    +
    +
    +
    +
    +

    The dictionary of policies mapped to a particular host.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let policies: [String: ServerTrustPolicy]
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + init(policies:) + +
    +
    +
    +
    +
    +
    +

    Initializes the ServerTrustPolicyManager instance with the given policies.

    + +

    Since different servers and web services can have different leaf certificates, intermediate and even root +certficates, it is important to have the flexibility to specify evaluation policies on a per host basis. This +allows for scenarios such as using default evaluation for host1, certificate pinning for host2, public key +pinning for host3 and disabling evaluation for host4.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(policies: [String: ServerTrustPolicy])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + policies + + +
    +

    A dictionary of all policies mapped to a particular host.

    +
    +
    +
    +
    +

    Return Value

    +

    The new ServerTrustPolicyManager instance.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns the ServerTrustPolicy for the given host if applicable.

    + +

    By default, this method will return the policy that perfectly matches the given host. Subclasses could override +this method and implement more complex mapping implementations such as wildcards.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy?
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + host + + +
    +

    The host to use when searching for a matching policy.

    +
    +
    +
    +
    +

    Return Value

    +

    The server trust policy for the given host if found.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionDelegate.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionDelegate.html new file mode 100644 index 0000000..30b3a25 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionDelegate.html @@ -0,0 +1,2754 @@ + + + + SessionDelegate Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

SessionDelegate

+
+
+
open class SessionDelegate: NSObject
+ +
+
+

Responsible for handling all delegate callbacks for the underlying session.

+ +
+
+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
    +
  • +
    + + + + subscript(_:) + +
    +
    +
    +
    +
    +
    +

    Access the task delegate for the specified task in a thread-safe manner.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open subscript(task: URLSessionTask) -> Request?
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init() + +
    +
    +
    +
    +
    +
    +

    Initializes the SessionDelegate instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public override init()
    + +
    +
    +
    +

    Return Value

    +

    The new SessionDelegate instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + responds(to:) + +
    +
    +
    +
    +
    +
    +

    Returns a Bool indicating whether the SessionDelegate implements or inherits a method that can respond +to a specified message.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override func responds(to selector: Selector) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + selector + + +
    +

    A selector that identifies a message.

    +
    +
    +
    +
    +

    Return Value

    +

    true if the receiver implements or inherits a method that can respond to selector, otherwise false.

    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the session has been invalidated.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, didBecomeInvalidWithError error: Error?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session object that was invalidated.

    +
    +
    + + error + + +
    +

    The error that caused invalidation, or nil if the invalidation was explicit.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Requests credentials from the delegate in response to a session-level authentication request from the +remote server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        didReceive challenge: URLAuthenticationChallenge,
    +        completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task that requested authentication.

    +
    +
    + + challenge + + +
    +

    An object that contains the request for authentication.

    +
    +
    + + completionHandler + + +
    +

    A handler that your delegate method must call providing the disposition + and credential.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that all messages enqueued for a session have been delivered.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + session + + +
    +

    The session that no longer has any outstanding requests.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the remote server requested an HTTP redirect.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        willPerformHTTPRedirection response: HTTPURLResponse,
    +        newRequest request: URLRequest,
    +        completionHandler: @escaping (URLRequest?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task whose request resulted in a redirect.

    +
    +
    + + task + + +
    +

    The task whose request resulted in a redirect.

    +
    +
    + + response + + +
    +

    An object containing the server’s response to the original request.

    +
    +
    + + request + + +
    +

    A URL request object filled out with the new location.

    +
    +
    + + completionHandler + + +
    +

    A closure that your handler should call with either the value of the request + parameter, a modified URL request object, or NULL to refuse the redirect and + return the body of the redirect response.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Requests credentials from the delegate in response to an authentication request from the remote server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        didReceive challenge: URLAuthenticationChallenge,
    +        completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task whose request requires authentication.

    +
    +
    + + task + + +
    +

    The task whose request requires authentication.

    +
    +
    + + challenge + + +
    +

    An object that contains the request for authentication.

    +
    +
    + + completionHandler + + +
    +

    A handler that your delegate method must call providing the disposition + and credential.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate when a task requires a new request body stream to send to the remote server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        needNewBodyStream completionHandler: @escaping (InputStream?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task that needs a new body stream.

    +
    +
    + + task + + +
    +

    The task that needs a new body stream.

    +
    +
    + + completionHandler + + +
    +

    A completion handler that your delegate method should call with the new body stream.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Periodically informs the delegate of the progress of sending body content to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        task: URLSessionTask,
    +        didSendBodyData bytesSent: Int64,
    +        totalBytesSent: Int64,
    +        totalBytesExpectedToSend: Int64)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data task.

    +
    +
    + + task + + +
    +

    The data task.

    +
    +
    + + bytesSent + + +
    +

    The number of bytes sent since the last time this delegate method was called.

    +
    +
    + + totalBytesSent + + +
    +

    The total number of bytes sent so far.

    +
    +
    + + totalBytesExpectedToSend + + +
    +

    The expected length of the body data.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the session finished collecting metrics for the task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, task: URLSessionTask, didFinishCollecting metrics: URLSessionTaskMetrics)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session collecting the metrics.

    +
    +
    + + task + + +
    +

    The task whose metrics have been collected.

    +
    +
    + + metrics + + +
    +

    The collected metrics.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the task finished transferring data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task whose request finished transferring data.

    +
    +
    + + task + + +
    +

    The task whose request finished transferring data.

    +
    +
    + + error + + +
    +

    If an error occurred, an error object indicating how the transfer failed, otherwise nil.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the data task received the initial reply (headers) from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        dataTask: URLSessionDataTask,
    +        didReceive response: URLResponse,
    +        completionHandler: @escaping (URLSession.ResponseDisposition) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data task that received an initial reply.

    +
    +
    + + dataTask + + +
    +

    The data task that received an initial reply.

    +
    +
    + + response + + +
    +

    A URL response object populated with headers.

    +
    +
    + + completionHandler + + +
    +

    A completion handler that your code calls to continue the transfer, passing a + constant to indicate whether the transfer should continue as a data task or + should become a download task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the data task was changed to a download task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        dataTask: URLSessionDataTask,
    +        didBecome downloadTask: URLSessionDownloadTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the task that was replaced by a download task.

    +
    +
    + + dataTask + + +
    +

    The data task that was replaced by a download task.

    +
    +
    + + downloadTask + + +
    +

    The new download task that replaced the data task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the data task has received some of the expected data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data task that provided data.

    +
    +
    + + dataTask + + +
    +

    The data task that provided data.

    +
    +
    + + data + + +
    +

    A data object containing the transferred data.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Asks the delegate whether the data (or upload) task should store the response in the cache.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        dataTask: URLSessionDataTask,
    +        willCacheResponse proposedResponse: CachedURLResponse,
    +        completionHandler: @escaping (CachedURLResponse?) -> Void)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the data (or upload) task.

    +
    +
    + + dataTask + + +
    +

    The data (or upload) task.

    +
    +
    + + proposedResponse + + +
    +

    The default caching behavior. This behavior is determined based on the current + caching policy and the values of certain received headers, such as the Pragma + and Cache-Control headers.

    +
    +
    + + completionHandler + + +
    +

    A block that your handler must call, providing either the original proposed + response, a modified version of that response, or NULL to prevent caching the + response. If your delegate implements this method, it must call this completion + handler; otherwise, your app leaks memory.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that a download task has finished downloading.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        downloadTask: URLSessionDownloadTask,
    +        didFinishDownloadingTo location: URL)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the download task that finished.

    +
    +
    + + downloadTask + + +
    +

    The download task that finished.

    +
    +
    + + location + + +
    +

    A file URL for the temporary file. Because the file is temporary, you must either + open the file for reading or move it to a permanent location in your app’s sandbox + container directory before returning from this delegate method.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Periodically informs the delegate about the download’s progress.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        downloadTask: URLSessionDownloadTask,
    +        didWriteData bytesWritten: Int64,
    +        totalBytesWritten: Int64,
    +        totalBytesExpectedToWrite: Int64)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the download task.

    +
    +
    + + downloadTask + + +
    +

    The download task.

    +
    +
    + + bytesWritten + + +
    +

    The number of bytes transferred since the last time this delegate + method was called.

    +
    +
    + + totalBytesWritten + + +
    +

    The total number of bytes transferred so far.

    +
    +
    + + totalBytesExpectedToWrite + + +
    +

    The expected length of the file, as provided by the Content-Length + header. If this header was not provided, the value is + NSURLSessionTransferSizeUnknown.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the download task has resumed downloading.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        downloadTask: URLSessionDownloadTask,
    +        didResumeAtOffset fileOffset: Int64,
    +        expectedTotalBytes: Int64)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session containing the download task that finished.

    +
    +
    + + downloadTask + + +
    +

    The download task that resumed. See explanation in the discussion.

    +
    +
    + + fileOffset + + +
    +

    If the file’s cache policy or last modified date prevents reuse of the + existing content, then this value is zero. Otherwise, this value is an + integer representing the number of bytes on disk that do not need to be + retrieved again.

    +
    +
    + + expectedTotalBytes + + +
    +

    The expected length of the file, as provided by the Content-Length header. + If this header was not provided, the value is NSURLSessionTransferSizeUnknown.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the read side of the connection has been closed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, readClosedFor streamTask: URLSessionStreamTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the write side of the connection has been closed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, writeClosedFor streamTask: URLSessionStreamTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the system has determined that a better route to the host is available.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(_ session: URLSession, betterRouteDiscoveredFor streamTask: URLSessionStreamTask)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Tells the delegate that the stream task has been completed and provides the unopened stream objects.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func urlSession(
    +        _ session: URLSession,
    +        streamTask: URLSessionStreamTask,
    +        didBecome inputStream: InputStream,
    +        outputStream: OutputStream)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The session.

    +
    +
    + + streamTask + + +
    +

    The stream task.

    +
    +
    + + inputStream + + +
    +

    The new input stream.

    +
    +
    + + outputStream + + +
    +

    The new output stream.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager.html new file mode 100644 index 0000000..b45fa7a --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager.html @@ -0,0 +1,2159 @@ + + + + SessionManager Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

SessionManager

+
+
+
open class SessionManager
+ +
+
+

Responsible for creating and managing Request objects, as well as their underlying NSURLSession.

+ +
+
+ +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Defines whether the MultipartFormData encoding was successful and contains result of the encoding as +associated values.

    + +
      +
    • Success: Represents a successful MultipartFormData encoding and contains the new UploadRequest along with + streaming information.
    • +
    • Failure: Used to represent a failure in the MultipartFormData encoding and also contains the encoding + error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartFormDataEncodingResult
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    A default instance of SessionManager, used by top-level Alamofire request methods, and suitable for use +directly for any ad hoc requests.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static let `default`: SessionManager =
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + defaultHTTPHeaders + +
    +
    +
    +
    +
    +
    +

    Creates default values for the Accept-Encoding, Accept-Language and User-Agent headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static let defaultHTTPHeaders: HTTPHeaders =
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Default memory threshold used when encoding MultipartFormData in bytes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + session + +
    +
    +
    +
    +
    +
    +

    The underlying session.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let session: URLSession
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + delegate + +
    +
    +
    +
    +
    +
    +

    The session delegate handling all the task and session delegate callbacks.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let delegate: SessionDelegate
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Whether to start requests immediately after being constructed. true by default.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var startRequestsImmediately: Bool = true
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + adapter + +
    +
    +
    +
    +
    +
    +

    The request adapter called each time a new request is created.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var adapter: RequestAdapter?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + retrier + +
    +
    +
    +
    +
    +
    +

    The request retrier called each time a request encounters an error to determine whether to retry the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var retrier: RequestRetrier?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The background completion handler closure provided by the UIApplicationDelegate +application:handleEventsForBackgroundURLSession:completionHandler: method. By setting the background +completion handler, the SessionDelegate sessionDidFinishEventsForBackgroundURLSession closure implementation +will automatically call the handler.

    + +

    If you need to handle your own events before the handler is called, then you need to override the +SessionDelegate sessionDidFinishEventsForBackgroundURLSession and manually call the handler when finished.

    + +

    nil by default.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var backgroundCompletionHandler: (() -> Void)?
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates an instance with the specified configuration, delegate and serverTrustPolicyManager.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        configuration: URLSessionConfiguration = URLSessionConfiguration.default,
    +        delegate: SessionDelegate = SessionDelegate(),
    +        serverTrustPolicyManager: ServerTrustPolicyManager? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + configuration + + +
    +

    The configuration used to construct the managed session. + URLSessionConfiguration.default by default.

    +
    +
    + + delegate + + +
    +

    The delegate used when initializing the session. SessionDelegate() by + default.

    +
    +
    + + serverTrustPolicyManager + + +
    +

    The server trust policy manager to use for evaluating all server trust + challenges. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The new SessionManager instance.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates an instance with the specified session, delegate and serverTrustPolicyManager.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init?(
    +        session: URLSession,
    +        delegate: SessionDelegate,
    +        serverTrustPolicyManager: ServerTrustPolicyManager? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + session + + +
    +

    The URL session.

    +
    +
    + + delegate + + +
    +

    The delegate of the URL session. Must equal the URL session’s delegate.

    +
    +
    + + serverTrustPolicyManager + + +
    +

    The server trust policy manager to use for evaluating all server trust + challenges. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The new SessionManager instance if the URL session’s delegate matches; nil otherwise.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DataRequest to retrieve the contents of the specified url, method, parameters, encoding +and headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func request(
    +        _ url: URLConvertible,
    +        method: HTTPMethod = .get,
    +        parameters: Parameters? = nil,
    +        encoding: ParameterEncoding = URLEncoding.default,
    +        headers: HTTPHeaders? = nil)
    +        -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + request(_:) + +
    +
    +
    +
    +
    +
    +

    Creates a DataRequest to retrieve the contents of a URL based on the specified urlRequest.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func request(_ urlRequest: URLRequestConvertible) -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest to retrieve the contents the specified url, method, parameters, encoding, +headers and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func download(
    +        _ url: URLConvertible,
    +        method: HTTPMethod = .get,
    +        parameters: Parameters? = nil,
    +        encoding: ParameterEncoding = URLEncoding.default,
    +        headers: HTTPHeaders? = nil,
    +        to destination: DownloadRequest.DownloadFileDestination? = nil)
    +        -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + download(_:to:) + +
    +
    +
    +
    +
    +
    +

    Creates a DownloadRequest to retrieve the contents of a URL based on the specified urlRequest and save +them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func download(
    +        _ urlRequest: URLRequestConvertible,
    +        to destination: DownloadRequest.DownloadFileDestination? = nil)
    +        -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The URL request

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest from the resumeData produced from a previous request cancellation to retrieve +the contents of the original request and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +

    On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken +on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the +data is written incorrectly and will always fail to resume the download. For more information about the bug and +possible workarounds, please refer to the following Stack Overflow post:

    + + + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func download(
    +        resumingWith resumeData: Data,
    +        to destination: DownloadRequest.DownloadFileDestination? = nil)
    +        -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + resumeData + + +
    +

    The resume data. This is an opaque data blob produced by URLSessionDownloadTask + when a task is cancelled. See URLSession -downloadTask(withResumeData:) for + additional information.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

File

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified url, method and headers for uploading the file.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        _ fileURL: URL,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil)
    +        -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a UploadRequest from the specified urlRequest for uploading the file.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

Data

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified url, method and headers for uploading the data.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        _ data: Data,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil)
    +        -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified urlRequest for uploading the data.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified url, method and headers for uploading the stream.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        _ stream: InputStream,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil)
    +        -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest from the specified urlRequest for uploading the stream.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold and calls encodingCompletion with new +UploadRequest using the url, method and headers.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        multipartFormData: @escaping (MultipartFormData) -> Void,
    +        usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +        to url: URLConvertible,
    +        method: HTTPMethod = .post,
    +        headers: HTTPHeaders? = nil,
    +        encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold and calls encodingCompletion with new +UploadRequest using the urlRequest.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func upload(
    +        multipartFormData: @escaping (MultipartFormData) -> Void,
    +        usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +        with urlRequest: URLRequestConvertible,
    +        encodingCompletion: ((MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a StreamRequest for bidirectional streaming using the hostname and port.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func stream(withHostName hostName: String, port: Int) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + hostName + + +
    +

    The hostname of the server to connect to.

    +
    +
    + + port + + +
    +

    The port of the server to connect to.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + stream(with:) + +
    +
    +
    +
    +
    +
    +

    Creates a StreamRequest for bidirectional streaming using the netService.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func stream(with netService: NetService) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + netService + + +
    +

    The net service used to identify the endpoint.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager/MultipartFormDataEncodingResult.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager/MultipartFormDataEncodingResult.html new file mode 100644 index 0000000..b541b1d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/SessionManager/MultipartFormDataEncodingResult.html @@ -0,0 +1,399 @@ + + + + MultipartFormDataEncodingResult Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultipartFormDataEncodingResult

+
+
+
public enum MultipartFormDataEncodingResult
+ +
+
+

Defines whether the MultipartFormData encoding was successful and contains result of the encoding as +associated values.

+ +
    +
  • Success: Represents a successful MultipartFormData encoding and contains the new UploadRequest along with + streaming information.
  • +
  • Failure: Used to represent a failure in the MultipartFormData encoding and also contains the encoding + error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartFormDataEncodingResult
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + failure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartFormDataEncodingResult
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/TaskDelegate.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/TaskDelegate.html new file mode 100644 index 0000000..c137be5 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/TaskDelegate.html @@ -0,0 +1,422 @@ + + + + TaskDelegate Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

TaskDelegate

+
+
+
open class TaskDelegate: NSObject
+ +
+
+

The task delegate is responsible for handling all delegate callbacks for the underlying task as well as +executing all operations attached to the serial operation queue upon task completion.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + queue + +
    +
    +
    +
    +
    +
    +

    The serial operation queue used to execute all operations after the task completes.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open let queue: OperationQueue
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + data + +
    +
    +
    +
    +
    +
    +

    The data returned by the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var data: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    The error generated throughout the lifecyle of the task.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/UploadRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/UploadRequest.html new file mode 100644 index 0000000..129666d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Classes/UploadRequest.html @@ -0,0 +1,471 @@ + + + + UploadRequest Class Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

UploadRequest

+
+
+
open class UploadRequest: DataRequest
+ +
+
+

Specific type of Request that manages an underlying URLSessionUploadTask.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The request sent or to be sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open override var request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + uploadProgress + +
    +
    +
    +
    +
    +
    +

    The progress of uploading the payload to the server for the upload request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open var uploadProgress: Progress
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Sets a closure to be called periodically during the lifecycle of the UploadRequest as data is sent to +the server.

    + +

    After the data is sent to the server, the progress(queue:closure:) APIs can be used to monitor the progress +of data being read from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    open func uploadProgress(queue: DispatchQueue = DispatchQueue.main, closure: @escaping ProgressHandler) -> Self
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + queue + + +
    +

    The dispatch queue to execute the closure on.

    +
    +
    + + closure + + +
    +

    The code to be executed periodically as data is sent to the server.

    +
    +
    +
    +
    +

    Return Value

    +

    The request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums.html new file mode 100644 index 0000000..b8030bb --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums.html @@ -0,0 +1,508 @@ + + + + Enums Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Enums

+

The following enums are available globally.

+ +
+
+ +
+
+
+ +
+
+
    +
  • +
    + + + + AFError + +
    +
    +
    +
    +
    +
    +

    AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with +their own associated reasons.

    + +
      +
    • invalidURL: Returned when a URLConvertible type fails to create a valid URL.
    • +
    • parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process.
    • +
    • multipartEncodingFailed: Returned when some step in the multipart encoding process fails.
    • +
    • responseValidationFailed: Returned when a validate() call fails.
    • +
    • responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + ServerTrustPolicy + +
    +
    +
    +
    +
    +
    +

    The ServerTrustPolicy evaluates the server trust generally provided by an NSURLAuthenticationChallenge when +connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +with a given set of criteria to determine whether the server trust is valid and the connection should be made.

    + +

    Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) 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 pinning enabled.

    + +
      +
    • performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to + validate the host provided by the challenge. Applications are encouraged to always + validate the host in production environments to guarantee the validity of the server’s + certificate chain.

    • +
    • performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to + validate the host provided by the challenge as well as specify the revocation flags for + testing for revoked certificates. Apple platforms did not start testing for revoked + certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is + demonstrated in our TLS tests. Applications are encouraged to always validate the host + in production environments to guarantee the validity of the server’s certificate chain.

    • +
    • pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is + considered valid if one of the pinned certificates match one of the server certificates. + By validating both the certificate chain and host, certificate pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

    • +
    • pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered + valid if one of the pinned public keys match one of the server certificate public keys. + By validating both the certificate chain and host, public key pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

    • +
    • disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid.

    • +
    • customEvaluation: Uses the associated closure to evaluate the validity of the server trust.

    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + Result + +
    +
    +
    +
    +
    +
    +

    Used to represent whether a request was successful or encountered an error.

    + +
      +
    • success: The request and all post processing operations were successful resulting in the serialization of the + provided associated value.

    • +
    • failure: The request encountered an error resulting in a failure. The associated values are the original data + provided by the server as well as the error that caused the failure.

    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Result<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError.html new file mode 100644 index 0000000..80ea5d2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError.html @@ -0,0 +1,1030 @@ + + + + AFError Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

AFError

+
+
+
public enum AFError: Error
+ +
+
+

AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with +their own associated reasons.

+ +
    +
  • invalidURL: Returned when a URLConvertible type fails to create a valid URL.
  • +
  • parameterEncodingFailed: Returned when a parameter encoding object throws an error during the encoding process.
  • +
  • multipartEncodingFailed: Returned when some step in the multipart encoding process fails.
  • +
  • responseValidationFailed: Returned when a validate() call fails.
  • +
  • responseSerializationFailed: Returned when a response serializer encounters an error in the serialization process.
  • +
+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the parameter encoding error occurred.

    + +
      +
    • missingURL: The URL request did not have a URL to encode.
    • +
    • jsonEncodingFailed: JSON serialization failed with an underlying system error during the + encoding process.
    • +
    • propertyListEncodingFailed: Property list serialization failed with an underlying system error during + encoding process.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the multipart encoding error occurred.

    + +
      +
    • bodyPartURLInvalid: The fileURL provided for reading an encodable body part isn’t a + file URL.
    • +
    • bodyPartFilenameInvalid: The filename of the fileURL provided has either an empty + lastPathComponent or `pathExtension.
    • +
    • bodyPartFileNotReachable: The file at the fileURL provided was not reachable.
    • +
    • bodyPartFileNotReachableWithError: Attempting to check the reachability of the fileURL provided threw + an error.
    • +
    • bodyPartFileIsDirectory: The file at the fileURL provided is actually a directory.
    • +
    • bodyPartFileSizeNotAvailable: The size of the file at the fileURL provided was not returned by + the system.
    • +
    • bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the fileURL provided + threw an error.
    • +
    • bodyPartInputStreamCreationFailed: An InputStream could not be created for the provided fileURL.
    • +
    • outputStreamCreationFailed: An OutputStream could not be created when attempting to write the + encoded data to disk.
    • +
    • outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file + already exists at the provided fileURL.
    • +
    • outputStreamURLInvalid: The fileURL provided for writing the encoded body data to disk is + not a file URL.
    • +
    • outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an + underlying error.
    • +
    • inputStreamReadFailed: The attempt to read an encoded body part InputStream failed with + underlying system error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the response validation error occurred.

    + +
      +
    • dataFileNil: The data file containing the server response did not exist.
    • +
    • dataFileReadFailed: The data file containing the server response could not be read.
    • +
    • missingContentType: The response did not contain a Content-Type and the acceptableContentTypes + provided did not contain wildcard type.
    • +
    • unacceptableContentType: The response Content-Type did not match any type in the provided + acceptableContentTypes.
    • +
    • unacceptableStatusCode: The response status code was not acceptable.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The underlying reason the response serialization error occurred.

    + +
      +
    • inputDataNil: The server response contained no data.
    • +
    • inputDataNilOrZeroLength: The server response contained no data or the data was zero length.
    • +
    • inputFileNil: The file containing the server response did not exist.
    • +
    • inputFileReadFailed: The file containing the server response could not be read.
    • +
    • stringSerializationFailed: String serialization failed using the provided String.Encoding.
    • +
    • jsonSerializationFailed: JSON serialization failed with an underlying system error.
    • +
    • propertyListSerializationFailed: Property list serialization failed with an underlying system error.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + invalidURL + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum AFError: Error
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + isInvalidURLError + +
    +
    +
    +
    +
    +
    +

    Returns whether the AFError is an invalid URL error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isInvalidURLError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a parameter encoding error. When true, the underlyingError property will +contain the associated value.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isParameterEncodingError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a multipart encoding error. When true, the url and underlyingError properties +will contain the associated values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isMultipartEncodingError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a response validation error. When true, the acceptableContentTypes, +responseContentType, and responseCode properties will contain the associated values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isResponseValidationError: Bool
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Returns whether the AFError is a response serialization error. When true, the failedStringEncoding and +underlyingError properties will contain the associated values.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isResponseSerializationError: Bool
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+
    +
  • +
    + + + + errorDescription + +
    +
    +
    +
    +
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var errorDescription: String?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/MultipartEncodingFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/MultipartEncodingFailureReason.html new file mode 100644 index 0000000..ce047fd --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/MultipartEncodingFailureReason.html @@ -0,0 +1,758 @@ + + + + MultipartEncodingFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

MultipartEncodingFailureReason

+
+
+
public enum MultipartEncodingFailureReason
+ +
+
+

The underlying reason the multipart encoding error occurred.

+ +
    +
  • bodyPartURLInvalid: The fileURL provided for reading an encodable body part isn’t a + file URL.
  • +
  • bodyPartFilenameInvalid: The filename of the fileURL provided has either an empty + lastPathComponent or `pathExtension.
  • +
  • bodyPartFileNotReachable: The file at the fileURL provided was not reachable.
  • +
  • bodyPartFileNotReachableWithError: Attempting to check the reachability of the fileURL provided threw + an error.
  • +
  • bodyPartFileIsDirectory: The file at the fileURL provided is actually a directory.
  • +
  • bodyPartFileSizeNotAvailable: The size of the file at the fileURL provided was not returned by + the system.
  • +
  • bodyPartFileSizeQueryFailedWithError: The attempt to find the size of the file at the fileURL provided + threw an error.
  • +
  • bodyPartInputStreamCreationFailed: An InputStream could not be created for the provided fileURL.
  • +
  • outputStreamCreationFailed: An OutputStream could not be created when attempting to write the + encoded data to disk.
  • +
  • outputStreamFileAlreadyExists: The encoded body data could not be writtent disk because a file + already exists at the provided fileURL.
  • +
  • outputStreamURLInvalid: The fileURL provided for writing the encoded body data to disk is + not a file URL.
  • +
  • outputStreamWriteFailed: The attempt to write the encoded body data to disk failed with an + underlying error.
  • +
  • inputStreamReadFailed: The attempt to read an encoded body part InputStream failed with + underlying system error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + bodyPartURLInvalid + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + inputStreamReadFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum MultipartEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ParameterEncodingFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ParameterEncodingFailureReason.html new file mode 100644 index 0000000..d6817d8 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ParameterEncodingFailureReason.html @@ -0,0 +1,430 @@ + + + + ParameterEncodingFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ParameterEncodingFailureReason

+
+
+
public enum ParameterEncodingFailureReason
+ +
+
+

The underlying reason the parameter encoding error occurred.

+ +
    +
  • missingURL: The URL request did not have a URL to encode.
  • +
  • jsonEncodingFailed: JSON serialization failed with an underlying system error during the + encoding process.
  • +
  • propertyListEncodingFailed: Property list serialization failed with an underlying system error during + encoding process.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + missingURL + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + jsonEncodingFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ParameterEncodingFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ResponseSerializationFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ResponseSerializationFailureReason.html new file mode 100644 index 0000000..775567d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ResponseSerializationFailureReason.html @@ -0,0 +1,556 @@ + + + + ResponseSerializationFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ResponseSerializationFailureReason

+
+
+
public enum ResponseSerializationFailureReason
+ +
+
+

The underlying reason the response serialization error occurred.

+ +
    +
  • inputDataNil: The server response contained no data.
  • +
  • inputDataNilOrZeroLength: The server response contained no data or the data was zero length.
  • +
  • inputFileNil: The file containing the server response did not exist.
  • +
  • inputFileReadFailed: The file containing the server response could not be read.
  • +
  • stringSerializationFailed: String serialization failed using the provided String.Encoding.
  • +
  • jsonSerializationFailed: JSON serialization failed with an underlying system error.
  • +
  • propertyListSerializationFailed: Property list serialization failed with an underlying system error.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + inputDataNil + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + inputFileNil + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + inputFileReadFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseSerializationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ResponseValidationFailureReason.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ResponseValidationFailureReason.html new file mode 100644 index 0000000..6bff647 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/AFError/ResponseValidationFailureReason.html @@ -0,0 +1,494 @@ + + + + ResponseValidationFailureReason Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ResponseValidationFailureReason

+
+
+
public enum ResponseValidationFailureReason
+ +
+
+

The underlying reason the response validation error occurred.

+ +
    +
  • dataFileNil: The data file containing the server response did not exist.
  • +
  • dataFileReadFailed: The data file containing the server response could not be read.
  • +
  • missingContentType: The response did not contain a Content-Type and the acceptableContentTypes + provided did not contain wildcard type.
  • +
  • unacceptableContentType: The response Content-Type did not match any type in the provided + acceptableContentTypes.
  • +
  • unacceptableStatusCode: The response status code was not acceptable.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + dataFileNil + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + dataFileReadFailed + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + missingContentType + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ResponseValidationFailureReason
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/HTTPMethod.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/HTTPMethod.html new file mode 100644 index 0000000..4aebca8 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/HTTPMethod.html @@ -0,0 +1,610 @@ + + + + HTTPMethod Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

HTTPMethod

+
+
+
public enum HTTPMethod: String
+ +
+
+

HTTP method definitions.

+ +

See https://tools.ietf.org/html/rfc7231#section-4.3

+ +
+
+ +
+
+
+
    +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + get + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + head + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + post + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + put + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + patch + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + delete + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + trace + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + connect + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum HTTPMethod: String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/Result.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/Result.html new file mode 100644 index 0000000..92da939 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/Result.html @@ -0,0 +1,1117 @@ + + + + Result Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Result

+
+
+
public enum Result<Value>
+ +
+
+

Used to represent whether a request was successful or encountered an error.

+ +
    +
  • success: The request and all post processing operations were successful resulting in the serialization of the + provided associated value.

  • +
  • failure: The request encountered an error resulting in a failure. The associated values are the original data + provided by the server as well as the error that caused the failure.

  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + success + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Result<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + failure + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Result<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + isSuccess + +
    +
    +
    +
    +
    +
    +

    Returns true if the result is a success, false otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isSuccess: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + isFailure + +
    +
    +
    +
    +
    +
    +

    Returns true if the result is a failure, false otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var isFailure: Bool
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Returns the associated value if the result is a success, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: Value?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Returns the associated error value if the result is a failure, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes whether the result was a +success or failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The debug textual representation used when written to an output stream, which includes whether the result was a +success or failure in addition to the value or error.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + init(value:) + +
    +
    +
    +
    +
    +
    +

    Creates a Result instance from the result of a closure.

    + +

    A failure result is created when the closure throws, and a success result is created when the closure +succeeds without throwing an error.

    +
    func someString() throws -> String { ... }
    +
    +let result = Result(value: {
    +    return try someString()
    +})
    +
    +// The type of result is Result<String>
    +
    + +

    The trailing closure syntax is also supported:

    +
    let result = Result { try someString() }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(value: () throws -> Value)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + value + + +
    +

    The closure to execute and create the result for.

    +
    +
    +
    +
    +
    +
  • +
  • +
    + + + + unwrap() + +
    +
    +
    +
    +
    +
    +

    Returns the success value, or throws the failure error.

    +
    let possibleString: Result<String> = .success("success")
    +try print(possibleString.unwrap())
    +// Prints "success"
    +
    +let noString: Result<String> = .failure(error)
    +try print(noString.unwrap())
    +// Throws error
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func unwrap() throws -> Value
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + map(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success, passing the unwrapped value as a parameter.

    + +

    Use the map method with a closure that does not throw. For example:

    +
    let possibleData: Result<Data> = .success(Data())
    +let possibleInt = possibleData.map { $0.count }
    +try print(possibleInt.unwrap())
    +// Prints "0"
    +
    +let noData: Result<Data> = .failure(error)
    +let noInt = noData.map { $0.count }
    +try print(noInt.unwrap())
    +// Throws error
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func map<T>(_ transform: (Value) -> T) -> Result<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the Result instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result containing the result of the given closure. If this instance is a failure, returns the + same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMap(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success, passing the unwrapped value as a parameter.

    + +

    Use the flatMap method with a closure that may throw an error. For example:

    +
    let possibleData: Result<Data> = .success(Data(...))
    +let possibleObject = possibleData.flatMap {
    +    try JSONSerialization.jsonObject(with: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMap<T>(_ transform: (Value) throws -> T) -> Result<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result containing the result of the given closure. If this instance is a failure, returns the + same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + mapError(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure, passing the unwrapped error as a parameter.

    + +

    Use the mapError function with a closure that does not throw. For example:

    +
    let possibleData: Result<Data> = .failure(someError)
    +let withMyError: Result<Data> = possibleData.mapError { MyError.error($0) }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func mapError<T: Error>(_ transform: (Error) -> T) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the error of the instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result instance containing the result of the transform. If this instance is a success, returns + the same instance.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMapError(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure, passing the unwrapped error as a parameter.

    + +

    Use the flatMapError function with a closure that may throw an error. For example:

    +
    let possibleData: Result<Data> = .success(Data(...))
    +let possibleObject = possibleData.flatMapError {
    +    try someFailableFunction(taking: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMapError<T: Error>(_ transform: (Error) throws -> T) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A throwing closure that takes the error of the instance.

    +
    +
    +
    +
    +

    Return Value

    +

    A Result instance containing the result of the transform. If this instance is a success, returns + the same instance.

    +
    +
    +
    +
  • +
  • +
    + + + + withValue(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success, passing the unwrapped value as a parameter.

    + +

    Use the withValue function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withValue(_ closure: (Value) -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A closure that takes the success value of this instance.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
  • +
    + + + + withError(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure, passing the unwrapped error as a parameter.

    + +

    Use the withError function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func withError(_ closure: (Error) -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A closure that takes the success value of this instance.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
  • +
    + + + + ifSuccess(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a success.

    + +

    Use the ifSuccess function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ifSuccess(_ closure: () -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A Void closure.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
  • +
    + + + + ifFailure(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the Result is a failure.

    + +

    Use the ifFailure function to evaluate the passed closure without modifying the Result instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ifFailure(_ closure: () -> Void) -> Result
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + closure + + +
    +

    A Void closure.

    +
    +
    +
    +
    +

    Return Value

    +

    This Result instance, unmodified.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/ServerTrustPolicy.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/ServerTrustPolicy.html new file mode 100644 index 0000000..dda06fd --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Enums/ServerTrustPolicy.html @@ -0,0 +1,732 @@ + + + + ServerTrustPolicy Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ServerTrustPolicy

+
+
+
public enum ServerTrustPolicy
+ +
+
+

The ServerTrustPolicy evaluates the server trust generally provided by an NSURLAuthenticationChallenge when +connecting to a server over a secure HTTPS connection. The policy configuration then evaluates the server trust +with a given set of criteria to determine whether the server trust is valid and the connection should be made.

+ +

Using pinned certificates or public keys for evaluation helps prevent man-in-the-middle (MITM) 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 pinning enabled.

+ +
    +
  • performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to + validate the host provided by the challenge. Applications are encouraged to always + validate the host in production environments to guarantee the validity of the server’s + certificate chain.

  • +
  • performRevokedEvaluation: Uses the default and revoked server trust evaluations allowing you to control whether to + validate the host provided by the challenge as well as specify the revocation flags for + testing for revoked certificates. Apple platforms did not start testing for revoked + certificates automatically until iOS 10.1, macOS 10.12 and tvOS 10.1 which is + demonstrated in our TLS tests. Applications are encouraged to always validate the host + in production environments to guarantee the validity of the server’s certificate chain.

  • +
  • pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is + considered valid if one of the pinned certificates match one of the server certificates. + By validating both the certificate chain and host, certificate pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

  • +
  • pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered + valid if one of the pinned public keys match one of the server certificate public keys. + By validating both the certificate chain and host, public key pinning provides a very + secure form of server trust validation mitigating most, if not all, MITM attacks. + Applications are encouraged to always validate the host and require a valid certificate + chain in production environments.

  • +
  • disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid.

  • +
  • customEvaluation: Uses the associated closure to evaluate the validity of the server trust.

  • +
+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + pinCertificates + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + pinPublicKeys + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + disableEvaluation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + customEvaluation + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum ServerTrustPolicy
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + certificates(in:) + +
    +
    +
    +
    +
    +
    +

    Returns all certificates within the given bundle with a .cer file extension.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func certificates(in bundle: Bundle = Bundle.main) -> [SecCertificate]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bundle + + +
    +

    The bundle to search for all .cer files.

    +
    +
    +
    +
    +

    Return Value

    +

    All certificates within the given bundle.

    +
    +
    +
    +
  • +
  • +
    + + + + publicKeys(in:) + +
    +
    +
    +
    +
    +
    +

    Returns all public keys within the given bundle with a .cer file extension.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static func publicKeys(in bundle: Bundle = Bundle.main) -> [SecKey]
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + bundle + + +
    +

    The bundle to search for all *.cer files.

    +
    +
    +
    +
    +

    Return Value

    +

    All public keys within the given bundle.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + evaluate(_:forHost:) + +
    +
    +
    +
    +
    +
    +

    Evaluates whether the server trust is valid for the given host.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func evaluate(_ serverTrust: SecTrust, forHost host: String) -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + serverTrust + + +
    +

    The server trust to evaluate.

    +
    +
    + + host + + +
    +

    The host of the challenge protection space.

    +
    +
    +
    +
    +

    Return Value

    +

    Whether the server trust is valid.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions.html new file mode 100644 index 0000000..da0e8b7 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions.html @@ -0,0 +1,453 @@ + + + + Extensions Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Extensions

+

The following extensions are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + String + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + URL + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct URL : ReferenceConvertible, Equatable
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + URLComponents + +
    +
    +
    +
    +
    +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    struct URLComponents : ReferenceConvertible, Hashable, Equatable
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ +
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification.html new file mode 100644 index 0000000..f73e63d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification.html @@ -0,0 +1,377 @@ + + + + Notification Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Notification

+ +
+
+ +
+
+
+ +
+
+
    +
  • +
    + + + + Key + +
    +
    +
    +
    +
    +
    +

    Used as a namespace for all Notification user info dictionary keys.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Key
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Key.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Key.html new file mode 100644 index 0000000..678167b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Key.html @@ -0,0 +1,360 @@ + + + + Key Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Key

+
+
+
public struct Key
+ +
+
+

Used as a namespace for all Notification user info dictionary keys.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Task + +
    +
    +
    +
    +
    +
    +

    User info dictionary key representing the URLSessionTask associated with the notification.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let Task = "org.alamofire.notification.key.task"
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Name.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Name.html new file mode 100644 index 0000000..2da0b12 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Name.html @@ -0,0 +1,354 @@ + + + + Name Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Name

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Task + +
    +
    +
    +
    +
    +
    +

    Used as a namespace for all URLSessionTask related notifications.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Task
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Name/Task.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Name/Task.html new file mode 100644 index 0000000..e07d38a --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/Notification/Name/Task.html @@ -0,0 +1,441 @@ + + + + Task Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Task

+
+
+
public struct Task
+ +
+
+

Used as a namespace for all URLSessionTask related notifications.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + DidResume + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is resumed. The notification object contains the resumed URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidResume = Notification.Name(rawValue: "org.alamofire.notification.name.task.didResume")
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DidSuspend + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is suspended. The notification object contains the suspended URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidSuspend = Notification.Name(rawValue: "org.alamofire.notification.name.task.didSuspend")
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DidCancel + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is cancelled. The notification object contains the cancelled URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidCancel = Notification.Name(rawValue: "org.alamofire.notification.name.task.didCancel")
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + DidComplete + +
    +
    +
    +
    +
    +
    +

    Posted when a URLSessionTask is completed. The notification object contains the completed URLSessionTask.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static let DidComplete = Notification.Name(rawValue: "org.alamofire.notification.name.task.didComplete")
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/String.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/String.html new file mode 100644 index 0000000..3c264b0 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/String.html @@ -0,0 +1,368 @@ + + + + String Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

String

+
+
+
struct String
+ +
+
+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns a URL if self represents a valid URL string that conforms to RFC 2396 or throws an AFError.

    +
    +

    Throws

    +

    An AFError.invalidURL if self is not a valid URL string.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURL() throws -> URL
    + +
    +
    +
    +

    Return Value

    +

    A URL or throws an AFError.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URL.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URL.html new file mode 100644 index 0000000..db21443 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URL.html @@ -0,0 +1,359 @@ + + + + URL Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URL

+
+
+
struct URL : ReferenceConvertible, Equatable
+ +
+
+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns self.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURL() throws -> URL
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLComponents.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLComponents.html new file mode 100644 index 0000000..6515724 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLComponents.html @@ -0,0 +1,368 @@ + + + + URLComponents Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLComponents

+
+
+
struct URLComponents : ReferenceConvertible, Hashable, Equatable
+ +
+
+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns a URL if url is not nil, otherwise throws an Error.

    +
    +

    Throws

    +

    An AFError.invalidURL if url is nil.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURL() throws -> URL
    + +
    +
    +
    +

    Return Value

    +

    A URL or throws an AFError.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLRequest.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLRequest.html new file mode 100644 index 0000000..6b820f2 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Extensions/URLRequest.html @@ -0,0 +1,431 @@ + + + + URLRequest Extension Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLRequest

+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURLRequest() + +
    +
    +
    +
    +
    +
    +

    Returns a URL request or throws if an Error was encountered.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func asURLRequest() throws -> URLRequest
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an instance with the specified method, urlString and headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(url: URLConvertible, method: HTTPMethod, headers: HTTPHeaders? = nil) throws
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The new URLRequest instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Functions.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Functions.html new file mode 100644 index 0000000..3adda42 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Functions.html @@ -0,0 +1,1726 @@ + + + + Functions Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Functions

+

The following functions are available globally.

+ +
+
+ +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DataRequest using the default SessionManager to retrieve the contents of the specified url, +method, parameters, encoding and headers.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func request(
    +    _ url: URLConvertible,
    +    method: HTTPMethod = .get,
    +    parameters: Parameters? = nil,
    +    encoding: ParameterEncoding = URLEncoding.default,
    +    headers: HTTPHeaders? = nil)
    +    -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + request(_:) + +
    +
    +
    +
    +
    +
    +

    Creates a DataRequest using the default SessionManager to retrieve the contents of a URL based on the +specified urlRequest.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func request(_ urlRequest: URLRequestConvertible) -> DataRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + urlRequest + + +
    +

    The URL request

    +
    +
    +
    +
    +

    Return Value

    +

    The created DataRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest using the default SessionManager to retrieve the contents of the specified url, +method, parameters, encoding, headers and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func download(
    +    _ url: URLConvertible,
    +    method: HTTPMethod = .get,
    +    parameters: Parameters? = nil,
    +    encoding: ParameterEncoding = URLEncoding.default,
    +    headers: HTTPHeaders? = nil,
    +    to destination: DownloadRequest.DownloadFileDestination? = nil)
    +    -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .get by default.

    +
    +
    + + parameters + + +
    +

    The parameters. nil by default.

    +
    +
    + + encoding + + +
    +

    The parameter encoding. URLEncoding.default by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + download(_:to:) + +
    +
    +
    +
    +
    +
    +

    Creates a DownloadRequest using the default SessionManager to retrieve the contents of a URL based on the +specified urlRequest and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func download(
    +    _ urlRequest: URLRequestConvertible,
    +    to destination: DownloadRequest.DownloadFileDestination? = nil)
    +    -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadRequest using the default SessionManager from the resumeData produced from a +previous request cancellation to retrieve the contents of the original request and save them to the destination.

    + +

    If destination is not specified, the contents will remain in the temporary location determined by the +underlying URL session.

    + +

    On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken +on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the +data is written incorrectly and will always fail to resume the download. For more information about the bug and +possible workarounds, please refer to the following Stack Overflow post:

    + + + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func download(
    +    resumingWith resumeData: Data,
    +    to destination: DownloadRequest.DownloadFileDestination? = nil)
    +    -> DownloadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + resumeData + + +
    +

    The resume data. This is an opaque data blob produced by URLSessionDownloadTask + when a task is cancelled. See URLSession -downloadTask(withResumeData:) for additional + information.

    +
    +
    + + destination + + +
    +

    The closure used to determine the destination of the downloaded file. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created DownloadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

File

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified url, method and headers +for uploading the file.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    _ fileURL: URL,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil)
    +    -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a UploadRequest using the default SessionManager from the specified urlRequest for +uploading the file.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(_ fileURL: URL, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + file + + +
    +

    The file to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+
+ + + +

Data

+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified url, method and headers +for uploading the data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    _ data: Data,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil)
    +    -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified urlRequest for +uploading the data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(_ data: Data, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + data + + +
    +

    The data to upload.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified url, method and headers +for uploading the stream.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    _ stream: InputStream,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil)
    +    -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
  • +
    + + + + upload(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates an UploadRequest using the default SessionManager from the specified urlRequest for +uploading the stream.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(_ stream: InputStream, with urlRequest: URLRequestConvertible) -> UploadRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + stream + + +
    +

    The stream to upload.

    +
    +
    +
    +
    +

    Return Value

    +

    The created UploadRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold with the default SessionManager and calls +encodingCompletion with new UploadRequest using the url, method and headers.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    multipartFormData: @escaping (MultipartFormData) -> Void,
    +    usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +    to url: URLConvertible,
    +    method: HTTPMethod = .post,
    +    headers: HTTPHeaders? = nil,
    +    encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + url + + +
    +

    The URL.

    +
    +
    + + method + + +
    +

    The HTTP method. .post by default.

    +
    +
    + + headers + + +
    +

    The HTTP headers. nil by default.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Encodes multipartFormData using encodingMemoryThreshold and the default SessionManager and +calls encodingCompletion with new UploadRequest using the urlRequest.

    + +

    It is important to understand the memory implications of uploading MultipartFormData. If the cummulative +payload is small, encoding the data in-memory and directly uploading to a server is the by far the most +efficient approach. However, if the payload is too large, encoding the data in-memory could cause your app to +be terminated. Larger payloads must first be written to disk using input and output streams to keep the memory +footprint low, then the data can be uploaded as a stream from the resulting file. Streaming from disk MUST be +used for larger payloads such as video content.

    + +

    The encodingMemoryThreshold parameter allows Alamofire to automatically determine whether to encode in-memory +or stream from disk. If the content length of the MultipartFormData is below the encodingMemoryThreshold, +encoding takes place in-memory. If the content length exceeds the threshold, the data is streamed to disk +during the encoding process. Then the result is uploaded as data or as a stream depending on which encoding +technique was used.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func upload(
    +    multipartFormData: @escaping (MultipartFormData) -> Void,
    +    usingThreshold encodingMemoryThreshold: UInt64 = SessionManager.multipartFormDataEncodingMemoryThreshold,
    +    with urlRequest: URLRequestConvertible,
    +    encodingCompletion: ((SessionManager.MultipartFormDataEncodingResult) -> Void)?)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + multipartFormData + + +
    +

    The closure used to append body parts to the MultipartFormData.

    +
    +
    + + encodingMemoryThreshold + + +
    +

    The encoding memory threshold in bytes. + multipartFormDataEncodingMemoryThreshold by default.

    +
    +
    + + urlRequest + + +
    +

    The URL request.

    +
    +
    + + encodingCompletion + + +
    +

    The closure called when the MultipartFormData encoding is complete.

    +
    +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • + +
    +
    +
    +
    +
    +

    Creates a StreamRequest using the default SessionManager for bidirectional streaming with the hostname +and port.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stream(withHostName hostName: String, port: Int) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + hostName + + +
    +

    The hostname of the server to connect to.

    +
    +
    + + port + + +
    +

    The port of the server to connect to.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + stream(with:) + +
    +
    +
    +
    +
    +
    +

    Creates a StreamRequest using the default SessionManager for bidirectional streaming with the netService.

    + +

    If startRequestsImmediately is true, the request will have resume() called before being returned.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func stream(with netService: NetService) -> StreamRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + netService + + +
    +

    The net service used to identify the endpoint.

    +
    +
    +
    +
    +

    Return Value

    +

    The created StreamRequest.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + ==(_:_:) + +
    +
    +
    +
    +
    +
    +

    Returns whether the two network reachability status values are equal.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func ==(
    +    lhs: NetworkReachabilityManager.NetworkReachabilityStatus,
    +    rhs: NetworkReachabilityManager.NetworkReachabilityStatus)
    +    -> Bool
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + lhs + + +
    +

    The left-hand side value to compare.

    +
    +
    + + rhs + + +
    +

    The right-hand side value to compare.

    +
    +
    +
    +
    +

    Return Value

    +

    true if the two values are equal, false otherwise.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols.html new file mode 100644 index 0000000..d54c5dd --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols.html @@ -0,0 +1,548 @@ + + + + Protocols Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Protocols

+

The following protocols are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + ParameterEncoding + +
    +
    +
    +
    +
    +
    +

    A type used to define how a set of parameters are applied to a URLRequest.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + RequestAdapter + +
    +
    +
    +
    +
    +
    +

    A type that can inspect and optionally adapt a URLRequest in some manner if necessary.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol RequestAdapter
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + RequestRetrier + +
    +
    +
    +
    +
    +
    +

    A type that determines whether a request should be retried after being executed by the specified session manager +and encountering an error.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol RequestRetrier
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The type in which all data response serializers must conform to in order to serialize a response.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol DataResponseSerializerProtocol
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    The type in which all download response serializers must conform to in order to serialize a response.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol DownloadResponseSerializerProtocol
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + URLConvertible + +
    +
    +
    +
    +
    +
    +

    Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct +URL requests.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol URLConvertible
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + URLRequestConvertible + +
    +
    +
    +
    +
    +
    +

    Types adopting the URLRequestConvertible protocol can be used to construct URL requests.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public protocol URLRequestConvertible
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DataResponseSerializerProtocol.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DataResponseSerializerProtocol.html new file mode 100644 index 0000000..3e3f5a0 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DataResponseSerializerProtocol.html @@ -0,0 +1,387 @@ + + + + DataResponseSerializerProtocol Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataResponseSerializerProtocol

+
+
+
public protocol DataResponseSerializerProtocol
+ +
+
+

The type in which all data response serializers must conform to in order to serialize a response.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DataResponseSerializerType.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    associatedtype SerializedObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, data and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<SerializedObject>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DownloadResponseSerializerProtocol.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DownloadResponseSerializerProtocol.html new file mode 100644 index 0000000..97f92e3 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/DownloadResponseSerializerProtocol.html @@ -0,0 +1,387 @@ + + + + DownloadResponseSerializerProtocol Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadResponseSerializerProtocol

+
+
+
public protocol DownloadResponseSerializerProtocol
+ +
+
+

The type in which all download response serializers must conform to in order to serialize a response.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DownloadResponseSerializerType.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    associatedtype SerializedObject
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, url and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<SerializedObject>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/ParameterEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/ParameterEncoding.html new file mode 100644 index 0000000..b34c4e5 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/ParameterEncoding.html @@ -0,0 +1,400 @@ + + + + ParameterEncoding Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

ParameterEncoding

+
+
+
public protocol ParameterEncoding
+ +
+
+

A type used to define how a set of parameters are applied to a URLRequest.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An AFError.parameterEncodingFailed error if encoding fails.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestAdapter.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestAdapter.html new file mode 100644 index 0000000..fd434e9 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestAdapter.html @@ -0,0 +1,388 @@ + + + + RequestAdapter Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

RequestAdapter

+
+
+
public protocol RequestAdapter
+ +
+
+

A type that can inspect and optionally adapt a URLRequest in some manner if necessary.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + adapt(_:) + +
    +
    +
    +
    +
    +
    +

    Inspects and adapts the specified URLRequest in some manner if necessary and returns the result.

    +
    +

    Throws

    +

    An Error if the adaptation encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func adapt(_ urlRequest: URLRequest) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + urlRequest + + +
    +

    The URL request to adapt.

    +
    +
    +
    +
    +

    Return Value

    +

    The adapted URLRequest.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestRetrier.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestRetrier.html new file mode 100644 index 0000000..ad246db --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/RequestRetrier.html @@ -0,0 +1,420 @@ + + + + RequestRetrier Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

RequestRetrier

+
+
+
public protocol RequestRetrier
+ +
+
+

A type that determines whether a request should be retried after being executed by the specified session manager +and encountering an error.

+ +
+
+ +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Determines whether the Request should be retried by calling the completion closure.

    + +

    This operation is fully asynchronous. Any amount of time can be taken to determine whether the request needs +to be retried. The one requirement is that the completion closure is called to ensure the request is properly +cleaned up after.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + manager + + +
    +

    The session manager the request was executed on.

    +
    +
    + + request + + +
    +

    The request that failed due to the encountered error.

    +
    +
    + + error + + +
    +

    The error encountered when executing the request.

    +
    +
    + + completion + + +
    +

    The completion closure to be executed when retry decision has been determined.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLConvertible.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLConvertible.html new file mode 100644 index 0000000..1ac7a84 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLConvertible.html @@ -0,0 +1,370 @@ + + + + URLConvertible Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLConvertible

+
+
+
public protocol URLConvertible
+ +
+
+

Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct +URL requests.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURL() + +
    +
    +
    +
    +
    +
    +

    Returns a URL that conforms to RFC 2396 or throws an Error.

    +
    +

    Throws

    +

    An Error if the type cannot be converted to a URL.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func asURL() throws -> URL
    + +
    +
    +
    +

    Return Value

    +

    A URL or throws an Error.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLRequestConvertible.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLRequestConvertible.html new file mode 100644 index 0000000..2a8cebe --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Protocols/URLRequestConvertible.html @@ -0,0 +1,403 @@ + + + + URLRequestConvertible Protocol Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLRequestConvertible

+
+
+
public protocol URLRequestConvertible
+ +
+
+

Types adopting the URLRequestConvertible protocol can be used to construct URL requests.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + asURLRequest() + +
    +
    +
    +
    +
    +
    +

    Returns a URL request or throws if an Error was encountered.

    +
    +

    Throws

    +

    An Error if the underlying URLRequest is nil.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    func asURLRequest() throws -> URLRequest
    + +
    +
    +
    +

    Return Value

    +

    A URL request.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + urlRequest + + + Extension method + +
    +
    +
    +
    +
    +
    +

    The URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var urlRequest: URLRequest?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs.html new file mode 100644 index 0000000..ab65031 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs.html @@ -0,0 +1,652 @@ + + + + Structs Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Structs

+

The following structs are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Timeline + +
    +
    +
    +
    +
    +
    +

    Responsible for computing the timing metrics for the complete lifecycle of a Request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct Timeline
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + URLEncoding + +
    +
    +
    +
    +
    +
    +

    Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +the HTTP body depends on the destination of the encoding.

    + +

    The Content-Type HTTP header field of an encoded request with HTTP body is set to +application/x-www-form-urlencoded; charset=utf-8. Since there is no published specification for how to encode +collection types, the convention of appending [] to the key for array values (foo[]=1&foo[]=2), and appending +the key surrounded by square brackets for nested dictionary values (foo[bar]=baz).

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct URLEncoding: ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + JSONEncoding + +
    +
    +
    +
    +
    +
    +

    Uses JSONSerialization to create a JSON representation of the parameters object, which is set as the body of the +request. The Content-Type HTTP header field of an encoded request is set to application/json.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct JSONEncoding: ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + PropertyListEncoding + +
    +
    +
    +
    +
    +
    +

    Uses PropertyListSerialization to create a plist representation of the parameters object, according to the +associated format and write options values, which is set as the body of the request. The Content-Type HTTP header +field of an encoded request is set to application/x-plist.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct PropertyListEncoding: ParameterEncoding
    + +
    +
    +
    +
    +
  • +
+
+
+ +
+
+ +
+
+
    +
  • +
    + + + + DefaultDataResponse + +
    +
    +
    +
    +
    +
    +

    Used to store all data associated with an non-serialized response of a data or upload request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DefaultDataResponse
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DataResponse + +
    +
    +
    +
    +
    +
    +

    Used to store all data associated with a serialized response of a data or upload request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DataResponse<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    Used to store all data associated with an non-serialized response of a download request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DefaultDownloadResponse
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + DownloadResponse + +
    +
    +
    +
    +
    +
    +

    Used to store all data associated with a serialized response of a download request.

    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public struct DownloadResponse<Value>
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponse.html new file mode 100644 index 0000000..7d73119 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponse.html @@ -0,0 +1,836 @@ + + + + DataResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataResponse

+
+
+
public struct DataResponse<Value>
+ +
+
+

Used to store all data associated with a serialized response of a data or upload request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + data + +
    +
    +
    +
    +
    +
    +

    The data returned by the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let data: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + result + +
    +
    +
    +
    +
    +
    +

    The result of response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let result: Result<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Returns the associated value of the result if it is a success, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: Value?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Returns the associated error value if the result if it is a failure, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DataResponse instance with the specified parameters derived from response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        result: Result<Value>,
    +        timeline: Timeline = Timeline())
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + data + + +
    +

    The data returned by the server.

    +
    +
    + + result + + +
    +

    The result of response serialization.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the Request. Defaults to Timeline().

    +
    +
    +
    +
    +

    Return Value

    +

    The new DataResponse instance.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes whether the result was a +success or failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The debug textual representation used when written to an output stream, which includes the URL request, the URL +response, the server data, the response serialization result and the timeline.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + map(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the specified closure when the result of this DataResponse is a success, passing the unwrapped +result value as a parameter.

    + +

    Use the map method with a closure that does not throw. For example:

    +
    let possibleData: DataResponse<Data> = ...
    +let possibleInt = possibleData.map { $0.count }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func map<T>(_ transform: (Value) -> T) -> DataResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A DataResponse whose result wraps the value returned by the given closure. If this instance’s + result is a failure, returns a response wrapping the same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMap(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the given closure when the result of this DataResponse is a success, passing the unwrapped result +value as a parameter.

    + +

    Use the flatMap method with a closure that may throw an error. For example:

    +
    let possibleData: DataResponse<Data> = ...
    +let possibleObject = possibleData.flatMap {
    +    try JSONSerialization.jsonObject(with: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMap<T>(_ transform: (Value) throws -> T) -> DataResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A success or failure DataResponse depending on the result of the given closure. If this instance’s + result is a failure, returns the same failure.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponseSerializer.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponseSerializer.html new file mode 100644 index 0000000..3e3f299 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DataResponseSerializer.html @@ -0,0 +1,437 @@ + + + + DataResponseSerializer Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DataResponseSerializer

+
+
+
public struct DataResponseSerializer<Value>: DataResponseSerializerProtocol
+ +
+
+

A generic DataResponseSerializerType used to serialize a request, response, and data into a serialized object.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DataResponseSerializer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias SerializedObject = Value
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, data and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var serializeResponse: (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<Value>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes the ResponseSerializer instance with the given serialize response closure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, Data?, Error?) -> Result<Value>)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + serializeResponse + + +
    +

    The closure used to serialize the response.

    +
    +
    +
    +
    +

    Return Value

    +

    The new generic response serializer instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDataResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDataResponse.html new file mode 100644 index 0000000..637657a --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDataResponse.html @@ -0,0 +1,611 @@ + + + + DefaultDataResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DefaultDataResponse

+
+
+
public struct DefaultDataResponse
+ +
+
+

Used to store all data associated with an non-serialized response of a data or upload request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + data + +
    +
    +
    +
    +
    +
    +

    The data returned by the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let data: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    The error encountered while executing or validating the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let error: Error?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DefaultDataResponse instance from the specified parameters.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        data: Data?,
    +        error: Error?,
    +        timeline: Timeline = Timeline(),
    +        metrics: AnyObject? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + data + + +
    +

    The data returned by the server.

    +
    +
    + + error + + +
    +

    The error encountered while executing or validating the request.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the request. Timeline() by default.

    +
    +
    + + metrics + + +
    +

    The task metrics containing the request / response statistics. nil by default.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDownloadResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDownloadResponse.html new file mode 100644 index 0000000..dfe52c4 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DefaultDownloadResponse.html @@ -0,0 +1,691 @@ + + + + DefaultDownloadResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DefaultDownloadResponse

+
+
+
public struct DefaultDownloadResponse
+ +
+
+

Used to store all data associated with an non-serialized response of a download request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + temporaryURL + +
    +
    +
    +
    +
    +
    +

    The temporary destination URL of the data returned from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let temporaryURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + destinationURL + +
    +
    +
    +
    +
    +
    +

    The final destination URL of the data returned from the server if it was moved.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let destinationURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + resumeData + +
    +
    +
    +
    +
    +
    +

    The resume data generated if the request was cancelled.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let resumeData: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    The error encountered while executing or validating the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let error: Error?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DefaultDownloadResponse instance from the specified parameters.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        temporaryURL: URL?,
    +        destinationURL: URL?,
    +        resumeData: Data?,
    +        error: Error?,
    +        timeline: Timeline = Timeline(),
    +        metrics: AnyObject? = nil)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + temporaryURL + + +
    +

    The temporary destination URL of the data returned from the server.

    +
    +
    + + destinationURL + + +
    +

    The final destination URL of the data returned from the server if it was moved.

    +
    +
    + + resumeData + + +
    +

    The resume data generated if the request was cancelled.

    +
    +
    + + error + + +
    +

    The error encountered while executing or validating the request.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the request. Timeline() by default.

    +
    +
    + + metrics + + +
    +

    The task metrics containing the request / response statistics. nil by default.

    +
    +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponse.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponse.html new file mode 100644 index 0000000..eeba814 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponse.html @@ -0,0 +1,917 @@ + + + + DownloadResponse Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadResponse

+
+
+
public struct DownloadResponse<Value>
+ +
+
+

Used to store all data associated with a serialized response of a download request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + request + +
    +
    +
    +
    +
    +
    +

    The URL request sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let request: URLRequest?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + response + +
    +
    +
    +
    +
    +
    +

    The server’s response to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let response: HTTPURLResponse?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + temporaryURL + +
    +
    +
    +
    +
    +
    +

    The temporary destination URL of the data returned from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let temporaryURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + destinationURL + +
    +
    +
    +
    +
    +
    +

    The final destination URL of the data returned from the server if it was moved.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let destinationURL: URL?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + resumeData + +
    +
    +
    +
    +
    +
    +

    The resume data generated if the request was cancelled.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let resumeData: Data?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + result + +
    +
    +
    +
    +
    +
    +

    The result of response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let result: Result<Value>
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + timeline + +
    +
    +
    +
    +
    +
    +

    The timeline of the complete lifecycle of the request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let timeline: Timeline
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + value + +
    +
    +
    +
    +
    +
    +

    Returns the associated value of the result if it is a success, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var value: Value?
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + error + +
    +
    +
    +
    +
    +
    +

    Returns the associated error value if the result if it is a failure, nil otherwise.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var error: Error?
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a DownloadResponse instance with the specified parameters derived from response serialization.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        request: URLRequest?,
    +        response: HTTPURLResponse?,
    +        temporaryURL: URL?,
    +        destinationURL: URL?,
    +        resumeData: Data?,
    +        result: Result<Value>,
    +        timeline: Timeline = Timeline())
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + request + + +
    +

    The URL request sent to the server.

    +
    +
    + + response + + +
    +

    The server’s response to the URL request.

    +
    +
    + + temporaryURL + + +
    +

    The temporary destination URL of the data returned from the server.

    +
    +
    + + destinationURL + + +
    +

    The final destination URL of the data returned from the server if it was moved.

    +
    +
    + + resumeData + + +
    +

    The resume data generated if the request was cancelled.

    +
    +
    + + result + + +
    +

    The result of response serialization.

    +
    +
    + + timeline + + +
    +

    The timeline of the complete lifecycle of the Request. Defaults to Timeline().

    +
    +
    +
    +
    +

    Return Value

    +

    The new DownloadResponse instance.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes whether the result was a +success or failure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The debug textual representation used when written to an output stream, which includes the URL request, the URL +response, the temporary and destination URLs, the resume data, the response serialization result and the +timeline.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + map(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the given closure when the result of this DownloadResponse is a success, passing the unwrapped +result value as a parameter.

    + +

    Use the map method with a closure that does not throw. For example:

    +
    let possibleData: DownloadResponse<Data> = ...
    +let possibleInt = possibleData.map { $0.count }
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func map<T>(_ transform: (Value) -> T) -> DownloadResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A DownloadResponse whose result wraps the value returned by the given closure. If this instance’s + result is a failure, returns a response wrapping the same failure.

    +
    +
    +
    +
  • +
  • +
    + + + + flatMap(_:) + +
    +
    +
    +
    +
    +
    +

    Evaluates the given closure when the result of this DownloadResponse is a success, passing the unwrapped +result value as a parameter.

    + +

    Use the flatMap method with a closure that may throw an error. For example:

    +
    let possibleData: DownloadResponse<Data> = ...
    +let possibleObject = possibleData.flatMap {
    +    try JSONSerialization.jsonObject(with: $0)
    +}
    +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func flatMap<T>(_ transform: (Value) throws -> T) -> DownloadResponse<T>
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + transform + + +
    +

    A closure that takes the success value of the instance’s result.

    +
    +
    +
    +
    +

    Return Value

    +

    A success or failure DownloadResponse depending on the result of the given closure. If this +instance’s result is a failure, returns the same failure.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + metrics + +
    +
    +
    +
    +
    +
    +

    The task metrics containing the request / response statistics.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var metrics: URLSessionTaskMetrics?
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponseSerializer.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponseSerializer.html new file mode 100644 index 0000000..5d68cff --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/DownloadResponseSerializer.html @@ -0,0 +1,437 @@ + + + + DownloadResponseSerializer Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

DownloadResponseSerializer

+
+
+
public struct DownloadResponseSerializer<Value>: DownloadResponseSerializerProtocol
+ +
+
+

A generic DownloadResponseSerializerType used to serialize a request, response, and data into a serialized object.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + SerializedObject + +
    +
    +
    +
    +
    +
    +

    The type of serialized object to be created by this DownloadResponseSerializer.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias SerializedObject = Value
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializeResponse + +
    +
    +
    +
    +
    +
    +

    A closure used by response handlers that takes a request, response, url and error and returns a result.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var serializeResponse: (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<Value>
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Initializes the ResponseSerializer instance with the given serialize response closure.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(serializeResponse: @escaping (URLRequest?, HTTPURLResponse?, URL?, Error?) -> Result<Value>)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + serializeResponse + + +
    +

    The closure used to serialize the response.

    +
    +
    +
    +
    +

    Return Value

    +

    The new generic response serializer instance.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/JSONEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/JSONEncoding.html new file mode 100644 index 0000000..175ff1d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/JSONEncoding.html @@ -0,0 +1,628 @@ + + + + JSONEncoding Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

JSONEncoding

+
+
+
public struct JSONEncoding: ParameterEncoding
+ +
+
+

Uses JSONSerialization to create a JSON representation of the parameters object, which is set as the body of the +request. The Content-Type HTTP header field of an encoded request is set to application/json.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    Returns a JSONEncoding instance with default writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var `default`: JSONEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + prettyPrinted + +
    +
    +
    +
    +
    +
    +

    Returns a JSONEncoding instance with .prettyPrinted writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var prettyPrinted: JSONEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    The options for writing the parameters as JSON data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let options: JSONSerialization.WritingOptions
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(options:) + +
    +
    +
    +
    +
    +
    +

    Creates a JSONEncoding instance using the specified options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(options: JSONSerialization.WritingOptions = [])
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + options + + +
    +

    The options for writing the parameters as JSON data.

    +
    +
    +
    +
    +

    Return Value

    +

    The new JSONEncoding instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a URL request by encoding the JSON object and setting the resulting data on the HTTP body.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, withJSONObject jsonObject: Any? = nil) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to apply the JSON object to.

    +
    +
    + + jsonObject + + +
    +

    The JSON object to apply to the request.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/PropertyListEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/PropertyListEncoding.html new file mode 100644 index 0000000..0cd00ba --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/PropertyListEncoding.html @@ -0,0 +1,630 @@ + + + + PropertyListEncoding Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

PropertyListEncoding

+
+
+
public struct PropertyListEncoding: ParameterEncoding
+ +
+
+

Uses PropertyListSerialization to create a plist representation of the parameters object, according to the +associated format and write options values, which is set as the body of the request. The Content-Type HTTP header +field of an encoded request is set to application/x-plist.

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    Returns a default PropertyListEncoding instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var `default`: PropertyListEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + xml + +
    +
    +
    +
    +
    +
    +

    Returns a PropertyListEncoding instance with xml formatting and default writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var xml: PropertyListEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + binary + +
    +
    +
    +
    +
    +
    +

    Returns a PropertyListEncoding instance with binary formatting and default writing options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var binary: PropertyListEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + format + +
    +
    +
    +
    +
    +
    +

    The property list serialization format.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let format: PropertyListSerialization.PropertyListFormat
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + options + +
    +
    +
    +
    +
    +
    +

    The options for writing the parameters as plist data.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let options: PropertyListSerialization.WriteOptions
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(format:options:) + +
    +
    +
    +
    +
    +
    +

    Creates a PropertyListEncoding instance using the specified format and options.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        format: PropertyListSerialization.PropertyListFormat = .xml,
    +        options: PropertyListSerialization.WriteOptions = 0)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + format + + +
    +

    The property list serialization format.

    +
    +
    + + options + + +
    +

    The options for writing the parameters as plist data.

    +
    +
    +
    +
    +

    Return Value

    +

    The new PropertyListEncoding instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/Timeline.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/Timeline.html new file mode 100644 index 0000000..0095bba --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/Timeline.html @@ -0,0 +1,706 @@ + + + + Timeline Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Timeline

+
+
+
public struct Timeline
+ +
+
+

Responsible for computing the timing metrics for the complete lifecycle of a Request.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + requestStartTime + +
    +
    +
    +
    +
    +
    +

    The time the request was initialized.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let requestStartTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + initialResponseTime + +
    +
    +
    +
    +
    +
    +

    The time the first bytes were received from or sent to the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let initialResponseTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + requestCompletedTime + +
    +
    +
    +
    +
    +
    +

    The time when the request was completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let requestCompletedTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    The time when the response serialization was completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let serializationCompletedTime: CFAbsoluteTime
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + latency + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request started to the initial response from the server.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let latency: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + requestDuration + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request started to the time the request completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let requestDuration: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + serializationDuration + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request completed to the time response serialization completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let serializationDuration: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + totalDuration + +
    +
    +
    +
    +
    +
    +

    The time interval in seconds from the time the request started to the time response serialization completed.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let totalDuration: TimeInterval
    + +
    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates a new Timeline instance with the specified request times.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(
    +        requestStartTime: CFAbsoluteTime = 0.0,
    +        initialResponseTime: CFAbsoluteTime = 0.0,
    +        requestCompletedTime: CFAbsoluteTime = 0.0,
    +        serializationCompletedTime: CFAbsoluteTime = 0.0)
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + + + + + + + + + +
    + + requestStartTime + + +
    +

    The time the request was initialized. Defaults to 0.0.

    +
    +
    + + initialResponseTime + + +
    +

    The time the first bytes were received from or sent to the server. + Defaults to 0.0.

    +
    +
    + + requestCompletedTime + + +
    +

    The time when the request was completed. Defaults to 0.0.

    +
    +
    + + serializationCompletedTime + + +
    +

    The time when the response serialization was completed. Defaults + to 0.0.

    +
    +
    +
    +
    +

    Return Value

    +

    The new Timeline instance.

    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + description + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes the latency, the request +duration and the total duration.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var description: String
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + debugDescription + +
    +
    +
    +
    +
    +
    +

    The textual representation used when written to an output stream, which includes the request start time, the +initial response time, the request completed time, the serialization completed time, the latency, the request +duration and the total duration.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public var debugDescription: String
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding.html new file mode 100644 index 0000000..cbee047 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding.html @@ -0,0 +1,791 @@ + + + + URLEncoding Struct Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

URLEncoding

+
+
+
public struct URLEncoding: ParameterEncoding
+ +
+
+

Creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP +body of the URL request. Whether the query string is set or appended to any existing URL query string or set as +the HTTP body depends on the destination of the encoding.

+ +

The Content-Type HTTP header field of an encoded request with HTTP body is set to +application/x-www-form-urlencoded; charset=utf-8. Since there is no published specification for how to encode +collection types, the convention of appending [] to the key for array values (foo[]=1&foo[]=2), and appending +the key surrounded by square brackets for nested dictionary values (foo[bar]=baz).

+ +
+
+ +
+
+
+ +
    +
  • +
    + + + + Destination + +
    +
    +
    +
    +
    +
    +

    Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the +resulting URL request.

    + +
      +
    • methodDependent: Applies encoded query string result to existing query string for GET, HEAD and DELETE + requests and sets as the HTTP body for requests with any other HTTP method.
    • +
    • queryString: Sets or appends encoded query string result to existing query string.
    • +
    • httpBody: Sets encoded query string result as the HTTP body of the URL request.
    • +
    + + See more +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + default + +
    +
    +
    +
    +
    +
    +

    Returns a default URLEncoding instance.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var `default`: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + methodDependent + +
    +
    +
    +
    +
    +
    +

    Returns a URLEncoding instance with a .methodDependent destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var methodDependent: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + queryString + +
    +
    +
    +
    +
    +
    +

    Returns a URLEncoding instance with a .queryString destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var queryString: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + httpBody + +
    +
    +
    +
    +
    +
    +

    Returns a URLEncoding instance with an .httpBody destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public static var httpBody: URLEncoding
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + destination + +
    +
    +
    +
    +
    +
    +

    The destination defining where the encoded query string is to be applied to the URL request.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public let destination: Destination
    + +
    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + init(destination:) + +
    +
    +
    +
    +
    +
    +

    Creates a URLEncoding instance using the specified destination.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public init(destination: Destination = .methodDependent)
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + destination + + +
    +

    The destination defining where the encoded query string is to be applied.

    +
    +
    +
    +
    +

    Return Value

    +

    The new URLEncoding instance.

    +
    +
    +
    +
  • +
+
+
+ +
    +
  • +
    + + + + encode(_:with:) + +
    +
    +
    +
    +
    +
    +

    Creates a URL request by encoding parameters and applying them onto an existing request.

    +
    +

    Throws

    +

    An Error if the encoding process encounters an error.

    + +
    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + urlRequest + + +
    +

    The request to have parameters applied.

    +
    +
    + + parameters + + +
    +

    The parameters to apply.

    +
    +
    +
    +
    +

    Return Value

    +

    The encoded request.

    +
    +
    +
    +
  • +
  • + +
    +
    +
    +
    +
    +

    Creates percent-escaped, URL encoded query string components from the given key-value pair using recursion.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func queryComponents(fromKey key: String, value: Any) -> [(String, String)]
    + +
    +
    +
    +

    Parameters

    + + + + + + + + + + + +
    + + key + + +
    +

    The key of the query component.

    +
    +
    + + value + + +
    +

    The value of the query component.

    +
    +
    +
    +
    +

    Return Value

    +

    The percent-escaped, URL encoded query string components.

    +
    +
    +
    +
  • +
  • +
    + + + + escape(_:) + +
    +
    +
    +
    +
    +
    +

    Returns a percent-escaped string following RFC 3986 for a query string key or value.

    + +

    RFC 3986 states that the following characters are reserved characters.

    + +
      +
    • General Delimiters: :, #, [, ], @, ?, /
    • +
    • Sub-Delimiters: !, $, &, , (, ), *, +, ,, ;, =
    • +
    + +

    In RFC 3986 - Section 3.4, it states that the ? and / characters should not be escaped to allow +query strings to include a URL. Therefore, all reserved characters with the exception of ? and / +should be percent-escaped in the query string.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public func escape(_ string: String) -> String
    + +
    +
    +
    +

    Parameters

    + + + + + + + +
    + + string + + +
    +

    The string to be percent-escaped.

    +
    +
    +
    +
    +

    Return Value

    +

    The percent-escaped string.

    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding/Destination.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding/Destination.html new file mode 100644 index 0000000..bbe4739 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Structs/URLEncoding/Destination.html @@ -0,0 +1,422 @@ + + + + Destination Enum Reference + + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Destination

+
+
+
public enum Destination
+ +
+
+

Defines whether the url-encoded query string is applied to the existing query string or HTTP body of the +resulting URL request.

+ +
    +
  • methodDependent: Applies encoded query string result to existing query string for GET, HEAD and DELETE + requests and sets as the HTTP body for requests with any other HTTP method.
  • +
  • queryString: Sets or appends encoded query string result to existing query string.
  • +
  • httpBody: Sets encoded query string result as the HTTP body of the URL request.
  • +
+ +
+
+ +
+
+
+
    +
  • +
    + + + + methodDependent + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + queryString + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
  • +
    + + + + httpBody + +
    +
    +
    +
    +
    +
    +

    Undocumented

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public enum Destination
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Typealiases.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Typealiases.html new file mode 100644 index 0000000..2f7137c --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/Typealiases.html @@ -0,0 +1,415 @@ + + + + Typealiases Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+

Typealiases

+

The following typealiases are available globally.

+ +
+
+ +
+
+
+
    +
  • +
    + + + + Parameters + +
    +
    +
    +
    +
    +
    +

    A dictionary of parameters to apply to a URLRequest.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias Parameters = [String: Any]
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • + +
    +
    +
    +
    +
    +

    A closure executed when the RequestRetrier determines whether a Request should be retried or not.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias RequestRetryCompletion = (_ shouldRetry: Bool, _ timeDelay: TimeInterval) -> Void
    + +
    +
    +
    +
    +
  • +
+
+
+
    +
  • +
    + + + + HTTPHeaders + +
    +
    +
    +
    +
    +
    +

    A dictionary of headers to apply to a URLRequest.

    + +
    +
    +

    Declaration

    +
    +

    Swift

    +
    public typealias HTTPHeaders = [String: String]
    + +
    +
    +
    +
    +
  • +
+
+
+
+ +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/_config.yml b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/_config.yml new file mode 100644 index 0000000..2f7efbe --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/badge.svg b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/badge.svg new file mode 100644 index 0000000..5aff34b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/badge.svg @@ -0,0 +1 @@ +documentationdocumentation87%87% \ No newline at end of file diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/css/highlight.css b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/css/highlight.css new file mode 100644 index 0000000..d0db0e1 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/css/highlight.css @@ -0,0 +1,200 @@ +/* Credit to https://gist.github.com/wataru420/2048287 */ +.highlight { + /* Comment */ + /* Error */ + /* Keyword */ + /* Operator */ + /* Comment.Multiline */ + /* Comment.Preproc */ + /* Comment.Single */ + /* Comment.Special */ + /* Generic.Deleted */ + /* Generic.Deleted.Specific */ + /* Generic.Emph */ + /* Generic.Error */ + /* Generic.Heading */ + /* Generic.Inserted */ + /* Generic.Inserted.Specific */ + /* Generic.Output */ + /* Generic.Prompt */ + /* Generic.Strong */ + /* Generic.Subheading */ + /* Generic.Traceback */ + /* Keyword.Constant */ + /* Keyword.Declaration */ + /* Keyword.Pseudo */ + /* Keyword.Reserved */ + /* Keyword.Type */ + /* Literal.Number */ + /* Literal.String */ + /* Name.Attribute */ + /* Name.Builtin */ + /* Name.Class */ + /* Name.Constant */ + /* Name.Entity */ + /* Name.Exception */ + /* Name.Function */ + /* Name.Namespace */ + /* Name.Tag */ + /* Name.Variable */ + /* Operator.Word */ + /* Text.Whitespace */ + /* Literal.Number.Float */ + /* Literal.Number.Hex */ + /* Literal.Number.Integer */ + /* Literal.Number.Oct */ + /* Literal.String.Backtick */ + /* Literal.String.Char */ + /* Literal.String.Doc */ + /* Literal.String.Double */ + /* Literal.String.Escape */ + /* Literal.String.Heredoc */ + /* Literal.String.Interpol */ + /* Literal.String.Other */ + /* Literal.String.Regex */ + /* Literal.String.Single */ + /* Literal.String.Symbol */ + /* Name.Builtin.Pseudo */ + /* Name.Variable.Class */ + /* Name.Variable.Global */ + /* Name.Variable.Instance */ + /* Literal.Number.Integer.Long */ } + .highlight .c { + color: #999988; + font-style: italic; } + .highlight .err { + color: #a61717; + background-color: #e3d2d2; } + .highlight .k { + color: #000000; + font-weight: bold; } + .highlight .o { + color: #000000; + font-weight: bold; } + .highlight .cm { + color: #999988; + font-style: italic; } + .highlight .cp { + color: #999999; + font-weight: bold; } + .highlight .c1 { + color: #999988; + font-style: italic; } + .highlight .cs { + color: #999999; + font-weight: bold; + font-style: italic; } + .highlight .gd { + color: #000000; + background-color: #ffdddd; } + .highlight .gd .x { + color: #000000; + background-color: #ffaaaa; } + .highlight .ge { + color: #000000; + font-style: italic; } + .highlight .gr { + color: #aa0000; } + .highlight .gh { + color: #999999; } + .highlight .gi { + color: #000000; + background-color: #ddffdd; } + .highlight .gi .x { + color: #000000; + background-color: #aaffaa; } + .highlight .go { + color: #888888; } + .highlight .gp { + color: #555555; } + .highlight .gs { + font-weight: bold; } + .highlight .gu { + color: #aaaaaa; } + .highlight .gt { + color: #aa0000; } + .highlight .kc { + color: #000000; + font-weight: bold; } + .highlight .kd { + color: #000000; + font-weight: bold; } + .highlight .kp { + color: #000000; + font-weight: bold; } + .highlight .kr { + color: #000000; + font-weight: bold; } + .highlight .kt { + color: #445588; } + .highlight .m { + color: #009999; } + .highlight .s { + color: #d14; } + .highlight .na { + color: #008080; } + .highlight .nb { + color: #0086B3; } + .highlight .nc { + color: #445588; + font-weight: bold; } + .highlight .no { + color: #008080; } + .highlight .ni { + color: #800080; } + .highlight .ne { + color: #990000; + font-weight: bold; } + .highlight .nf { + color: #990000; } + .highlight .nn { + color: #555555; } + .highlight .nt { + color: #000080; } + .highlight .nv { + color: #008080; } + .highlight .ow { + color: #000000; + font-weight: bold; } + .highlight .w { + color: #bbbbbb; } + .highlight .mf { + color: #009999; } + .highlight .mh { + color: #009999; } + .highlight .mi { + color: #009999; } + .highlight .mo { + color: #009999; } + .highlight .sb { + color: #d14; } + .highlight .sc { + color: #d14; } + .highlight .sd { + color: #d14; } + .highlight .s2 { + color: #d14; } + .highlight .se { + color: #d14; } + .highlight .sh { + color: #d14; } + .highlight .si { + color: #d14; } + .highlight .sx { + color: #d14; } + .highlight .sr { + color: #009926; } + .highlight .s1 { + color: #d14; } + .highlight .ss { + color: #990073; } + .highlight .bp { + color: #999999; } + .highlight .vc { + color: #008080; } + .highlight .vg { + color: #008080; } + .highlight .vi { + color: #008080; } + .highlight .il { + color: #009999; } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/css/jazzy.css b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/css/jazzy.css new file mode 100644 index 0000000..c83db5b --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/css/jazzy.css @@ -0,0 +1,368 @@ +*, *:before, *:after { + box-sizing: inherit; } + +body { + margin: 0; + background: #fff; + color: #333; + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + letter-spacing: .2px; + -webkit-font-smoothing: antialiased; + box-sizing: border-box; } + +h1 { + font-size: 2rem; + font-weight: 700; + margin: 1.275em 0 0.6em; } + +h2 { + font-size: 1.75rem; + font-weight: 700; + margin: 1.275em 0 0.3em; } + +h3 { + font-size: 1.5rem; + font-weight: 700; + margin: 1em 0 0.3em; } + +h4 { + font-size: 1.25rem; + font-weight: 700; + margin: 1.275em 0 0.85em; } + +h5 { + font-size: 1rem; + font-weight: 700; + margin: 1.275em 0 0.85em; } + +h6 { + font-size: 1rem; + font-weight: 700; + margin: 1.275em 0 0.85em; + color: #777; } + +p { + margin: 0 0 1em; } + +ul, ol { + padding: 0 0 0 2em; + margin: 0 0 0.85em; } + +blockquote { + margin: 0 0 0.85em; + padding: 0 15px; + color: #858585; + border-left: 4px solid #e5e5e5; } + +img { + max-width: 100%; } + +a { + color: #4183c4; + text-decoration: none; } + a:hover, a:focus { + outline: 0; + text-decoration: underline; } + +table { + background: #fff; + width: 100%; + border-collapse: collapse; + border-spacing: 0; + overflow: auto; + margin: 0 0 0.85em; } + +tr:nth-child(2n) { + background-color: #fbfbfb; } + +th, td { + padding: 6px 13px; + border: 1px solid #ddd; } + +pre { + margin: 0 0 1.275em; + padding: .85em 1em; + overflow: auto; + background: #f7f7f7; + font-size: .85em; + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +code { + font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +p > code, li > code { + background: #f7f7f7; + padding: .2em; } + p > code:before, p > code:after, li > code:before, li > code:after { + letter-spacing: -.2em; + content: "\00a0"; } + +pre code { + padding: 0; + white-space: pre; } + +.content-wrapper { + display: flex; + flex-direction: column; } + @media (min-width: 768px) { + .content-wrapper { + flex-direction: row; } } + +.header { + display: flex; + padding: 8px; + font-size: 0.875em; + background: #444; + color: #999; } + +.header-col { + margin: 0; + padding: 0 8px; } + +.header-col--primary { + flex: 1; } + +.header-link { + color: #fff; } + +.header-icon { + padding-right: 6px; + vertical-align: -4px; + height: 16px; } + +.breadcrumbs { + font-size: 0.875em; + padding: 8px 16px; + margin: 0; + background: #fbfbfb; + border-bottom: 1px solid #ddd; } + +.carat { + height: 10px; + margin: 0 5px; } + +.navigation { + order: 2; } + @media (min-width: 768px) { + .navigation { + order: 1; + width: 25%; + max-width: 300px; + padding-bottom: 64px; + overflow: hidden; + word-wrap: normal; + background: #fbfbfb; + border-right: 1px solid #ddd; } } + +.nav-groups { + list-style-type: none; + padding-left: 0; } + +.nav-group-name { + border-bottom: 1px solid #ddd; + padding: 8px 0 8px 16px; } + +.nav-group-name-link { + color: #333; } + +.nav-group-tasks { + margin: 8px 0; + padding: 0 0 0 8px; } + +.nav-group-task { + font-size: 1em; + list-style-type: none; + white-space: nowrap; } + +.nav-group-task-link { + color: #808080; } + +.main-content { + order: 1; } + @media (min-width: 768px) { + .main-content { + order: 2; + flex: 1; + padding-bottom: 60px; } } + +.section { + padding: 0 32px; + border-bottom: 1px solid #ddd; } + +.section-content { + max-width: 834px; + margin: 0 auto; + padding: 16px 0; } + +.section-name { + color: #666; + display: block; } + +.declaration .highlight { + overflow-x: initial; + padding: 8px 0; + margin: 0; + background-color: transparent; + border: none; } + +.task-group-section { + border-top: 1px solid #ddd; } + +.task-group { + padding-top: 0px; } + +.task-name-container a[name]:before { + content: ""; + display: block; } + +.item-container { + padding: 0; } + +.item { + padding-top: 8px; + width: 100%; + list-style-type: none; } + .item a[name]:before { + content: ""; + display: block; } + .item .token { + padding-left: 3px; + margin-left: 0px; + font-size: 1rem; } + .item .declaration-note { + font-size: .85em; + color: #808080; + font-style: italic; } + +.pointer-container { + border-bottom: 1px solid #ddd; + left: -23px; + padding-bottom: 13px; + position: relative; + width: 110%; } + +.pointer { + left: 21px; + top: 7px; + display: block; + position: absolute; + width: 12px; + height: 12px; + border-left: 1px solid #ddd; + border-top: 1px solid #ddd; + background: #fff; + transform: rotate(45deg); } + +.height-container { + display: none; + position: relative; + width: 100%; + overflow: hidden; } + .height-container .section { + background: #fff; + border: 1px solid #ddd; + border-top-width: 0; + padding-top: 10px; + padding-bottom: 5px; + padding: 8px 16px; } + +.aside, .language { + padding: 6px 12px; + margin: 12px 0; + border-left: 5px solid #dddddd; + overflow-y: hidden; } + .aside .aside-title, .language .aside-title { + font-size: 9px; + letter-spacing: 2px; + text-transform: uppercase; + padding-bottom: 0; + margin: 0; + color: #aaa; + -webkit-user-select: none; } + .aside p:last-child, .language p:last-child { + margin-bottom: 0; } + +.language { + border-left: 5px solid #cde9f4; } + .language .aside-title { + color: #4183c4; } + +.aside-warning { + border-left: 5px solid #ff6666; } + .aside-warning .aside-title { + color: #ff0000; } + +.graybox { + border-collapse: collapse; + width: 100%; } + .graybox p { + margin: 0; + word-break: break-word; + min-width: 50px; } + .graybox td { + border: 1px solid #ddd; + padding: 5px 25px 5px 10px; + vertical-align: middle; } + .graybox tr td:first-of-type { + text-align: right; + padding: 7px; + vertical-align: top; + word-break: normal; + width: 40px; } + +.slightly-smaller { + font-size: 0.9em; } + +.footer { + padding: 8px 16px; + background: #444; + color: #ddd; + font-size: 0.8em; } + .footer p { + margin: 8px 0; } + .footer a { + color: #fff; } + +html.dash .header, html.dash .breadcrumbs, html.dash .navigation { + display: none; } +html.dash .height-container { + display: block; } + +form[role=search] input { + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 24px; + padding: 0 10px; + margin: 0; + border: none; + border-radius: 1em; } + .loading form[role=search] input { + background: white url(../img/spinner.gif) center right 4px no-repeat; } +form[role=search] .tt-menu { + margin: 0; + min-width: 300px; + background: #fbfbfb; + color: #333; + border: 1px solid #ddd; } +form[role=search] .tt-highlight { + font-weight: bold; } +form[role=search] .tt-suggestion { + font: 16px/1.7 "Helvetica Neue", Helvetica, Arial, sans-serif; + padding: 0 8px; } + form[role=search] .tt-suggestion span { + display: table-cell; + white-space: nowrap; } + form[role=search] .tt-suggestion .doc-parent-name { + width: 100%; + text-align: right; + font-weight: normal; + font-size: 0.9em; + padding-left: 16px; } +form[role=search] .tt-suggestion:hover, +form[role=search] .tt-suggestion.tt-cursor { + cursor: pointer; + background-color: #4183c4; + color: #fff; } +form[role=search] .tt-suggestion:hover .doc-parent-name, +form[role=search] .tt-suggestion.tt-cursor .doc-parent-name { + color: #fff; } diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/carat.png b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/carat.png new file mode 100755 index 0000000..29d2f7f Binary files /dev/null and b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/carat.png differ diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/dash.png b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/dash.png new file mode 100755 index 0000000..6f694c7 Binary files /dev/null and b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/dash.png differ diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/gh.png b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/gh.png new file mode 100755 index 0000000..628da97 Binary files /dev/null and b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/gh.png differ diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/spinner.gif b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/spinner.gif new file mode 100644 index 0000000..e3038d0 Binary files /dev/null and b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/img/spinner.gif differ diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/index.html b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/index.html new file mode 100644 index 0000000..866f5ec --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/index.html @@ -0,0 +1,2026 @@ + + + + Alamofire Reference + + + + + + + + + + + + + + + +
+

+ + Alamofire Docs + + (87% documented) +

+ +

+

+ +
+

+ +

+ + + View on GitHub + +

+ +

+ + + Install in Dash + +

+
+ + + +
+ +
+ +
+
+ +

Alamofire: Elegant Networking in Swift

+ +

Build Status +CocoaPods Compatible +Carthage Compatible +Platform +Twitter +Gitter

+ +

Alamofire is an HTTP networking library written in Swift.

+ + +

Features

+ +
    +
  • [x] Chainable Request / Response Methods
  • +
  • [x] URL / JSON / plist Parameter Encoding
  • +
  • [x] Upload File / Data / Stream / MultipartFormData
  • +
  • [x] Download File using Request or Resume Data
  • +
  • [x] Authentication with URLCredential
  • +
  • [x] HTTP Response Validation
  • +
  • [x] Upload and Download Progress Closures with Progress
  • +
  • [x] cURL Command Output
  • +
  • [x] Dynamically Adapt and Retry Requests
  • +
  • [x] TLS Certificate and Public Key Pinning
  • +
  • [x] Network Reachability
  • +
  • [x] Comprehensive Unit and Integration Test Coverage
  • +
  • [x] Complete Documentation
  • +
+

Component Libraries

+ +

In order to keep Alamofire focused specifically on core networking implementations, additional component libraries have been created by the Alamofire Software Foundation to bring additional functionality to the Alamofire ecosystem.

+ +
    +
  • AlamofireImage - An image library including image response serializers, UIImage and UIImageView extensions, custom image filters, an auto-purging in-memory cache and a priority-based image downloading system.
  • +
  • AlamofireNetworkActivityIndicator - Controls the visibility of the network activity indicator on iOS using Alamofire. It contains configurable delay timers to help mitigate flicker and can support URLSession instances not managed by Alamofire.
  • +
+

Requirements

+ +
    +
  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • +
  • Xcode 8.1, 8.2, 8.3, and 9.0
  • +
  • Swift 3.0, 3.1, 3.2, and 4.0
  • +
+

Migration Guides

+ + +

Communication

+ +
    +
  • If you need help, use Stack Overflow. (Tag ‘alamofire’)
  • +
  • If you’d like to ask a general question, use Stack Overflow.
  • +
  • If you found a bug, open an issue.
  • +
  • If you have a feature request, open an issue.
  • +
  • If you want to contribute, submit a pull request.
  • +
+

Installation

+

CocoaPods

+ +

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

+
$ gem install cocoapods
+
+ +
+

CocoaPods 1.1.0+ is required to build Alamofire 4.0.0+.

+
+ +

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

+
source 'https://github.com/CocoaPods/Specs.git'
+platform :ios, '10.0'
+use_frameworks!
+
+target '<Your Target Name>' do
+    pod 'Alamofire', '~> 4.4'
+end
+
+ +

Then, run the following command:

+
$ pod install
+
+

Carthage

+ +

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

+ +

You can install Carthage with Homebrew using the following command:

+
$ brew update
+$ brew install carthage
+
+ +

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

+
github "Alamofire/Alamofire" ~> 4.4
+
+ +

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

+

Swift Package Manager

+ +

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Alamofire does support its use on supported platforms.

+ +

Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies value of your Package.swift.

+
dependencies: [
+    .Package(url: "https://github.com/Alamofire/Alamofire.git", majorVersion: 4)
+]
+
+

Manually

+ +

If you prefer not to use any of the aforementioned dependency managers, you can integrate Alamofire into your project manually.

+

Embedded Framework

+ +
    +
  • Open up Terminal, cd into your top-level project directory, and run the following command if your project is not initialized as a git repository:
  • +
+
  $ git init
+
+ +
    +
  • Add Alamofire as a git submodule by running the following command:
  • +
+
  $ git submodule add https://github.com/Alamofire/Alamofire.git
+
+ +
    +
  • Open the new Alamofire folder, and drag the Alamofire.xcodeproj into the Project Navigator of your application’s Xcode project.

    + +
    +

    It should appear nested underneath your application’s blue project icon. Whether it is above or below all the other Xcode groups does not matter.

    +
  • +
  • Select the Alamofire.xcodeproj in the Project Navigator and verify the deployment target matches that of your application target.

  • +
  • Next, select your application project in the Project Navigator (blue project icon) to navigate to the target configuration window and select the application target under the Targets heading in the sidebar.

  • +
  • In the tab bar at the top of that window, open the General panel.

  • +
  • Click on the + button under the Embedded Binaries section.

  • +
  • You will see two different Alamofire.xcodeproj folders each with two different versions of the Alamofire.framework nested inside a Products folder.

    + +
    +

    It does not matter which Products folder you choose from, but it does matter whether you choose the top or bottom Alamofire.framework.

    +
  • +
  • Select the top Alamofire.framework for iOS and the bottom one for OS X.

    + +
    +

    You can verify which one you selected by inspecting the build log for your project. The build target for Alamofire will be listed as either Alamofire iOS, Alamofire macOS, Alamofire tvOS or Alamofire watchOS.

    +
  • +
  • And that’s it!

  • +
+ +
+

The Alamofire.framework is automagically added as a target dependency, linked framework and embedded framework in a copy files build phase which is all you need to build on the simulator and a device.

+
+ +
+

Usage

+

Making a Request

+
import Alamofire
+
+Alamofire.request("https://httpbin.org/get")
+
+

Response Handling

+ +

Handling the Response of a Request made in Alamofire involves chaining a response handler onto the Request.

+
Alamofire.request("https://httpbin.org/get").responseJSON { response in
+    print("Request: \(String(describing: response.request))")   // original url request
+    print("Response: \(String(describing: response.response))") // http url response
+    print("Result: \(response.result)")                         // response serialization result
+
+    if let json = response.result.value {
+        print("JSON: \(json)") // serialized json response
+    }
+
+    if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) {
+        print("Data: \(utf8Text)") // original server data as UTF8 string
+    }
+}
+
+ +

In the above example, the responseJSON handler is appended to the Request to be executed once the Request is complete. Rather than blocking execution to wait for a response from the server, a callback in the form of a closure is specified to handle the response once it’s received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure.

+ +
+

Networking in Alamofire is done asynchronously. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are very good reasons for doing it this way.

+
+ +

Alamofire contains five different response handlers by default including:

+
// Response Handler - Unserialized Response
+func response(
+    queue: DispatchQueue?,
+    completionHandler: @escaping (DefaultDataResponse) -> Void)
+    -> Self
+
+// Response Data Handler - Serialized into Data
+func responseData(
+    queue: DispatchQueue?,
+    completionHandler: @escaping (DataResponse<Data>) -> Void)
+    -> Self
+
+// Response String Handler - Serialized into String
+func responseString(
+    queue: DispatchQueue?,
+    encoding: String.Encoding?,
+    completionHandler: @escaping (DataResponse<String>) -> Void)
+    -> Self
+
+// Response JSON Handler - Serialized into Any
+func responseJSON(
+    queue: DispatchQueue?,
+    completionHandler: @escaping (DataResponse<Any>) -> Void)
+    -> Self
+
+// Response PropertyList (plist) Handler - Serialized into Any
+func responsePropertyList(
+    queue: DispatchQueue?,
+    completionHandler: @escaping (DataResponse<Any>) -> Void))
+    -> Self
+
+ +

None of the response handlers perform any validation of the HTTPURLResponse it gets back from the server.

+ +
+

For example, response status codes in the 400..<500 and 500..<600 ranges do NOT automatically trigger an Error. Alamofire uses Response Validation method chaining to achieve this.

+
+

Response Handler

+ +

The response handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using cURL to execute a Request.

+
Alamofire.request("https://httpbin.org/get").response { response in
+    print("Request: \(response.request)")
+    print("Response: \(response.response)")
+    print("Error: \(response.error)")
+
+    if let data = response.data, let utf8Text = String(data: data, encoding: .utf8) {
+        print("Data: \(utf8Text)")
+    }
+}
+
+ +
+

We strongly encourage you to leverage the other response serializers taking advantage of Response and Result types.

+
+

Response Data Handler

+ +

The responseData handler uses the responseDataSerializer (the object that serializes the server data into some other type) to extract the Data returned by the server. If no errors occur and Data is returned, the response Result will be a .success and the value will be of type Data.

+
Alamofire.request("https://httpbin.org/get").responseData { response in
+    debugPrint("All Response Info: \(response)")
+
+    if let data = response.result.value, let utf8Text = String(data: data, encoding: .utf8) {
+        print("Data: \(utf8Text)")
+    }
+}
+
+

Response String Handler

+ +

The responseString handler uses the responseStringSerializer to convert the Data returned by the server into a String with the specified encoding. If no errors occur and the server data is successfully serialized into a String, the response Result will be a .success and the value will be of type String.

+
Alamofire.request("https://httpbin.org/get").responseString { response in
+    print("Success: \(response.result.isSuccess)")
+    print("Response String: \(response.result.value)")
+}
+
+ +
+

If no encoding is specified, Alamofire will use the text encoding specified in the HTTPURLResponse from the server. If the text encoding cannot be determined by the server response, it defaults to .isoLatin1.

+
+

Response JSON Handler

+ +

The responseJSON handler uses the responseJSONSerializer to convert the Data returned by the server into an Any type using the specified JSONSerialization.ReadingOptions. If no errors occur and the server data is successfully serialized into a JSON object, the response Result will be a .success and the value will be of type Any.

+
Alamofire.request("https://httpbin.org/get").responseJSON { response in
+    debugPrint(response)
+
+    if let json = response.result.value {
+        print("JSON: \(json)")
+    }
+}
+
+ +
+

All JSON serialization is handled by the JSONSerialization API in the Foundation framework.

+
+

Chained Response Handlers

+ +

Response handlers can even be chained:

+
Alamofire.request("https://httpbin.org/get")
+    .responseString { response in
+        print("Response String: \(response.result.value)")
+    }
+    .responseJSON { response in
+        print("Response JSON: \(response.result.value)")
+    }
+
+ +
+

It is important to note that using multiple response handlers on the same Request requires the server data to be serialized multiple times. Once for each response handler.

+
+

Response Handler Queue

+ +

Response handlers by default are executed on the main dispatch queue. However, a custom dispatch queue can be provided instead.

+
let utilityQueue = DispatchQueue.global(qos: .utility)
+
+Alamofire.request("https://httpbin.org/get").responseJSON(queue: utilityQueue) { response in
+    print("Executing response handler on utility queue")
+}
+
+

Response Validation

+ +

By default, Alamofire treats any completed request to be successful, regardless of the content of the response. Calling validate before a response handler causes an error to be generated if the response had an unacceptable status code or MIME type.

+

Manual Validation

+
Alamofire.request("https://httpbin.org/get")
+    .validate(statusCode: 200..<300)
+    .validate(contentType: ["application/json"])
+    .responseData { response in
+        switch response.result {
+        case .success:
+            print("Validation Successful")
+        case .failure(let error):
+            print(error)
+        }
+    }
+
+

Automatic Validation

+ +

Automatically validates status code within 200..<300 range, and that the Content-Type header of the response matches the Accept header of the request, if one is provided.

+
Alamofire.request("https://httpbin.org/get").validate().responseJSON { response in
+    switch response.result {
+    case .success:
+        print("Validation Successful")
+    case .failure(let error):
+        print(error)
+    }
+}
+
+

Response Caching

+ +

Response Caching is handled on the system framework level by URLCache. It provides a composite in-memory and on-disk cache and lets you manipulate the sizes of both the in-memory and on-disk portions.

+ +
+

By default, Alamofire leverages the shared URLCache. In order to customize it, see the Session Manager Configurations section.

+
+

HTTP Methods

+ +

The HTTPMethod enumeration lists the HTTP methods defined in RFC 7231 §4.3:

+
public enum HTTPMethod: String {
+    case options = "OPTIONS"
+    case get     = "GET"
+    case head    = "HEAD"
+    case post    = "POST"
+    case put     = "PUT"
+    case patch   = "PATCH"
+    case delete  = "DELETE"
+    case trace   = "TRACE"
+    case connect = "CONNECT"
+}
+
+ +

These values can be passed as the method argument to the Alamofire.request API:

+
Alamofire.request("https://httpbin.org/get") // method defaults to `.get`
+
+Alamofire.request("https://httpbin.org/post", method: .post)
+Alamofire.request("https://httpbin.org/put", method: .put)
+Alamofire.request("https://httpbin.org/delete", method: .delete)
+
+ +
+

The Alamofire.request method parameter defaults to .get.

+
+

Parameter Encoding

+ +

Alamofire supports three types of parameter encoding including: URL, JSON and PropertyList. It can also support any custom encoding that conforms to the ParameterEncoding protocol.

+

URL Encoding

+ +

The URLEncoding type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the Destination of the encoding. The Destination enumeration has three cases:

+ +
    +
  • .methodDependent - Applies encoded query string result to existing query string for GET, HEAD and DELETE requests and sets as the HTTP body for requests with any other HTTP method.
  • +
  • .queryString - Sets or appends encoded query string result to existing query string.
  • +
  • .httpBody - Sets encoded query string result as the HTTP body of the URL request.
  • +
+ +

The Content-Type HTTP header field of an encoded request with HTTP body is set to application/x-www-form-urlencoded; charset=utf-8. Since there is no published specification for how to encode collection types, the convention of appending [] to the key for array values (foo[]=1&foo[]=2), and appending the key surrounded by square brackets for nested dictionary values (foo[bar]=baz).

+
GET Request With URL-Encoded Parameters
+
let parameters: Parameters = ["foo": "bar"]
+
+// All three of these calls are equivalent
+Alamofire.request("https://httpbin.org/get", parameters: parameters) // encoding defaults to `URLEncoding.default`
+Alamofire.request("https://httpbin.org/get", parameters: parameters, encoding: URLEncoding.default)
+Alamofire.request("https://httpbin.org/get", parameters: parameters, encoding: URLEncoding(destination: .methodDependent))
+
+// https://httpbin.org/get?foo=bar
+
+
POST Request With URL-Encoded Parameters
+
let parameters: Parameters = [
+    "foo": "bar",
+    "baz": ["a", 1],
+    "qux": [
+        "x": 1,
+        "y": 2,
+        "z": 3
+    ]
+]
+
+// All three of these calls are equivalent
+Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters)
+Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: URLEncoding.default)
+Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: URLEncoding.httpBody)
+
+// HTTP body: foo=bar&baz[]=a&baz[]=1&qux[x]=1&qux[y]=2&qux[z]=3
+
+

JSON Encoding

+ +

The JSONEncoding type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The Content-Type HTTP header field of an encoded request is set to application/json.

+
POST Request with JSON-Encoded Parameters
+
let parameters: Parameters = [
+    "foo": [1,2,3],
+    "bar": [
+        "baz": "qux"
+    ]
+]
+
+// Both calls are equivalent
+Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: JSONEncoding.default)
+Alamofire.request("https://httpbin.org/post", method: .post, parameters: parameters, encoding: JSONEncoding(options: []))
+
+// HTTP body: {"foo": [1, 2, 3], "bar": {"baz": "qux"}}
+
+

Property List Encoding

+ +

The PropertyListEncoding uses PropertyListSerialization to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The Content-Type HTTP header field of an encoded request is set to application/x-plist.

+

Custom Encoding

+ +

In the event that the provided ParameterEncoding types do not meet your needs, you can create your own custom encoding. Here’s a quick example of how you could build a custom JSONStringArrayEncoding type to encode a JSON string array onto a Request.

+
struct JSONStringArrayEncoding: ParameterEncoding {
+    private let array: [String]
+
+    init(array: [String]) {
+        self.array = array
+    }
+
+    func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest {
+        var urlRequest = try urlRequest.asURLRequest()
+
+        let data = try JSONSerialization.data(withJSONObject: array, options: [])
+
+        if urlRequest.value(forHTTPHeaderField: "Content-Type") == nil {
+            urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
+        }
+
+        urlRequest.httpBody = data
+
+        return urlRequest
+    }
+}
+
+

Manual Parameter Encoding of a URLRequest

+ +

The ParameterEncoding APIs can be used outside of making network requests.

+
let url = URL(string: "https://httpbin.org/get")!
+var urlRequest = URLRequest(url: url)
+
+let parameters: Parameters = ["foo": "bar"]
+let encodedURLRequest = try URLEncoding.queryString.encode(urlRequest, with: parameters)
+
+

HTTP Headers

+ +

Adding a custom HTTP header to a Request is supported directly in the global request method. This makes it easy to attach HTTP headers to a Request that can be constantly changing.

+
let headers: HTTPHeaders = [
+    "Authorization": "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==",
+    "Accept": "application/json"
+]
+
+Alamofire.request("https://httpbin.org/headers", headers: headers).responseJSON { response in
+    debugPrint(response)
+}
+
+ +
+

For HTTP headers that do not change, it is recommended to set them on the URLSessionConfiguration so they are automatically applied to any URLSessionTask created by the underlying URLSession. For more information, see the Session Manager Configurations section.

+
+ +

The default Alamofire SessionManager provides a default set of headers for every Request. These include:

+ +
    +
  • Accept-Encoding, which defaults to gzip;q=1.0, compress;q=0.5, per RFC 7230 §4.2.3.
  • +
  • Accept-Language, which defaults to up to the top 6 preferred languages on the system, formatted like en;q=1.0, per RFC 7231 §5.3.5.
  • +
  • User-Agent, which contains versioning information about the current app. For example: iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0, per RFC 7231 §5.5.3.
  • +
+ +

If you need to customize these headers, a custom URLSessionConfiguration should be created, the defaultHTTPHeaders property updated and the configuration applied to a new SessionManager instance.

+

Authentication

+ +

Authentication is handled on the system framework level by URLCredential and URLAuthenticationChallenge.

+ +

Supported Authentication Schemes

+ + +

HTTP Basic Authentication

+ +

The authenticate method on a Request will automatically provide a URLCredential to a URLAuthenticationChallenge when appropriate:

+
let user = "user"
+let password = "password"
+
+Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)")
+    .authenticate(user: user, password: password)
+    .responseJSON { response in
+        debugPrint(response)
+    }
+
+ +

Depending upon your server implementation, an Authorization header may also be appropriate:

+
let user = "user"
+let password = "password"
+
+var headers: HTTPHeaders = [:]
+
+if let authorizationHeader = Request.authorizationHeader(user: user, password: password) {
+    headers[authorizationHeader.key] = authorizationHeader.value
+}
+
+Alamofire.request("https://httpbin.org/basic-auth/user/password", headers: headers)
+    .responseJSON { response in
+        debugPrint(response)
+    }
+
+

Authentication with URLCredential

+
let user = "user"
+let password = "password"
+
+let credential = URLCredential(user: user, password: password, persistence: .forSession)
+
+Alamofire.request("https://httpbin.org/basic-auth/\(user)/\(password)")
+    .authenticate(usingCredential: credential)
+    .responseJSON { response in
+        debugPrint(response)
+    }
+
+ +
+

It is important to note that when using a URLCredential for authentication, the underlying URLSession will actually end up making two requests if a challenge is issued by the server. The first request will not include the credential which may trigger a challenge from the server. The challenge is then received by Alamofire, the credential is appended and the request is retried by the underlying URLSession.

+
+

Downloading Data to a File

+ +

Requests made in Alamofire that fetch data from a server can download the data in-memory or on-disk. The Alamofire.request APIs used in all the examples so far always downloads the server data in-memory. This is great for smaller payloads because it’s more efficient, but really bad for larger payloads because the download could run your entire application out-of-memory. Because of this, you can also use the Alamofire.download APIs to download the server data to a temporary file on-disk.

+ +
+

This will only work on macOS as is. Other platforms don’t allow access to the filesystem outside of your app’s sandbox. To download files on other platforms, see the Download File Destination section.

+
+
Alamofire.download("https://httpbin.org/image/png").responseData { response in
+    if let data = response.result.value {
+        let image = UIImage(data: data)
+    }
+}
+
+ +
+

The Alamofire.download APIs should also be used if you need to download data while your app is in the background. For more information, please see the Session Manager Configurations section.

+
+

Download File Destination

+ +

You can also provide a DownloadFileDestination closure to move the file from the temporary directory to a final destination. Before the temporary file is actually moved to the destinationURL, the DownloadOptions specified in the closure will be executed. The two currently supported DownloadOptions are:

+ +
    +
  • .createIntermediateDirectories - Creates intermediate directories for the destination URL if specified.
  • +
  • .removePreviousFile - Removes a previous file from the destination URL if specified.
  • +
+
let destination: DownloadRequest.DownloadFileDestination = { _, _ in
+    let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
+    let fileURL = documentsURL.appendingPathComponent("pig.png")
+
+    return (fileURL, [.removePreviousFile, .createIntermediateDirectories])
+}
+
+Alamofire.download(urlString, to: destination).response { response in
+    print(response)
+
+    if response.error == nil, let imagePath = response.destinationURL?.path {
+        let image = UIImage(contentsOfFile: imagePath)
+    }
+}
+
+ +

You can also use the suggested download destination API.

+
let destination = DownloadRequest.suggestedDownloadDestination(for: .documentDirectory)
+Alamofire.download("https://httpbin.org/image/png", to: destination)
+
+

Download Progress

+ +

Many times it can be helpful to report download progress to the user. Any DownloadRequest can report download progress using the downloadProgress API.

+
Alamofire.download("https://httpbin.org/image/png")
+    .downloadProgress { progress in
+        print("Download Progress: \(progress.fractionCompleted)")
+    }
+    .responseData { response in
+        if let data = response.result.value {
+            let image = UIImage(data: data)
+        }
+    }
+
+ +

The downloadProgress API also takes a queue parameter which defines which DispatchQueue the download progress closure should be called on.

+
let utilityQueue = DispatchQueue.global(qos: .utility)
+
+Alamofire.download("https://httpbin.org/image/png")
+    .downloadProgress(queue: utilityQueue) { progress in
+        print("Download Progress: \(progress.fractionCompleted)")
+    }
+    .responseData { response in
+        if let data = response.result.value {
+            let image = UIImage(data: data)
+        }
+    }
+
+

Resuming a Download

+ +

If a DownloadRequest is cancelled or interrupted, the underlying URL session may generate resume data for the active DownloadRequest. If this happens, the resume data can be re-used to restart the DownloadRequest where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request.

+ +
+

IMPORTANT: On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the data is written incorrectly and will always fail to resume the download. For more information about the bug and possible workarounds, please see this Stack Overflow post.

+
+
class ImageRequestor {
+    private var resumeData: Data?
+    private var image: UIImage?
+
+    func fetchImage(completion: (UIImage?) -> Void) {
+        guard image == nil else { completion(image) ; return }
+
+        let destination: DownloadRequest.DownloadFileDestination = { _, _ in
+            let documentsURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
+            let fileURL = documentsURL.appendingPathComponent("pig.png")
+
+            return (fileURL, [.removePreviousFile, .createIntermediateDirectories])
+        }
+
+        let request: DownloadRequest
+
+        if let resumeData = resumeData {
+            request = Alamofire.download(resumingWith: resumeData)
+        } else {
+            request = Alamofire.download("https://httpbin.org/image/png")
+        }
+
+        request.responseData { response in
+            switch response.result {
+            case .success(let data):
+                self.image = UIImage(data: data)
+            case .failure:
+                self.resumeData = response.resumeData
+            }
+        }
+    }
+}
+
+

Uploading Data to a Server

+ +

When sending relatively small amounts of data to a server using JSON or URL encoded parameters, the Alamofire.request APIs are usually sufficient. If you need to send much larger amounts of data from a file URL or an InputStream, then the Alamofire.upload APIs are what you want to use.

+ +
+

The Alamofire.upload APIs should also be used if you need to upload data while your app is in the background. For more information, please see the Session Manager Configurations section.

+
+

Uploading Data

+
let imageData = UIImagePNGRepresentation(image)!
+
+Alamofire.upload(imageData, to: "https://httpbin.org/post").responseJSON { response in
+    debugPrint(response)
+}
+
+

Uploading a File

+
let fileURL = Bundle.main.url(forResource: "video", withExtension: "mov")
+
+Alamofire.upload(fileURL, to: "https://httpbin.org/post").responseJSON { response in
+    debugPrint(response)
+}
+
+

Uploading Multipart Form Data

+
Alamofire.upload(
+    multipartFormData: { multipartFormData in
+        multipartFormData.append(unicornImageURL, withName: "unicorn")
+        multipartFormData.append(rainbowImageURL, withName: "rainbow")
+    },
+    to: "https://httpbin.org/post",
+    encodingCompletion: { encodingResult in
+        switch encodingResult {
+        case .success(let upload, _, _):
+            upload.responseJSON { response in
+                debugPrint(response)
+            }
+        case .failure(let encodingError):
+            print(encodingError)
+        }
+    }
+)
+
+

Upload Progress

+ +

While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any UploadRequest can report both upload progress and download progress of the response data using the uploadProgress and downloadProgress APIs.

+
let fileURL = Bundle.main.url(forResource: "video", withExtension: "mov")
+
+Alamofire.upload(fileURL, to: "https://httpbin.org/post")
+    .uploadProgress { progress in // main queue by default
+        print("Upload Progress: \(progress.fractionCompleted)")
+    }
+    .downloadProgress { progress in // main queue by default
+        print("Download Progress: \(progress.fractionCompleted)")
+    }
+    .responseJSON { response in
+        debugPrint(response)
+    }
+
+

Statistical Metrics

+

Timeline

+ +

Alamofire collects timings throughout the lifecycle of a Request and creates a Timeline object exposed as a property on all response types.

+
Alamofire.request("https://httpbin.org/get").responseJSON { response in
+    print(response.timeline)
+}
+
+ +

The above reports the following Timeline info:

+ +
    +
  • Latency: 0.428 seconds
  • +
  • Request Duration: 0.428 seconds
  • +
  • Serialization Duration: 0.001 seconds
  • +
  • Total Duration: 0.429 seconds
  • +
+

URL Session Task Metrics

+ +

In iOS and tvOS 10 and macOS 10.12, Apple introduced the new URLSessionTaskMetrics APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the Timeline, but provides many more statistics that Alamofire doesn’t have access to compute. The metrics can be accessed through any response type.

+
Alamofire.request("https://httpbin.org/get").responseJSON { response in
+    print(response.metrics)
+}
+
+ +

It’s important to note that these APIs are only available on iOS and tvOS 10 and macOS 10.12. Therefore, depending on your deployment target, you may need to use these inside availability checks:

+
Alamofire.request("https://httpbin.org/get").responseJSON { response in
+    if #available(iOS 10.0, *) {
+        print(response.metrics)
+    }
+}
+
+

cURL Command Output

+ +

Debugging platform issues can be frustrating. Thankfully, Alamofire Request objects conform to both the CustomStringConvertible and CustomDebugStringConvertible protocols to provide some VERY helpful debugging tools.

+

CustomStringConvertible

+
let request = Alamofire.request("https://httpbin.org/ip")
+
+print(request)
+// GET https://httpbin.org/ip (200)
+
+

CustomDebugStringConvertible

+
let request = Alamofire.request("https://httpbin.org/get", parameters: ["foo": "bar"])
+debugPrint(request)
+
+ +

Outputs:

+
$ curl -i \
+    -H "User-Agent: Alamofire/4.0.0" \
+    -H "Accept-Encoding: gzip;q=1.0, compress;q=0.5" \
+    -H "Accept-Language: en;q=1.0,fr;q=0.9,de;q=0.8,zh-Hans;q=0.7,zh-Hant;q=0.6,ja;q=0.5" \
+    "https://httpbin.org/get?foo=bar"
+
+ +
+

Advanced Usage

+ +

Alamofire is built on URLSession and the Foundation URL Loading System. To make the most of this framework, it is recommended that you be familiar with the concepts and capabilities of the underlying networking stack.

+ +

Recommended Reading

+ + +

Session Manager

+ +

Top-level convenience methods like Alamofire.request use a default instance of Alamofire.SessionManager, which is configured with the default URLSessionConfiguration.

+ +

As such, the following two statements are equivalent:

+
Alamofire.request("https://httpbin.org/get")
+
+
let sessionManager = Alamofire.SessionManager.default
+sessionManager.request("https://httpbin.org/get")
+
+ +

Applications can create session managers for background and ephemeral sessions, as well as new managers that customize the default session configuration, such as for default headers (httpAdditionalHeaders) or timeout interval (timeoutIntervalForRequest).

+

Creating a Session Manager with Default Configuration

+
let configuration = URLSessionConfiguration.default
+let sessionManager = Alamofire.SessionManager(configuration: configuration)
+
+

Creating a Session Manager with Background Configuration

+
let configuration = URLSessionConfiguration.background(withIdentifier: "com.example.app.background")
+let sessionManager = Alamofire.SessionManager(configuration: configuration)
+
+

Creating a Session Manager with Ephemeral Configuration

+
let configuration = URLSessionConfiguration.ephemeral
+let sessionManager = Alamofire.SessionManager(configuration: configuration)
+
+

Modifying the Session Configuration

+
var defaultHeaders = Alamofire.SessionManager.defaultHTTPHeaders
+defaultHeaders["DNT"] = "1 (Do Not Track Enabled)"
+
+let configuration = URLSessionConfiguration.default
+configuration.httpAdditionalHeaders = defaultHeaders
+
+let sessionManager = Alamofire.SessionManager(configuration: configuration)
+
+ +
+

This is not recommended for Authorization or Content-Type headers. Instead, use the headers parameter in the top-level Alamofire.request APIs, URLRequestConvertible and ParameterEncoding, respectively.

+
+

Session Delegate

+ +

By default, an Alamofire SessionManager instance creates a SessionDelegate object to handle all the various types of delegate callbacks that are generated by the underlying URLSession. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons.

+

Override Closures

+ +

The first way to customize the SessionDelegate behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching SessionDelegate API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available:

+
/// Overrides default behavior for URLSessionDelegate method `urlSession(_:didReceive:completionHandler:)`.
+open var sessionDidReceiveChallenge: ((URLSession, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))?
+
+/// Overrides default behavior for URLSessionDelegate method `urlSessionDidFinishEvents(forBackgroundURLSession:)`.
+open var sessionDidFinishEventsForBackgroundURLSession: ((URLSession) -> Void)?
+
+/// Overrides default behavior for URLSessionTaskDelegate method `urlSession(_:task:willPerformHTTPRedirection:newRequest:completionHandler:)`.
+open var taskWillPerformHTTPRedirection: ((URLSession, URLSessionTask, HTTPURLResponse, URLRequest) -> URLRequest?)?
+
+/// Overrides default behavior for URLSessionDataDelegate method `urlSession(_:dataTask:willCacheResponse:completionHandler:)`.
+open var dataTaskWillCacheResponse: ((URLSession, URLSessionDataTask, CachedURLResponse) -> CachedURLResponse?)?
+
+ +

The following is a short example of how to use the taskWillPerformHTTPRedirection to avoid following redirects to any apple.com domains.

+
let sessionManager = Alamofire.SessionManager(configuration: URLSessionConfiguration.default)
+let delegate: Alamofire.SessionDelegate = sessionManager.delegate
+
+delegate.taskWillPerformHTTPRedirection = { session, task, response, request in
+    var finalRequest = request
+
+    if
+        let originalRequest = task.originalRequest,
+        let urlString = originalRequest.url?.urlString,
+        urlString.contains("apple.com")
+    {
+        finalRequest = originalRequest
+    }
+
+    return finalRequest
+}
+
+

Subclassing

+ +

Another way to override the default implementation of the SessionDelegate is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here’s a quick example of subclassing the SessionDelegate and logging a message when a redirect occurs.

+
class LoggingSessionDelegate: SessionDelegate {
+    override func urlSession(
+        _ session: URLSession,
+        task: URLSessionTask,
+        willPerformHTTPRedirection response: HTTPURLResponse,
+        newRequest request: URLRequest,
+        completionHandler: @escaping (URLRequest?) -> Void)
+    {
+        print("URLSession will perform HTTP redirection to request: \(request)")
+
+        super.urlSession(
+            session,
+            task: task,
+            willPerformHTTPRedirection: response,
+            newRequest: request,
+            completionHandler: completionHandler
+        )
+    }
+}
+
+ +

Generally speaking, either the default implementation or the override closures should provide the necessary functionality required. Subclassing should only be used as a last resort.

+ +
+

It is important to keep in mind that the subdelegates are initialized and destroyed in the default implementation. Be careful when subclassing to not introduce memory leaks.

+
+

Request

+ +

The result of a request, download, upload or stream methods are a DataRequest, DownloadRequest, UploadRequest and StreamRequest which all inherit from Request. All Request instances are always created by an owning session manager, and never initialized directly.

+ +

Each subclass has specialized methods such as authenticate, validate, responseJSON and uploadProgress that each return the caller instance in order to facilitate method chaining.

+ +

Requests can be suspended, resumed and cancelled:

+ +
    +
  • suspend(): Suspends the underlying task and dispatch queue.
  • +
  • resume(): Resumes the underlying task and dispatch queue. If the owning manager does not have startRequestsImmediately set to true, the request must call resume() in order to start.
  • +
  • cancel(): Cancels the underlying task, producing an error that is passed to any registered response handlers.
  • +
+

Routing Requests

+ +

As apps grow in size, it’s important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire URLConvertible and URLRequestConvertible protocols along with the Router design pattern are here to help.

+

URLConvertible

+ +

Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct URL requests internally. String, URL, and URLComponents conform to URLConvertible by default, allowing any of them to be passed as url parameters to the request, upload, and download methods:

+
let urlString = "https://httpbin.org/post"
+Alamofire.request(urlString, method: .post)
+
+let url = URL(string: urlString)!
+Alamofire.request(url, method: .post)
+
+let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: true)!
+Alamofire.request(urlComponents, method: .post)
+
+ +

Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLConvertible as a convenient way to map domain-specific models to server resources.

+
Type-Safe Routing
+
extension User: URLConvertible {
+    static let baseURLString = "https://example.com"
+
+    func asURL() throws -> URL {
+        let urlString = User.baseURLString + "/users/\(username)/"
+        return try urlString.asURL()
+    }
+}
+
+
let user = User(username: "mattt")
+Alamofire.request(user) // https://example.com/users/mattt
+
+

URLRequestConvertible

+ +

Types adopting the URLRequestConvertible protocol can be used to construct URL requests. URLRequest conforms to URLRequestConvertible by default, allowing it to be passed into request, upload, and download methods directly (this is the recommended way to specify custom HTTP body for individual requests):

+
let url = URL(string: "https://httpbin.org/post")!
+var urlRequest = URLRequest(url: url)
+urlRequest.httpMethod = "POST"
+
+let parameters = ["foo": "bar"]
+
+do {
+    urlRequest.httpBody = try JSONSerialization.data(withJSONObject: parameters, options: [])
+} catch {
+    // No-op
+}
+
+urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
+
+Alamofire.request(urlRequest)
+
+ +

Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLRequestConvertible as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state.

+
API Parameter Abstraction
+
enum Router: URLRequestConvertible {
+    case search(query: String, page: Int)
+
+    static let baseURLString = "https://example.com"
+    static let perPage = 50
+
+    // MARK: URLRequestConvertible
+
+    func asURLRequest() throws -> URLRequest {
+        let result: (path: String, parameters: Parameters) = {
+            switch self {
+            case let .search(query, page) where page > 0:
+                return ("/search", ["q": query, "offset": Router.perPage * page])
+            case let .search(query, _):
+                return ("/search", ["q": query])
+            }
+        }()
+
+        let url = try Router.baseURLString.asURL()
+        let urlRequest = URLRequest(url: url.appendingPathComponent(result.path))
+
+        return try URLEncoding.default.encode(urlRequest, with: result.parameters)
+    }
+}
+
+
Alamofire.request(Router.search(query: "foo bar", page: 1)) // https://example.com/search?q=foo%20bar&offset=50
+
+
CRUD & Authorization
+
import Alamofire
+
+enum Router: URLRequestConvertible {
+    case createUser(parameters: Parameters)
+    case readUser(username: String)
+    case updateUser(username: String, parameters: Parameters)
+    case destroyUser(username: String)
+
+    static let baseURLString = "https://example.com"
+
+    var method: HTTPMethod {
+        switch self {
+        case .createUser:
+            return .post
+        case .readUser:
+            return .get
+        case .updateUser:
+            return .put
+        case .destroyUser:
+            return .delete
+        }
+    }
+
+    var path: String {
+        switch self {
+        case .createUser:
+            return "/users"
+        case .readUser(let username):
+            return "/users/\(username)"
+        case .updateUser(let username, _):
+            return "/users/\(username)"
+        case .destroyUser(let username):
+            return "/users/\(username)"
+        }
+    }
+
+    // MARK: URLRequestConvertible
+
+    func asURLRequest() throws -> URLRequest {
+        let url = try Router.baseURLString.asURL()
+
+        var urlRequest = URLRequest(url: url.appendingPathComponent(path))
+        urlRequest.httpMethod = method.rawValue
+
+        switch self {
+        case .createUser(let parameters):
+            urlRequest = try URLEncoding.default.encode(urlRequest, with: parameters)
+        case .updateUser(_, let parameters):
+            urlRequest = try URLEncoding.default.encode(urlRequest, with: parameters)
+        default:
+            break
+        }
+
+        return urlRequest
+    }
+}
+
+
Alamofire.request(Router.readUser("mattt")) // GET https://example.com/users/mattt
+
+

Adapting and Retrying Requests

+ +

Most web services these days are behind some sort of authentication system. One of the more common ones today is OAuth. This generally involves generating an access token authorizing your application or user to call the various supported web services. While creating these initial access tokens can be laborsome, it can be even more complicated when your access token expires and you need to fetch a new one. There are many thread-safety issues that need to be considered.

+ +

The RequestAdapter and RequestRetrier protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services.

+

RequestAdapter

+ +

The RequestAdapter protocol allows each Request made on a SessionManager to be inspected and adapted before being created. One very specific way to use an adapter is to append an Authorization header to requests behind a certain type of authentication.

+
class AccessTokenAdapter: RequestAdapter {
+    private let accessToken: String
+
+    init(accessToken: String) {
+        self.accessToken = accessToken
+    }
+
+    func adapt(_ urlRequest: URLRequest) throws -> URLRequest {
+        var urlRequest = urlRequest
+
+        if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix("https://httpbin.org") {
+            urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization")
+        }
+
+        return urlRequest
+    }
+}
+
+
let sessionManager = SessionManager()
+sessionManager.adapter = AccessTokenAdapter(accessToken: "1234")
+
+sessionManager.request("https://httpbin.org/get")
+
+

RequestRetrier

+ +

The RequestRetrier protocol allows a Request that encountered an Error while being executed to be retried. When using both the RequestAdapter and RequestRetrier protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here’s an example of how you could implement a refresh flow for OAuth2 access tokens.

+ +
+

DISCLAIMER: This is NOT a global OAuth2 solution. It is merely an example demonstrating how one could use the RequestAdapter in conjunction with the RequestRetrier to create a thread-safe refresh system.

+ +

To reiterate, do NOT copy this sample code and drop it into a production application. This is merely an example. Each authentication system must be tailored to a particular platform and authentication type.

+
+
class OAuth2Handler: RequestAdapter, RequestRetrier {
+    private typealias RefreshCompletion = (_ succeeded: Bool, _ accessToken: String?, _ refreshToken: String?) -> Void
+
+    private let sessionManager: SessionManager = {
+        let configuration = URLSessionConfiguration.default
+        configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders
+
+        return SessionManager(configuration: configuration)
+    }()
+
+    private let lock = NSLock()
+
+    private var clientID: String
+    private var baseURLString: String
+    private var accessToken: String
+    private var refreshToken: String
+
+    private var isRefreshing = false
+    private var requestsToRetry: [RequestRetryCompletion] = []
+
+    // MARK: - Initialization
+
+    public init(clientID: String, baseURLString: String, accessToken: String, refreshToken: String) {
+        self.clientID = clientID
+        self.baseURLString = baseURLString
+        self.accessToken = accessToken
+        self.refreshToken = refreshToken
+    }
+
+    // MARK: - RequestAdapter
+
+    func adapt(_ urlRequest: URLRequest) throws -> URLRequest {
+        if let urlString = urlRequest.url?.absoluteString, urlString.hasPrefix(baseURLString) {
+            var urlRequest = urlRequest
+            urlRequest.setValue("Bearer " + accessToken, forHTTPHeaderField: "Authorization")
+            return urlRequest
+        }
+
+        return urlRequest
+    }
+
+    // MARK: - RequestRetrier
+
+    func should(_ manager: SessionManager, retry request: Request, with error: Error, completion: @escaping RequestRetryCompletion) {
+        lock.lock() ; defer { lock.unlock() }
+
+        if let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401 {
+            requestsToRetry.append(completion)
+
+            if !isRefreshing {
+                refreshTokens { [weak self] succeeded, accessToken, refreshToken in
+                    guard let strongSelf = self else { return }
+
+                    strongSelf.lock.lock() ; defer { strongSelf.lock.unlock() }
+
+                    if let accessToken = accessToken, let refreshToken = refreshToken {
+                        strongSelf.accessToken = accessToken
+                        strongSelf.refreshToken = refreshToken
+                    }
+
+                    strongSelf.requestsToRetry.forEach { $0(succeeded, 0.0) }
+                    strongSelf.requestsToRetry.removeAll()
+                }
+            }
+        } else {
+            completion(false, 0.0)
+        }
+    }
+
+    // MARK: - Private - Refresh Tokens
+
+    private func refreshTokens(completion: @escaping RefreshCompletion) {
+        guard !isRefreshing else { return }
+
+        isRefreshing = true
+
+        let urlString = "\(baseURLString)/oauth2/token"
+
+        let parameters: [String: Any] = [
+            "access_token": accessToken,
+            "refresh_token": refreshToken,
+            "client_id": clientID,
+            "grant_type": "refresh_token"
+        ]
+
+        sessionManager.request(urlString, method: .post, parameters: parameters, encoding: JSONEncoding.default)
+            .responseJSON { [weak self] response in
+                guard let strongSelf = self else { return }
+
+                if 
+                    let json = response.result.value as? [String: Any], 
+                    let accessToken = json["access_token"] as? String, 
+                    let refreshToken = json["refresh_token"] as? String 
+                {
+                    completion(true, accessToken, refreshToken)
+                } else {
+                    completion(false, nil, nil)
+                }
+
+                strongSelf.isRefreshing = false
+            }
+    }
+}
+
+
let baseURLString = "https://some.domain-behind-oauth2.com"
+
+let oauthHandler = OAuth2Handler(
+    clientID: "12345678",
+    baseURLString: baseURLString,
+    accessToken: "abcd1234",
+    refreshToken: "ef56789a"
+)
+
+let sessionManager = SessionManager()
+sessionManager.adapter = oauthHandler
+sessionManager.retrier = oauthHandler
+
+let urlString = "\(baseURLString)/some/endpoint"
+
+sessionManager.request(urlString).validate().responseJSON { response in
+    debugPrint(response)
+}
+
+ +

Once the OAuth2Handler is applied as both the adapter and retrier for the SessionManager, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed.

+ +
+

If you needed them to execute in the same order they were created, you could sort them by their task identifiers.

+
+ +

The example above only checks for a 401 response code which is not nearly robust enough, but does demonstrate how one could check for an invalid access token error. In a production application, one would want to check the realm and most likely the www-authenticate header response although it depends on the OAuth2 implementation.

+ +

Another important note is that this authentication system could be shared between multiple session managers. For example, you may need to use both a default and ephemeral session configuration for the same set of web services. The example above allows the same oauthHandler instance to be shared across multiple session managers to manage the single refresh flow.

+

Custom Response Serialization

+ +

Alamofire provides built-in response serialization for data, strings, JSON, and property lists:

+
Alamofire.request(...).responseData { (resp: DataResponse<Data>) in ... }
+Alamofire.request(...).responseString { (resp: DataResponse<String>) in ... }
+Alamofire.request(...).responseJSON { (resp: DataResponse<Any>) in ... }
+Alamofire.request(...).responsePropertyList { resp: DataResponse<Any>) in ... }
+
+ +

Those responses wrap deserialized values (Data, String, Any) or errors (network, validation errors), as well as meta-data (URL request, HTTP headers, status code, metrics, …).

+ +

You have several ways to customize all of those response elements:

+ + +

Response Mapping

+ +

Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response DataResponse<Any> into a response that holds an application model, such as DataResponse<User>. You perform response mapping with the DataResponse.map method:

+
Alamofire.request("https://example.com/users/mattt").responseJSON { (response: DataResponse<Any>) in
+    let userResponse = response.map { json in
+        // We assume an existing User(json: Any) initializer
+        return User(json: json)
+    }
+
+    // Process userResponse, of type DataResponse<User>:
+    if let user = userResponse.value {
+        print("User: { username: \(user.username), name: \(user.name) }")
+    }
+}
+
+ +

When the transformation may throw an error, use flatMap instead:

+
Alamofire.request("https://example.com/users/mattt").responseJSON { response in
+    let userResponse = response.flatMap { json in
+        try User(json: json)
+    }
+}
+
+ +

Response mapping is a good fit for your custom completion handlers:

+
@discardableResult
+func loadUser(completionHandler: @escaping (DataResponse<User>) -> Void) -> Alamofire.DataRequest {
+    return Alamofire.request("https://example.com/users/mattt").responseJSON { response in
+        let userResponse = response.flatMap { json in
+            try User(json: json)
+        }
+
+        completionHandler(userResponse)
+    }
+}
+
+loadUser { response in
+    if let user = response.value {
+        print("User: { username: \(user.username), name: \(user.name) }")
+    }
+}
+
+ +

When the map/flatMap closure may process a big amount of data, make sure you execute it outside of the main thread:

+
@discardableResult
+func loadUser(completionHandler: @escaping (DataResponse<User>) -> Void) -> Alamofire.DataRequest {
+    let utilityQueue = DispatchQueue.global(qos: .utility)
+
+    return Alamofire.request("https://example.com/users/mattt").responseJSON(queue: utilityQueue) { response in
+        let userResponse = response.flatMap { json in
+            try User(json: json)
+        }
+
+        DispatchQueue.main.async {
+            completionHandler(userResponse)
+        }
+    }
+}
+
+ +

map and flatMap are also available for download responses.

+

Handling Errors

+ +

Before implementing custom response serializers or object serialization methods, it’s important to consider how to handle any errors that may occur. There are two basic options: passing existing errors along unmodified, to be dealt with at response time; or, wrapping all errors in an Error type specific to your app.

+ +

For example, here’s a simple BackendError enum which will be used in later examples:

+
enum BackendError: Error {
+    case network(error: Error) // Capture any underlying Error from the URLSession API
+    case dataSerialization(error: Error)
+    case jsonSerialization(error: Error)
+    case xmlSerialization(error: Error)
+    case objectSerialization(reason: String)
+}
+
+

Creating a Custom Response Serializer

+ +

Alamofire provides built-in response serialization for strings, JSON, and property lists, but others can be added in extensions on Alamofire.DataRequest and / or Alamofire.DownloadRequest.

+ +

For example, here’s how a response handler using Ono might be implemented:

+
extension DataRequest {
+    static func xmlResponseSerializer() -> DataResponseSerializer<ONOXMLDocument> {
+        return DataResponseSerializer { request, response, data, error in
+            // Pass through any underlying URLSession error to the .network case.
+            guard error == nil else { return .failure(BackendError.network(error: error!)) }
+
+            // Use Alamofire's existing data serializer to extract the data, passing the error as nil, as it has
+            // already been handled.
+            let result = Request.serializeResponseData(response: response, data: data, error: nil)
+
+            guard case let .success(validData) = result else {
+                return .failure(BackendError.dataSerialization(error: result.error! as! AFError))
+            }
+
+            do {
+                let xml = try ONOXMLDocument(data: validData)
+                return .success(xml)
+            } catch {
+                return .failure(BackendError.xmlSerialization(error: error))
+            }
+        }
+    }
+
+    @discardableResult
+    func responseXMLDocument(
+        queue: DispatchQueue? = nil,
+        completionHandler: @escaping (DataResponse<ONOXMLDocument>) -> Void)
+        -> Self
+    {
+        return response(
+            queue: queue,
+            responseSerializer: DataRequest.xmlResponseSerializer(),
+            completionHandler: completionHandler
+        )
+    }
+}
+
+

Generic Response Object Serialization

+ +

Generics can be used to provide automatic, type-safe response object serialization.

+
protocol ResponseObjectSerializable {
+    init?(response: HTTPURLResponse, representation: Any)
+}
+
+extension DataRequest {
+    func responseObject<T: ResponseObjectSerializable>(
+        queue: DispatchQueue? = nil,
+        completionHandler: @escaping (DataResponse<T>) -> Void)
+        -> Self
+    {
+        let responseSerializer = DataResponseSerializer<T> { request, response, data, error in
+            guard error == nil else { return .failure(BackendError.network(error: error!)) }
+
+            let jsonResponseSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments)
+            let result = jsonResponseSerializer.serializeResponse(request, response, data, nil)
+
+            guard case let .success(jsonObject) = result else {
+                return .failure(BackendError.jsonSerialization(error: result.error!))
+            }
+
+            guard let response = response, let responseObject = T(response: response, representation: jsonObject) else {
+                return .failure(BackendError.objectSerialization(reason: "JSON could not be serialized: \(jsonObject)"))
+            }
+
+            return .success(responseObject)
+        }
+
+        return response(queue: queue, responseSerializer: responseSerializer, completionHandler: completionHandler)
+    }
+}
+
+
struct User: ResponseObjectSerializable, CustomStringConvertible {
+    let username: String
+    let name: String
+
+    var description: String {
+        return "User: { username: \(username), name: \(name) }"
+    }
+
+    init?(response: HTTPURLResponse, representation: Any) {
+        guard
+            let username = response.url?.lastPathComponent,
+            let representation = representation as? [String: Any],
+            let name = representation["name"] as? String
+        else { return nil }
+
+        self.username = username
+        self.name = name
+    }
+}
+
+
Alamofire.request("https://example.com/users/mattt").responseObject { (response: DataResponse<User>) in
+    debugPrint(response)
+
+    if let user = response.result.value {
+        print("User: { username: \(user.username), name: \(user.name) }")
+    }
+}
+
+ +

The same approach can also be used to handle endpoints that return a representation of a collection of objects:

+
protocol ResponseCollectionSerializable {
+    static func collection(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Self]
+}
+
+extension ResponseCollectionSerializable where Self: ResponseObjectSerializable {
+    static func collection(from response: HTTPURLResponse, withRepresentation representation: Any) -> [Self] {
+        var collection: [Self] = []
+
+        if let representation = representation as? [[String: Any]] {
+            for itemRepresentation in representation {
+                if let item = Self(response: response, representation: itemRepresentation) {
+                    collection.append(item)
+                }
+            }
+        }
+
+        return collection
+    }
+}
+
+
extension DataRequest {
+    @discardableResult
+    func responseCollection<T: ResponseCollectionSerializable>(
+        queue: DispatchQueue? = nil,
+        completionHandler: @escaping (DataResponse<[T]>) -> Void) -> Self
+    {
+        let responseSerializer = DataResponseSerializer<[T]> { request, response, data, error in
+            guard error == nil else { return .failure(BackendError.network(error: error!)) }
+
+            let jsonSerializer = DataRequest.jsonResponseSerializer(options: .allowFragments)
+            let result = jsonSerializer.serializeResponse(request, response, data, nil)
+
+            guard case let .success(jsonObject) = result else {
+                return .failure(BackendError.jsonSerialization(error: result.error!))
+            }
+
+            guard let response = response else {
+                let reason = "Response collection could not be serialized due to nil response."
+                return .failure(BackendError.objectSerialization(reason: reason))
+            }
+
+            return .success(T.collection(from: response, withRepresentation: jsonObject))
+        }
+
+        return response(responseSerializer: responseSerializer, completionHandler: completionHandler)
+    }
+}
+
+
struct User: ResponseObjectSerializable, ResponseCollectionSerializable, CustomStringConvertible {
+    let username: String
+    let name: String
+
+    var description: String {
+        return "User: { username: \(username), name: \(name) }"
+    }
+
+    init?(response: HTTPURLResponse, representation: Any) {
+        guard
+            let username = response.url?.lastPathComponent,
+            let representation = representation as? [String: Any],
+            let name = representation["name"] as? String
+        else { return nil }
+
+        self.username = username
+        self.name = name
+    }
+}
+
+
Alamofire.request("https://example.com/users").responseCollection { (response: DataResponse<[User]>) in
+    debugPrint(response)
+
+    if let users = response.result.value {
+        users.forEach { print("- \($0)") }
+    }
+}
+
+

Security

+ +

Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple’s built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the ServerTrustPolicy.

+

ServerTrustPolicy

+ +

The ServerTrustPolicy enumeration evaluates the server trust generally provided by an URLAuthenticationChallenge when connecting to a server over a secure HTTPS connection.

+
let serverTrustPolicy = ServerTrustPolicy.pinCertificates(
+    certificates: ServerTrustPolicy.certificates(),
+    validateCertificateChain: true,
+    validateHost: true
+)
+
+ +

There are many different cases of server trust evaluation giving you complete control over the validation process:

+ +
    +
  • performDefaultEvaluation: Uses the default server trust evaluation while allowing you to control whether to validate the host provided by the challenge.
  • +
  • pinCertificates: Uses the pinned certificates to validate the server trust. The server trust is considered valid if one of the pinned certificates match one of the server certificates.
  • +
  • pinPublicKeys: Uses the pinned public keys to validate the server trust. The server trust is considered valid if one of the pinned public keys match one of the server certificate public keys.
  • +
  • disableEvaluation: Disables all evaluation which in turn will always consider any server trust as valid.
  • +
  • customEvaluation: Uses the associated closure to evaluate the validity of the server trust thus giving you complete control over the validation process. Use with caution.
  • +
+

Server Trust Policy Manager

+ +

The ServerTrustPolicyManager is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy.

+
let serverTrustPolicies: [String: ServerTrustPolicy] = [
+    "test.example.com": .pinCertificates(
+        certificates: ServerTrustPolicy.certificates(),
+        validateCertificateChain: true,
+        validateHost: true
+    ),
+    "insecure.expired-apis.com": .disableEvaluation
+]
+
+let sessionManager = SessionManager(
+    serverTrustPolicyManager: ServerTrustPolicyManager(policies: serverTrustPolicies)
+)
+
+ +
+

Make sure to keep a reference to the new SessionManager instance, otherwise your requests will all get cancelled when your sessionManager is deallocated.

+
+ +

These server trust policies will result in the following behavior:

+ +
    +
  • test.example.com will always use certificate pinning with certificate chain and host validation enabled thus requiring the following criteria to be met to allow the TLS handshake to succeed: + +
      +
    • Certificate chain MUST be valid.
    • +
    • Certificate chain MUST include one of the pinned certificates.
    • +
    • Challenge host MUST match the host in the certificate chain’s leaf certificate.
    • +
  • +
  • insecure.expired-apis.com will never evaluate the certificate chain and will always allow the TLS handshake to succeed.
  • +
  • All other hosts will use the default evaluation provided by Apple.
  • +
+
Subclassing Server Trust Policy Manager
+ +

If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the ServerTrustPolicyManager and override the serverTrustPolicyForHost method with your own custom implementation.

+
class CustomServerTrustPolicyManager: ServerTrustPolicyManager {
+    override func serverTrustPolicy(forHost host: String) -> ServerTrustPolicy? {
+        var policy: ServerTrustPolicy?
+
+        // Implement your custom domain matching behavior...
+
+        return policy
+    }
+}
+
+

Validating the Host

+ +

The .performDefaultEvaluation, .pinCertificates and .pinPublicKeys server trust policies all take a validateHost parameter. Setting the value to true will cause the server trust evaluation to verify that hostname in the certificate matches the hostname of the challenge. If they do not match, evaluation will fail. A validateHost value of false will still evaluate the full certificate chain, but will not validate the hostname of the leaf certificate.

+ +
+

It is recommended that validateHost always be set to true in production environments.

+
+

Validating the Certificate Chain

+ +

Pinning certificates and public keys both have the option of validating the certificate chain using the validateCertificateChain parameter. By setting this value to true, the full certificate chain will be evaluated in addition to performing a byte equality check against the pinned certificates or public keys. A value of false will skip the certificate chain validation, but will still perform the byte equality check.

+ +

There are several cases where it may make sense to disable certificate chain validation. The most common use cases for disabling validation are self-signed and expired certificates. The evaluation would always fail in both of these cases, but the byte equality check will still ensure you are receiving the certificate you expect from the server.

+ +
+

It is recommended that validateCertificateChain always be set to true in production environments.

+
+

App Transport Security

+ +

With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom ServerTrustPolicyManager with several ServerTrustPolicy objects will have no effect. If you continuously see CFNetwork SSLHandshake failed (-9806) errors, you have probably run into this problem. Apple’s ATS system overrides the entire challenge system unless you configure the ATS settings in your app’s plist to disable enough of it to allow your app to evaluate the server trust.

+ +

If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your Info.plist.

+
<dict>
+    <key>NSAppTransportSecurity</key>
+    <dict>
+        <key>NSExceptionDomains</key>
+        <dict>
+            <key>example.com</key>
+            <dict>
+                <key>NSExceptionAllowsInsecureHTTPLoads</key>
+                <true/>
+                <key>NSExceptionRequiresForwardSecrecy</key>
+                <false/>
+                <key>NSIncludesSubdomains</key>
+                <true/>
+                <!-- Optional: Specify minimum TLS version -->
+                <key>NSTemporaryExceptionMinimumTLSVersion</key>
+                <string>TLSv1.2</string>
+            </dict>
+        </dict>
+    </dict>
+</dict>
+
+ +

Whether you need to set the NSExceptionRequiresForwardSecrecy to NO depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to NO. The NSExceptionAllowsInsecureHTTPLoads MUST be set to YES in order to allow the SessionDelegate to receive challenge callbacks. Once the challenge callbacks are being called, the ServerTrustPolicyManager will take over the server trust evaluation. You may also need to specify the NSTemporaryExceptionMinimumTLSVersion if you’re trying to connect to a host that only supports TLS versions less than 1.2.

+ +
+

It is recommended to always use valid certificates in production environments.

+
+

Network Reachability

+ +

The NetworkReachabilityManager listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.

+
let manager = NetworkReachabilityManager(host: "www.apple.com")
+
+manager?.listener = { status in
+    print("Network Status Changed: \(status)")
+}
+
+manager?.startListening()
+
+ +
+

Make sure to remember to retain the manager in the above example, or no status changes will be reported. +Also, do not include the scheme in the host string or reachability won’t function correctly.

+
+ +

There are some important things to remember when using network reachability to determine what to do next.

+ +
    +
  • Do NOT use Reachability to determine if a network request should be sent. + +
      +
    • You should ALWAYS send it.
    • +
  • +
  • When Reachability is restored, use the event to retry failed network requests. + +
      +
    • Even though the network requests may still fail, this is a good moment to retry them.
    • +
  • +
  • The network reachability status can be useful for determining why a network request may have failed. + +
      +
    • If a network request fails, it is more useful to tell the user that the network request failed due to being offline rather than a more technical error, such as request timed out.
    • +
  • +
+ +
+

It is recommended to check out WWDC 2012 Session 706, Networking Best Practices for more info.

+
+ +
+

Open Radars

+ +

The following radars have some effect on the current implementation of Alamofire.

+ +
    +
  • rdar://21349340 - Compiler throwing warning due to toll-free bridging issue in test case
  • +
  • rdar://26761490 - Swift string interpolation causing memory leak with common usage
  • +
  • rdar://26870455 - Background URL Session Configurations do not work in the simulator
  • +
  • rdar://26849668 - Some URLProtocol APIs do not properly handle URLRequest
  • +
+

FAQ

+

What’s the origin of the name Alamofire?

+ +

Alamofire is named after the Alamo Fire flower, a hybrid variant of the Bluebonnet, the official state flower of Texas.

+

What logic belongs in a Router vs. a Request Adapter?

+ +

Simple, static data such as paths, parameters and common headers belong in the Router. Dynamic data such as an Authorization header whose value can changed based on an authentication system belongs in a RequestAdapter.

+ +

The reason the dynamic data MUST be placed into the RequestAdapter is to support retry operations. When a Request is retried, the original request is not rebuilt meaning the Router will not be called again. The RequestAdapter is called again allowing the dynamic data to be updated on the original request before retrying the Request.

+ +
+

Credits

+ +

Alamofire is owned and maintained by the Alamofire Software Foundation. You can follow them on Twitter at @AlamofireSF for project updates and releases.

+

Security Disclosure

+ +

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

+

Donations

+ +

The ASF is looking to raise money to officially register as a federal non-profit organization. Registering will allow us members to gain some legal protections and also allow us to put donations to use, tax free. Donating to the ASF will enable us to:

+ +
    +
  • Pay our legal fees to register as a federal non-profit organization
  • +
  • Pay our yearly legal fees to keep the non-profit in good status
  • +
  • Pay for our mail servers to help us stay on top of all questions and security issues
  • +
  • Potentially fund test servers to make it easier for us to test the edge cases
  • +
  • Potentially fund developers to work on one of our projects full-time
  • +
+ +

The community adoption of the ASF libraries has been amazing. We are greatly humbled by your enthusiasm around the projects, and want to continue to do everything we can to move the needle forward. With your continued support, the ASF will be able to improve its reach and also provide better legal safety for the core members. If you use any of our libraries for work, see if your employers would be interested in donating. Our initial goal is to raise $1000 to get all our legal ducks in a row and kickstart this campaign. Any amount you can donate today to help us reach our goal would be greatly appreciated.

+ +

Click here to lend your support to: Alamofire Software Foundation and make a donation at pledgie.com !

+

License

+ +

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

+ +
+
+ + +
+
+ + + + diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.js b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.js new file mode 100755 index 0000000..009c80d --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.js @@ -0,0 +1,43 @@ +window.jazzy = {'docset': false} +if (typeof window.dash != 'undefined') { + document.documentElement.className += ' dash' + window.jazzy.docset = true +} +if (navigator.userAgent.match(/xcode/i)) { + document.documentElement.className += ' xcode' + window.jazzy.docset = true +} + +// On doc load, toggle the URL hash discussion if present +$(document).ready(function() { + if (!window.jazzy.docset) { + var linkToHash = $('a[href="' + window.location.hash +'"]'); + linkToHash.trigger("click"); + } +}); + +// On token click, toggle its discussion and animate token.marginLeft +$(".token").click(function(event) { + if (window.jazzy.docset) { + return; + } + var link = $(this); + var animationDuration = 300; + $content = link.parent().parent().next(); + $content.slideToggle(animationDuration); + + // Keeps the document from jumping to the hash. + var href = $(this).attr('href'); + if (history.pushState) { + history.pushState({}, '', href); + } else { + location.hash = href; + } + event.preventDefault(); +}); + +// Dumb down quotes within code blocks that delimit strings instead of quotations +// https://github.com/realm/jazzy/issues/714 +$("code q").replaceWith(function () { + return ["\"", $(this).contents(), "\""]; +}); diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.search.js b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.search.js new file mode 100644 index 0000000..54be83c --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.search.js @@ -0,0 +1,62 @@ +$(function(){ + var searchIndex = lunr(function() { + this.ref('url'); + this.field('name'); + }); + + var $typeahead = $('[data-typeahead]'); + var $form = $typeahead.parents('form'); + var searchURL = $form.attr('action'); + + function displayTemplate(result) { + return result.name; + } + + function suggestionTemplate(result) { + var t = '
'; + t += '' + result.name + ''; + if (result.parent_name) { + t += '' + result.parent_name + ''; + } + t += '
'; + return t; + } + + $typeahead.one('focus', function() { + $form.addClass('loading'); + + $.getJSON(searchURL).then(function(searchData) { + $.each(searchData, function (url, doc) { + searchIndex.add({url: url, name: doc.name}); + }); + + $typeahead.typeahead( + { + highlight: true, + minLength: 3 + }, + { + limit: 10, + display: displayTemplate, + templates: { suggestion: suggestionTemplate }, + source: function(query, sync) { + var results = searchIndex.search(query).map(function(result) { + var doc = searchData[result.ref]; + doc.url = result.ref; + return doc; + }); + sync(results); + } + } + ); + $form.removeClass('loading'); + $typeahead.trigger('focus'); + }); + }); + + var baseURL = searchURL.slice(0, -"search.json".length); + + $typeahead.on('typeahead:select', function(e, result) { + window.location = baseURL + result.url; + }); +}); diff --git a/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jquery.min.js b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jquery.min.js new file mode 100755 index 0000000..ab28a24 --- /dev/null +++ b/Carthage/Checkouts/AlamofireImage/Carthage/Checkouts/Alamofire/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jquery.min.js @@ -0,0 +1,4 @@ +/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h; +if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthh;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="
a",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/\s*$/g,rb={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:k.htmlSerialize?[0,"",""]:[1,"X
","
"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?""!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("