Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

移除依赖中的UIWebView #500

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "AFNetworking/AFNetworking" ~> 3.0
github "AFNetworking/AFNetworking"

4 changes: 2 additions & 2 deletions YTKNetwork.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "YTKNetwork"
s.version = "2.0.4"
s.version = "2.0.5"
s.summary = "YTKNetwork is a high level request util based on AFNetworking."
s.homepage = "https://github.com/yuantiku/YTKNetwork"
s.license = "MIT"
Expand All @@ -23,5 +23,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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
6 changes: 3 additions & 3 deletions YTKNetwork/YTKBaseRequest.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
#import "YTKNetworkAgent.h"
#import "YTKNetworkPrivate.h"

#if __has_include(<AFNetworking/AFNetworking.h>)
#import <AFNetworking/AFNetworking.h>
#if __has_include(<AFNetworking/AFHTTPSessionManager.h>)
#import <AFNetworking/AFHTTPSessionManager.h>
#else
#import "AFNetworking.h"
#import "AFHTTPSessionManager.h"
#endif

NSString *const YTKRequestValidationErrorDomain = @"com.yuantiku.request.validation";
Expand Down
6 changes: 3 additions & 3 deletions YTKNetwork/YTKNetworkAgent.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
#import "YTKNetworkPrivate.h"
#import <pthread/pthread.h>

#if __has_include(<AFNetworking/AFNetworking.h>)
#import <AFNetworking/AFNetworking.h>
#if __has_include(<AFNetworking/AFHTTPSessionManager.h>)
#import <AFNetworking/AFHTTPSessionManager.h>
#else
#import "AFNetworking.h"
#import "AFHTTPSessionManager.h"
#endif

#define Lock() pthread_mutex_lock(&_lock)
Expand Down
6 changes: 3 additions & 3 deletions YTKNetwork/YTKNetworkConfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#import "YTKNetworkConfig.h"
#import "YTKBaseRequest.h"

#if __has_include(<AFNetworking/AFNetworking.h>)
#import <AFNetworking/AFNetworking.h>
#if __has_include(<AFNetworking/AFHTTPSessionManager.h>)
#import <AFNetworking/AFHTTPSessionManager.h>
#else
#import "AFNetworking.h"
#import "AFHTTPSessionManager.h"
#endif

@implementation YTKNetworkConfig {
Expand Down
2 changes: 1 addition & 1 deletion YTKNetwork/YTKNetworkPrivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#import <CommonCrypto/CommonDigest.h>
#import "YTKNetworkPrivate.h"

#if __has_include(<AFNetworking/AFNetworking.h>)
#if __has_include(<AFNetworking/AFURLRequestSerialization.h>)
#import <AFNetworking/AFURLRequestSerialization.h>
#else
#import "AFURLRequestSerialization.h"
Expand Down
2 changes: 1 addition & 1 deletion YTKNetworkDemo/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
target 'YTKNetworkDemo' do
pod 'YTKNetwork', :path => '../'
pod 'AFNetworking', '~> 3.1'
pod 'AFNetworking/NSURLSession', '~> 3.1'
end

target 'YTKNetworkDemoTests' do
Expand Down
34 changes: 15 additions & 19 deletions YTKNetworkDemo/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
PODS:
- AFNetworking (3.1.0):
- AFNetworking/NSURLSession (= 3.1.0)
- AFNetworking/Reachability (= 3.1.0)
- AFNetworking/Security (= 3.1.0)
- AFNetworking/Serialization (= 3.1.0)
- AFNetworking/UIKit (= 3.1.0)
- AFNetworking/NSURLSession (3.1.0):
- AFNetworking/NSURLSession (3.2.1):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/Reachability (3.1.0)
- AFNetworking/Security (3.1.0)
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- YTKNetwork (2.0.1):
- AFNetworking (~> 3.0)
- AFNetworking/Reachability (3.2.1)
- AFNetworking/Security (3.2.1)
- AFNetworking/Serialization (3.2.1)
- YTKNetwork (2.0.5):
- AFNetworking/NSURLSession (~> 3.0)

DEPENDENCIES:
- AFNetworking (~> 3.1)
- AFNetworking/NSURLSession (~> 3.1)
- YTKNetwork (from `../`)

SPEC REPOS:
https://cdn.cocoapods.org/:
- AFNetworking

EXTERNAL SOURCES:
YTKNetwork:
:path: "../"

SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
YTKNetwork: f21ad2073b3353a11d257593a2859f2904bbec75
AFNetworking: b6f891fdfaed196b46c7a83cf209e09697b94057
YTKNetwork: 05f6e5fe003c57d5c8a214b3b4ac55c443916a1c

PODFILE CHECKSUM: fac6c10b171443ed76dffcc019afa1046783a5cd
PODFILE CHECKSUM: e13467c20b95e7f35a99e80f224a36cabe8eaaff

COCOAPODS: 1.0.1
COCOAPODS: 1.8.0.beta.2
74 changes: 8 additions & 66 deletions YTKNetworkDemo/YTKNetworkDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@
BF007FCF19FF972C00816462 /* Sources */,
BF007FD019FF972C00816462 /* Frameworks */,
BF007FD119FF972C00816462 /* Resources */,
446BEB38D2E9356D5931A463 /* [CP] Embed Pods Frameworks */,
DE3E65FF40BD9A908E26EF96 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -235,8 +233,6 @@
BF007FE819FF972C00816462 /* Sources */,
BF007FE919FF972C00816462 /* Frameworks */,
BF007FEA19FF972C00816462 /* Resources */,
35388473680756633E871C75 /* [CP] Embed Pods Frameworks */,
9D8FC356690477282DCB85ED /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -306,49 +302,22 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
35388473680756633E871C75 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YTKNetworkDemoTests/Pods-YTKNetworkDemoTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
446BEB38D2E9356D5931A463 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YTKNetworkDemo/Pods-YTKNetworkDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
530C2FC27E9D057DF8080989 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-YTKNetworkDemoTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
609DD632ED1E07363BD48FB2 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -357,43 +326,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-YTKNetworkDemo-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
9D8FC356690477282DCB85ED /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YTKNetworkDemoTests/Pods-YTKNetworkDemoTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
DE3E65FF40BD9A908E26EF96 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-YTKNetworkDemo/Pods-YTKNetworkDemo-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
2 changes: 1 addition & 1 deletion YTKNetworkDemo/YTKNetworkDemo/UploadImageApi.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
//

#import "UploadImageApi.h"
#import "AFNetworking.h"
#import "AFHTTPSessionManager.h"

@implementation UploadImageApi {
UIImage *_image;
Expand Down