diff --git a/LXCastleGameFish.podspec b/LXCastleGameFish.podspec index 4520bbd..ef784cd 100644 --- a/LXCastleGameFish.podspec +++ b/LXCastleGameFish.podspec @@ -12,7 +12,7 @@ Pod::Spec.new do |spec| spec.author = { "AloneMonkey" => "liupeiqing1993@163.com" } #作者 spec.social_media_url = "http://weibo.com/xiaoqing28" #weibo spec.platform = :ios, "8.0" #平台、版本 - spec.source = { :git => "https://github.com/lyonxu/MonkeyDevSpecs.git", :tag => spec.version.to_s } #代码的git地址以及tag + spec.source = { :git => "https://github.com/lyonxu/LXCastleGameFish.git", :tag => spec.version.to_s } #代码的git地址以及tag spec.source_files = "LXCastleGameFish/**/*.{h,m}" #本地验证,表示当前目录以及子目录的所有h或m结尾的文件 如果发布到MonkeyPodSpecs需要填写git clone下来的对应的路径 spec.public_header_files = "LXCastleGameFish/LXCastleGameFish.h" #需要对外导出的头文件 此处为本地验证 spec.requires_arc = true #ARC diff --git a/LXCastleGameFish/LXCastleGameFish.m b/LXCastleGameFish/LXCastleGameFish.m index a21cc4f..ca6bf50 100644 --- a/LXCastleGameFish/LXCastleGameFish.m +++ b/LXCastleGameFish/LXCastleGameFish.m @@ -22,3 +22,19 @@ CHLoadLateClass(CustomViewController); CHClassHook(0, CustomViewController, getMyName); } + +//Hook的class +CHDeclareClass(AFHTTPSessionManager); + +// - (id)POST:(id)arg1 parameters:(id)arg2 progress:(id)arg3 success:(id)arg4 failure:(id)arg5 +CHMethod(5, void, AFHTTPSessionManager, POST, id, arg1, parameters, id, arg2, progress, id, arg3, success, id, arg4, failure, id, arg5) +{ + NSLog(@"%s::%@\n %@", __func__, arg1, arg2); + return CHSuper(5, AFHTTPSessionManager, POST, arg1, parameters,arg2, progress, arg3, success, arg4, failure, arg5); +} + +__attribute__((constructor)) static void entry() +{ + CHLoadLateClass(AFHTTPSessionManager); + CHClassHook(5, AFHTTPSessionManager, POST, parameters, progress, success, failure); +}