diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..6e9023f
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,9 @@
+## How to contribute
+
+1. Fork it
+2. Clone your project
+3. Create your feature branch (`git checkout -b my-feature`)
+4. Commit your changes (`git commit -am 'Add some feature'`)
+5. Push to the branch (`git push origin my-feature`)
+6. Create new Pull Request
+
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..74a6840
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,12 @@
+### 提出问题前请先确认完成了下列几项步骤 New Issue Checklist
+
+* [ ] 我已经阅读过 [贡献指南](CONTRIBUTING.md) I have read and understood the [CONTRIBUTING guide](CONTRIBUTING.md)
+* [ ] 我已经阅读过 [程序文档]((http://cocoadocs.org/docsets/YTKNetwork)) I have read the [Documentation](http://cocoadocs.org/docsets/YTKNetwork)
+* [ ] 我已经证实这个问题来源于 YTKNetwork 本身,而不是其所依赖的 [AFNetworking](https://github.com/AFNetworking/AFNetworking) I have confirmed that this issue is caused by YTKNetwork, not [AFNetworking](https://github.com/AFNetworking/AFNetworking)
+* [ ] 我已经在项目的 [问题列表](https://github.com/yuantiku/YTKNetwork/issues) 中搜索过并且没有找到类似问题 I have searched for a similar issue in the [project](https://github.com/yuantiku/YTKNetwork/issues) and found none
+
+### 问题描述 Issue Description
+
+请给出所提出问题的详尽描述,包括具体的错误信息,打印的堆栈等等,以及重现此问题的具体步骤。
+
+Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue.
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..e2d7cde
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,14 @@
+### 提出 Pull Request 前请先确认完成了下列几项步骤 New Pull Request Checklist
+
+* [ ] 我已经阅读过 [贡献指南](CONTRIBUTING.md) I have read and understood the [CONTRIBUTING guide](CONTRIBUTING.md)
+* [ ] 我已经阅读过 [程序文档]((http://cocoadocs.org/docsets/YTKNetwork)) I have read the [Documentation](http://cocoadocs.org/docsets/YTKNetwork)
+* [ ] 我已经在项目的 [Pull Request 列表](https://github.com/yuantiku/YTKNetwork/pulls) 中搜索过并且没有找到类似的 Pull Request I have searched for a similar pull request in the [project](https://github.com/yuantiku/YTKNetwork/pulls) and found none
+* [ ] 我已经添加了必要的测试以证明我的改动是正确的 I have added the required tests to prove the fix/feature I am adding
+* [ ] 我已经更新了有关文档(如必要)I have updated the documentation (if necesarry)
+
+### Pull Request 说明 Pull Request Description
+
+这个 Pull Request 解决了如下问题/加入了如下功能:···
+
+This pull request fixes / reffers to the following issues: ...
+
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index d7fac47..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## How to contribute
-
-1. Fork it
-1. Clone your project
-1. Create your feature branch (`git checkout -b my-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-feature`)
-1. Create new Pull Request
\ No newline at end of file
diff --git a/Docs/2.0_MigrationGuide_cn.md b/Docs/2.0_MigrationGuide_cn.md
old mode 100644
new mode 100755
index 46215b1..ce84bb4
--- a/Docs/2.0_MigrationGuide_cn.md
+++ b/Docs/2.0_MigrationGuide_cn.md
@@ -52,7 +52,7 @@ YTKNetwork 2.0 中 `baseUrl` 和 `requestUrl` 的拼接实现发生了变化。
```objectivec
NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
-NSURL *resultURL = [NSURL URLWithString:@"/foo" relativeToURL:baseURL];
+NSURL *resultURL = [NSURL URLWithString:@"/foo" relativeToURL:baseURL:];
// resultURL : http://example.com/foo
```
diff --git a/Docs/BasicGuide_cn.md b/Docs/BasicGuide_cn.md
old mode 100644
new mode 100755
diff --git a/Docs/BasicGuide_en.md b/Docs/BasicGuide_en.md
old mode 100644
new mode 100755
diff --git a/Docs/ProGuide_cn.md b/Docs/ProGuide_cn.md
old mode 100644
new mode 100755
index 5867cb8..6765193
--- a/Docs/ProGuide_cn.md
+++ b/Docs/ProGuide_cn.md
@@ -221,7 +221,7 @@ YTKBatchRequest 类:用于方便地发送批量的网络请求,YTKBatchReque
## 定制 `buildCustomUrlRequest`
-通过覆盖 `buildCustomUrlRequest` 方法,返回一个 `NSUrlRequest` 对象来达到完全自定义请求的需求。该方法定义在 `YTKBaseRequest` 类,如下:
+通过覆盖 `buildCustomUrlRequest` 方法,返回一个 `NSURLRequest` 对象来达到完全自定义请求的需求。该方法定义在 `YTKBaseRequest` 类,如下:
```objectivec
// 构建自定义的 UrlRequest,
diff --git a/Docs/README_cn.md b/Docs/README_cn.md
old mode 100644
new mode 100755
index e03d91b..cf5ad0b
--- a/Docs/README_cn.md
+++ b/Docs/README_cn.md
@@ -34,7 +34,7 @@ YTKNetwork 的基本的思想是把每一个网络请求封装成对象。所以
* 方便在基类中处理缓存逻辑,以及其它一些公共逻辑。
* 方便做对象的持久化。
-当然,如果说它有什么不好,那就是如果你的工程非常简单,这么写会显得没有直接用 AFNetworking 将请求逻辑写在 Controller 中方便,所以 YTKNetwork 并不合适特别简单的项目。
+当然,如果说它有什么不好,那就是如果你的工程非常简单,这么写会显得没有直接用 AFNetworking 将请求逻辑写在 Controller 中方便,所以 YTKNetwork 并不适合特别简单的项目。
## 安装
@@ -70,6 +70,7 @@ YTKNetwork 的主要作者是:
* [maojj][maojjGithub]
* [veecci][veecciGithub]
* [tangqiaoboy][tangqiaoboyGithub]
+* [skyline75489][skyline75489Github]
## 感谢
@@ -92,3 +93,4 @@ YTKNetwork 被许可在 MIT 协议下使用。查阅 LICENSE 文件来获得更
[lancyGithub]:https://github.com/lancy
[maojjGithub]:https://github.com/maojj
[veecciGithub]:https://github.com/veecci
+[skyline75489Github]:https://github.com/skyline75489
diff --git a/Framework/Info.plist b/Framework/Info.plist
old mode 100644
new mode 100755
index dfb6492..0de69c1
--- a/Framework/Info.plist
+++ b/Framework/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 2.0
+ 2.0.3
CFBundleSignature
????
CFBundleVersion
diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index 641dafb..609c5a5
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ YTKNetwork
## What
-YTKNetwork is is a high level request util based on [AFNetworking][AFNetworking]. It's developed by the iOS Team of YuanTiKu. It provides a High Level API for network request.
+YTKNetwork is a high level request util based on [AFNetworking][AFNetworking]. It's developed by the iOS Team of YuanTiKu. It provides a High Level API for network request.
YTKNetwork is used in all products of YuanTiKu, including: [YuanTiKu][YuanTiKu], [YuanSoTi][YuanSoTi], [YuanFuDao][YuanFuDao], [FenBiZhiBoKe][FenBiZhiBoKe].
@@ -76,6 +76,7 @@ YTKNetwork is based on AFNetworking. You can find more detail about version comp
* [maojj][maojjGithub]
* [veecci][veecciGithub]
* [tangqiaoboy][tangqiaoboyGithub]
+ * [skyline75489][skyline75489Github]
## Acknowledgements
@@ -101,3 +102,4 @@ YTKNetwork is available under the MIT license. See the LICENSE file for more inf
[lancyGithub]:https://github.com/lancy
[maojjGithub]:https://github.com/maojj
[veecciGithub]:https://github.com/veecci
+[skyline75489Github]:https://github.com/skyline75489
diff --git a/YTKNetwork.podspec b/YTKNetwork.podspec
old mode 100644
new mode 100755
index 060a7a4..4655d4f
--- a/YTKNetwork.podspec
+++ b/YTKNetwork.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "YTKNetwork"
- s.version = "2.0.1"
+ s.version = "2.0.4"
s.summary = "YTKNetwork is a high level request util based on AFNetworking."
s.homepage = "https://github.com/yuantiku/YTKNetwork"
s.license = "MIT"
diff --git a/YTKNetwork.xcodeproj/project.pbxproj b/YTKNetwork.xcodeproj/project.pbxproj
old mode 100644
new mode 100755
index 9a00758..1216734
--- a/YTKNetwork.xcodeproj/project.pbxproj
+++ b/YTKNetwork.xcodeproj/project.pbxproj
@@ -27,34 +27,8 @@
2D244E451D4ED7910031202D /* YTKNetworkPrivate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E331D4ED7910031202D /* YTKNetworkPrivate.m */; };
2D244E461D4ED7910031202D /* YTKRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E341D4ED7910031202D /* YTKRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
2D244E471D4ED7920031202D /* YTKRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E351D4ED7910031202D /* YTKRequest.m */; };
- 2D244E581D4ED7CB0031202D /* YTKBasicAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E491D4ED7CB0031202D /* YTKBasicAuthRequest.m */; };
- 2D244E591D4ED7CB0031202D /* YTKBasicHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4B1D4ED7CB0031202D /* YTKBasicHTTPRequest.m */; };
- 2D244E5A1D4ED7CB0031202D /* YTKBasicUrlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4D1D4ED7CB0031202D /* YTKBasicUrlFilter.m */; };
- 2D244E5B1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4F1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m */; };
- 2D244E5C1D4ED7CB0031202D /* YTKJSONValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E511D4ED7CB0031202D /* YTKJSONValidatorRequest.m */; };
- 2D244E5D1D4ED7CB0031202D /* YTKJSONValidatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E521D4ED7CB0031202D /* YTKJSONValidatorTests.m */; };
- 2D244E5E1D4ED7CB0031202D /* YTKNetworkRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E531D4ED7CB0031202D /* YTKNetworkRequestTests.m */; };
- 2D244E5F1D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E551D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m */; };
- 2D244E601D4ED7CB0031202D /* YTKTimeoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E571D4ED7CB0031202D /* YTKTimeoutRequest.m */; };
2D244E631D4EDC7E0031202D /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D244E621D4EDC7E0031202D /* AFNetworking.framework */; };
2D244E641D4EDCCA0031202D /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D244E621D4EDC7E0031202D /* AFNetworking.framework */; };
- 2D2F15181D6157590068D5B5 /* YTKCustomCacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F15151D61574B0068D5B5 /* YTKCustomCacheRequest.m */; };
- 2D2F15191D6157590068D5B5 /* YTKCustomCacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F15151D61574B0068D5B5 /* YTKCustomCacheRequest.m */; };
- 2D2F151A1D6157590068D5B5 /* YTKCustomCacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F15151D61574B0068D5B5 /* YTKCustomCacheRequest.m */; };
- 2D2F151D1D6157680068D5B5 /* YTKCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F151B1D6157630068D5B5 /* YTKCacheTests.m */; };
- 2D2F151E1D6157680068D5B5 /* YTKCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F151B1D6157630068D5B5 /* YTKCacheTests.m */; };
- 2D2F151F1D6157690068D5B5 /* YTKCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F151B1D6157630068D5B5 /* YTKCacheTests.m */; };
- 2D2F15221D6157880068D5B5 /* YTKBasicCacheDirFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D2F15201D6157880068D5B5 /* YTKBasicCacheDirFilter.h */; };
- 2D2F15241D6157920068D5B5 /* YTKBasicCacheDirFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F15211D6157880068D5B5 /* YTKBasicCacheDirFilter.m */; };
- 2D2F15251D6157930068D5B5 /* YTKBasicCacheDirFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F15211D6157880068D5B5 /* YTKBasicCacheDirFilter.m */; };
- 2D2F15261D6157930068D5B5 /* YTKBasicCacheDirFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2F15211D6157880068D5B5 /* YTKBasicCacheDirFilter.m */; };
- 2D3D83951D5D91640010788B /* YTKDownloadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D3D83941D5D91640010788B /* YTKDownloadRequest.m */; };
- 2D3D83961D5D91640010788B /* YTKDownloadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D3D83941D5D91640010788B /* YTKDownloadRequest.m */; };
- 2D3D83971D5D91640010788B /* YTKDownloadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D3D83941D5D91640010788B /* YTKDownloadRequest.m */; };
- 2D513AAB1D5080F400E475EA /* YTKRequestFilterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D513AAA1D5080F400E475EA /* YTKRequestFilterTests.m */; };
- 2D53D1001D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D53D0FF1D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m */; };
- 2D53D1011D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D53D0FF1D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m */; };
- 2D53D1021D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D53D0FF1D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m */; };
2D58ADB71D59910500FA6347 /* YTKBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E251D4ED7910031202D /* YTKBaseRequest.m */; };
2D58ADB81D59910500FA6347 /* YTKBatchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E271D4ED7910031202D /* YTKBatchRequest.m */; };
2D58ADB91D59910500FA6347 /* YTKBatchRequestAgent.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E291D4ED7910031202D /* YTKBatchRequestAgent.m */; };
@@ -96,42 +70,10 @@
2D58ADFC1D59987400FA6347 /* YTKChainRequestAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E2C1D4ED7910031202D /* YTKChainRequestAgent.h */; settings = {ATTRIBUTES = (Public, ); }; };
2D58ADFD1D59987400FA6347 /* YTKNetworkAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E2E1D4ED7910031202D /* YTKNetworkAgent.h */; settings = {ATTRIBUTES = (Public, ); }; };
2D58ADFE1D59987400FA6347 /* YTKNetworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E321D4ED7910031202D /* YTKNetworkPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 2D58ADFF1D59994D00FA6347 /* YTKRequestFilterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D513AAA1D5080F400E475EA /* YTKRequestFilterTests.m */; };
- 2D58AE001D59994D00FA6347 /* YTKJSONValidatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E521D4ED7CB0031202D /* YTKJSONValidatorTests.m */; };
- 2D58AE011D59994D00FA6347 /* YTKNetworkRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E531D4ED7CB0031202D /* YTKNetworkRequestTests.m */; };
- 2D58AE021D59994D00FA6347 /* YTKConcurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9714A51D51DA55001EE8CD /* YTKConcurrencyTests.m */; };
- 2D58AE031D59994D00FA6347 /* YTKPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB52D681D520856006B779C /* YTKPerformanceTests.m */; };
- 2D58AE051D59994D00FA6347 /* YTKTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA9B00B1D5082C200D4A1EC /* YTKTestCase.m */; };
- 2D58AE061D59994D00FA6347 /* YTKBasicUrlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4D1D4ED7CB0031202D /* YTKBasicUrlFilter.m */; };
- 2D58AE071D59994D00FA6347 /* YTKBasicAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E491D4ED7CB0031202D /* YTKBasicAuthRequest.m */; };
- 2D58AE081D59994D00FA6347 /* YTKBasicHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4B1D4ED7CB0031202D /* YTKBasicHTTPRequest.m */; };
- 2D58AE091D59994D00FA6347 /* YTKCustomHeaderFieldRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4F1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m */; };
- 2D58AE0A1D59994D00FA6347 /* YTKJSONValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E511D4ED7CB0031202D /* YTKJSONValidatorRequest.m */; };
- 2D58AE0B1D59994D00FA6347 /* YTKStatusCodeValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E551D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m */; };
- 2D58AE0C1D59994D00FA6347 /* YTKTimeoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E571D4ED7CB0031202D /* YTKTimeoutRequest.m */; };
2D58AE0D1D5999CE00FA6347 /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D58ADF21D5997F600FA6347 /* AFNetworking.framework */; };
2D58AE0F1D5999F700FA6347 /* AFNetworking.framework in Copy Framework */ = {isa = PBXBuildFile; fileRef = 2D58ADF21D5997F600FA6347 /* AFNetworking.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2D6B77451D599C6F000C3BF2 /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DC79A851D599B9600197527 /* AFNetworking.framework */; };
2D6B77471D599C83000C3BF2 /* AFNetworking.framework in Copy Framework */ = {isa = PBXBuildFile; fileRef = 2DC79A851D599B9600197527 /* AFNetworking.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 2D6B77481D599CAC000C3BF2 /* YTKRequestFilterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D513AAA1D5080F400E475EA /* YTKRequestFilterTests.m */; };
- 2D6B77491D599CAC000C3BF2 /* YTKJSONValidatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E521D4ED7CB0031202D /* YTKJSONValidatorTests.m */; };
- 2D6B774A1D599CAC000C3BF2 /* YTKNetworkRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E531D4ED7CB0031202D /* YTKNetworkRequestTests.m */; };
- 2D6B774B1D599CAC000C3BF2 /* YTKConcurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9714A51D51DA55001EE8CD /* YTKConcurrencyTests.m */; };
- 2D6B774C1D599CAC000C3BF2 /* YTKPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB52D681D520856006B779C /* YTKPerformanceTests.m */; };
- 2D6B774D1D599CAC000C3BF2 /* YTKTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA9B00B1D5082C200D4A1EC /* YTKTestCase.m */; };
- 2D6B774E1D599CAC000C3BF2 /* YTKBasicUrlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4D1D4ED7CB0031202D /* YTKBasicUrlFilter.m */; };
- 2D6B774F1D599CAC000C3BF2 /* YTKBasicAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E491D4ED7CB0031202D /* YTKBasicAuthRequest.m */; };
- 2D6B77501D599CAC000C3BF2 /* YTKBasicHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4B1D4ED7CB0031202D /* YTKBasicHTTPRequest.m */; };
- 2D6B77511D599CAC000C3BF2 /* YTKCustomHeaderFieldRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E4F1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m */; };
- 2D6B77521D599CAC000C3BF2 /* YTKJSONValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E511D4ED7CB0031202D /* YTKJSONValidatorRequest.m */; };
- 2D6B77531D599CAC000C3BF2 /* YTKStatusCodeValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E551D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m */; };
- 2D6B77541D599CAC000C3BF2 /* YTKTimeoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E571D4ED7CB0031202D /* YTKTimeoutRequest.m */; };
- 2D9714A61D51DA55001EE8CD /* YTKConcurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9714A51D51DA55001EE8CD /* YTKConcurrencyTests.m */; };
- 2DA2F16A1D5B236500244CDC /* YTKNetworkPrivateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA2F1691D5B236500244CDC /* YTKNetworkPrivateTests.m */; };
- 2DA2F16B1D5B236500244CDC /* YTKNetworkPrivateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA2F1691D5B236500244CDC /* YTKNetworkPrivateTests.m */; };
- 2DA2F16C1D5B236500244CDC /* YTKNetworkPrivateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA2F1691D5B236500244CDC /* YTKNetworkPrivateTests.m */; };
- 2DA9B00C1D5082C200D4A1EC /* YTKTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DA9B00B1D5082C200D4A1EC /* YTKTestCase.m */; };
- 2DB52D691D520856006B779C /* YTKPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DB52D681D520856006B779C /* YTKPerformanceTests.m */; };
2DC79A6E1D599B0F00197527 /* YTKNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DC79A651D599B0F00197527 /* YTKNetwork.framework */; };
2DC79A7C1D599B6B00197527 /* YTKBaseRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E251D4ED7910031202D /* YTKBaseRequest.m */; };
2DC79A7D1D599B6B00197527 /* YTKBatchRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D244E271D4ED7910031202D /* YTKBatchRequest.m */; };
@@ -153,10 +95,67 @@
2DC79A8F1D599C1C00197527 /* YTKNetworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E321D4ED7910031202D /* YTKNetworkPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
2DC79A901D599C1C00197527 /* YTKRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E341D4ED7910031202D /* YTKRequest.h */; settings = {ATTRIBUTES = (Public, ); }; };
2DC79A911D599C1C00197527 /* YTKNetwork.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D244E0C1D4ED6470031202D /* YTKNetwork.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 2DCEC2ED1D5AFBBD00A5BB24 /* YTKXMLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DCEC2EC1D5AFBBD00A5BB24 /* YTKXMLRequest.m */; };
- 2DCEC2EE1D5AFBBD00A5BB24 /* YTKXMLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DCEC2EC1D5AFBBD00A5BB24 /* YTKXMLRequest.m */; };
- 2DCEC2EF1D5AFBBD00A5BB24 /* YTKXMLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DCEC2EC1D5AFBBD00A5BB24 /* YTKXMLRequest.m */; };
2DCFCBF71D4EE10D002CAC24 /* AFNetworking.framework in Copy Framework */ = {isa = PBXBuildFile; fileRef = 2D244E621D4EDC7E0031202D /* AFNetworking.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 2DDCF9C41DA7B71600F5793B /* YTKCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BA1DA7B71600F5793B /* YTKCacheTests.m */; };
+ 2DDCF9C51DA7B71600F5793B /* YTKCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BA1DA7B71600F5793B /* YTKCacheTests.m */; };
+ 2DDCF9C61DA7B71600F5793B /* YTKCacheTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BA1DA7B71600F5793B /* YTKCacheTests.m */; };
+ 2DDCF9C71DA7B71600F5793B /* YTKConcurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BB1DA7B71600F5793B /* YTKConcurrencyTests.m */; };
+ 2DDCF9C81DA7B71600F5793B /* YTKConcurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BB1DA7B71600F5793B /* YTKConcurrencyTests.m */; };
+ 2DDCF9C91DA7B71600F5793B /* YTKConcurrencyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BB1DA7B71600F5793B /* YTKConcurrencyTests.m */; };
+ 2DDCF9CA1DA7B71600F5793B /* YTKJSONValidatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BC1DA7B71600F5793B /* YTKJSONValidatorTests.m */; };
+ 2DDCF9CB1DA7B71600F5793B /* YTKJSONValidatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BC1DA7B71600F5793B /* YTKJSONValidatorTests.m */; };
+ 2DDCF9CC1DA7B71600F5793B /* YTKJSONValidatorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BC1DA7B71600F5793B /* YTKJSONValidatorTests.m */; };
+ 2DDCF9D01DA7B71600F5793B /* YTKNetworkRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BE1DA7B71600F5793B /* YTKNetworkRequestTests.m */; };
+ 2DDCF9D11DA7B71600F5793B /* YTKNetworkRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BE1DA7B71600F5793B /* YTKNetworkRequestTests.m */; };
+ 2DDCF9D21DA7B71600F5793B /* YTKNetworkRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BE1DA7B71600F5793B /* YTKNetworkRequestTests.m */; };
+ 2DDCF9D31DA7B71600F5793B /* YTKPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BF1DA7B71600F5793B /* YTKPerformanceTests.m */; };
+ 2DDCF9D41DA7B71600F5793B /* YTKPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BF1DA7B71600F5793B /* YTKPerformanceTests.m */; };
+ 2DDCF9D51DA7B71600F5793B /* YTKPerformanceTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9BF1DA7B71600F5793B /* YTKPerformanceTests.m */; };
+ 2DDCF9D61DA7B71600F5793B /* YTKRequestFilterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C01DA7B71600F5793B /* YTKRequestFilterTests.m */; };
+ 2DDCF9D71DA7B71600F5793B /* YTKRequestFilterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C01DA7B71600F5793B /* YTKRequestFilterTests.m */; };
+ 2DDCF9D81DA7B71600F5793B /* YTKRequestFilterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C01DA7B71600F5793B /* YTKRequestFilterTests.m */; };
+ 2DDCF9D91DA7B71600F5793B /* YTKResumableDownloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C11DA7B71600F5793B /* YTKResumableDownloadTests.m */; };
+ 2DDCF9DA1DA7B71600F5793B /* YTKResumableDownloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C11DA7B71600F5793B /* YTKResumableDownloadTests.m */; };
+ 2DDCF9DB1DA7B71600F5793B /* YTKResumableDownloadTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C11DA7B71600F5793B /* YTKResumableDownloadTests.m */; };
+ 2DDCF9DC1DA7B71600F5793B /* YTKTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C31DA7B71600F5793B /* YTKTestCase.m */; };
+ 2DDCF9DD1DA7B71600F5793B /* YTKTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C31DA7B71600F5793B /* YTKTestCase.m */; };
+ 2DDCF9DE1DA7B71600F5793B /* YTKTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9C31DA7B71600F5793B /* YTKTestCase.m */; };
+ 2DDCF9E31DA7B72B00F5793B /* YTKBasicCacheDirFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9E01DA7B72B00F5793B /* YTKBasicCacheDirFilter.m */; };
+ 2DDCF9E41DA7B72B00F5793B /* YTKBasicCacheDirFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9E01DA7B72B00F5793B /* YTKBasicCacheDirFilter.m */; };
+ 2DDCF9E51DA7B72B00F5793B /* YTKBasicCacheDirFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9E01DA7B72B00F5793B /* YTKBasicCacheDirFilter.m */; };
+ 2DDCF9E61DA7B72B00F5793B /* YTKBasicUrlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9E21DA7B72B00F5793B /* YTKBasicUrlFilter.m */; };
+ 2DDCF9E71DA7B72B00F5793B /* YTKBasicUrlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9E21DA7B72B00F5793B /* YTKBasicUrlFilter.m */; };
+ 2DDCF9E81DA7B72B00F5793B /* YTKBasicUrlFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9E21DA7B72B00F5793B /* YTKBasicUrlFilter.m */; };
+ 2DDCF9FB1DA7B73B00F5793B /* YTKBasicAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EA1DA7B73B00F5793B /* YTKBasicAuthRequest.m */; };
+ 2DDCF9FC1DA7B73B00F5793B /* YTKBasicAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EA1DA7B73B00F5793B /* YTKBasicAuthRequest.m */; };
+ 2DDCF9FD1DA7B73B00F5793B /* YTKBasicAuthRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EA1DA7B73B00F5793B /* YTKBasicAuthRequest.m */; };
+ 2DDCF9FE1DA7B73B00F5793B /* YTKBasicHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EC1DA7B73B00F5793B /* YTKBasicHTTPRequest.m */; };
+ 2DDCF9FF1DA7B73B00F5793B /* YTKBasicHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EC1DA7B73B00F5793B /* YTKBasicHTTPRequest.m */; };
+ 2DDCFA001DA7B73B00F5793B /* YTKBasicHTTPRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EC1DA7B73B00F5793B /* YTKBasicHTTPRequest.m */; };
+ 2DDCFA011DA7B73B00F5793B /* YTKCustomCacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EE1DA7B73B00F5793B /* YTKCustomCacheRequest.m */; };
+ 2DDCFA021DA7B73B00F5793B /* YTKCustomCacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EE1DA7B73B00F5793B /* YTKCustomCacheRequest.m */; };
+ 2DDCFA031DA7B73B00F5793B /* YTKCustomCacheRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9EE1DA7B73B00F5793B /* YTKCustomCacheRequest.m */; };
+ 2DDCFA041DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F01DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m */; };
+ 2DDCFA051DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F01DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m */; };
+ 2DDCFA061DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F01DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m */; };
+ 2DDCFA071DA7B73B00F5793B /* YTKDownloadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F21DA7B73B00F5793B /* YTKDownloadRequest.m */; };
+ 2DDCFA081DA7B73B00F5793B /* YTKDownloadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F21DA7B73B00F5793B /* YTKDownloadRequest.m */; };
+ 2DDCFA091DA7B73B00F5793B /* YTKDownloadRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F21DA7B73B00F5793B /* YTKDownloadRequest.m */; };
+ 2DDCFA0A1DA7B73B00F5793B /* YTKJSONValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F41DA7B73B00F5793B /* YTKJSONValidatorRequest.m */; };
+ 2DDCFA0B1DA7B73B00F5793B /* YTKJSONValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F41DA7B73B00F5793B /* YTKJSONValidatorRequest.m */; };
+ 2DDCFA0C1DA7B73B00F5793B /* YTKJSONValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F41DA7B73B00F5793B /* YTKJSONValidatorRequest.m */; };
+ 2DDCFA0D1DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F61DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m */; };
+ 2DDCFA0E1DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F61DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m */; };
+ 2DDCFA0F1DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F61DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m */; };
+ 2DDCFA101DA7B73B00F5793B /* YTKTimeoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F81DA7B73B00F5793B /* YTKTimeoutRequest.m */; };
+ 2DDCFA111DA7B73B00F5793B /* YTKTimeoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F81DA7B73B00F5793B /* YTKTimeoutRequest.m */; };
+ 2DDCFA121DA7B73B00F5793B /* YTKTimeoutRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9F81DA7B73B00F5793B /* YTKTimeoutRequest.m */; };
+ 2DDCFA131DA7B73B00F5793B /* YTKXMLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9FA1DA7B73B00F5793B /* YTKXMLRequest.m */; };
+ 2DDCFA141DA7B73B00F5793B /* YTKXMLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9FA1DA7B73B00F5793B /* YTKXMLRequest.m */; };
+ 2DDCFA151DA7B73B00F5793B /* YTKXMLRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DDCF9FA1DA7B73B00F5793B /* YTKXMLRequest.m */; };
+ 2DF836161DA7CA190076B1EB /* NSString+YTKUrlUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DF836131DA7C7FB0076B1EB /* NSString+YTKUrlUtils.m */; };
+ 2DF836171DA7CA1B0076B1EB /* NSString+YTKUrlUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DF836131DA7C7FB0076B1EB /* NSString+YTKUrlUtils.m */; };
+ 2DF836181DA7CA1B0076B1EB /* NSString+YTKUrlUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DF836131DA7C7FB0076B1EB /* NSString+YTKUrlUtils.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -243,47 +242,48 @@
2D244E331D4ED7910031202D /* YTKNetworkPrivate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKNetworkPrivate.m; path = YTKNetwork/YTKNetworkPrivate.m; sourceTree = ""; };
2D244E341D4ED7910031202D /* YTKRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKRequest.h; path = YTKNetwork/YTKRequest.h; sourceTree = ""; };
2D244E351D4ED7910031202D /* YTKRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKRequest.m; path = YTKNetwork/YTKRequest.m; sourceTree = ""; };
- 2D244E481D4ED7CB0031202D /* YTKBasicAuthRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKBasicAuthRequest.h; sourceTree = ""; };
- 2D244E491D4ED7CB0031202D /* YTKBasicAuthRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKBasicAuthRequest.m; sourceTree = ""; };
- 2D244E4A1D4ED7CB0031202D /* YTKBasicHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKBasicHTTPRequest.h; sourceTree = ""; };
- 2D244E4B1D4ED7CB0031202D /* YTKBasicHTTPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKBasicHTTPRequest.m; sourceTree = ""; };
- 2D244E4C1D4ED7CB0031202D /* YTKBasicUrlFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKBasicUrlFilter.h; sourceTree = ""; };
- 2D244E4D1D4ED7CB0031202D /* YTKBasicUrlFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKBasicUrlFilter.m; sourceTree = ""; };
- 2D244E4E1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKCustomHeaderFieldRequest.h; sourceTree = ""; };
- 2D244E4F1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKCustomHeaderFieldRequest.m; sourceTree = ""; };
- 2D244E501D4ED7CB0031202D /* YTKJSONValidatorRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKJSONValidatorRequest.h; sourceTree = ""; };
- 2D244E511D4ED7CB0031202D /* YTKJSONValidatorRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKJSONValidatorRequest.m; sourceTree = ""; };
- 2D244E521D4ED7CB0031202D /* YTKJSONValidatorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKJSONValidatorTests.m; sourceTree = ""; };
- 2D244E531D4ED7CB0031202D /* YTKNetworkRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKNetworkRequestTests.m; sourceTree = ""; };
- 2D244E541D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKStatusCodeValidatorRequest.h; sourceTree = ""; };
- 2D244E551D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKStatusCodeValidatorRequest.m; sourceTree = ""; };
- 2D244E561D4ED7CB0031202D /* YTKTimeoutRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKTimeoutRequest.h; sourceTree = ""; };
- 2D244E571D4ED7CB0031202D /* YTKTimeoutRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKTimeoutRequest.m; sourceTree = ""; };
2D244E621D4EDC7E0031202D /* AFNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AFNetworking.framework; path = Carthage/Build/iOS/AFNetworking.framework; sourceTree = ""; };
- 2D2F15141D61574B0068D5B5 /* YTKCustomCacheRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKCustomCacheRequest.h; sourceTree = ""; };
- 2D2F15151D61574B0068D5B5 /* YTKCustomCacheRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKCustomCacheRequest.m; sourceTree = ""; };
- 2D2F151B1D6157630068D5B5 /* YTKCacheTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKCacheTests.m; sourceTree = ""; };
- 2D2F15201D6157880068D5B5 /* YTKBasicCacheDirFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKBasicCacheDirFilter.h; sourceTree = ""; };
- 2D2F15211D6157880068D5B5 /* YTKBasicCacheDirFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKBasicCacheDirFilter.m; sourceTree = ""; };
- 2D3D83931D5D91640010788B /* YTKDownloadRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKDownloadRequest.h; sourceTree = ""; };
- 2D3D83941D5D91640010788B /* YTKDownloadRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKDownloadRequest.m; sourceTree = ""; };
- 2D513AAA1D5080F400E475EA /* YTKRequestFilterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKRequestFilterTests.m; sourceTree = ""; };
- 2D53D0FF1D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKResumableDownloadTests.m; sourceTree = ""; };
2D58ADAF1D598FE700FA6347 /* YTKNetwork.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = YTKNetwork.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2D58ADCA1D5993FB00FA6347 /* AFNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AFNetworking.framework; path = Carthage/Build/watchOS/AFNetworking.framework; sourceTree = ""; };
2D58ADD21D59973D00FA6347 /* YTKNetwork.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = YTKNetwork.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2D58ADDB1D59973D00FA6347 /* YTKNetwork tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "YTKNetwork tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2D58ADF21D5997F600FA6347 /* AFNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AFNetworking.framework; path = Carthage/Build/tvOS/AFNetworking.framework; sourceTree = ""; };
- 2D9714A51D51DA55001EE8CD /* YTKConcurrencyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKConcurrencyTests.m; sourceTree = ""; };
- 2DA2F1691D5B236500244CDC /* YTKNetworkPrivateTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKNetworkPrivateTests.m; sourceTree = ""; };
- 2DA9B00A1D5082C200D4A1EC /* YTKTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKTestCase.h; sourceTree = ""; };
- 2DA9B00B1D5082C200D4A1EC /* YTKTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKTestCase.m; sourceTree = ""; };
- 2DB52D681D520856006B779C /* YTKPerformanceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKPerformanceTests.m; sourceTree = ""; };
2DC79A651D599B0F00197527 /* YTKNetwork.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = YTKNetwork.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2DC79A6D1D599B0F00197527 /* YTKNetwork macOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "YTKNetwork macOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
2DC79A851D599B9600197527 /* AFNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AFNetworking.framework; path = Carthage/Build/Mac/AFNetworking.framework; sourceTree = ""; };
- 2DCEC2EB1D5AFBBD00A5BB24 /* YTKXMLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YTKXMLRequest.h; sourceTree = ""; };
- 2DCEC2EC1D5AFBBD00A5BB24 /* YTKXMLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YTKXMLRequest.m; sourceTree = ""; };
+ 2DDCF9BA1DA7B71600F5793B /* YTKCacheTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKCacheTests.m; path = "Test Cases/YTKCacheTests.m"; sourceTree = ""; };
+ 2DDCF9BB1DA7B71600F5793B /* YTKConcurrencyTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKConcurrencyTests.m; path = "Test Cases/YTKConcurrencyTests.m"; sourceTree = ""; };
+ 2DDCF9BC1DA7B71600F5793B /* YTKJSONValidatorTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKJSONValidatorTests.m; path = "Test Cases/YTKJSONValidatorTests.m"; sourceTree = ""; };
+ 2DDCF9BE1DA7B71600F5793B /* YTKNetworkRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKNetworkRequestTests.m; path = "Test Cases/YTKNetworkRequestTests.m"; sourceTree = ""; };
+ 2DDCF9BF1DA7B71600F5793B /* YTKPerformanceTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKPerformanceTests.m; path = "Test Cases/YTKPerformanceTests.m"; sourceTree = ""; };
+ 2DDCF9C01DA7B71600F5793B /* YTKRequestFilterTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKRequestFilterTests.m; path = "Test Cases/YTKRequestFilterTests.m"; sourceTree = ""; };
+ 2DDCF9C11DA7B71600F5793B /* YTKResumableDownloadTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKResumableDownloadTests.m; path = "Test Cases/YTKResumableDownloadTests.m"; sourceTree = ""; };
+ 2DDCF9C21DA7B71600F5793B /* YTKTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKTestCase.h; path = "Test Cases/YTKTestCase.h"; sourceTree = ""; };
+ 2DDCF9C31DA7B71600F5793B /* YTKTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKTestCase.m; path = "Test Cases/YTKTestCase.m"; sourceTree = ""; };
+ 2DDCF9DF1DA7B72B00F5793B /* YTKBasicCacheDirFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKBasicCacheDirFilter.h; path = Utils/YTKBasicCacheDirFilter.h; sourceTree = ""; };
+ 2DDCF9E01DA7B72B00F5793B /* YTKBasicCacheDirFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKBasicCacheDirFilter.m; path = Utils/YTKBasicCacheDirFilter.m; sourceTree = ""; };
+ 2DDCF9E11DA7B72B00F5793B /* YTKBasicUrlFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKBasicUrlFilter.h; path = Utils/YTKBasicUrlFilter.h; sourceTree = ""; };
+ 2DDCF9E21DA7B72B00F5793B /* YTKBasicUrlFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKBasicUrlFilter.m; path = Utils/YTKBasicUrlFilter.m; sourceTree = ""; };
+ 2DDCF9E91DA7B73B00F5793B /* YTKBasicAuthRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKBasicAuthRequest.h; path = Requests/YTKBasicAuthRequest.h; sourceTree = ""; };
+ 2DDCF9EA1DA7B73B00F5793B /* YTKBasicAuthRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKBasicAuthRequest.m; path = Requests/YTKBasicAuthRequest.m; sourceTree = ""; };
+ 2DDCF9EB1DA7B73B00F5793B /* YTKBasicHTTPRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKBasicHTTPRequest.h; path = Requests/YTKBasicHTTPRequest.h; sourceTree = ""; };
+ 2DDCF9EC1DA7B73B00F5793B /* YTKBasicHTTPRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKBasicHTTPRequest.m; path = Requests/YTKBasicHTTPRequest.m; sourceTree = ""; };
+ 2DDCF9ED1DA7B73B00F5793B /* YTKCustomCacheRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKCustomCacheRequest.h; path = Requests/YTKCustomCacheRequest.h; sourceTree = ""; };
+ 2DDCF9EE1DA7B73B00F5793B /* YTKCustomCacheRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKCustomCacheRequest.m; path = Requests/YTKCustomCacheRequest.m; sourceTree = ""; };
+ 2DDCF9EF1DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKCustomHeaderFieldRequest.h; path = Requests/YTKCustomHeaderFieldRequest.h; sourceTree = ""; };
+ 2DDCF9F01DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKCustomHeaderFieldRequest.m; path = Requests/YTKCustomHeaderFieldRequest.m; sourceTree = ""; };
+ 2DDCF9F11DA7B73B00F5793B /* YTKDownloadRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKDownloadRequest.h; path = Requests/YTKDownloadRequest.h; sourceTree = ""; };
+ 2DDCF9F21DA7B73B00F5793B /* YTKDownloadRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKDownloadRequest.m; path = Requests/YTKDownloadRequest.m; sourceTree = ""; };
+ 2DDCF9F31DA7B73B00F5793B /* YTKJSONValidatorRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKJSONValidatorRequest.h; path = Requests/YTKJSONValidatorRequest.h; sourceTree = ""; };
+ 2DDCF9F41DA7B73B00F5793B /* YTKJSONValidatorRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKJSONValidatorRequest.m; path = Requests/YTKJSONValidatorRequest.m; sourceTree = ""; };
+ 2DDCF9F51DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKStatusCodeValidatorRequest.h; path = Requests/YTKStatusCodeValidatorRequest.h; sourceTree = ""; };
+ 2DDCF9F61DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKStatusCodeValidatorRequest.m; path = Requests/YTKStatusCodeValidatorRequest.m; sourceTree = ""; };
+ 2DDCF9F71DA7B73B00F5793B /* YTKTimeoutRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKTimeoutRequest.h; path = Requests/YTKTimeoutRequest.h; sourceTree = ""; };
+ 2DDCF9F81DA7B73B00F5793B /* YTKTimeoutRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKTimeoutRequest.m; path = Requests/YTKTimeoutRequest.m; sourceTree = ""; };
+ 2DDCF9F91DA7B73B00F5793B /* YTKXMLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = YTKXMLRequest.h; path = Requests/YTKXMLRequest.h; sourceTree = ""; };
+ 2DDCF9FA1DA7B73B00F5793B /* YTKXMLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = YTKXMLRequest.m; path = Requests/YTKXMLRequest.m; sourceTree = ""; };
+ 2DF836121DA7C7FB0076B1EB /* NSString+YTKUrlUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+YTKUrlUtils.h"; path = "Utils/NSString+YTKUrlUtils.h"; sourceTree = ""; };
+ 2DF836131DA7C7FB0076B1EB /* NSString+YTKUrlUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+YTKUrlUtils.m"; path = "Utils/NSString+YTKUrlUtils.m"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -434,10 +434,12 @@
2D513AAC1D50810800E475EA /* Utils */ = {
isa = PBXGroup;
children = (
- 2D244E4C1D4ED7CB0031202D /* YTKBasicUrlFilter.h */,
- 2D244E4D1D4ED7CB0031202D /* YTKBasicUrlFilter.m */,
- 2D2F15201D6157880068D5B5 /* YTKBasicCacheDirFilter.h */,
- 2D2F15211D6157880068D5B5 /* YTKBasicCacheDirFilter.m */,
+ 2DDCF9DF1DA7B72B00F5793B /* YTKBasicCacheDirFilter.h */,
+ 2DDCF9E01DA7B72B00F5793B /* YTKBasicCacheDirFilter.m */,
+ 2DDCF9E11DA7B72B00F5793B /* YTKBasicUrlFilter.h */,
+ 2DDCF9E21DA7B72B00F5793B /* YTKBasicUrlFilter.m */,
+ 2DF836121DA7C7FB0076B1EB /* NSString+YTKUrlUtils.h */,
+ 2DF836131DA7C7FB0076B1EB /* NSString+YTKUrlUtils.m */,
);
name = Utils;
sourceTree = "";
@@ -445,16 +447,15 @@
2D513AAD1D50811300E475EA /* Test Cases */ = {
isa = PBXGroup;
children = (
- 2D2F151B1D6157630068D5B5 /* YTKCacheTests.m */,
- 2D513AAA1D5080F400E475EA /* YTKRequestFilterTests.m */,
- 2D244E521D4ED7CB0031202D /* YTKJSONValidatorTests.m */,
- 2DA2F1691D5B236500244CDC /* YTKNetworkPrivateTests.m */,
- 2D244E531D4ED7CB0031202D /* YTKNetworkRequestTests.m */,
- 2D9714A51D51DA55001EE8CD /* YTKConcurrencyTests.m */,
- 2DB52D681D520856006B779C /* YTKPerformanceTests.m */,
- 2D53D0FF1D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m */,
- 2DA9B00A1D5082C200D4A1EC /* YTKTestCase.h */,
- 2DA9B00B1D5082C200D4A1EC /* YTKTestCase.m */,
+ 2DDCF9BA1DA7B71600F5793B /* YTKCacheTests.m */,
+ 2DDCF9BB1DA7B71600F5793B /* YTKConcurrencyTests.m */,
+ 2DDCF9BC1DA7B71600F5793B /* YTKJSONValidatorTests.m */,
+ 2DDCF9BE1DA7B71600F5793B /* YTKNetworkRequestTests.m */,
+ 2DDCF9BF1DA7B71600F5793B /* YTKPerformanceTests.m */,
+ 2DDCF9C01DA7B71600F5793B /* YTKRequestFilterTests.m */,
+ 2DDCF9C11DA7B71600F5793B /* YTKResumableDownloadTests.m */,
+ 2DDCF9C21DA7B71600F5793B /* YTKTestCase.h */,
+ 2DDCF9C31DA7B71600F5793B /* YTKTestCase.m */,
);
name = "Test Cases";
sourceTree = "";
@@ -462,24 +463,24 @@
2DAB7EA81D50227D009F6257 /* Requests */ = {
isa = PBXGroup;
children = (
- 2D244E481D4ED7CB0031202D /* YTKBasicAuthRequest.h */,
- 2D244E491D4ED7CB0031202D /* YTKBasicAuthRequest.m */,
- 2D244E4A1D4ED7CB0031202D /* YTKBasicHTTPRequest.h */,
- 2D244E4B1D4ED7CB0031202D /* YTKBasicHTTPRequest.m */,
- 2DCEC2EB1D5AFBBD00A5BB24 /* YTKXMLRequest.h */,
- 2DCEC2EC1D5AFBBD00A5BB24 /* YTKXMLRequest.m */,
- 2D244E4E1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.h */,
- 2D244E4F1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m */,
- 2D244E501D4ED7CB0031202D /* YTKJSONValidatorRequest.h */,
- 2D244E511D4ED7CB0031202D /* YTKJSONValidatorRequest.m */,
- 2D244E541D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.h */,
- 2D244E551D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m */,
- 2D244E561D4ED7CB0031202D /* YTKTimeoutRequest.h */,
- 2D244E571D4ED7CB0031202D /* YTKTimeoutRequest.m */,
- 2D3D83931D5D91640010788B /* YTKDownloadRequest.h */,
- 2D3D83941D5D91640010788B /* YTKDownloadRequest.m */,
- 2D2F15141D61574B0068D5B5 /* YTKCustomCacheRequest.h */,
- 2D2F15151D61574B0068D5B5 /* YTKCustomCacheRequest.m */,
+ 2DDCF9E91DA7B73B00F5793B /* YTKBasicAuthRequest.h */,
+ 2DDCF9EA1DA7B73B00F5793B /* YTKBasicAuthRequest.m */,
+ 2DDCF9EB1DA7B73B00F5793B /* YTKBasicHTTPRequest.h */,
+ 2DDCF9EC1DA7B73B00F5793B /* YTKBasicHTTPRequest.m */,
+ 2DDCF9ED1DA7B73B00F5793B /* YTKCustomCacheRequest.h */,
+ 2DDCF9EE1DA7B73B00F5793B /* YTKCustomCacheRequest.m */,
+ 2DDCF9EF1DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.h */,
+ 2DDCF9F01DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m */,
+ 2DDCF9F11DA7B73B00F5793B /* YTKDownloadRequest.h */,
+ 2DDCF9F21DA7B73B00F5793B /* YTKDownloadRequest.m */,
+ 2DDCF9F31DA7B73B00F5793B /* YTKJSONValidatorRequest.h */,
+ 2DDCF9F41DA7B73B00F5793B /* YTKJSONValidatorRequest.m */,
+ 2DDCF9F51DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.h */,
+ 2DDCF9F61DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m */,
+ 2DDCF9F71DA7B73B00F5793B /* YTKTimeoutRequest.h */,
+ 2DDCF9F81DA7B73B00F5793B /* YTKTimeoutRequest.m */,
+ 2DDCF9F91DA7B73B00F5793B /* YTKXMLRequest.h */,
+ 2DDCF9FA1DA7B73B00F5793B /* YTKXMLRequest.m */,
);
name = Requests;
sourceTree = "";
@@ -499,7 +500,6 @@
2D244E3E1D4ED7910031202D /* YTKChainRequestAgent.h in Headers */,
2D244E3A1D4ED7910031202D /* YTKBatchRequestAgent.h in Headers */,
2D244E401D4ED7910031202D /* YTKNetworkAgent.h in Headers */,
- 2D2F15221D6157880068D5B5 /* YTKBasicCacheDirFilter.h in Headers */,
2D244E0D1D4ED6470031202D /* YTKNetwork.h in Headers */,
2D244E441D4ED7910031202D /* YTKNetworkPrivate.h in Headers */,
);
@@ -694,7 +694,7 @@
2D244E001D4ED6460031202D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0730;
+ LastUpgradeCheck = 0800;
ORGANIZATIONNAME = skyline;
TargetAttributes = {
2D244E081D4ED6470031202D = {
@@ -822,26 +822,26 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 2D244E601D4ED7CB0031202D /* YTKTimeoutRequest.m in Sources */,
- 2D2F151D1D6157680068D5B5 /* YTKCacheTests.m in Sources */,
- 2D244E5F1D4ED7CB0031202D /* YTKStatusCodeValidatorRequest.m in Sources */,
- 2D3D83951D5D91640010788B /* YTKDownloadRequest.m in Sources */,
- 2D244E5C1D4ED7CB0031202D /* YTKJSONValidatorRequest.m in Sources */,
- 2D2F15181D6157590068D5B5 /* YTKCustomCacheRequest.m in Sources */,
- 2D244E5D1D4ED7CB0031202D /* YTKJSONValidatorTests.m in Sources */,
- 2D9714A61D51DA55001EE8CD /* YTKConcurrencyTests.m in Sources */,
- 2DB52D691D520856006B779C /* YTKPerformanceTests.m in Sources */,
- 2D244E5A1D4ED7CB0031202D /* YTKBasicUrlFilter.m in Sources */,
- 2D244E5B1D4ED7CB0031202D /* YTKCustomHeaderFieldRequest.m in Sources */,
- 2DCEC2ED1D5AFBBD00A5BB24 /* YTKXMLRequest.m in Sources */,
- 2D53D1001D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m in Sources */,
- 2D244E581D4ED7CB0031202D /* YTKBasicAuthRequest.m in Sources */,
- 2D2F15241D6157920068D5B5 /* YTKBasicCacheDirFilter.m in Sources */,
- 2D244E5E1D4ED7CB0031202D /* YTKNetworkRequestTests.m in Sources */,
- 2D513AAB1D5080F400E475EA /* YTKRequestFilterTests.m in Sources */,
- 2D244E591D4ED7CB0031202D /* YTKBasicHTTPRequest.m in Sources */,
- 2DA9B00C1D5082C200D4A1EC /* YTKTestCase.m in Sources */,
- 2DA2F16A1D5B236500244CDC /* YTKNetworkPrivateTests.m in Sources */,
+ 2DDCFA101DA7B73B00F5793B /* YTKTimeoutRequest.m in Sources */,
+ 2DDCFA0A1DA7B73B00F5793B /* YTKJSONValidatorRequest.m in Sources */,
+ 2DDCF9C71DA7B71600F5793B /* YTKConcurrencyTests.m in Sources */,
+ 2DDCFA0D1DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m in Sources */,
+ 2DF836161DA7CA190076B1EB /* NSString+YTKUrlUtils.m in Sources */,
+ 2DDCF9D91DA7B71600F5793B /* YTKResumableDownloadTests.m in Sources */,
+ 2DDCFA041DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m in Sources */,
+ 2DDCF9D01DA7B71600F5793B /* YTKNetworkRequestTests.m in Sources */,
+ 2DDCF9CA1DA7B71600F5793B /* YTKJSONValidatorTests.m in Sources */,
+ 2DDCFA131DA7B73B00F5793B /* YTKXMLRequest.m in Sources */,
+ 2DDCF9E61DA7B72B00F5793B /* YTKBasicUrlFilter.m in Sources */,
+ 2DDCF9E31DA7B72B00F5793B /* YTKBasicCacheDirFilter.m in Sources */,
+ 2DDCF9C41DA7B71600F5793B /* YTKCacheTests.m in Sources */,
+ 2DDCFA071DA7B73B00F5793B /* YTKDownloadRequest.m in Sources */,
+ 2DDCF9D31DA7B71600F5793B /* YTKPerformanceTests.m in Sources */,
+ 2DDCF9FE1DA7B73B00F5793B /* YTKBasicHTTPRequest.m in Sources */,
+ 2DDCFA011DA7B73B00F5793B /* YTKCustomCacheRequest.m in Sources */,
+ 2DDCF9FB1DA7B73B00F5793B /* YTKBasicAuthRequest.m in Sources */,
+ 2DDCF9DC1DA7B71600F5793B /* YTKTestCase.m in Sources */,
+ 2DDCF9D61DA7B71600F5793B /* YTKRequestFilterTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -881,26 +881,26 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 2D58ADFF1D59994D00FA6347 /* YTKRequestFilterTests.m in Sources */,
- 2D2F151F1D6157690068D5B5 /* YTKCacheTests.m in Sources */,
- 2D58AE001D59994D00FA6347 /* YTKJSONValidatorTests.m in Sources */,
- 2D3D83971D5D91640010788B /* YTKDownloadRequest.m in Sources */,
- 2D58AE011D59994D00FA6347 /* YTKNetworkRequestTests.m in Sources */,
- 2D2F151A1D6157590068D5B5 /* YTKCustomCacheRequest.m in Sources */,
- 2D58AE021D59994D00FA6347 /* YTKConcurrencyTests.m in Sources */,
- 2D58AE031D59994D00FA6347 /* YTKPerformanceTests.m in Sources */,
- 2D58AE051D59994D00FA6347 /* YTKTestCase.m in Sources */,
- 2D58AE061D59994D00FA6347 /* YTKBasicUrlFilter.m in Sources */,
- 2D58AE071D59994D00FA6347 /* YTKBasicAuthRequest.m in Sources */,
- 2DCEC2EF1D5AFBBD00A5BB24 /* YTKXMLRequest.m in Sources */,
- 2D53D1021D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m in Sources */,
- 2D58AE081D59994D00FA6347 /* YTKBasicHTTPRequest.m in Sources */,
- 2D2F15261D6157930068D5B5 /* YTKBasicCacheDirFilter.m in Sources */,
- 2D58AE091D59994D00FA6347 /* YTKCustomHeaderFieldRequest.m in Sources */,
- 2D58AE0A1D59994D00FA6347 /* YTKJSONValidatorRequest.m in Sources */,
- 2D58AE0B1D59994D00FA6347 /* YTKStatusCodeValidatorRequest.m in Sources */,
- 2D58AE0C1D59994D00FA6347 /* YTKTimeoutRequest.m in Sources */,
- 2DA2F16C1D5B236500244CDC /* YTKNetworkPrivateTests.m in Sources */,
+ 2DDCFA121DA7B73B00F5793B /* YTKTimeoutRequest.m in Sources */,
+ 2DDCFA0C1DA7B73B00F5793B /* YTKJSONValidatorRequest.m in Sources */,
+ 2DDCF9C91DA7B71600F5793B /* YTKConcurrencyTests.m in Sources */,
+ 2DDCFA0F1DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m in Sources */,
+ 2DF836181DA7CA1B0076B1EB /* NSString+YTKUrlUtils.m in Sources */,
+ 2DDCF9DB1DA7B71600F5793B /* YTKResumableDownloadTests.m in Sources */,
+ 2DDCFA061DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m in Sources */,
+ 2DDCF9D21DA7B71600F5793B /* YTKNetworkRequestTests.m in Sources */,
+ 2DDCF9CC1DA7B71600F5793B /* YTKJSONValidatorTests.m in Sources */,
+ 2DDCFA151DA7B73B00F5793B /* YTKXMLRequest.m in Sources */,
+ 2DDCF9E81DA7B72B00F5793B /* YTKBasicUrlFilter.m in Sources */,
+ 2DDCF9E51DA7B72B00F5793B /* YTKBasicCacheDirFilter.m in Sources */,
+ 2DDCF9C61DA7B71600F5793B /* YTKCacheTests.m in Sources */,
+ 2DDCFA091DA7B73B00F5793B /* YTKDownloadRequest.m in Sources */,
+ 2DDCF9D51DA7B71600F5793B /* YTKPerformanceTests.m in Sources */,
+ 2DDCFA001DA7B73B00F5793B /* YTKBasicHTTPRequest.m in Sources */,
+ 2DDCFA031DA7B73B00F5793B /* YTKCustomCacheRequest.m in Sources */,
+ 2DDCF9FD1DA7B73B00F5793B /* YTKBasicAuthRequest.m in Sources */,
+ 2DDCF9DE1DA7B71600F5793B /* YTKTestCase.m in Sources */,
+ 2DDCF9D81DA7B71600F5793B /* YTKRequestFilterTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -924,26 +924,26 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 2D6B77481D599CAC000C3BF2 /* YTKRequestFilterTests.m in Sources */,
- 2D2F151E1D6157680068D5B5 /* YTKCacheTests.m in Sources */,
- 2D6B77491D599CAC000C3BF2 /* YTKJSONValidatorTests.m in Sources */,
- 2D3D83961D5D91640010788B /* YTKDownloadRequest.m in Sources */,
- 2D6B774A1D599CAC000C3BF2 /* YTKNetworkRequestTests.m in Sources */,
- 2D2F15191D6157590068D5B5 /* YTKCustomCacheRequest.m in Sources */,
- 2D6B774B1D599CAC000C3BF2 /* YTKConcurrencyTests.m in Sources */,
- 2D6B774C1D599CAC000C3BF2 /* YTKPerformanceTests.m in Sources */,
- 2D6B774D1D599CAC000C3BF2 /* YTKTestCase.m in Sources */,
- 2D6B774E1D599CAC000C3BF2 /* YTKBasicUrlFilter.m in Sources */,
- 2D6B774F1D599CAC000C3BF2 /* YTKBasicAuthRequest.m in Sources */,
- 2DCEC2EE1D5AFBBD00A5BB24 /* YTKXMLRequest.m in Sources */,
- 2D53D1011D5D71CA00B2B6C8 /* YTKResumableDownloadTests.m in Sources */,
- 2D6B77501D599CAC000C3BF2 /* YTKBasicHTTPRequest.m in Sources */,
- 2D2F15251D6157930068D5B5 /* YTKBasicCacheDirFilter.m in Sources */,
- 2D6B77511D599CAC000C3BF2 /* YTKCustomHeaderFieldRequest.m in Sources */,
- 2D6B77521D599CAC000C3BF2 /* YTKJSONValidatorRequest.m in Sources */,
- 2D6B77531D599CAC000C3BF2 /* YTKStatusCodeValidatorRequest.m in Sources */,
- 2D6B77541D599CAC000C3BF2 /* YTKTimeoutRequest.m in Sources */,
- 2DA2F16B1D5B236500244CDC /* YTKNetworkPrivateTests.m in Sources */,
+ 2DDCFA111DA7B73B00F5793B /* YTKTimeoutRequest.m in Sources */,
+ 2DDCFA0B1DA7B73B00F5793B /* YTKJSONValidatorRequest.m in Sources */,
+ 2DDCF9C81DA7B71600F5793B /* YTKConcurrencyTests.m in Sources */,
+ 2DDCFA0E1DA7B73B00F5793B /* YTKStatusCodeValidatorRequest.m in Sources */,
+ 2DF836171DA7CA1B0076B1EB /* NSString+YTKUrlUtils.m in Sources */,
+ 2DDCF9DA1DA7B71600F5793B /* YTKResumableDownloadTests.m in Sources */,
+ 2DDCFA051DA7B73B00F5793B /* YTKCustomHeaderFieldRequest.m in Sources */,
+ 2DDCF9D11DA7B71600F5793B /* YTKNetworkRequestTests.m in Sources */,
+ 2DDCF9CB1DA7B71600F5793B /* YTKJSONValidatorTests.m in Sources */,
+ 2DDCFA141DA7B73B00F5793B /* YTKXMLRequest.m in Sources */,
+ 2DDCF9E71DA7B72B00F5793B /* YTKBasicUrlFilter.m in Sources */,
+ 2DDCF9E41DA7B72B00F5793B /* YTKBasicCacheDirFilter.m in Sources */,
+ 2DDCF9C51DA7B71600F5793B /* YTKCacheTests.m in Sources */,
+ 2DDCFA081DA7B73B00F5793B /* YTKDownloadRequest.m in Sources */,
+ 2DDCF9D41DA7B71600F5793B /* YTKPerformanceTests.m in Sources */,
+ 2DDCF9FF1DA7B73B00F5793B /* YTKBasicHTTPRequest.m in Sources */,
+ 2DDCFA021DA7B73B00F5793B /* YTKCustomCacheRequest.m in Sources */,
+ 2DDCF9FC1DA7B73B00F5793B /* YTKBasicAuthRequest.m in Sources */,
+ 2DDCF9DD1DA7B71600F5793B /* YTKTestCase.m in Sources */,
+ 2DDCF9D71DA7B71600F5793B /* YTKRequestFilterTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -982,8 +982,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -1030,8 +1032,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -1061,6 +1065,7 @@
2D244E1E1D4ED6470031202D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1071,7 +1076,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.fenbi.YTKNetwork;
+ PRODUCT_BUNDLE_IDENTIFIER = "com.fenbi.YTKNetwork-iOS";
PRODUCT_NAME = YTKNetwork;
SKIP_INSTALL = YES;
TVOS_DEPLOYMENT_TARGET = 9.0;
@@ -1082,6 +1087,7 @@
2D244E1F1D4ED6470031202D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1092,7 +1098,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
- PRODUCT_BUNDLE_IDENTIFIER = com.fenbi.YTKNetwork;
+ PRODUCT_BUNDLE_IDENTIFIER = "com.fenbi.YTKNetwork-iOS";
PRODUCT_NAME = YTKNetwork;
SKIP_INSTALL = YES;
TVOS_DEPLOYMENT_TARGET = 9.0;
@@ -1103,6 +1109,7 @@
2D244E211D4ED6470031202D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -1118,6 +1125,7 @@
2D244E221D4ED6470031202D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
@@ -1134,6 +1142,7 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
+ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1157,6 +1166,7 @@
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
+ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1179,6 +1189,7 @@
2D58ADE41D59973D00FA6347 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1201,6 +1212,7 @@
2D58ADE51D59973D00FA6347 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -1223,6 +1235,7 @@
2D58ADE71D59973D00FA6347 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CODE_SIGN_IDENTITY = "";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/tvOS";
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/tvOS/AFNetworking.framework/Headers";
INFOPLIST_FILE = ./YTKNetworkTests/Info.plist;
@@ -1237,6 +1250,7 @@
2D58ADE81D59973D00FA6347 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ CODE_SIGN_IDENTITY = "";
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/tvOS";
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/Carthage/Build/tvOS/AFNetworking.framework/Headers";
INFOPLIST_FILE = ./YTKNetworkTests/Info.plist;
@@ -1304,7 +1318,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CODE_SIGN_IDENTITY = "-";
+ CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1324,7 +1338,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CODE_SIGN_IDENTITY = "-";
+ CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
diff --git a/YTKNetwork.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/YTKNetwork.xcodeproj/project.xcworkspace/contents.xcworkspacedata
old mode 100644
new mode 100755
diff --git a/YTKNetwork.xcodeproj/xcshareddata/xcschemes/YTKNetwork iOS.xcscheme b/YTKNetwork.xcodeproj/xcshareddata/xcschemes/YTKNetwork iOS.xcscheme
old mode 100644
new mode 100755
index cae3a28..dfc9a95
--- a/YTKNetwork.xcodeproj/xcshareddata/xcschemes/YTKNetwork iOS.xcscheme
+++ b/YTKNetwork.xcodeproj/xcshareddata/xcschemes/YTKNetwork iOS.xcscheme
@@ -1,6 +1,6 @@
= 200 && statusCode <= 299) {
- return YES;
- } else {
- return NO;
- }
+ return (statusCode >= 200 && statusCode <= 299);
}
#pragma mark - NSObject
diff --git a/YTKNetwork/YTKBatchRequest.h b/YTKNetwork/YTKBatchRequest.h
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKBatchRequest.m b/YTKNetwork/YTKBatchRequest.m
old mode 100644
new mode 100755
index 0318200..1785159
--- a/YTKNetwork/YTKBatchRequest.m
+++ b/YTKNetwork/YTKBatchRequest.m
@@ -59,7 +59,7 @@ - (void)start {
[self toggleAccessoriesWillStartCallBack];
for (YTKRequest * req in _requestArray) {
req.delegate = self;
- [req clearCompletionBlock];
+// [req clearCompletionBlock];
[req start];
}
}
@@ -109,6 +109,10 @@ - (void)dealloc {
- (void)requestFinished:(YTKRequest *)request {
_finishedCount++;
+ if (request.successCompletionBlock) {
+ request.successCompletionBlock(request);
+ [request clearCompletionBlock];
+ }
if (_finishedCount == _requestArray.count) {
[self toggleAccessoriesWillStopCallBack];
if ([_delegate respondsToSelector:@selector(batchRequestFinished:)]) {
@@ -125,6 +129,10 @@ - (void)requestFinished:(YTKRequest *)request {
- (void)requestFailed:(YTKRequest *)request {
_failedRequest = request;
+ if (request.failureCompletionBlock) {
+ request.failureCompletionBlock(request);
+ [request clearCompletionBlock];
+ }
[self toggleAccessoriesWillStopCallBack];
// Stop
for (YTKRequest *req in _requestArray) {
diff --git a/YTKNetwork/YTKBatchRequestAgent.h b/YTKNetwork/YTKBatchRequestAgent.h
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKBatchRequestAgent.m b/YTKNetwork/YTKBatchRequestAgent.m
old mode 100644
new mode 100755
index ca22027..0550de2
--- a/YTKNetwork/YTKBatchRequestAgent.m
+++ b/YTKNetwork/YTKBatchRequestAgent.m
@@ -41,7 +41,6 @@ + (YTKBatchRequestAgent *)sharedAgent {
return sharedInstance;
}
-
- (instancetype)init {
self = [super init];
if (self) {
diff --git a/YTKNetwork/YTKChainRequest.h b/YTKNetwork/YTKChainRequest.h
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKChainRequest.m b/YTKNetwork/YTKChainRequest.m
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKChainRequestAgent.h b/YTKNetwork/YTKChainRequestAgent.h
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKChainRequestAgent.m b/YTKNetwork/YTKChainRequestAgent.m
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKNetwork.h b/YTKNetwork/YTKNetwork.h
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKNetworkAgent.h b/YTKNetwork/YTKNetworkAgent.h
old mode 100644
new mode 100755
index a33cf04..30f824e
--- a/YTKNetwork/YTKNetworkAgent.h
+++ b/YTKNetwork/YTKNetworkAgent.h
@@ -47,6 +47,10 @@ NS_ASSUME_NONNULL_BEGIN
- (void)cancelAllRequests;
/// Return the constructed URL of request.
+///
+/// @param request The request to parse. Should not be nil.
+///
+/// @return The result URL.
- (NSString *)buildRequestUrl:(YTKBaseRequest *)request;
@end
diff --git a/YTKNetwork/YTKNetworkAgent.m b/YTKNetwork/YTKNetworkAgent.m
old mode 100644
new mode 100755
index 03e4b0d..078b30c
--- a/YTKNetwork/YTKNetworkAgent.m
+++ b/YTKNetwork/YTKNetworkAgent.m
@@ -62,15 +62,16 @@ - (instancetype)init {
self = [super init];
if (self) {
_config = [YTKNetworkConfig sharedConfig];
- _manager = [AFHTTPSessionManager manager];
+ _manager = [[AFHTTPSessionManager alloc] initWithSessionConfiguration:_config.sessionConfiguration];
_requestsRecord = [NSMutableDictionary dictionary];
_processingQueue = dispatch_queue_create("com.yuantiku.networkagent.processing", DISPATCH_QUEUE_CONCURRENT);
_allStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(100, 500)];
pthread_mutex_init(&_lock, NULL);
_manager.securityPolicy = _config.securityPolicy;
- _manager.responseSerializer = [AFHTTPResponseSerializer serializer];
+ _manager.responseSerializer = [AFJSONResponseSerializer serializer];
// Take over the status code validation
+ _manager.responseSerializer.acceptableContentTypes = [NSSet setWithArray:@[@"application/json", @"text/json", @"text/javascript",@"text/html", @"text/plain",@"application/atom+xml",@"application/xml",@"text/xml",@"image/jpeg", @"image/png"]];
_manager.responseSerializer.acceptableStatusCodes = _allStatusCodes;
_manager.completionQueue = _processingQueue;
}
@@ -97,6 +98,8 @@ - (AFXMLParserResponseSerializer *)xmlParserResponseSerialzier {
#pragma mark -
- (NSString *)buildRequestUrl:(YTKBaseRequest *)request {
+ NSParameterAssert(request != nil);
+
NSString *detailUrl = [request requestUrl];
NSURL *temp = [NSURL URLWithString:detailUrl];
// If detailUrl is valid URL
@@ -190,6 +193,8 @@ - (NSURLSessionTask *)sessionTaskForRequest:(YTKBaseRequest *)request error:(NSE
}
- (void)addRequest:(YTKBaseRequest *)request {
+ NSParameterAssert(request != nil);
+
NSError * __autoreleasing requestSerializationError = nil;
NSURLRequest *customUrlRequest= [request buildCustomUrlRequest];
@@ -208,6 +213,8 @@ - (void)addRequest:(YTKBaseRequest *)request {
return;
}
+ NSAssert(request.requestTask != nil, @"requestTask should not be nil");
+
// Set request task priority
// !!Available on iOS 8 +
if ([request.requestTask respondsToSelector:@selector(priority)]) {
@@ -233,7 +240,18 @@ - (void)addRequest:(YTKBaseRequest *)request {
}
- (void)cancelRequest:(YTKBaseRequest *)request {
- [request.requestTask cancel];
+ NSParameterAssert(request != nil);
+
+ if (request.resumableDownloadPath) {
+ NSURLSessionDownloadTask *requestTask = (NSURLSessionDownloadTask *)request.requestTask;
+ [requestTask cancelByProducingResumeData:^(NSData *resumeData) {
+ NSURL *localUrl = [self incompleteDownloadTempPathForDownloadPath:request.resumableDownloadPath];
+ [resumeData writeToURL:localUrl atomically:YES];
+ }];
+ } else {
+ [request.requestTask cancel];
+ }
+
[self removeRequestFromRecord:request];
[request clearCompletionBlock];
}
@@ -263,17 +281,15 @@ - (BOOL)validateResult:(YTKBaseRequest *)request error:(NSError * _Nullable __au
}
return result;
}
+ id json = [request responseJSONObject];
id validator = [request jsonValidator];
- if (validator) {
- id json = [request responseJSONObject];
- if (json) {
- result = [YTKNetworkUtils validateJSON:json withValidator:validator];
- if (!result) {
- if (error) {
- *error = [NSError errorWithDomain:YTKRequestValidationErrorDomain code:YTKRequestValidationErrorInvalidJSONFormat userInfo:@{NSLocalizedDescriptionKey:@"Invalid JSON format"}];
- }
- return result;
+ if (json && validator) {
+ result = [YTKNetworkUtils validateJSON:json withValidator:validator];
+ if (!result) {
+ if (error) {
+ *error = [NSError errorWithDomain:YTKRequestValidationErrorDomain code:YTKRequestValidationErrorInvalidJSONFormat userInfo:@{NSLocalizedDescriptionKey:@"Invalid JSON format"}];
}
+ return result;
}
}
return YES;
@@ -284,6 +300,11 @@ - (void)handleRequestResult:(NSURLSessionTask *)task responseObject:(id)response
YTKBaseRequest *request = _requestsRecord[@(task.taskIdentifier)];
Unlock();
+ // When the request is cancelled and removed from records, the underlying
+ // AFNetworking failure callback will still kicks in, resulting in a nil `request`.
+ //
+ // Here we choose to completely ignore cancelled tasks. Neither success or failure
+ // callback will be called.
if (!request) {
return;
}
@@ -325,7 +346,6 @@ - (void)handleRequestResult:(NSURLSessionTask *)task responseObject:(id)response
requestError = validationError;
}
-
if (succeed) {
[self requestDidSucceedWithRequest:request];
} else {
@@ -361,11 +381,24 @@ - (void)requestDidFailWithRequest:(YTKBaseRequest *)request error:(NSError *)err
YTKLog(@"Request %@ failed, status code = %ld, error = %@",
NSStringFromClass([request class]), (long)request.responseStatusCode, error.localizedDescription);
+ // Save incomplete download data.
NSData *incompleteDownloadData = error.userInfo[NSURLSessionDownloadTaskResumeData];
if (incompleteDownloadData) {
[incompleteDownloadData writeToURL:[self incompleteDownloadTempPathForDownloadPath:request.resumableDownloadPath] atomically:YES];
}
+ // Load response from file and clean up if download task failed.
+ if ([request.responseObject isKindOfClass:[NSURL class]]) {
+ NSURL *url = request.responseObject;
+ if (url.isFileURL && [[NSFileManager defaultManager] fileExistsAtPath:url.path]) {
+ request.responseData = [NSData dataWithContentsOfURL:url];
+ request.responseString = [[NSString alloc] initWithData:request.responseData encoding:[YTKNetworkUtils stringEncodingWithRequest:request]];
+
+ [[NSFileManager defaultManager] removeItemAtURL:url error:nil];
+ }
+ request.responseObject = nil;
+ }
+
@autoreleasepool {
[request requestFailedPreprocessor];
}
@@ -384,11 +417,9 @@ - (void)requestDidFailWithRequest:(YTKBaseRequest *)request error:(NSError *)err
}
- (void)addRequestToRecord:(YTKBaseRequest *)request {
- if (request.requestTask != nil) {
- Lock();
- _requestsRecord[@(request.requestTask.taskIdentifier)] = request;
- Unlock();
- }
+ Lock();
+ _requestsRecord[@(request.requestTask.taskIdentifier)] = request;
+ Unlock();
}
- (void)removeRequestFromRecord:(YTKBaseRequest *)request {
@@ -454,6 +485,14 @@ - (NSURLSessionDownloadTask *)downloadTaskWithDownloadPath:(NSString *)downloadP
downloadTargetPath = downloadPath;
}
+ // AFN use `moveItemAtURL` to move downloaded file to target path,
+ // this method aborts the move attempt if a file already exist at the path.
+ // So we remove the exist file before we start the download task.
+ // https://github.com/AFNetworking/AFNetworking/issues/3775
+ if ([[NSFileManager defaultManager] fileExistsAtPath:downloadTargetPath]) {
+ [[NSFileManager defaultManager] removeItemAtPath:downloadTargetPath error:nil];
+ }
+
BOOL resumeDataFileExists = [[NSFileManager defaultManager] fileExistsAtPath:[self incompleteDownloadTempPathForDownloadPath:downloadPath].path];
NSData *data = [NSData dataWithContentsOfURL:[self incompleteDownloadTempPathForDownloadPath:downloadPath]];
BOOL resumeDataIsValid = [YTKNetworkUtils validateResumeData:data];
diff --git a/YTKNetwork/YTKNetworkConfig.h b/YTKNetwork/YTKNetworkConfig.h
old mode 100644
new mode 100755
index 778044f..2eb385b
--- a/YTKNetwork/YTKNetworkConfig.h
+++ b/YTKNetwork/YTKNetworkConfig.h
@@ -72,6 +72,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
/// Whether to log debug info. Default is NO;
@property (nonatomic) BOOL debugLogEnabled;
+/// SessionConfiguration will be used to initialize AFHTTPSessionManager. Default is nil.
+@property (nonatomic, strong) NSURLSessionConfiguration* sessionConfiguration;
/// Add a new URL filter.
- (void)addUrlFilter:(id)filter;
diff --git a/YTKNetwork/YTKNetworkConfig.m b/YTKNetwork/YTKNetworkConfig.m
old mode 100644
new mode 100755
diff --git a/YTKNetwork/YTKNetworkPrivate.h b/YTKNetwork/YTKNetworkPrivate.h
old mode 100644
new mode 100755
index 3386b7b..f9361c6
--- a/YTKNetwork/YTKNetworkPrivate.h
+++ b/YTKNetwork/YTKNetworkPrivate.h
@@ -29,19 +29,16 @@
#import "YTKNetworkAgent.h"
#import "YTKNetworkConfig.h"
-@class AFHTTPSessionManager;
-
NS_ASSUME_NONNULL_BEGIN
FOUNDATION_EXPORT void YTKLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2);
+@class AFHTTPSessionManager;
+
@interface YTKNetworkUtils : NSObject
+ (BOOL)validateJSON:(id)json withValidator:(id)jsonValidator;
-+ (NSString *)urlStringWithOriginUrlString:(NSString *)originUrlString
- appendParameters:(NSDictionary *)parameters;
-
+ (void)addDoNotBackupAttribute:(NSString *)path;
+ (NSString *)md5StringFromString:(NSString *)string;
diff --git a/YTKNetwork/YTKNetworkPrivate.m b/YTKNetwork/YTKNetworkPrivate.m
old mode 100644
new mode 100755
index f0e1b3c..1bc62e1
--- a/YTKNetwork/YTKNetworkPrivate.m
+++ b/YTKNetwork/YTKNetworkPrivate.m
@@ -91,36 +91,6 @@ + (BOOL)validateJSON:(id)json withValidator:(id)jsonValidator {
}
}
-+ (NSString *)urlStringWithOriginUrlString:(NSString *)originUrlString appendParameters:(NSDictionary *)parameters {
- NSString *paraUrlString = AFQueryStringFromParameters(parameters);
-
- if (!(paraUrlString.length > 0)) {
- return originUrlString;
- }
-
- BOOL useDummyUrl = NO;
- static NSString *dummyUrl = nil;
- NSURLComponents *components = [NSURLComponents componentsWithString:originUrlString];
- if (!components) {
- useDummyUrl = YES;
- if (!dummyUrl) {
- dummyUrl = @"http://www.dummy.com";
- }
- components = [NSURLComponents componentsWithString:dummyUrl];
- }
-
- NSString *queryString = components.query ?: @"";
- NSString *newQueryString = [queryString stringByAppendingFormat:queryString.length > 0 ? @"&%@" : @"%@", paraUrlString];
-
- components.query = newQueryString;
-
- if (useDummyUrl) {
- return [components.URL.absoluteString substringFromIndex:dummyUrl.length - 1];
- } else {
- return components.URL.absoluteString;
- }
-}
-
+ (void)addDoNotBackupAttribute:(NSString *)path {
NSURL *url = [NSURL fileURLWithPath:path];
NSError *error = nil;
@@ -131,8 +101,7 @@ + (void)addDoNotBackupAttribute:(NSString *)path {
}
+ (NSString *)md5StringFromString:(NSString *)string {
- if(string == nil || [string length] == 0)
- return nil;
+ NSParameterAssert(string != nil && [string length] > 0);
const char *value = [string UTF8String];
@@ -141,7 +110,7 @@ + (NSString *)md5StringFromString:(NSString *)string {
NSMutableString *outputString = [[NSMutableString alloc] initWithCapacity:CC_MD5_DIGEST_LENGTH * 2];
for(NSInteger count = 0; count < CC_MD5_DIGEST_LENGTH; count++){
- [outputString appendFormat:@"%02x",outputBuffer[count]];
+ [outputString appendFormat:@"%02x", outputBuffer[count]];
}
return outputString;
diff --git a/YTKNetwork/YTKRequest.h b/YTKNetwork/YTKRequest.h
old mode 100644
new mode 100755
index 0bef9c0..18a4066
--- a/YTKNetwork/YTKRequest.h
+++ b/YTKNetwork/YTKRequest.h
@@ -40,7 +40,7 @@ NS_ENUM(NSInteger) {
/// YTKRequest is the base class you should inherit to create your own request class.
/// Based on YTKBaseRequest, YTKRequest adds local caching feature. Note download
/// request will not be cached whatsoever, because download request may involve complicated
-/// cache control policy controlled by `Cache-Control`, `If-Modified-Since`, etc.
+/// cache control policy controlled by `Cache-Control`, `Last-Modified`, etc.
@interface YTKRequest : YTKBaseRequest
/// Whether to use cache as response or not.
diff --git a/YTKNetwork/YTKRequest.m b/YTKNetwork/YTKRequest.m
old mode 100644
new mode 100755
diff --git a/YTKNetworkDemo/Podfile b/YTKNetworkDemo/Podfile
index 0b8fea9..fb8193e 100644
--- a/YTKNetworkDemo/Podfile
+++ b/YTKNetworkDemo/Podfile
@@ -1,5 +1,6 @@
target 'YTKNetworkDemo' do
pod 'YTKNetwork', :path => '../'
+ pod 'AFNetworking', '~> 3.1'
end
target 'YTKNetworkDemoTests' do
diff --git a/YTKNetworkDemo/Podfile.lock b/YTKNetworkDemo/Podfile.lock
index 0cc9513..0389cdf 100644
--- a/YTKNetworkDemo/Podfile.lock
+++ b/YTKNetworkDemo/Podfile.lock
@@ -14,10 +14,11 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- - YTKNetwork (2.0.0):
+ - YTKNetwork (2.0.1):
- AFNetworking (~> 3.0)
DEPENDENCIES:
+ - AFNetworking (~> 3.1)
- YTKNetwork (from `../`)
EXTERNAL SOURCES:
@@ -26,8 +27,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
- YTKNetwork: 3baf58c0bbabf1cfd99ee129474bc717844d6f78
+ YTKNetwork: f21ad2073b3353a11d257593a2859f2904bbec75
-PODFILE CHECKSUM: 9d1d3944658897f73e65631e437a496436069bbb
+PODFILE CHECKSUM: fac6c10b171443ed76dffcc019afa1046783a5cd
COCOAPODS: 1.0.1
diff --git a/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/project.pbxproj b/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/project.pbxproj
index 16595f5..c49803c 100644
--- a/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/project.pbxproj
+++ b/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/project.pbxproj
@@ -254,7 +254,7 @@
BF007FCB19FF972C00816462 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0730;
+ LastUpgradeCheck = 0800;
ORGANIZATIONNAME = yuantiku.com;
TargetAttributes = {
BF007FD219FF972C00816462 = {
@@ -469,8 +469,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -479,6 +481,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -512,8 +515,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -521,6 +526,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
diff --git a/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/xcshareddata/xcschemes/YTKNetworkDemo.xcscheme b/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/xcshareddata/xcschemes/YTKNetworkDemo.xcscheme
index de729c3..4a21486 100644
--- a/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/xcshareddata/xcschemes/YTKNetworkDemo.xcscheme
+++ b/YTKNetworkDemo/YTKNetworkDemo.xcodeproj/xcshareddata/xcschemes/YTKNetworkDemo.xcscheme
@@ -1,6 +1,6 @@
0) {
- if ([originUrlString rangeOfString:@"?"].location != NSNotFound) {
- filteredUrl = [filteredUrl stringByAppendingString:paraUrlString];
- } else {
- filteredUrl = [filteredUrl stringByAppendingFormat:@"?%@", [paraUrlString substringFromIndex:1]];
- }
- return filteredUrl;
- } else {
+ NSString *paraUrlString = AFQueryStringFromParameters(parameters);
+
+ if (!(paraUrlString.length > 0)) {
return originUrlString;
}
-}
-- (NSString *)urlParametersStringFromParameters:(NSDictionary *)parameters {
- NSMutableString *urlParametersString = [[NSMutableString alloc] initWithString:@""];
- if (parameters && parameters.count > 0) {
- for (NSString *key in parameters) {
- NSString *value = parameters[key];
- value = [NSString stringWithFormat:@"%@",value];
- value = [self urlEncode:value];
- [urlParametersString appendFormat:@"&%@=%@", key, value];
+ BOOL useDummyUrl = NO;
+ static NSString *dummyUrl = nil;
+ NSURLComponents *components = [NSURLComponents componentsWithString:originUrlString];
+ if (!components) {
+ useDummyUrl = YES;
+ if (!dummyUrl) {
+ dummyUrl = @"http://www.dummy.com";
}
+ components = [NSURLComponents componentsWithString:dummyUrl];
}
- return urlParametersString;
-}
-- (NSString*)urlEncode:(NSString*)str {
- return AFPercentEscapedStringFromString(str);
+ NSString *queryString = components.query ?: @"";
+ NSString *newQueryString = [queryString stringByAppendingFormat:queryString.length > 0 ? @"&%@" : @"%@", paraUrlString];
+
+ components.query = newQueryString;
+
+ if (useDummyUrl) {
+ return [components.URL.absoluteString substringFromIndex:dummyUrl.length - 1];
+ } else {
+ return components.URL.absoluteString;
+ }
}
@end
diff --git a/YTKNetworkTests/Info.plist b/YTKNetworkTests/Info.plist
old mode 100644
new mode 100755
diff --git a/YTKNetworkTests/YTKBasicAuthRequest.h b/YTKNetworkTests/Requests/YTKBasicAuthRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicAuthRequest.h
rename to YTKNetworkTests/Requests/YTKBasicAuthRequest.h
diff --git a/YTKNetworkTests/YTKBasicAuthRequest.m b/YTKNetworkTests/Requests/YTKBasicAuthRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicAuthRequest.m
rename to YTKNetworkTests/Requests/YTKBasicAuthRequest.m
diff --git a/YTKNetworkTests/YTKBasicHTTPRequest.h b/YTKNetworkTests/Requests/YTKBasicHTTPRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicHTTPRequest.h
rename to YTKNetworkTests/Requests/YTKBasicHTTPRequest.h
diff --git a/YTKNetworkTests/YTKBasicHTTPRequest.m b/YTKNetworkTests/Requests/YTKBasicHTTPRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicHTTPRequest.m
rename to YTKNetworkTests/Requests/YTKBasicHTTPRequest.m
diff --git a/YTKNetworkTests/YTKCustomCacheRequest.h b/YTKNetworkTests/Requests/YTKCustomCacheRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKCustomCacheRequest.h
rename to YTKNetworkTests/Requests/YTKCustomCacheRequest.h
diff --git a/YTKNetworkTests/YTKCustomCacheRequest.m b/YTKNetworkTests/Requests/YTKCustomCacheRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKCustomCacheRequest.m
rename to YTKNetworkTests/Requests/YTKCustomCacheRequest.m
diff --git a/YTKNetworkTests/YTKCustomHeaderFieldRequest.h b/YTKNetworkTests/Requests/YTKCustomHeaderFieldRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKCustomHeaderFieldRequest.h
rename to YTKNetworkTests/Requests/YTKCustomHeaderFieldRequest.h
diff --git a/YTKNetworkTests/YTKCustomHeaderFieldRequest.m b/YTKNetworkTests/Requests/YTKCustomHeaderFieldRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKCustomHeaderFieldRequest.m
rename to YTKNetworkTests/Requests/YTKCustomHeaderFieldRequest.m
diff --git a/YTKNetworkTests/YTKDownloadRequest.h b/YTKNetworkTests/Requests/YTKDownloadRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKDownloadRequest.h
rename to YTKNetworkTests/Requests/YTKDownloadRequest.h
diff --git a/YTKNetworkTests/YTKDownloadRequest.m b/YTKNetworkTests/Requests/YTKDownloadRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKDownloadRequest.m
rename to YTKNetworkTests/Requests/YTKDownloadRequest.m
diff --git a/YTKNetworkTests/YTKJSONValidatorRequest.h b/YTKNetworkTests/Requests/YTKJSONValidatorRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKJSONValidatorRequest.h
rename to YTKNetworkTests/Requests/YTKJSONValidatorRequest.h
diff --git a/YTKNetworkTests/YTKJSONValidatorRequest.m b/YTKNetworkTests/Requests/YTKJSONValidatorRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKJSONValidatorRequest.m
rename to YTKNetworkTests/Requests/YTKJSONValidatorRequest.m
diff --git a/YTKNetworkTests/YTKStatusCodeValidatorRequest.h b/YTKNetworkTests/Requests/YTKStatusCodeValidatorRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKStatusCodeValidatorRequest.h
rename to YTKNetworkTests/Requests/YTKStatusCodeValidatorRequest.h
diff --git a/YTKNetworkTests/YTKStatusCodeValidatorRequest.m b/YTKNetworkTests/Requests/YTKStatusCodeValidatorRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKStatusCodeValidatorRequest.m
rename to YTKNetworkTests/Requests/YTKStatusCodeValidatorRequest.m
diff --git a/YTKNetworkTests/YTKTimeoutRequest.h b/YTKNetworkTests/Requests/YTKTimeoutRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKTimeoutRequest.h
rename to YTKNetworkTests/Requests/YTKTimeoutRequest.h
diff --git a/YTKNetworkTests/YTKTimeoutRequest.m b/YTKNetworkTests/Requests/YTKTimeoutRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKTimeoutRequest.m
rename to YTKNetworkTests/Requests/YTKTimeoutRequest.m
diff --git a/YTKNetworkTests/YTKXMLRequest.h b/YTKNetworkTests/Requests/YTKXMLRequest.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKXMLRequest.h
rename to YTKNetworkTests/Requests/YTKXMLRequest.h
diff --git a/YTKNetworkTests/YTKXMLRequest.m b/YTKNetworkTests/Requests/YTKXMLRequest.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKXMLRequest.m
rename to YTKNetworkTests/Requests/YTKXMLRequest.m
diff --git a/YTKNetworkTests/YTKCacheTests.m b/YTKNetworkTests/Test Cases/YTKCacheTests.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKCacheTests.m
rename to YTKNetworkTests/Test Cases/YTKCacheTests.m
diff --git a/YTKNetworkTests/YTKConcurrencyTests.m b/YTKNetworkTests/Test Cases/YTKConcurrencyTests.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKConcurrencyTests.m
rename to YTKNetworkTests/Test Cases/YTKConcurrencyTests.m
diff --git a/YTKNetworkTests/YTKJSONValidatorTests.m b/YTKNetworkTests/Test Cases/YTKJSONValidatorTests.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKJSONValidatorTests.m
rename to YTKNetworkTests/Test Cases/YTKJSONValidatorTests.m
diff --git a/YTKNetworkTests/YTKNetworkRequestTests.m b/YTKNetworkTests/Test Cases/YTKNetworkRequestTests.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKNetworkRequestTests.m
rename to YTKNetworkTests/Test Cases/YTKNetworkRequestTests.m
diff --git a/YTKNetworkTests/YTKPerformanceTests.m b/YTKNetworkTests/Test Cases/YTKPerformanceTests.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKPerformanceTests.m
rename to YTKNetworkTests/Test Cases/YTKPerformanceTests.m
diff --git a/YTKNetworkTests/YTKRequestFilterTests.m b/YTKNetworkTests/Test Cases/YTKRequestFilterTests.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKRequestFilterTests.m
rename to YTKNetworkTests/Test Cases/YTKRequestFilterTests.m
diff --git a/YTKNetworkTests/YTKResumableDownloadTests.m b/YTKNetworkTests/Test Cases/YTKResumableDownloadTests.m
old mode 100644
new mode 100755
similarity index 69%
rename from YTKNetworkTests/YTKResumableDownloadTests.m
rename to YTKNetworkTests/Test Cases/YTKResumableDownloadTests.m
index 4731186..b8ddc9e
--- a/YTKNetworkTests/YTKResumableDownloadTests.m
+++ b/YTKNetworkTests/Test Cases/YTKResumableDownloadTests.m
@@ -12,6 +12,7 @@
#import "AFNetworking.h"
NSString *const kTestDownloadURL = @"https://qd.myapp.com/myapp/qqteam/AndroidQQ/mobileqq_android.apk";
+NSString *const kTestFailDownloadURL = @"https://qd.myapp.com/myapp/qqteam/AndroidQQ/mobileqq_android.apkfail";
@interface YTKResumableDownloadTests : YTKTestCase
@@ -97,5 +98,38 @@ - (void)testResumableDownloadWithDirectoryPath {
[self expectSuccess:req2];
}
+- (void)testResumableDownloadOverwriteAndCleanup {
+ [[YTKNetworkAgent sharedAgent] resetURLSessionManager];
+ [[YTKNetworkAgent sharedAgent] manager].responseSerializer.acceptableContentTypes = nil;
+ NSString *path = [[self saveBasePath] stringByAppendingPathComponent:@"downloaded.bin"];
+
+ // Create a exist file
+ NSString *testString = @"TEST";
+ NSData *stringData = [testString dataUsingEncoding:NSUTF8StringEncoding];
+ [stringData writeToFile:path atomically:YES];
+
+ // Download req file
+ YTKDownloadRequest *req = [[YTKDownloadRequest alloc] initWithTimeout:self.networkTimeout requestUrl:kTestDownloadURL];
+ req.resumableDownloadPath = path;
+ req.resumableDownloadProgressBlock = ^(NSProgress *progress) {
+ XCTAssertTrue(progress.completedUnitCount > 0);
+ NSLog(@"Downloading: %lld / %lld", progress.completedUnitCount, progress.totalUnitCount);
+ };
+
+ [self expectSuccess:req];
+ XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:path]);
+ XCTAssertTrue(([[NSFileManager defaultManager] contentsAtPath:path].length > stringData.length));
+
+ YTKDownloadRequest *req2 = [[YTKDownloadRequest alloc] initWithTimeout:self.networkTimeout requestUrl:kTestFailDownloadURL];
+ req2.resumableDownloadPath = path;
+ req2.resumableDownloadProgressBlock = ^(NSProgress *progress) {
+ XCTAssertTrue(progress.completedUnitCount > 0);
+ NSLog(@"Downloading: %lld / %lld", progress.completedUnitCount, progress.totalUnitCount);
+ };
+
+ [self expectFailure:req2];
+ XCTAssertFalse([[NSFileManager defaultManager] fileExistsAtPath:path]);
+ XCTAssertTrue(req2.responseData.length > 0 && req2.responseString.length > 0);
+}
@end
diff --git a/YTKNetworkTests/YTKTestCase.h b/YTKNetworkTests/Test Cases/YTKTestCase.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKTestCase.h
rename to YTKNetworkTests/Test Cases/YTKTestCase.h
diff --git a/YTKNetworkTests/YTKTestCase.m b/YTKNetworkTests/Test Cases/YTKTestCase.m
old mode 100644
new mode 100755
similarity index 97%
rename from YTKNetworkTests/YTKTestCase.m
rename to YTKNetworkTests/Test Cases/YTKTestCase.m
index 5a0d84b..b3a8198
--- a/YTKNetworkTests/YTKTestCase.m
+++ b/YTKNetworkTests/Test Cases/YTKTestCase.m
@@ -39,6 +39,7 @@ - (void)expectSuccess:(YTKRequest *)request withAssertion:(void(^)(YTKBaseReques
[request startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
XCTAssertNotNil(request);
+ XCTAssertNil(request.error);
if (assertion) {
assertion(request);
}
@@ -63,6 +64,7 @@ - (void)expectFailure:(YTKRequest *)request withAssertion:(void(^)(YTKBaseReques
[exp fulfill];
} failure:^(__kindof YTKBaseRequest * _Nonnull request) {
XCTAssertNotNil(request);
+ XCTAssertNotNil(request.error);
if (assertion) {
assertion(request);
}
diff --git a/YTKNetworkTests/Utils/NSString+YTKUrlUtils.h b/YTKNetworkTests/Utils/NSString+YTKUrlUtils.h
new file mode 100755
index 0000000..c06704f
--- /dev/null
+++ b/YTKNetworkTests/Utils/NSString+YTKUrlUtils.h
@@ -0,0 +1,15 @@
+//
+// NSString+YTKUrlUtils.h
+// YTKNetwork
+//
+// Created by skyline on 16/10/7.
+// Copyright © 2016年 skyline. All rights reserved.
+//
+
+#import
+
+@interface NSString (YTKUrlUtils)
+
+- (NSString *)ytk_stringByAppendURLParameters:(NSDictionary *)parameters;
+
+@end
diff --git a/YTKNetworkTests/Utils/NSString+YTKUrlUtils.m b/YTKNetworkTests/Utils/NSString+YTKUrlUtils.m
new file mode 100755
index 0000000..965542e
--- /dev/null
+++ b/YTKNetworkTests/Utils/NSString+YTKUrlUtils.m
@@ -0,0 +1,44 @@
+//
+// NSString+YTKUrlUtils.m
+// YTKNetwork
+//
+// Created by skyline on 16/10/7.
+// Copyright © 2016年 skyline. All rights reserved.
+//
+
+#import "NSString+YTKUrlUtils.h"
+#import
+
+@implementation NSString (YTKUrlUtils)
+
+- (NSString *)ytk_stringByAppendURLParameters:(NSDictionary *)parameters {
+ NSString *paraUrlString = AFQueryStringFromParameters(parameters);
+
+ if (!(paraUrlString.length > 0)) {
+ return self;
+ }
+
+ BOOL useDummyUrl = NO;
+ static NSString *dummyUrl = nil;
+ NSURLComponents *components = [NSURLComponents componentsWithString:self];
+ if (!components) {
+ useDummyUrl = YES;
+ if (!dummyUrl) {
+ dummyUrl = @"http://www.dummy.com";
+ }
+ components = [NSURLComponents componentsWithString:dummyUrl];
+ }
+
+ NSString *queryString = components.query ?: @"";
+ NSString *newQueryString = [queryString stringByAppendingFormat:queryString.length > 0 ? @"&%@" : @"%@", paraUrlString];
+
+ components.query = newQueryString;
+
+ if (useDummyUrl) {
+ return [components.URL.absoluteString substringFromIndex:dummyUrl.length - 1];
+ } else {
+ return components.URL.absoluteString;
+ }
+}
+
+@end
diff --git a/YTKNetworkTests/YTKBasicCacheDirFilter.h b/YTKNetworkTests/Utils/YTKBasicCacheDirFilter.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicCacheDirFilter.h
rename to YTKNetworkTests/Utils/YTKBasicCacheDirFilter.h
diff --git a/YTKNetworkTests/YTKBasicCacheDirFilter.m b/YTKNetworkTests/Utils/YTKBasicCacheDirFilter.m
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicCacheDirFilter.m
rename to YTKNetworkTests/Utils/YTKBasicCacheDirFilter.m
diff --git a/YTKNetworkTests/YTKBasicUrlFilter.h b/YTKNetworkTests/Utils/YTKBasicUrlFilter.h
old mode 100644
new mode 100755
similarity index 100%
rename from YTKNetworkTests/YTKBasicUrlFilter.h
rename to YTKNetworkTests/Utils/YTKBasicUrlFilter.h
diff --git a/YTKNetworkTests/YTKBasicUrlFilter.m b/YTKNetworkTests/Utils/YTKBasicUrlFilter.m
old mode 100644
new mode 100755
similarity index 84%
rename from YTKNetworkTests/YTKBasicUrlFilter.m
rename to YTKNetworkTests/Utils/YTKBasicUrlFilter.m
index 04640f8..7329cec
--- a/YTKNetworkTests/YTKBasicUrlFilter.m
+++ b/YTKNetworkTests/Utils/YTKBasicUrlFilter.m
@@ -8,7 +8,7 @@
#import "YTKBasicUrlFilter.h"
#import "YTKNetworkConfig.h"
-#import "YTKNetworkPrivate.h"
+#import "NSString+YTKUrlUtils.h"
@interface YTKBasicUrlFilter ()
@@ -31,7 +31,7 @@ - (instancetype)initWithArguments:(NSDictionary *)arguments {
}
- (NSString *)filterUrl:(NSString *)originUrl withRequest:(YTKBaseRequest *)request {
- return [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:_arguments];
+ return [originUrl ytk_stringByAppendURLParameters:_arguments];
}
@end
diff --git a/YTKNetworkTests/YTKNetworkPrivateTests.m b/YTKNetworkTests/YTKNetworkPrivateTests.m
deleted file mode 100644
index c33c178..0000000
--- a/YTKNetworkTests/YTKNetworkPrivateTests.m
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// YTKUrlUtilsTests.m
-// YTKNetwork
-//
-// Created by skyline on 16/8/10.
-// Copyright © 2016年 skyline. All rights reserved.
-//
-
-#import
-#import "YTKNetworkPrivate.h"
-
-@interface YTKNetworkPrivateTests : XCTestCase
-
-@end
-
-@implementation YTKNetworkPrivateTests
-
-- (void)setUp {
- [super setUp];
-}
-
-- (void)tearDown {
- [super tearDown];
-}
-
-- (void)testFullURLWithEmptyParameters {
- NSString *originUrl = @"http://www.yuantiku.com/";
- NSDictionary *parameters = nil;
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"http://www.yuantiku.com/"]);
-}
-
-- (void)testFullURLWithSlash {
- NSString *originUrl = @"http://www.yuantiku.com/";
- NSDictionary *parameters = @{@"key": @"value"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"http://www.yuantiku.com/?key=value"]);
-}
-
-- (void)testFullURLWithNoSlash {
- NSString *originUrl = @"http://www.yuantiku.com";
- NSDictionary *parameters = @{@"key": @"value"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"http://www.yuantiku.com?key=value"]);
-}
-
-- (void)testFullURLWithParameters {
- NSString *originUrl = @"http://www.yuantiku.com?key1=value1";
- NSDictionary *parameters = @{@"key2": @"value2"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"http://www.yuantiku.com?key1=value1&key2=value2"]);
-}
-
-- (void)testFullURLWithFragment {
- NSString *originUrl = @"http://www.yuantiku.com?key1=value1#frag1";
- NSDictionary *parameters = @{@"key2": @"value2"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"http://www.yuantiku.com?key1=value1&key2=value2#frag1"]);
-}
-
-- (void)testDetailURLWithEmptyParameters {
- NSString *originUrl = @"get/";
- NSDictionary *parameters = nil;
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"get/"]);
-}
-
-- (void)testDetailURLWithSlash {
- NSString *originUrl = @"get/";
- NSDictionary *parameters = @{@"key": @"value"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"get/?key=value"]);
-}
-
-- (void)testDetailURLWithNoSlash {
- NSString *originUrl = @"get";
- NSDictionary *parameters = @{@"key": @"value"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"get?key=value"]);
-}
-
-- (void)testDetailURLWithParameters {
- NSString *originUrl = @"get?key1=value1";
- NSDictionary *parameters = @{@"key2": @"value2"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"get?key1=value1&key2=value2"]);
-}
-
-- (void)testDetailURLWithFragment {
- NSString *originUrl = @"get?key1=value1#frag1";
- NSDictionary *parameters = @{@"key2": @"value2"};
- NSString *resultUrl = [YTKNetworkUtils urlStringWithOriginUrlString:originUrl appendParameters:parameters];
-
- XCTAssertTrue([resultUrl isEqualToString:@"get?key1=value1&key2=value2#frag1"]);
-}
-
-@end