forked from loafle/openapi-generator-original
[Swift] Updates for Swift 4.2 (#1443)
* [Swift] Update Alamofire version and update tests and Swift version to 4.2 for default and RxSwift variants * Update promiseKit for Swift 4.0 * Update project files. * Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator into OpenAPITools-master # Conflicts: # samples/client/petstore/swift4/default/SwaggerClientTests/SwaggerClient.xcodeproj/project.pbxproj * Merge in latest master * Remove typo in bash file
This commit is contained in:
parent
3896821d5e
commit
33fbd9c78b
@ -34,5 +34,5 @@ Pod::Spec.new do |s|
|
||||
{{#useRxSwift}}
|
||||
s.dependency 'RxSwift', '~> 4.0'
|
||||
{{/useRxSwift}}
|
||||
s.dependency 'Alamofire', '~> 4.5.0'
|
||||
s.dependency 'Alamofire', '~> 4.7.0'
|
||||
end
|
||||
|
@ -147,7 +147,7 @@ open class {{classname}} {
|
||||
{{/hasFormParams}}
|
||||
{{/bodyParam}}{{#hasQueryParams}}
|
||||
var url = URLComponents(string: URLString)
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([
|
||||
url?.queryItems = APIHelper.mapValuesToQueryItems([{{^queryParams}}:{{/queryParams}}
|
||||
{{#queryParams}}
|
||||
{{> _param}}{{#hasMore}}, {{/hasMore}}
|
||||
{{/queryParams}}
|
||||
|
@ -7,7 +7,6 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */; };
|
||||
6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; };
|
||||
6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; };
|
||||
6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; };
|
||||
@ -16,8 +15,9 @@
|
||||
6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; };
|
||||
6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; };
|
||||
6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; };
|
||||
751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */; };
|
||||
A77F0668DAC6BFAB9DBB7D37 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E9AE2FEF8E8F914C1D2F168B /* Pods_SwaggerClient.framework */; };
|
||||
C6AAAD211D8718D00016A515 /* ISOFullDateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6AAAD201D8718D00016A515 /* ISOFullDateTests.swift */; };
|
||||
F3FCC41175F14274266B53FA /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3C56BADD08FA3D474DBDF71 /* Pods_SwaggerClientTests.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -31,7 +31,6 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
@ -44,13 +43,14 @@
|
||||
6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = "<group>"; };
|
||||
6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = "<group>"; };
|
||||
6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = "<group>"; };
|
||||
8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
78ED7EF301CC6DF958B4BFAB /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
A3C56BADD08FA3D474DBDF71 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
C6AAAD201D8718D00016A515 /* ISOFullDateTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ISOFullDateTests.swift; sourceTree = "<group>"; };
|
||||
F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
|
||||
E9AE2FEF8E8F914C1D2F168B /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA2BED756A4C5389B0F46BC4 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
EA32712FFC62EA5F96CC006F /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
F18FDCB0CAAA15B973147EED /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -58,7 +58,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */,
|
||||
A77F0668DAC6BFAB9DBB7D37 /* Pods_SwaggerClient.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -66,30 +66,19 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */,
|
||||
F3FCC41175F14274266B53FA /* Pods_SwaggerClientTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0CAA98BEFA303B94D3664C7D /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */,
|
||||
FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */,
|
||||
289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */,
|
||||
B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3FABC56EC0BA84CBF4F99564 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C07EC0A94AA0F86D60668B32 /* Pods.framework */,
|
||||
8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */,
|
||||
F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */,
|
||||
E9AE2FEF8E8F914C1D2F168B /* Pods_SwaggerClient.framework */,
|
||||
A3C56BADD08FA3D474DBDF71 /* Pods_SwaggerClientTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@ -101,7 +90,7 @@
|
||||
6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */,
|
||||
6D4EFB921C692C6300B96B06 /* Products */,
|
||||
3FABC56EC0BA84CBF4F99564 /* Frameworks */,
|
||||
0CAA98BEFA303B94D3664C7D /* Pods */,
|
||||
D598C75400476D9194EADBAA /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@ -139,6 +128,17 @@
|
||||
path = SwaggerClientTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D598C75400476D9194EADBAA /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EA2BED756A4C5389B0F46BC4 /* Pods-SwaggerClient.debug.xcconfig */,
|
||||
F18FDCB0CAAA15B973147EED /* Pods-SwaggerClient.release.xcconfig */,
|
||||
78ED7EF301CC6DF958B4BFAB /* Pods-SwaggerClientTests.debug.xcconfig */,
|
||||
EA32712FFC62EA5F96CC006F /* Pods-SwaggerClientTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -146,16 +146,11 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */;
|
||||
buildPhases = (
|
||||
6345B531824FA2069A72B604 /* 📦 Check Pods Manifest.lock */,
|
||||
CF310079E3CB0BE5BE604471 /* [CP] Check Pods Manifest.lock */,
|
||||
1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */,
|
||||
E5F6E842A9A53DF5152241BC /* [CP] Check Pods Manifest.lock */,
|
||||
6D4EFB8D1C692C6300B96B06 /* Sources */,
|
||||
6D4EFB8E1C692C6300B96B06 /* Frameworks */,
|
||||
6D4EFB8F1C692C6300B96B06 /* Resources */,
|
||||
4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */,
|
||||
808CE4A0CE801CAC5ABF5B08 /* [CP] Copy Pods Resources */,
|
||||
3D9471620628F03313096EB2 /* 📦 Embed Pods Frameworks */,
|
||||
EEEC2B2D0497D38CEAD2DB24 /* 📦 Copy Pods Resources */,
|
||||
4A8C29C17AE187506924CE72 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -170,16 +165,10 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */;
|
||||
buildPhases = (
|
||||
5B23A28C59366E7C8D31550A /* 📦 Check Pods Manifest.lock */,
|
||||
B4DB169E5F018305D6759D34 /* [CP] Check Pods Manifest.lock */,
|
||||
79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */,
|
||||
18CD551FE8D8E7492A1C4100 /* [CP] Check Pods Manifest.lock */,
|
||||
6D4EFBA11C692C6300B96B06 /* Sources */,
|
||||
6D4EFBA21C692C6300B96B06 /* Frameworks */,
|
||||
6D4EFBA31C692C6300B96B06 /* Resources */,
|
||||
796EAD48F1BCCDAA291CD963 /* [CP] Embed Pods Frameworks */,
|
||||
1652CB1A246A4689869E442D /* [CP] Copy Pods Resources */,
|
||||
ECE47F6BF90C3848F6E94AFF /* 📦 Embed Pods Frameworks */,
|
||||
1494090872F3F18E536E8902 /* 📦 Copy Pods Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -250,244 +239,72 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
1494090872F3F18E536E8902 /* 📦 Copy Pods Resources */ = {
|
||||
18CD551FE8D8E7492A1C4100 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
1652CB1A246A4689869E442D /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3D9471620628F03313096EB2 /* 📦 Embed Pods Frameworks */ = {
|
||||
4A8C29C17AE187506924CE72 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
name = "📦 Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */ = {
|
||||
E5F6E842A9A53DF5152241BC /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
5B23A28C59366E7C8D31550A /* 📦 Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
6345B531824FA2069A72B604 /* 📦 Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
796EAD48F1BCCDAA291CD963 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
808CE4A0CE801CAC5ABF5B08 /* [CP] Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
A16DAFA9EF474E5065B5B1C2 /* 📦 Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
B4DB169E5F018305D6759D34 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
CF310079E3CB0BE5BE604471 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
ECE47F6BF90C3848F6E94AFF /* 📦 Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
EEEC2B2D0497D38CEAD2DB24 /* 📦 Copy Pods Resources */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Copy Pods Resources";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-resources.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
FE27E864CEDDA2D12F7972B1 /* 📦 Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
@ -628,7 +445,7 @@
|
||||
};
|
||||
6D4EFBAF1C692C6300B96B06 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */;
|
||||
baseConfigurationReference = EA2BED756A4C5389B0F46BC4 /* Pods-SwaggerClient.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwaggerClient/Info.plist;
|
||||
@ -640,7 +457,7 @@
|
||||
};
|
||||
6D4EFBB01C692C6300B96B06 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */;
|
||||
baseConfigurationReference = F18FDCB0CAAA15B973147EED /* Pods-SwaggerClient.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwaggerClient/Info.plist;
|
||||
@ -652,7 +469,7 @@
|
||||
};
|
||||
6D4EFBB21C692C6300B96B06 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */;
|
||||
baseConfigurationReference = 78ED7EF301CC6DF958B4BFAB /* Pods-SwaggerClientTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = SwaggerClientTests/Info.plist;
|
||||
@ -665,7 +482,7 @@
|
||||
};
|
||||
6D4EFBB31C692C6300B96B06 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */;
|
||||
baseConfigurationReference = EA32712FFC62EA5F96CC006F /* Pods-SwaggerClientTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = SwaggerClientTests/Info.plist;
|
||||
|
@ -1 +1 @@
|
||||
3.3.3-SNAPSHOT
|
||||
3.3.4-SNAPSHOT
|
@ -10,5 +10,5 @@ Pod::Spec.new do |s|
|
||||
s.homepage = 'https://github.com/openapitools/openapi-generator'
|
||||
s.summary = 'PetstoreClient'
|
||||
s.source_files = 'PetstoreClient/Classes/**/*.swift'
|
||||
s.dependency 'Alamofire', '~> 4.5.0'
|
||||
s.dependency 'Alamofire', '~> 4.7.0'
|
||||
end
|
||||
|
@ -8,11 +8,3 @@ target 'SwaggerClient' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |configuration|
|
||||
configuration.build_settings['SWIFT_VERSION'] = "3.0"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,7 +1,7 @@
|
||||
PODS:
|
||||
- Alamofire (4.5.0)
|
||||
- Alamofire (4.7.3)
|
||||
- PetstoreClient (0.0.1):
|
||||
- Alamofire (~> 4.5.0)
|
||||
- Alamofire (~> 4.7.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PetstoreClient (from `../`)
|
||||
@ -15,9 +15,9 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140
|
||||
PetstoreClient: a9f241d378687facad5c691a1747b21f64b405fa
|
||||
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
|
||||
PetstoreClient: ed26185215a5241fa4e937e806321d611f3d0c30
|
||||
|
||||
PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418
|
||||
PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d
|
||||
|
||||
COCOAPODS: 1.5.3
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2014-2018 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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
//
|
||||
// AFError.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Alamofire.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// DispatchQueue+Alamofire.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// MultipartFormData.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// NetworkReachabilityManager.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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,7 +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.
|
||||
public class NetworkReachabilityManager {
|
||||
open class NetworkReachabilityManager {
|
||||
/// Defines the various states of network reachability.
|
||||
///
|
||||
/// - unknown: It is unknown whether the network is reachable.
|
||||
@ -61,27 +61,27 @@ public class NetworkReachabilityManager {
|
||||
// MARK: - Properties
|
||||
|
||||
/// Whether the network is currently reachable.
|
||||
public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi }
|
||||
open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi }
|
||||
|
||||
/// Whether the network is currently reachable over the WWAN interface.
|
||||
public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) }
|
||||
open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) }
|
||||
|
||||
/// Whether the network is currently reachable over Ethernet or WiFi interface.
|
||||
public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) }
|
||||
open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) }
|
||||
|
||||
/// The current network reachability status.
|
||||
public var networkReachabilityStatus: NetworkReachabilityStatus {
|
||||
open var networkReachabilityStatus: NetworkReachabilityStatus {
|
||||
guard let flags = self.flags else { return .unknown }
|
||||
return networkReachabilityStatusForFlags(flags)
|
||||
}
|
||||
|
||||
/// The dispatch queue to execute the `listener` closure on.
|
||||
public var listenerQueue: DispatchQueue = DispatchQueue.main
|
||||
open var listenerQueue: DispatchQueue = DispatchQueue.main
|
||||
|
||||
/// A closure executed when the network reachability status changes.
|
||||
public var listener: Listener?
|
||||
open var listener: Listener?
|
||||
|
||||
private var flags: SCNetworkReachabilityFlags? {
|
||||
open var flags: SCNetworkReachabilityFlags? {
|
||||
var flags = SCNetworkReachabilityFlags()
|
||||
|
||||
if SCNetworkReachabilityGetFlags(reachability, &flags) {
|
||||
@ -92,7 +92,7 @@ public class NetworkReachabilityManager {
|
||||
}
|
||||
|
||||
private let reachability: SCNetworkReachability
|
||||
private var previousFlags: SCNetworkReachabilityFlags
|
||||
open var previousFlags: SCNetworkReachabilityFlags
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
@ -141,7 +141,7 @@ public class NetworkReachabilityManager {
|
||||
///
|
||||
/// - returns: `true` if listening was started successfully, `false` otherwise.
|
||||
@discardableResult
|
||||
public func startListening() -> Bool {
|
||||
open func startListening() -> Bool {
|
||||
var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
|
||||
context.info = Unmanaged.passUnretained(self).toOpaque()
|
||||
|
||||
@ -165,7 +165,7 @@ public class NetworkReachabilityManager {
|
||||
}
|
||||
|
||||
/// Stops listening for changes in network reachability status.
|
||||
public func stopListening() {
|
||||
open func stopListening() {
|
||||
SCNetworkReachabilitySetCallback(reachability, nil, nil)
|
||||
SCNetworkReachabilitySetDispatchQueue(reachability, nil)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Notifications.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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,5 +48,8 @@ extension Notification {
|
||||
public struct Key {
|
||||
/// User info dictionary key representing the `URLSessionTask` associated with the notification.
|
||||
public static let Task = "org.alamofire.notification.key.task"
|
||||
|
||||
/// User info dictionary key representing the responseData associated with the notification.
|
||||
public static let ResponseData = "org.alamofire.notification.key.responseData"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ParameterEncoding.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -64,9 +64,15 @@ public protocol ParameterEncoding {
|
||||
/// 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`).
|
||||
/// `application/x-www-form-urlencoded; charset=utf-8`.
|
||||
///
|
||||
/// There is no published specification for how to encode collection types. By default 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`) is used. Optionally, `ArrayEncoding` can be used to omit the
|
||||
/// square brackets appended to array keys.
|
||||
///
|
||||
/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode
|
||||
/// `true` as 1 and `false` as 0.
|
||||
public struct URLEncoding: ParameterEncoding {
|
||||
|
||||
// MARK: Helper Types
|
||||
@ -82,6 +88,41 @@ public struct URLEncoding: ParameterEncoding {
|
||||
case methodDependent, queryString, httpBody
|
||||
}
|
||||
|
||||
/// Configures how `Array` parameters are encoded.
|
||||
///
|
||||
/// - brackets: An empty set of square brackets is appended to the key for every value.
|
||||
/// This is the default behavior.
|
||||
/// - noBrackets: No brackets are appended. The key is encoded as is.
|
||||
public enum ArrayEncoding {
|
||||
case brackets, noBrackets
|
||||
|
||||
func encode(key: String) -> String {
|
||||
switch self {
|
||||
case .brackets:
|
||||
return "\(key)[]"
|
||||
case .noBrackets:
|
||||
return key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Configures how `Bool` parameters are encoded.
|
||||
///
|
||||
/// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior.
|
||||
/// - literal: Encode `true` and `false` as string literals.
|
||||
public enum BoolEncoding {
|
||||
case numeric, literal
|
||||
|
||||
func encode(value: Bool) -> String {
|
||||
switch self {
|
||||
case .numeric:
|
||||
return value ? "1" : "0"
|
||||
case .literal:
|
||||
return value ? "true" : "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// Returns a default `URLEncoding` instance.
|
||||
@ -99,15 +140,25 @@ public struct URLEncoding: ParameterEncoding {
|
||||
/// The destination defining where the encoded query string is to be applied to the URL request.
|
||||
public let destination: Destination
|
||||
|
||||
/// The encoding to use for `Array` parameters.
|
||||
public let arrayEncoding: ArrayEncoding
|
||||
|
||||
/// The encoding to use for `Bool` parameters.
|
||||
public let boolEncoding: BoolEncoding
|
||||
|
||||
// MARK: Initialization
|
||||
|
||||
/// Creates a `URLEncoding` instance using the specified destination.
|
||||
///
|
||||
/// - parameter destination: The destination defining where the encoded query string is to be applied.
|
||||
/// - parameter arrayEncoding: The encoding to use for `Array` parameters.
|
||||
/// - parameter boolEncoding: The encoding to use for `Bool` parameters.
|
||||
///
|
||||
/// - returns: The new `URLEncoding` instance.
|
||||
public init(destination: Destination = .methodDependent) {
|
||||
public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) {
|
||||
self.destination = destination
|
||||
self.arrayEncoding = arrayEncoding
|
||||
self.boolEncoding = boolEncoding
|
||||
}
|
||||
|
||||
// MARK: Encoding
|
||||
@ -161,16 +212,16 @@ public struct URLEncoding: ParameterEncoding {
|
||||
}
|
||||
} else if let array = value as? [Any] {
|
||||
for value in array {
|
||||
components += queryComponents(fromKey: "\(key)[]", value: value)
|
||||
components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value)
|
||||
}
|
||||
} else if let value = value as? NSNumber {
|
||||
if value.isBool {
|
||||
components.append((escape(key), escape((value.boolValue ? "1" : "0"))))
|
||||
components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue))))
|
||||
} else {
|
||||
components.append((escape(key), escape("\(value)")))
|
||||
}
|
||||
} else if let bool = value as? Bool {
|
||||
components.append((escape(key), escape((bool ? "1" : "0"))))
|
||||
components.append((escape(key), escape(boolEncoding.encode(value: bool))))
|
||||
} else {
|
||||
components.append((escape(key), escape("\(value)")))
|
||||
}
|
||||
@ -223,9 +274,9 @@ public struct URLEncoding: ParameterEncoding {
|
||||
let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex
|
||||
let range = startIndex..<endIndex
|
||||
|
||||
let substring = string.substring(with: range)
|
||||
let substring = string[range]
|
||||
|
||||
escaped += substring.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? substring
|
||||
escaped += substring.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? String(substring)
|
||||
|
||||
index = endIndex
|
||||
}
|
||||
@ -241,11 +292,7 @@ public struct URLEncoding: ParameterEncoding {
|
||||
let value = parameters[key]!
|
||||
components += queryComponents(fromKey: key, value: value)
|
||||
}
|
||||
#if swift(>=4.0)
|
||||
return components.map { "\($0.0)=\($0.1)" }.joined(separator: "&")
|
||||
#else
|
||||
return components.map { "\($0)=\($1)" }.joined(separator: "&")
|
||||
#endif
|
||||
}
|
||||
|
||||
private func encodesParametersInURL(with method: HTTPMethod) -> Bool {
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Request.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -102,7 +102,7 @@ open class Request {
|
||||
open var task: URLSessionTask? { return delegate.task }
|
||||
|
||||
/// The session belonging to the underlying task.
|
||||
open let session: URLSession
|
||||
public let session: URLSession
|
||||
|
||||
/// The request sent or to be sent to the server.
|
||||
open var request: URLRequest? { return task?.originalRequest }
|
||||
@ -184,7 +184,7 @@ open class Request {
|
||||
/// - parameter password: The password.
|
||||
///
|
||||
/// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise.
|
||||
open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)? {
|
||||
open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? {
|
||||
guard let data = "\(user):\(password)".data(using: .utf8) else { return nil }
|
||||
|
||||
let credential = data.base64EncodedString(options: [])
|
||||
@ -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[..<string.index(before: string.endIndex)])\"")
|
||||
#else
|
||||
components.append("-b \"\(string.substring(to: string.characters.index(before: string.endIndex)))\"")
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -327,7 +333,8 @@ extension Request: CustomDebugStringConvertible {
|
||||
}
|
||||
|
||||
for (field, value) in headers {
|
||||
components.append("-H \"\(field): \(value)\"")
|
||||
let escapedValue = String(describing: value).replacingOccurrences(of: "\"", with: "\\\"")
|
||||
components.append("-H \"\(field): \(escapedValue)\"")
|
||||
}
|
||||
|
||||
if let httpBodyData = request.httpBody, let httpBody = String(data: httpBodyData, encoding: .utf8) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Response.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -199,6 +199,55 @@ extension DataResponse {
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DataResponse` 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: DataResponse<Data> = ...
|
||||
/// let withMyError = possibleData.mapError { MyError.error($0) }
|
||||
///
|
||||
/// - Parameter transform: A closure that takes the error of the instance.
|
||||
/// - Returns: A `DataResponse` instance containing the result of the transform.
|
||||
public func mapError<E: Error>(_ transform: (Error) -> E) -> DataResponse {
|
||||
var response = DataResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
data: data,
|
||||
result: result.mapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DataResponse` 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: DataResponse<Data> = ...
|
||||
/// let possibleObject = possibleData.flatMapError {
|
||||
/// try someFailableFunction(taking: $0)
|
||||
/// }
|
||||
///
|
||||
/// - Parameter transform: A throwing closure that takes the error of the instance.
|
||||
///
|
||||
/// - Returns: A `DataResponse` instance containing the result of the transform.
|
||||
public func flatMapError<E: Error>(_ transform: (Error) throws -> E) -> DataResponse {
|
||||
var response = DataResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
data: data,
|
||||
result: result.flatMapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
@ -409,6 +458,59 @@ extension DownloadResponse {
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DownloadResponse` 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: DownloadResponse<Data> = ...
|
||||
/// let withMyError = possibleData.mapError { MyError.error($0) }
|
||||
///
|
||||
/// - Parameter transform: A closure that takes the error of the instance.
|
||||
/// - Returns: A `DownloadResponse` instance containing the result of the transform.
|
||||
public func mapError<E: Error>(_ transform: (Error) -> E) -> DownloadResponse {
|
||||
var response = DownloadResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
temporaryURL: temporaryURL,
|
||||
destinationURL: destinationURL,
|
||||
resumeData: resumeData,
|
||||
result: result.mapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DownloadResponse` 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: DownloadResponse<Data> = ...
|
||||
/// let possibleObject = possibleData.flatMapError {
|
||||
/// try someFailableFunction(taking: $0)
|
||||
/// }
|
||||
///
|
||||
/// - Parameter transform: A throwing closure that takes the error of the instance.
|
||||
///
|
||||
/// - Returns: A `DownloadResponse` instance containing the result of the transform.
|
||||
public func flatMapError<E: Error>(_ transform: (Error) throws -> E) -> DownloadResponse {
|
||||
var response = DownloadResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
temporaryURL: temporaryURL,
|
||||
destinationURL: destinationURL,
|
||||
resumeData: resumeData,
|
||||
result: result.flatMapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ResponseSerialization.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -368,13 +368,13 @@ extension Request {
|
||||
|
||||
var convertedEncoding = encoding
|
||||
|
||||
if let encodingName = response?.textEncodingName as CFString!, convertedEncoding == nil {
|
||||
if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil {
|
||||
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
|
||||
CFStringConvertIANACharSetNameToEncoding(encodingName))
|
||||
)
|
||||
}
|
||||
|
||||
let actualEncoding = convertedEncoding ?? String.Encoding.isoLatin1
|
||||
let actualEncoding = convertedEncoding ?? .isoLatin1
|
||||
|
||||
if let string = String(data: validData, encoding: actualEncoding) {
|
||||
return .success(string)
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Result.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ServerTrustPolicy.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -27,7 +27,7 @@ import Foundation
|
||||
/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host.
|
||||
open class ServerTrustPolicyManager {
|
||||
/// The dictionary of policies mapped to a particular host.
|
||||
open let policies: [String: ServerTrustPolicy]
|
||||
public let policies: [String: ServerTrustPolicy]
|
||||
|
||||
/// Initializes the `ServerTrustPolicyManager` instance with the given policies.
|
||||
///
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// SessionDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -163,7 +163,7 @@ open class SessionDelegate: NSObject {
|
||||
var retrier: RequestRetrier?
|
||||
weak var sessionManager: SessionManager?
|
||||
|
||||
private var requests: [Int: Request] = [:]
|
||||
var requests: [Int: Request] = [:]
|
||||
private let lock = NSLock()
|
||||
|
||||
/// Access the task delegate for the specified task in a thread-safe manner.
|
||||
@ -442,10 +442,16 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
|
||||
strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error)
|
||||
|
||||
var userInfo: [String: Any] = [Notification.Key.Task: task]
|
||||
|
||||
if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data {
|
||||
userInfo[Notification.Key.ResponseData] = data
|
||||
}
|
||||
|
||||
NotificationCenter.default.post(
|
||||
name: Notification.Name.Task.DidComplete,
|
||||
object: strongSelf,
|
||||
userInfo: [Notification.Key.Task: task]
|
||||
userInfo: userInfo
|
||||
)
|
||||
|
||||
strongSelf[task] = nil
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// SessionManager.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -45,7 +45,7 @@ open class SessionManager {
|
||||
|
||||
/// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use
|
||||
/// directly for any ad hoc requests.
|
||||
open static let `default`: SessionManager = {
|
||||
public static let `default`: SessionManager = {
|
||||
let configuration = URLSessionConfiguration.default
|
||||
configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders
|
||||
|
||||
@ -53,23 +53,15 @@ open class SessionManager {
|
||||
}()
|
||||
|
||||
/// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers.
|
||||
open static let defaultHTTPHeaders: HTTPHeaders = {
|
||||
public static let defaultHTTPHeaders: HTTPHeaders = {
|
||||
// Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3
|
||||
let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5"
|
||||
|
||||
// Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5
|
||||
#if swift(>=4.0)
|
||||
let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { enumeratedLanguage in
|
||||
let (index, languageCode) = enumeratedLanguage
|
||||
let quality = 1.0 - (Double(index) * 0.1)
|
||||
return "\(languageCode);q=\(quality)"
|
||||
}.joined(separator: ", ")
|
||||
#else
|
||||
let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in
|
||||
let quality = 1.0 - (Double(index) * 0.1)
|
||||
return "\(languageCode);q=\(quality)"
|
||||
}.joined(separator: ", ")
|
||||
#endif
|
||||
|
||||
// User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3
|
||||
// Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0`
|
||||
@ -126,13 +118,13 @@ open class SessionManager {
|
||||
}()
|
||||
|
||||
/// Default memory threshold used when encoding `MultipartFormData` in bytes.
|
||||
open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
|
||||
public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
|
||||
|
||||
/// The underlying session.
|
||||
open let session: URLSession
|
||||
public let session: URLSession
|
||||
|
||||
/// The session delegate handling all the task and session delegate callbacks.
|
||||
open let delegate: SessionDelegate
|
||||
public let delegate: SessionDelegate
|
||||
|
||||
/// Whether to start requests immediately after being constructed. `true` by default.
|
||||
open var startRequestsImmediately: Bool = true
|
||||
@ -257,6 +249,7 @@ open class SessionManager {
|
||||
/// - parameter urlRequest: The URL request.
|
||||
///
|
||||
/// - returns: The created `DataRequest`.
|
||||
@discardableResult
|
||||
open func request(_ urlRequest: URLRequestConvertible) -> DataRequest {
|
||||
var originalRequest: URLRequest?
|
||||
|
||||
@ -855,6 +848,10 @@ open class SessionManager {
|
||||
do {
|
||||
let task = try originalTask.task(session: session, adapter: adapter, queue: queue)
|
||||
|
||||
if let originalTask = request.task {
|
||||
delegate[originalTask] = nil // removes the old request to avoid endless growth
|
||||
}
|
||||
|
||||
request.delegate.task = task // resets all task delegate data
|
||||
|
||||
request.retryCount += 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// TaskDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -31,7 +31,7 @@ open class TaskDelegate: NSObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// The serial operation queue used to execute all operations after the task completes.
|
||||
open let queue: OperationQueue
|
||||
public let queue: OperationQueue
|
||||
|
||||
/// The data returned by the server.
|
||||
public var data: Data? { return nil }
|
||||
@ -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()
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Timeline.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Validation.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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: "/")
|
||||
}()
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"source": {
|
||||
"git": "git@github.com:openapitools/openapi-generator.git",
|
||||
"git": "git@github.com:OpenAPITools/openapi-generator.git",
|
||||
"tag": "v1.0.0"
|
||||
},
|
||||
"authors": "",
|
||||
@ -17,7 +17,7 @@
|
||||
"source_files": "PetstoreClient/Classes/**/*.swift",
|
||||
"dependencies": {
|
||||
"Alamofire": [
|
||||
"~> 4.5.0"
|
||||
"~> 4.7.0"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
PODS:
|
||||
- Alamofire (4.5.0)
|
||||
- Alamofire (4.7.3)
|
||||
- PetstoreClient (0.0.1):
|
||||
- Alamofire (~> 4.5.0)
|
||||
- Alamofire (~> 4.7.0)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PetstoreClient (from `../`)
|
||||
@ -15,9 +15,9 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140
|
||||
PetstoreClient: a9f241d378687facad5c691a1747b21f64b405fa
|
||||
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
|
||||
PetstoreClient: ed26185215a5241fa4e937e806321d611f3d0c30
|
||||
|
||||
PODFILE CHECKSUM: 417049e9ed0e4680602b34d838294778389bd418
|
||||
PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d
|
||||
|
||||
COCOAPODS: 1.5.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.5.0</string>
|
||||
<string>4.7.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
@ -3,7 +3,7 @@ This application makes use of the following third party libraries:
|
||||
|
||||
## Alamofire
|
||||
|
||||
Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2014-2018 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
|
||||
|
@ -14,7 +14,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>FooterText</key>
|
||||
<string>Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
<string>Copyright (c) 2014-2018 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
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1A501F48219C3DC600F372F6 /* DateFormatTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A501F47219C3DC600F372F6 /* DateFormatTests.swift */; };
|
||||
54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */; };
|
||||
23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */; };
|
||||
6D4EFB951C692C6300B96B06 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB941C692C6300B96B06 /* AppDelegate.swift */; };
|
||||
6D4EFB971C692C6300B96B06 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFB961C692C6300B96B06 /* ViewController.swift */; };
|
||||
6D4EFB9A1C692C6300B96B06 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D4EFB981C692C6300B96B06 /* Main.storyboard */; };
|
||||
@ -17,7 +17,7 @@
|
||||
6D4EFBB51C693BE200B96B06 /* PetAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */; };
|
||||
6D4EFBB71C693BED00B96B06 /* StoreAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */; };
|
||||
6D4EFBB91C693BFC00B96B06 /* UserAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */; };
|
||||
751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */; };
|
||||
FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@ -31,8 +31,8 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
1A501F47219C3DC600F372F6 /* DateFormatTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatTests.swift; sourceTree = "<group>"; };
|
||||
289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
6D4EFB911C692C6300B96B06 /* SwaggerClient.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwaggerClient.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6D4EFB941C692C6300B96B06 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
6D4EFB961C692C6300B96B06 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||
@ -45,12 +45,12 @@
|
||||
6D4EFBB41C693BE200B96B06 /* PetAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PetAPITests.swift; sourceTree = "<group>"; };
|
||||
6D4EFBB61C693BED00B96B06 /* StoreAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoreAPITests.swift; sourceTree = "<group>"; };
|
||||
6D4EFBB81C693BFC00B96B06 /* UserAPITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserAPITests.swift; sourceTree = "<group>"; };
|
||||
8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
|
||||
C07EC0A94AA0F86D60668B32 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClient.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
|
||||
E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwaggerClientTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwaggerClientTests/Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -58,7 +58,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
751C65B82F596107A3DC8ED9 /* Pods_SwaggerClient.framework in Frameworks */,
|
||||
23B2E76564651097BE2FE501 /* Pods_SwaggerClient.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -66,20 +66,20 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
54DA06C1D70D78EC0EC72B61 /* Pods_SwaggerClientTests.framework in Frameworks */,
|
||||
FB5CCC7EFA680BB2746B695B /* Pods_SwaggerClientTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
0CAA98BEFA303B94D3664C7D /* Pods */ = {
|
||||
203D4495376E4EB72474B091 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */,
|
||||
FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */,
|
||||
289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */,
|
||||
B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */,
|
||||
081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */,
|
||||
ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */,
|
||||
E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */,
|
||||
ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
sourceTree = "<group>";
|
||||
@ -88,8 +88,8 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
C07EC0A94AA0F86D60668B32 /* Pods.framework */,
|
||||
8F60AECFF321A25553B6A5B0 /* Pods_SwaggerClient.framework */,
|
||||
F65B6638217EDDC99D103B16 /* Pods_SwaggerClientTests.framework */,
|
||||
7F98CC8B18E5FA9213F6A68D /* Pods_SwaggerClient.framework */,
|
||||
83FDC034BBA2A07AE9975250 /* Pods_SwaggerClientTests.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@ -101,7 +101,7 @@
|
||||
6D4EFBA81C692C6300B96B06 /* SwaggerClientTests */,
|
||||
6D4EFB921C692C6300B96B06 /* Products */,
|
||||
3FABC56EC0BA84CBF4F99564 /* Frameworks */,
|
||||
0CAA98BEFA303B94D3664C7D /* Pods */,
|
||||
203D4495376E4EB72474B091 /* Pods */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@ -146,13 +146,11 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6D4EFBAE1C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClient" */;
|
||||
buildPhases = (
|
||||
CF310079E3CB0BE5BE604471 /* [CP] Check Pods Manifest.lock */,
|
||||
1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */,
|
||||
5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */,
|
||||
6D4EFB8D1C692C6300B96B06 /* Sources */,
|
||||
6D4EFB8E1C692C6300B96B06 /* Frameworks */,
|
||||
6D4EFB8F1C692C6300B96B06 /* Resources */,
|
||||
4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */,
|
||||
3D9471620628F03313096EB2 /* 📦 Embed Pods Frameworks */,
|
||||
FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@ -167,8 +165,7 @@
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 6D4EFBB11C692C6300B96B06 /* Build configuration list for PBXNativeTarget "SwaggerClientTests" */;
|
||||
buildPhases = (
|
||||
B4DB169E5F018305D6759D34 /* [CP] Check Pods Manifest.lock */,
|
||||
79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */,
|
||||
EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */,
|
||||
6D4EFBA11C692C6300B96B06 /* Sources */,
|
||||
6D4EFBA21C692C6300B96B06 /* Frameworks */,
|
||||
6D4EFBA31C692C6300B96B06 /* Resources */,
|
||||
@ -244,81 +241,42 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
1F03F780DC2D9727E5E64BA9 /* [CP] Check Pods Manifest.lock */ = {
|
||||
5BC9214E8D9BA5A427A3775B /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3D9471620628F03313096EB2 /* 📦 Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "📦 Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4485A75250058E2D5BBDF63F /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
79FE27B09B2DD354C831BD49 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
B4DB169E5F018305D6759D34 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
EEDC5E683F9569976B7C1192 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-SwaggerClientTests-checkManifestLockResult.txt",
|
||||
);
|
||||
@ -327,22 +285,28 @@
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
CF310079E3CB0BE5BE604471 /* [CP] Check Pods Manifest.lock */ = {
|
||||
FDCA0F14611FE114BFEBA8BB /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/PetstoreClient/PetstoreClient.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-SwaggerClient-checkManifestLockResult.txt",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PetstoreClient.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwaggerClient/Pods-SwaggerClient-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
@ -439,6 +403,7 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@ -476,6 +441,7 @@
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_VERSION = 4.2;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
@ -483,54 +449,50 @@
|
||||
};
|
||||
6D4EFBAF1C692C6300B96B06 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */;
|
||||
baseConfigurationReference = 081E9B893DEB1589CB807EA7 /* Pods-SwaggerClient.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwaggerClient/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6D4EFBB01C692C6300B96B06 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */;
|
||||
baseConfigurationReference = ACB80AC61FA8D8916D4559AA /* Pods-SwaggerClient.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwaggerClient/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
6D4EFBB21C692C6300B96B06 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 289E8A9E9C0BB66AD190C7C6 /* Pods-SwaggerClientTests.debug.xcconfig */;
|
||||
baseConfigurationReference = E43FC34A9681D65ED44EE914 /* Pods-SwaggerClientTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = SwaggerClientTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
6D4EFBB31C692C6300B96B06 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = B4B2BEC2ECA535C616F2F3FE /* Pods-SwaggerClientTests.release.xcconfig */;
|
||||
baseConfigurationReference = ED8576754DBB828CAE63EA87 /* Pods-SwaggerClientTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
INFOPLIST_FILE = SwaggerClientTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient";
|
||||
};
|
||||
name = Release;
|
||||
|
@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var window: UIWindow?
|
||||
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||
// Override point for customization after application launch.
|
||||
return true
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>Swift3PetstoreClientTests</artifactId>
|
||||
<artifactId>Swift4PetstoreClientTests</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>Swift3 Swagger Petstore Client</name>
|
||||
<name>Swift4 Swagger Petstore Client</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
xcodebuild clean build build-for-testing -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 6,OS=9.3" && xcodebuild test-without-building -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 6,OS=9.3" | xcpretty && exit ${PIPESTATUS[0]}
|
||||
xcodebuild clean build build-for-testing -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=12.1" && xcodebuild test-without-building -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" -destination "platform=iOS Simulator,name=iPhone 8,OS=12.1" | xcpretty && exit ${PIPESTATUS[0]}
|
||||
|
@ -1 +1 @@
|
||||
3.3.3-SNAPSHOT
|
||||
3.3.4-SNAPSHOT
|
@ -10,5 +10,5 @@ Pod::Spec.new do |s|
|
||||
s.homepage = 'https://github.com/openapitools/openapi-generator'
|
||||
s.summary = 'PetstoreClient'
|
||||
s.source_files = 'PetstoreClient/Classes/**/*.swift'
|
||||
s.dependency 'Alamofire', '~> 4.5.0'
|
||||
s.dependency 'Alamofire', '~> 4.7.0'
|
||||
end
|
||||
|
@ -1 +1 @@
|
||||
3.3.3-SNAPSHOT
|
||||
3.3.4-SNAPSHOT
|
@ -11,5 +11,5 @@ Pod::Spec.new do |s|
|
||||
s.summary = 'PetstoreClient'
|
||||
s.source_files = 'PetstoreClient/Classes/**/*.swift'
|
||||
s.dependency 'PromiseKit/CorePromise', '~> 4.4.0'
|
||||
s.dependency 'Alamofire', '~> 4.5.0'
|
||||
s.dependency 'Alamofire', '~> 4.7.0'
|
||||
end
|
||||
|
@ -8,11 +8,3 @@ target 'SwaggerClient' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |configuration|
|
||||
configuration.build_settings['SWIFT_VERSION'] = "3.0"
|
||||
end
|
||||
end
|
||||
end
|
@ -1,9 +1,9 @@
|
||||
PODS:
|
||||
- Alamofire (4.5.0)
|
||||
- Alamofire (4.7.3)
|
||||
- PetstoreClient (0.0.1):
|
||||
- Alamofire (~> 4.5.0)
|
||||
- Alamofire (~> 4.7.0)
|
||||
- PromiseKit/CorePromise (~> 4.4.0)
|
||||
- PromiseKit/CorePromise (4.4.0)
|
||||
- PromiseKit/CorePromise (4.4.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PetstoreClient (from `../`)
|
||||
@ -18,10 +18,10 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140
|
||||
PetstoreClient: b5876a16a88cce6a4fc71443a62f9892171b48e2
|
||||
PromiseKit: ecf5fe92275d57ee77c9ede858af47a162e9b97e
|
||||
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
|
||||
PetstoreClient: 5ebb1667fa647759d434a9cf364c94174e6481cd
|
||||
PromiseKit: 6178219c4c7457ae90d7d8b34b7ac5eb36916519
|
||||
|
||||
PODFILE CHECKSUM: da9f5a7ad6086f2c7abb73cf2c35cefce04a9a30
|
||||
PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d
|
||||
|
||||
COCOAPODS: 1.5.3
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2014-2018 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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
//
|
||||
// AFError.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Alamofire.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// DispatchQueue+Alamofire.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// MultipartFormData.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// NetworkReachabilityManager.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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,7 +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.
|
||||
public class NetworkReachabilityManager {
|
||||
open class NetworkReachabilityManager {
|
||||
/// Defines the various states of network reachability.
|
||||
///
|
||||
/// - unknown: It is unknown whether the network is reachable.
|
||||
@ -61,27 +61,27 @@ public class NetworkReachabilityManager {
|
||||
// MARK: - Properties
|
||||
|
||||
/// Whether the network is currently reachable.
|
||||
public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi }
|
||||
open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi }
|
||||
|
||||
/// Whether the network is currently reachable over the WWAN interface.
|
||||
public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) }
|
||||
open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) }
|
||||
|
||||
/// Whether the network is currently reachable over Ethernet or WiFi interface.
|
||||
public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) }
|
||||
open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) }
|
||||
|
||||
/// The current network reachability status.
|
||||
public var networkReachabilityStatus: NetworkReachabilityStatus {
|
||||
open var networkReachabilityStatus: NetworkReachabilityStatus {
|
||||
guard let flags = self.flags else { return .unknown }
|
||||
return networkReachabilityStatusForFlags(flags)
|
||||
}
|
||||
|
||||
/// The dispatch queue to execute the `listener` closure on.
|
||||
public var listenerQueue: DispatchQueue = DispatchQueue.main
|
||||
open var listenerQueue: DispatchQueue = DispatchQueue.main
|
||||
|
||||
/// A closure executed when the network reachability status changes.
|
||||
public var listener: Listener?
|
||||
open var listener: Listener?
|
||||
|
||||
private var flags: SCNetworkReachabilityFlags? {
|
||||
open var flags: SCNetworkReachabilityFlags? {
|
||||
var flags = SCNetworkReachabilityFlags()
|
||||
|
||||
if SCNetworkReachabilityGetFlags(reachability, &flags) {
|
||||
@ -92,7 +92,7 @@ public class NetworkReachabilityManager {
|
||||
}
|
||||
|
||||
private let reachability: SCNetworkReachability
|
||||
private var previousFlags: SCNetworkReachabilityFlags
|
||||
open var previousFlags: SCNetworkReachabilityFlags
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
@ -141,7 +141,7 @@ public class NetworkReachabilityManager {
|
||||
///
|
||||
/// - returns: `true` if listening was started successfully, `false` otherwise.
|
||||
@discardableResult
|
||||
public func startListening() -> Bool {
|
||||
open func startListening() -> Bool {
|
||||
var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
|
||||
context.info = Unmanaged.passUnretained(self).toOpaque()
|
||||
|
||||
@ -165,7 +165,7 @@ public class NetworkReachabilityManager {
|
||||
}
|
||||
|
||||
/// Stops listening for changes in network reachability status.
|
||||
public func stopListening() {
|
||||
open func stopListening() {
|
||||
SCNetworkReachabilitySetCallback(reachability, nil, nil)
|
||||
SCNetworkReachabilitySetDispatchQueue(reachability, nil)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Notifications.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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,5 +48,8 @@ extension Notification {
|
||||
public struct Key {
|
||||
/// User info dictionary key representing the `URLSessionTask` associated with the notification.
|
||||
public static let Task = "org.alamofire.notification.key.task"
|
||||
|
||||
/// User info dictionary key representing the responseData associated with the notification.
|
||||
public static let ResponseData = "org.alamofire.notification.key.responseData"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ParameterEncoding.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -64,9 +64,15 @@ public protocol ParameterEncoding {
|
||||
/// 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`).
|
||||
/// `application/x-www-form-urlencoded; charset=utf-8`.
|
||||
///
|
||||
/// There is no published specification for how to encode collection types. By default 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`) is used. Optionally, `ArrayEncoding` can be used to omit the
|
||||
/// square brackets appended to array keys.
|
||||
///
|
||||
/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode
|
||||
/// `true` as 1 and `false` as 0.
|
||||
public struct URLEncoding: ParameterEncoding {
|
||||
|
||||
// MARK: Helper Types
|
||||
@ -82,6 +88,41 @@ public struct URLEncoding: ParameterEncoding {
|
||||
case methodDependent, queryString, httpBody
|
||||
}
|
||||
|
||||
/// Configures how `Array` parameters are encoded.
|
||||
///
|
||||
/// - brackets: An empty set of square brackets is appended to the key for every value.
|
||||
/// This is the default behavior.
|
||||
/// - noBrackets: No brackets are appended. The key is encoded as is.
|
||||
public enum ArrayEncoding {
|
||||
case brackets, noBrackets
|
||||
|
||||
func encode(key: String) -> String {
|
||||
switch self {
|
||||
case .brackets:
|
||||
return "\(key)[]"
|
||||
case .noBrackets:
|
||||
return key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Configures how `Bool` parameters are encoded.
|
||||
///
|
||||
/// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior.
|
||||
/// - literal: Encode `true` and `false` as string literals.
|
||||
public enum BoolEncoding {
|
||||
case numeric, literal
|
||||
|
||||
func encode(value: Bool) -> String {
|
||||
switch self {
|
||||
case .numeric:
|
||||
return value ? "1" : "0"
|
||||
case .literal:
|
||||
return value ? "true" : "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// Returns a default `URLEncoding` instance.
|
||||
@ -99,15 +140,25 @@ public struct URLEncoding: ParameterEncoding {
|
||||
/// The destination defining where the encoded query string is to be applied to the URL request.
|
||||
public let destination: Destination
|
||||
|
||||
/// The encoding to use for `Array` parameters.
|
||||
public let arrayEncoding: ArrayEncoding
|
||||
|
||||
/// The encoding to use for `Bool` parameters.
|
||||
public let boolEncoding: BoolEncoding
|
||||
|
||||
// MARK: Initialization
|
||||
|
||||
/// Creates a `URLEncoding` instance using the specified destination.
|
||||
///
|
||||
/// - parameter destination: The destination defining where the encoded query string is to be applied.
|
||||
/// - parameter arrayEncoding: The encoding to use for `Array` parameters.
|
||||
/// - parameter boolEncoding: The encoding to use for `Bool` parameters.
|
||||
///
|
||||
/// - returns: The new `URLEncoding` instance.
|
||||
public init(destination: Destination = .methodDependent) {
|
||||
public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) {
|
||||
self.destination = destination
|
||||
self.arrayEncoding = arrayEncoding
|
||||
self.boolEncoding = boolEncoding
|
||||
}
|
||||
|
||||
// MARK: Encoding
|
||||
@ -161,16 +212,16 @@ public struct URLEncoding: ParameterEncoding {
|
||||
}
|
||||
} else if let array = value as? [Any] {
|
||||
for value in array {
|
||||
components += queryComponents(fromKey: "\(key)[]", value: value)
|
||||
components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value)
|
||||
}
|
||||
} else if let value = value as? NSNumber {
|
||||
if value.isBool {
|
||||
components.append((escape(key), escape((value.boolValue ? "1" : "0"))))
|
||||
components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue))))
|
||||
} else {
|
||||
components.append((escape(key), escape("\(value)")))
|
||||
}
|
||||
} else if let bool = value as? Bool {
|
||||
components.append((escape(key), escape((bool ? "1" : "0"))))
|
||||
components.append((escape(key), escape(boolEncoding.encode(value: bool))))
|
||||
} else {
|
||||
components.append((escape(key), escape("\(value)")))
|
||||
}
|
||||
@ -223,9 +274,9 @@ public struct URLEncoding: ParameterEncoding {
|
||||
let endIndex = string.index(index, offsetBy: batchSize, limitedBy: string.endIndex) ?? string.endIndex
|
||||
let range = startIndex..<endIndex
|
||||
|
||||
let substring = string.substring(with: range)
|
||||
let substring = string[range]
|
||||
|
||||
escaped += substring.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? substring
|
||||
escaped += substring.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) ?? String(substring)
|
||||
|
||||
index = endIndex
|
||||
}
|
||||
@ -241,11 +292,7 @@ public struct URLEncoding: ParameterEncoding {
|
||||
let value = parameters[key]!
|
||||
components += queryComponents(fromKey: key, value: value)
|
||||
}
|
||||
#if swift(>=4.0)
|
||||
return components.map { "\($0.0)=\($0.1)" }.joined(separator: "&")
|
||||
#else
|
||||
return components.map { "\($0)=\($1)" }.joined(separator: "&")
|
||||
#endif
|
||||
}
|
||||
|
||||
private func encodesParametersInURL(with method: HTTPMethod) -> Bool {
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Request.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -102,7 +102,7 @@ open class Request {
|
||||
open var task: URLSessionTask? { return delegate.task }
|
||||
|
||||
/// The session belonging to the underlying task.
|
||||
open let session: URLSession
|
||||
public let session: URLSession
|
||||
|
||||
/// The request sent or to be sent to the server.
|
||||
open var request: URLRequest? { return task?.originalRequest }
|
||||
@ -184,7 +184,7 @@ open class Request {
|
||||
/// - parameter password: The password.
|
||||
///
|
||||
/// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise.
|
||||
open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)? {
|
||||
open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? {
|
||||
guard let data = "\(user):\(password)".data(using: .utf8) else { return nil }
|
||||
|
||||
let credential = data.base64EncodedString(options: [])
|
||||
@ -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[..<string.index(before: string.endIndex)])\"")
|
||||
#else
|
||||
components.append("-b \"\(string.substring(to: string.characters.index(before: string.endIndex)))\"")
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -327,7 +333,8 @@ extension Request: CustomDebugStringConvertible {
|
||||
}
|
||||
|
||||
for (field, value) in headers {
|
||||
components.append("-H \"\(field): \(value)\"")
|
||||
let escapedValue = String(describing: value).replacingOccurrences(of: "\"", with: "\\\"")
|
||||
components.append("-H \"\(field): \(escapedValue)\"")
|
||||
}
|
||||
|
||||
if let httpBodyData = request.httpBody, let httpBody = String(data: httpBodyData, encoding: .utf8) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Response.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -199,6 +199,55 @@ extension DataResponse {
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DataResponse` 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: DataResponse<Data> = ...
|
||||
/// let withMyError = possibleData.mapError { MyError.error($0) }
|
||||
///
|
||||
/// - Parameter transform: A closure that takes the error of the instance.
|
||||
/// - Returns: A `DataResponse` instance containing the result of the transform.
|
||||
public func mapError<E: Error>(_ transform: (Error) -> E) -> DataResponse {
|
||||
var response = DataResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
data: data,
|
||||
result: result.mapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DataResponse` 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: DataResponse<Data> = ...
|
||||
/// let possibleObject = possibleData.flatMapError {
|
||||
/// try someFailableFunction(taking: $0)
|
||||
/// }
|
||||
///
|
||||
/// - Parameter transform: A throwing closure that takes the error of the instance.
|
||||
///
|
||||
/// - Returns: A `DataResponse` instance containing the result of the transform.
|
||||
public func flatMapError<E: Error>(_ transform: (Error) throws -> E) -> DataResponse {
|
||||
var response = DataResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
data: data,
|
||||
result: result.flatMapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
@ -409,6 +458,59 @@ extension DownloadResponse {
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DownloadResponse` 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: DownloadResponse<Data> = ...
|
||||
/// let withMyError = possibleData.mapError { MyError.error($0) }
|
||||
///
|
||||
/// - Parameter transform: A closure that takes the error of the instance.
|
||||
/// - Returns: A `DownloadResponse` instance containing the result of the transform.
|
||||
public func mapError<E: Error>(_ transform: (Error) -> E) -> DownloadResponse {
|
||||
var response = DownloadResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
temporaryURL: temporaryURL,
|
||||
destinationURL: destinationURL,
|
||||
resumeData: resumeData,
|
||||
result: result.mapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DownloadResponse` 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: DownloadResponse<Data> = ...
|
||||
/// let possibleObject = possibleData.flatMapError {
|
||||
/// try someFailableFunction(taking: $0)
|
||||
/// }
|
||||
///
|
||||
/// - Parameter transform: A throwing closure that takes the error of the instance.
|
||||
///
|
||||
/// - Returns: A `DownloadResponse` instance containing the result of the transform.
|
||||
public func flatMapError<E: Error>(_ transform: (Error) throws -> E) -> DownloadResponse {
|
||||
var response = DownloadResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
temporaryURL: temporaryURL,
|
||||
destinationURL: destinationURL,
|
||||
resumeData: resumeData,
|
||||
result: result.flatMapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ResponseSerialization.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -368,13 +368,13 @@ extension Request {
|
||||
|
||||
var convertedEncoding = encoding
|
||||
|
||||
if let encodingName = response?.textEncodingName as CFString!, convertedEncoding == nil {
|
||||
if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil {
|
||||
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
|
||||
CFStringConvertIANACharSetNameToEncoding(encodingName))
|
||||
)
|
||||
}
|
||||
|
||||
let actualEncoding = convertedEncoding ?? String.Encoding.isoLatin1
|
||||
let actualEncoding = convertedEncoding ?? .isoLatin1
|
||||
|
||||
if let string = String(data: validData, encoding: actualEncoding) {
|
||||
return .success(string)
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Result.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ServerTrustPolicy.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -27,7 +27,7 @@ import Foundation
|
||||
/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host.
|
||||
open class ServerTrustPolicyManager {
|
||||
/// The dictionary of policies mapped to a particular host.
|
||||
open let policies: [String: ServerTrustPolicy]
|
||||
public let policies: [String: ServerTrustPolicy]
|
||||
|
||||
/// Initializes the `ServerTrustPolicyManager` instance with the given policies.
|
||||
///
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// SessionDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -163,7 +163,7 @@ open class SessionDelegate: NSObject {
|
||||
var retrier: RequestRetrier?
|
||||
weak var sessionManager: SessionManager?
|
||||
|
||||
private var requests: [Int: Request] = [:]
|
||||
var requests: [Int: Request] = [:]
|
||||
private let lock = NSLock()
|
||||
|
||||
/// Access the task delegate for the specified task in a thread-safe manner.
|
||||
@ -442,10 +442,16 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
|
||||
strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error)
|
||||
|
||||
var userInfo: [String: Any] = [Notification.Key.Task: task]
|
||||
|
||||
if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data {
|
||||
userInfo[Notification.Key.ResponseData] = data
|
||||
}
|
||||
|
||||
NotificationCenter.default.post(
|
||||
name: Notification.Name.Task.DidComplete,
|
||||
object: strongSelf,
|
||||
userInfo: [Notification.Key.Task: task]
|
||||
userInfo: userInfo
|
||||
)
|
||||
|
||||
strongSelf[task] = nil
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// SessionManager.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -45,7 +45,7 @@ open class SessionManager {
|
||||
|
||||
/// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use
|
||||
/// directly for any ad hoc requests.
|
||||
open static let `default`: SessionManager = {
|
||||
public static let `default`: SessionManager = {
|
||||
let configuration = URLSessionConfiguration.default
|
||||
configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders
|
||||
|
||||
@ -53,23 +53,15 @@ open class SessionManager {
|
||||
}()
|
||||
|
||||
/// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers.
|
||||
open static let defaultHTTPHeaders: HTTPHeaders = {
|
||||
public static let defaultHTTPHeaders: HTTPHeaders = {
|
||||
// Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3
|
||||
let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5"
|
||||
|
||||
// Accept-Language HTTP Header; see https://tools.ietf.org/html/rfc7231#section-5.3.5
|
||||
#if swift(>=4.0)
|
||||
let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { enumeratedLanguage in
|
||||
let (index, languageCode) = enumeratedLanguage
|
||||
let quality = 1.0 - (Double(index) * 0.1)
|
||||
return "\(languageCode);q=\(quality)"
|
||||
}.joined(separator: ", ")
|
||||
#else
|
||||
let acceptLanguage = Locale.preferredLanguages.prefix(6).enumerated().map { index, languageCode in
|
||||
let quality = 1.0 - (Double(index) * 0.1)
|
||||
return "\(languageCode);q=\(quality)"
|
||||
}.joined(separator: ", ")
|
||||
#endif
|
||||
|
||||
// User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3
|
||||
// Example: `iOS Example/1.0 (org.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0`
|
||||
@ -126,13 +118,13 @@ open class SessionManager {
|
||||
}()
|
||||
|
||||
/// Default memory threshold used when encoding `MultipartFormData` in bytes.
|
||||
open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
|
||||
public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
|
||||
|
||||
/// The underlying session.
|
||||
open let session: URLSession
|
||||
public let session: URLSession
|
||||
|
||||
/// The session delegate handling all the task and session delegate callbacks.
|
||||
open let delegate: SessionDelegate
|
||||
public let delegate: SessionDelegate
|
||||
|
||||
/// Whether to start requests immediately after being constructed. `true` by default.
|
||||
open var startRequestsImmediately: Bool = true
|
||||
@ -257,6 +249,7 @@ open class SessionManager {
|
||||
/// - parameter urlRequest: The URL request.
|
||||
///
|
||||
/// - returns: The created `DataRequest`.
|
||||
@discardableResult
|
||||
open func request(_ urlRequest: URLRequestConvertible) -> DataRequest {
|
||||
var originalRequest: URLRequest?
|
||||
|
||||
@ -855,6 +848,10 @@ open class SessionManager {
|
||||
do {
|
||||
let task = try originalTask.task(session: session, adapter: adapter, queue: queue)
|
||||
|
||||
if let originalTask = request.task {
|
||||
delegate[originalTask] = nil // removes the old request to avoid endless growth
|
||||
}
|
||||
|
||||
request.delegate.task = task // resets all task delegate data
|
||||
|
||||
request.retryCount += 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// TaskDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -31,7 +31,7 @@ open class TaskDelegate: NSObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// The serial operation queue used to execute all operations after the task completes.
|
||||
open let queue: OperationQueue
|
||||
public let queue: OperationQueue
|
||||
|
||||
/// The data returned by the server.
|
||||
public var data: Data? { return nil }
|
||||
@ -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()
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Timeline.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Validation.swift
|
||||
//
|
||||
// Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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: "/")
|
||||
}()
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"source": {
|
||||
"git": "git@github.com:openapitools/openapi-generator.git",
|
||||
"git": "git@github.com:OpenAPITools/openapi-generator.git",
|
||||
"tag": "v1.0.0"
|
||||
},
|
||||
"authors": "",
|
||||
@ -20,7 +20,7 @@
|
||||
"~> 4.4.0"
|
||||
],
|
||||
"Alamofire": [
|
||||
"~> 4.5.0"
|
||||
"~> 4.7.0"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
PODS:
|
||||
- Alamofire (4.5.0)
|
||||
- Alamofire (4.7.3)
|
||||
- PetstoreClient (0.0.1):
|
||||
- Alamofire (~> 4.5.0)
|
||||
- Alamofire (~> 4.7.0)
|
||||
- PromiseKit/CorePromise (~> 4.4.0)
|
||||
- PromiseKit/CorePromise (4.4.0)
|
||||
- PromiseKit/CorePromise (4.4.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PetstoreClient (from `../`)
|
||||
@ -18,10 +18,10 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: f28cdffd29de33a7bfa022cbd63ae95a27fae140
|
||||
PetstoreClient: b5876a16a88cce6a4fc71443a62f9892171b48e2
|
||||
PromiseKit: ecf5fe92275d57ee77c9ede858af47a162e9b97e
|
||||
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
|
||||
PetstoreClient: 5ebb1667fa647759d434a9cf364c94174e6481cd
|
||||
PromiseKit: 6178219c4c7457ae90d7d8b34b7ac5eb36916519
|
||||
|
||||
PODFILE CHECKSUM: da9f5a7ad6086f2c7abb73cf2c35cefce04a9a30
|
||||
PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d
|
||||
|
||||
COCOAPODS: 1.5.3
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
![badge-pod] ![badge-languages] ![badge-pms] ![badge-platforms] ![badge-mit]
|
||||
![badge-pod] ![badge-languages] ![badge-pms] ![badge-platforms] [](https://travis-ci.org/mxcl/PromiseKit)
|
||||
|
||||
[繁體中文](README.zh_Hant.md), [简体中文](README.zh_CN.md)
|
||||
|
||||
@ -35,11 +35,13 @@ In your [Podfile]:
|
||||
|
||||
```ruby
|
||||
use_frameworks!
|
||||
swift_version = "3.1"
|
||||
pod "PromiseKit", "~> 4.3"
|
||||
|
||||
target "Change Me!" do
|
||||
pod "PromiseKit", "~> 4.4"
|
||||
end
|
||||
```
|
||||
|
||||
PromiseKit 4 supports Xcode 8 and 9, Swift 3.0, 3.1, 3.2 and Swift 4.0.
|
||||
PromiseKit 4 supports Xcode 8.1, 8.2, 8.3 and 9.0; Swift 3.0, 3.1, 3.2 and 4.0; iOS, macOS, tvOS, watchOS, Linux and Android; CocoaPods, Carthage and SwiftPM; ([CI Matrix](https://travis-ci.org/mxcl/PromiseKit)).
|
||||
|
||||
For Carthage, SwiftPM, etc., or for instructions when using older Swifts or
|
||||
Xcodes see our [Installation Guide](Documentation/Installation.md).
|
||||
|
@ -258,6 +258,9 @@ typedef void (^PMKBooleanAdapter)(BOOL, NSError * __nullable) NS_REFINED_FOR_SWI
|
||||
@end
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
Whenever resolving a promise you may resolve with a tuple, eg.
|
||||
@ -273,6 +276,9 @@ typedef void (^PMKBooleanAdapter)(BOOL, NSError * __nullable) NS_REFINED_FOR_SWI
|
||||
#define __PMKManifold(_1, _2, _3, N, ...) __PMKArrayWithCount(N, _1, _2, _3)
|
||||
extern id __nonnull __PMKArrayWithCount(NSUInteger, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // Extern C
|
||||
#endif
|
||||
|
||||
|
||||
@interface AnyPromise (Deprecations)
|
||||
|
@ -162,7 +162,7 @@ class ErrorConsumptionToken {
|
||||
|
||||
deinit {
|
||||
if !consumed {
|
||||
#if os(Linux)
|
||||
#if os(Linux) || os(Android)
|
||||
PMKUnhandledErrorHandler(error)
|
||||
#else
|
||||
PMKUnhandledErrorHandler(error as NSError)
|
||||
|
@ -16,7 +16,7 @@ extern NSString * __nonnull const PMKErrorDomain;
|
||||
#define PMKJoinError 10l
|
||||
|
||||
|
||||
#if __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@ -228,7 +228,7 @@ extern __nonnull dispatch_queue_t PMKDefaultDispatchQueue(void) NS_REFINED_FOR_S
|
||||
*/
|
||||
extern void PMKSetDefaultDispatchQueue(__nonnull dispatch_queue_t) NS_REFINED_FOR_SWIFT;
|
||||
|
||||
#if __cplusplus
|
||||
#ifdef __cplusplus
|
||||
} // Extern C
|
||||
#endif
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.5.0</string>
|
||||
<string>4.7.3</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
@ -3,7 +3,7 @@ This application makes use of the following third party libraries:
|
||||
|
||||
## Alamofire
|
||||
|
||||
Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2014-2018 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
|
||||
|
@ -14,7 +14,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>FooterText</key>
|
||||
<string>Copyright (c) 2014-2016 Alamofire Software Foundation (http://alamofire.org/)
|
||||
<string>Copyright (c) 2014-2018 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
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>4.4.0</string>
|
||||
<string>4.4.4</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
|
@ -10,8 +10,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#import "AnyPromise.h"
|
||||
#import "fwd.h"
|
||||
#import "AnyPromise.h"
|
||||
#import "PromiseKit.h"
|
||||
|
||||
FOUNDATION_EXPORT double PromiseKitVersionNumber;
|
||||
|
@ -391,6 +391,7 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
@ -431,6 +432,7 @@
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
@ -440,13 +442,11 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = A638467ACFB30852DEA51F7A /* Pods-SwaggerClient.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwaggerClient/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -454,13 +454,11 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = FC60BDC7328C2AA916F25840 /* Pods-SwaggerClient.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
INFOPLIST_FILE = SwaggerClient/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClient;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@ -473,7 +471,6 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient";
|
||||
};
|
||||
name = Debug;
|
||||
@ -487,7 +484,6 @@
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.swagger.SwaggerClientTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwaggerClient.app/SwaggerClient";
|
||||
};
|
||||
name = Release;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>Swift3PromiseKitPetstoreClientTests</artifactId>
|
||||
<artifactId>Swift4PromiseKitPetstoreClientTests</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>Swift3 PromiseKit Swagger Petstore Client</name>
|
||||
<name>Swift4 PromiseKit Swagger Petstore Client</name>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 6,OS=9.3" | xcpretty && exit ${PIPESTATUS[0]}
|
||||
xcodebuild -workspace "SwaggerClient.xcworkspace" -scheme "SwaggerClient" test -destination "platform=iOS Simulator,name=iPhone 8,OS=12.1" | xcpretty && exit ${PIPESTATUS[0]}
|
||||
|
@ -1 +1 @@
|
||||
3.3.3-SNAPSHOT
|
||||
3.3.4-SNAPSHOT
|
@ -11,5 +11,5 @@ Pod::Spec.new do |s|
|
||||
s.summary = 'PetstoreClient'
|
||||
s.source_files = 'PetstoreClient/Classes/**/*.swift'
|
||||
s.dependency 'RxSwift', '~> 4.0'
|
||||
s.dependency 'Alamofire', '~> 4.5.0'
|
||||
s.dependency 'Alamofire', '~> 4.7.0'
|
||||
end
|
||||
|
@ -1,9 +1,11 @@
|
||||
PODS:
|
||||
- Alamofire (4.5.1)
|
||||
- Alamofire (4.7.3)
|
||||
- PetstoreClient (0.0.1):
|
||||
- Alamofire (~> 4.5.0)
|
||||
- Alamofire (~> 4.7.0)
|
||||
- RxSwift (~> 4.0)
|
||||
- RxSwift (4.0.0)
|
||||
- RxAtomic (4.4.0)
|
||||
- RxSwift (4.4.0):
|
||||
- RxAtomic (~> 4.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PetstoreClient (from `../`)
|
||||
@ -11,6 +13,7 @@ DEPENDENCIES:
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Alamofire
|
||||
- RxAtomic
|
||||
- RxSwift
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
@ -18,9 +21,10 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
|
||||
PetstoreClient: cec377a07dc2206a1c5ef08f05cb9281c70f449c
|
||||
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
|
||||
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
|
||||
PetstoreClient: 80be9a47f05232f2d10af7e18eedd089e09676a1
|
||||
RxAtomic: eacf60db868c96bfd63320e28619fe29c179656f
|
||||
RxSwift: 5976ecd04fc2fefd648827c23de5e11157faa973
|
||||
|
||||
PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
Copyright (c) 2014-2018 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
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
//
|
||||
// AFError.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Alamofire.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// DispatchQueue+Alamofire.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// MultipartFormData.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// NetworkReachabilityManager.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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,7 +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.
|
||||
public class NetworkReachabilityManager {
|
||||
open class NetworkReachabilityManager {
|
||||
/// Defines the various states of network reachability.
|
||||
///
|
||||
/// - unknown: It is unknown whether the network is reachable.
|
||||
@ -61,27 +61,27 @@ public class NetworkReachabilityManager {
|
||||
// MARK: - Properties
|
||||
|
||||
/// Whether the network is currently reachable.
|
||||
public var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi }
|
||||
open var isReachable: Bool { return isReachableOnWWAN || isReachableOnEthernetOrWiFi }
|
||||
|
||||
/// Whether the network is currently reachable over the WWAN interface.
|
||||
public var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) }
|
||||
open var isReachableOnWWAN: Bool { return networkReachabilityStatus == .reachable(.wwan) }
|
||||
|
||||
/// Whether the network is currently reachable over Ethernet or WiFi interface.
|
||||
public var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) }
|
||||
open var isReachableOnEthernetOrWiFi: Bool { return networkReachabilityStatus == .reachable(.ethernetOrWiFi) }
|
||||
|
||||
/// The current network reachability status.
|
||||
public var networkReachabilityStatus: NetworkReachabilityStatus {
|
||||
open var networkReachabilityStatus: NetworkReachabilityStatus {
|
||||
guard let flags = self.flags else { return .unknown }
|
||||
return networkReachabilityStatusForFlags(flags)
|
||||
}
|
||||
|
||||
/// The dispatch queue to execute the `listener` closure on.
|
||||
public var listenerQueue: DispatchQueue = DispatchQueue.main
|
||||
open var listenerQueue: DispatchQueue = DispatchQueue.main
|
||||
|
||||
/// A closure executed when the network reachability status changes.
|
||||
public var listener: Listener?
|
||||
open var listener: Listener?
|
||||
|
||||
private var flags: SCNetworkReachabilityFlags? {
|
||||
open var flags: SCNetworkReachabilityFlags? {
|
||||
var flags = SCNetworkReachabilityFlags()
|
||||
|
||||
if SCNetworkReachabilityGetFlags(reachability, &flags) {
|
||||
@ -92,7 +92,7 @@ public class NetworkReachabilityManager {
|
||||
}
|
||||
|
||||
private let reachability: SCNetworkReachability
|
||||
private var previousFlags: SCNetworkReachabilityFlags
|
||||
open var previousFlags: SCNetworkReachabilityFlags
|
||||
|
||||
// MARK: - Initialization
|
||||
|
||||
@ -141,7 +141,7 @@ public class NetworkReachabilityManager {
|
||||
///
|
||||
/// - returns: `true` if listening was started successfully, `false` otherwise.
|
||||
@discardableResult
|
||||
public func startListening() -> Bool {
|
||||
open func startListening() -> Bool {
|
||||
var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
|
||||
context.info = Unmanaged.passUnretained(self).toOpaque()
|
||||
|
||||
@ -165,7 +165,7 @@ public class NetworkReachabilityManager {
|
||||
}
|
||||
|
||||
/// Stops listening for changes in network reachability status.
|
||||
public func stopListening() {
|
||||
open func stopListening() {
|
||||
SCNetworkReachabilitySetCallback(reachability, nil, nil)
|
||||
SCNetworkReachabilitySetDispatchQueue(reachability, nil)
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Notifications.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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,5 +48,8 @@ extension Notification {
|
||||
public struct Key {
|
||||
/// User info dictionary key representing the `URLSessionTask` associated with the notification.
|
||||
public static let Task = "org.alamofire.notification.key.task"
|
||||
|
||||
/// User info dictionary key representing the responseData associated with the notification.
|
||||
public static let ResponseData = "org.alamofire.notification.key.responseData"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ParameterEncoding.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -64,9 +64,15 @@ public protocol ParameterEncoding {
|
||||
/// 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`).
|
||||
/// `application/x-www-form-urlencoded; charset=utf-8`.
|
||||
///
|
||||
/// There is no published specification for how to encode collection types. By default 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`) is used. Optionally, `ArrayEncoding` can be used to omit the
|
||||
/// square brackets appended to array keys.
|
||||
///
|
||||
/// `BoolEncoding` can be used to configure how boolean values are encoded. The default behavior is to encode
|
||||
/// `true` as 1 and `false` as 0.
|
||||
public struct URLEncoding: ParameterEncoding {
|
||||
|
||||
// MARK: Helper Types
|
||||
@ -82,6 +88,41 @@ public struct URLEncoding: ParameterEncoding {
|
||||
case methodDependent, queryString, httpBody
|
||||
}
|
||||
|
||||
/// Configures how `Array` parameters are encoded.
|
||||
///
|
||||
/// - brackets: An empty set of square brackets is appended to the key for every value.
|
||||
/// This is the default behavior.
|
||||
/// - noBrackets: No brackets are appended. The key is encoded as is.
|
||||
public enum ArrayEncoding {
|
||||
case brackets, noBrackets
|
||||
|
||||
func encode(key: String) -> String {
|
||||
switch self {
|
||||
case .brackets:
|
||||
return "\(key)[]"
|
||||
case .noBrackets:
|
||||
return key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Configures how `Bool` parameters are encoded.
|
||||
///
|
||||
/// - numeric: Encode `true` as `1` and `false` as `0`. This is the default behavior.
|
||||
/// - literal: Encode `true` and `false` as string literals.
|
||||
public enum BoolEncoding {
|
||||
case numeric, literal
|
||||
|
||||
func encode(value: Bool) -> String {
|
||||
switch self {
|
||||
case .numeric:
|
||||
return value ? "1" : "0"
|
||||
case .literal:
|
||||
return value ? "true" : "false"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Properties
|
||||
|
||||
/// Returns a default `URLEncoding` instance.
|
||||
@ -99,15 +140,25 @@ public struct URLEncoding: ParameterEncoding {
|
||||
/// The destination defining where the encoded query string is to be applied to the URL request.
|
||||
public let destination: Destination
|
||||
|
||||
/// The encoding to use for `Array` parameters.
|
||||
public let arrayEncoding: ArrayEncoding
|
||||
|
||||
/// The encoding to use for `Bool` parameters.
|
||||
public let boolEncoding: BoolEncoding
|
||||
|
||||
// MARK: Initialization
|
||||
|
||||
/// Creates a `URLEncoding` instance using the specified destination.
|
||||
///
|
||||
/// - parameter destination: The destination defining where the encoded query string is to be applied.
|
||||
/// - parameter arrayEncoding: The encoding to use for `Array` parameters.
|
||||
/// - parameter boolEncoding: The encoding to use for `Bool` parameters.
|
||||
///
|
||||
/// - returns: The new `URLEncoding` instance.
|
||||
public init(destination: Destination = .methodDependent) {
|
||||
public init(destination: Destination = .methodDependent, arrayEncoding: ArrayEncoding = .brackets, boolEncoding: BoolEncoding = .numeric) {
|
||||
self.destination = destination
|
||||
self.arrayEncoding = arrayEncoding
|
||||
self.boolEncoding = boolEncoding
|
||||
}
|
||||
|
||||
// MARK: Encoding
|
||||
@ -161,16 +212,16 @@ public struct URLEncoding: ParameterEncoding {
|
||||
}
|
||||
} else if let array = value as? [Any] {
|
||||
for value in array {
|
||||
components += queryComponents(fromKey: "\(key)[]", value: value)
|
||||
components += queryComponents(fromKey: arrayEncoding.encode(key: key), value: value)
|
||||
}
|
||||
} else if let value = value as? NSNumber {
|
||||
if value.isBool {
|
||||
components.append((escape(key), escape((value.boolValue ? "1" : "0"))))
|
||||
components.append((escape(key), escape(boolEncoding.encode(value: value.boolValue))))
|
||||
} else {
|
||||
components.append((escape(key), escape("\(value)")))
|
||||
}
|
||||
} else if let bool = value as? Bool {
|
||||
components.append((escape(key), escape((bool ? "1" : "0"))))
|
||||
components.append((escape(key), escape(boolEncoding.encode(value: bool))))
|
||||
} else {
|
||||
components.append((escape(key), escape("\(value)")))
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Request.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -102,7 +102,7 @@ open class Request {
|
||||
open var task: URLSessionTask? { return delegate.task }
|
||||
|
||||
/// The session belonging to the underlying task.
|
||||
open let session: URLSession
|
||||
public let session: URLSession
|
||||
|
||||
/// The request sent or to be sent to the server.
|
||||
open var request: URLRequest? { return task?.originalRequest }
|
||||
@ -184,7 +184,7 @@ open class Request {
|
||||
/// - parameter password: The password.
|
||||
///
|
||||
/// - returns: A tuple with Authorization header and credential value if encoding succeeds, `nil` otherwise.
|
||||
open static func authorizationHeader(user: String, password: String) -> (key: String, value: String)? {
|
||||
open class func authorizationHeader(user: String, password: String) -> (key: String, value: String)? {
|
||||
guard let data = "\(user):\(password)".data(using: .utf8) else { return nil }
|
||||
|
||||
let credential = data.base64EncodedString(options: [])
|
||||
@ -333,7 +333,8 @@ extension Request: CustomDebugStringConvertible {
|
||||
}
|
||||
|
||||
for (field, value) in headers {
|
||||
components.append("-H \"\(field): \(value)\"")
|
||||
let escapedValue = String(describing: value).replacingOccurrences(of: "\"", with: "\\\"")
|
||||
components.append("-H \"\(field): \(escapedValue)\"")
|
||||
}
|
||||
|
||||
if let httpBodyData = request.httpBody, let httpBody = String(data: httpBodyData, encoding: .utf8) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Response.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -199,6 +199,55 @@ extension DataResponse {
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DataResponse` 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: DataResponse<Data> = ...
|
||||
/// let withMyError = possibleData.mapError { MyError.error($0) }
|
||||
///
|
||||
/// - Parameter transform: A closure that takes the error of the instance.
|
||||
/// - Returns: A `DataResponse` instance containing the result of the transform.
|
||||
public func mapError<E: Error>(_ transform: (Error) -> E) -> DataResponse {
|
||||
var response = DataResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
data: data,
|
||||
result: result.mapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DataResponse` 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: DataResponse<Data> = ...
|
||||
/// let possibleObject = possibleData.flatMapError {
|
||||
/// try someFailableFunction(taking: $0)
|
||||
/// }
|
||||
///
|
||||
/// - Parameter transform: A throwing closure that takes the error of the instance.
|
||||
///
|
||||
/// - Returns: A `DataResponse` instance containing the result of the transform.
|
||||
public func flatMapError<E: Error>(_ transform: (Error) throws -> E) -> DataResponse {
|
||||
var response = DataResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
data: data,
|
||||
result: result.flatMapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
@ -409,6 +458,59 @@ extension DownloadResponse {
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DownloadResponse` 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: DownloadResponse<Data> = ...
|
||||
/// let withMyError = possibleData.mapError { MyError.error($0) }
|
||||
///
|
||||
/// - Parameter transform: A closure that takes the error of the instance.
|
||||
/// - Returns: A `DownloadResponse` instance containing the result of the transform.
|
||||
public func mapError<E: Error>(_ transform: (Error) -> E) -> DownloadResponse {
|
||||
var response = DownloadResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
temporaryURL: temporaryURL,
|
||||
destinationURL: destinationURL,
|
||||
resumeData: resumeData,
|
||||
result: result.mapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
/// Evaluates the specified closure when the `DownloadResponse` 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: DownloadResponse<Data> = ...
|
||||
/// let possibleObject = possibleData.flatMapError {
|
||||
/// try someFailableFunction(taking: $0)
|
||||
/// }
|
||||
///
|
||||
/// - Parameter transform: A throwing closure that takes the error of the instance.
|
||||
///
|
||||
/// - Returns: A `DownloadResponse` instance containing the result of the transform.
|
||||
public func flatMapError<E: Error>(_ transform: (Error) throws -> E) -> DownloadResponse {
|
||||
var response = DownloadResponse(
|
||||
request: request,
|
||||
response: self.response,
|
||||
temporaryURL: temporaryURL,
|
||||
destinationURL: destinationURL,
|
||||
resumeData: resumeData,
|
||||
result: result.flatMapError(transform),
|
||||
timeline: timeline
|
||||
)
|
||||
|
||||
response._metrics = _metrics
|
||||
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: -
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ResponseSerialization.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -368,13 +368,13 @@ extension Request {
|
||||
|
||||
var convertedEncoding = encoding
|
||||
|
||||
if let encodingName = response?.textEncodingName as CFString!, convertedEncoding == nil {
|
||||
if let encodingName = response?.textEncodingName as CFString?, convertedEncoding == nil {
|
||||
convertedEncoding = String.Encoding(rawValue: CFStringConvertEncodingToNSStringEncoding(
|
||||
CFStringConvertIANACharSetNameToEncoding(encodingName))
|
||||
)
|
||||
}
|
||||
|
||||
let actualEncoding = convertedEncoding ?? String.Encoding.isoLatin1
|
||||
let actualEncoding = convertedEncoding ?? .isoLatin1
|
||||
|
||||
if let string = String(data: validData, encoding: actualEncoding) {
|
||||
return .success(string)
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Result.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// ServerTrustPolicy.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -27,7 +27,7 @@ import Foundation
|
||||
/// Responsible for managing the mapping of `ServerTrustPolicy` objects to a given host.
|
||||
open class ServerTrustPolicyManager {
|
||||
/// The dictionary of policies mapped to a particular host.
|
||||
open let policies: [String: ServerTrustPolicy]
|
||||
public let policies: [String: ServerTrustPolicy]
|
||||
|
||||
/// Initializes the `ServerTrustPolicyManager` instance with the given policies.
|
||||
///
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// SessionDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -163,7 +163,7 @@ open class SessionDelegate: NSObject {
|
||||
var retrier: RequestRetrier?
|
||||
weak var sessionManager: SessionManager?
|
||||
|
||||
private var requests: [Int: Request] = [:]
|
||||
var requests: [Int: Request] = [:]
|
||||
private let lock = NSLock()
|
||||
|
||||
/// Access the task delegate for the specified task in a thread-safe manner.
|
||||
@ -442,10 +442,16 @@ extension SessionDelegate: URLSessionTaskDelegate {
|
||||
|
||||
strongSelf[task]?.delegate.urlSession(session, task: task, didCompleteWithError: error)
|
||||
|
||||
var userInfo: [String: Any] = [Notification.Key.Task: task]
|
||||
|
||||
if let data = (strongSelf[task]?.delegate as? DataTaskDelegate)?.data {
|
||||
userInfo[Notification.Key.ResponseData] = data
|
||||
}
|
||||
|
||||
NotificationCenter.default.post(
|
||||
name: Notification.Name.Task.DidComplete,
|
||||
object: strongSelf,
|
||||
userInfo: [Notification.Key.Task: task]
|
||||
userInfo: userInfo
|
||||
)
|
||||
|
||||
strongSelf[task] = nil
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// SessionManager.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -45,7 +45,7 @@ open class SessionManager {
|
||||
|
||||
/// A default instance of `SessionManager`, used by top-level Alamofire request methods, and suitable for use
|
||||
/// directly for any ad hoc requests.
|
||||
open static let `default`: SessionManager = {
|
||||
public static let `default`: SessionManager = {
|
||||
let configuration = URLSessionConfiguration.default
|
||||
configuration.httpAdditionalHeaders = SessionManager.defaultHTTPHeaders
|
||||
|
||||
@ -53,7 +53,7 @@ open class SessionManager {
|
||||
}()
|
||||
|
||||
/// Creates default values for the "Accept-Encoding", "Accept-Language" and "User-Agent" headers.
|
||||
open static let defaultHTTPHeaders: HTTPHeaders = {
|
||||
public static let defaultHTTPHeaders: HTTPHeaders = {
|
||||
// Accept-Encoding HTTP Header; see https://tools.ietf.org/html/rfc7230#section-4.2.3
|
||||
let acceptEncoding: String = "gzip;q=1.0, compress;q=0.5"
|
||||
|
||||
@ -118,13 +118,13 @@ open class SessionManager {
|
||||
}()
|
||||
|
||||
/// Default memory threshold used when encoding `MultipartFormData` in bytes.
|
||||
open static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
|
||||
public static let multipartFormDataEncodingMemoryThreshold: UInt64 = 10_000_000
|
||||
|
||||
/// The underlying session.
|
||||
open let session: URLSession
|
||||
public let session: URLSession
|
||||
|
||||
/// The session delegate handling all the task and session delegate callbacks.
|
||||
open let delegate: SessionDelegate
|
||||
public let delegate: SessionDelegate
|
||||
|
||||
/// Whether to start requests immediately after being constructed. `true` by default.
|
||||
open var startRequestsImmediately: Bool = true
|
||||
@ -249,6 +249,7 @@ open class SessionManager {
|
||||
/// - parameter urlRequest: The URL request.
|
||||
///
|
||||
/// - returns: The created `DataRequest`.
|
||||
@discardableResult
|
||||
open func request(_ urlRequest: URLRequestConvertible) -> DataRequest {
|
||||
var originalRequest: URLRequest?
|
||||
|
||||
@ -847,6 +848,10 @@ open class SessionManager {
|
||||
do {
|
||||
let task = try originalTask.task(session: session, adapter: adapter, queue: queue)
|
||||
|
||||
if let originalTask = request.task {
|
||||
delegate[originalTask] = nil // removes the old request to avoid endless growth
|
||||
}
|
||||
|
||||
request.delegate.task = task // resets all task delegate data
|
||||
|
||||
request.retryCount += 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// TaskDelegate.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
@ -31,7 +31,7 @@ open class TaskDelegate: NSObject {
|
||||
// MARK: Properties
|
||||
|
||||
/// The serial operation queue used to execute all operations after the task completes.
|
||||
open let queue: OperationQueue
|
||||
public let queue: OperationQueue
|
||||
|
||||
/// The data returned by the server.
|
||||
public var data: Data? { return nil }
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Timeline.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// Validation.swift
|
||||
//
|
||||
// Copyright (c) 2014-2017 Alamofire Software Foundation (http://alamofire.org/)
|
||||
// Copyright (c) 2014-2018 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
|
||||
|
@ -7,7 +7,7 @@
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"source": {
|
||||
"git": "git@github.com:openapitools/openapi-generator.git",
|
||||
"git": "git@github.com:OpenAPITools/openapi-generator.git",
|
||||
"tag": "v1.0.0"
|
||||
},
|
||||
"authors": "",
|
||||
@ -20,7 +20,7 @@
|
||||
"~> 4.0"
|
||||
],
|
||||
"Alamofire": [
|
||||
"~> 4.5.0"
|
||||
"~> 4.7.0"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,11 @@
|
||||
PODS:
|
||||
- Alamofire (4.5.1)
|
||||
- Alamofire (4.7.3)
|
||||
- PetstoreClient (0.0.1):
|
||||
- Alamofire (~> 4.5.0)
|
||||
- Alamofire (~> 4.7.0)
|
||||
- RxSwift (~> 4.0)
|
||||
- RxSwift (4.0.0)
|
||||
- RxAtomic (4.4.0)
|
||||
- RxSwift (4.4.0):
|
||||
- RxAtomic (~> 4.4)
|
||||
|
||||
DEPENDENCIES:
|
||||
- PetstoreClient (from `../`)
|
||||
@ -11,6 +13,7 @@ DEPENDENCIES:
|
||||
SPEC REPOS:
|
||||
https://github.com/cocoapods/specs.git:
|
||||
- Alamofire
|
||||
- RxAtomic
|
||||
- RxSwift
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
@ -18,9 +21,10 @@ EXTERNAL SOURCES:
|
||||
:path: "../"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Alamofire: 2d95912bf4c34f164fdfc335872e8c312acaea4a
|
||||
PetstoreClient: cec377a07dc2206a1c5ef08f05cb9281c70f449c
|
||||
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
|
||||
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
|
||||
PetstoreClient: 80be9a47f05232f2d10af7e18eedd089e09676a1
|
||||
RxAtomic: eacf60db868c96bfd63320e28619fe29c179656f
|
||||
RxSwift: 5976ecd04fc2fefd648827c23de5e11157faa973
|
||||
|
||||
PODFILE CHECKSUM: cedb3058b02f4776d7c31f6d92ae2f674fdf424d
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user