From 68b85a092470beeb93dd273e3360d964a7154aa7 Mon Sep 17 00:00:00 2001 From: shangcr Date: Tue, 29 Oct 2019 16:24:51 +0800 Subject: [PATCH] MOD: remove UIKit related category because of apple review in UIWebView Change-Id: Ie33db778c06b3f8f9044072419adb1b21681e4f8 --- YTKNetwork.podspec | 7 ++++--- YTKNetwork/YTKBaseRequest.m | 6 ------ YTKNetwork/YTKNetworkAgent.m | 6 +++--- YTKNetwork/YTKNetworkConfig.m | 6 +++--- YTKNetworkDemo/YTKNetworkDemo/UploadImageApi.m | 2 +- 5 files changed, 11 insertions(+), 16 deletions(-) diff --git a/YTKNetwork.podspec b/YTKNetwork.podspec index dcb50b4..7c733b4 100644 --- a/YTKNetwork.podspec +++ b/YTKNetwork.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "YTKNetwork" - s.version = "2.0.6" + s.version = "2.1.2" s.summary = "YTKNetwork is a high level request util based on AFNetworking." s.homepage = "https://github.com/yuantiku/YTKNetwork" s.license = "MIT" @@ -9,7 +9,8 @@ Pod::Spec.new do |s| "tangqiao" => "tangqiao@fenbi.com", "lancy" => "lancy@fenbi.com", "maojj" => "maojj@fenbi.com", - "liujl" => "liujl@fenbi.com" + "liujl" => "liujl@fenbi.com", + "shangcr" => "shangcr@fenbi.com" } s.source = { :git => "https://github.com/yuantiku/YTKNetwork.git", :tag => s.version.to_s } s.source_files = "YTKNetwork/*.{h,m}" @@ -23,5 +24,5 @@ Pod::Spec.new do |s| s.tvos.deployment_target = "9.0" s.framework = "CFNetwork" - s.dependency "AFNetworking", "~> 3.0" + s.dependency "AFNetworking/NSURLSession", "~> 3.0" end diff --git a/YTKNetwork/YTKBaseRequest.m b/YTKNetwork/YTKBaseRequest.m index 828b01f..4086192 100644 --- a/YTKNetwork/YTKBaseRequest.m +++ b/YTKNetwork/YTKBaseRequest.m @@ -25,12 +25,6 @@ #import "YTKNetworkAgent.h" #import "YTKNetworkPrivate.h" -#if __has_include() -#import -#else -#import "AFNetworking.h" -#endif - NSString *const YTKRequestValidationErrorDomain = @"com.yuantiku.request.validation"; @interface YTKBaseRequest () diff --git a/YTKNetwork/YTKNetworkAgent.m b/YTKNetwork/YTKNetworkAgent.m index 9345037..99f32d2 100644 --- a/YTKNetwork/YTKNetworkAgent.m +++ b/YTKNetwork/YTKNetworkAgent.m @@ -26,10 +26,10 @@ #import "YTKNetworkPrivate.h" #import -#if __has_include() -#import +#if __has_include() +#import #else -#import "AFNetworking.h" +#import "AFHTTPSessionManager.h" #endif #define Lock() pthread_mutex_lock(&_lock) diff --git a/YTKNetwork/YTKNetworkConfig.m b/YTKNetwork/YTKNetworkConfig.m index ac5cdf7..751adc6 100644 --- a/YTKNetwork/YTKNetworkConfig.m +++ b/YTKNetwork/YTKNetworkConfig.m @@ -24,10 +24,10 @@ #import "YTKNetworkConfig.h" #import "YTKBaseRequest.h" -#if __has_include() -#import +#if __has_include() +#import #else -#import "AFNetworking.h" +#import "AFSecurityPolicy.h" #endif @implementation YTKNetworkConfig { diff --git a/YTKNetworkDemo/YTKNetworkDemo/UploadImageApi.m b/YTKNetworkDemo/YTKNetworkDemo/UploadImageApi.m index a2f3ce5..500d6a6 100644 --- a/YTKNetworkDemo/YTKNetworkDemo/UploadImageApi.m +++ b/YTKNetworkDemo/YTKNetworkDemo/UploadImageApi.m @@ -7,7 +7,7 @@ // #import "UploadImageApi.h" -#import "AFNetworking.h" +#import @implementation UploadImageApi { UIImage *_image;