Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyon Xu authored and Lyon Xu committed Oct 3, 2018
1 parent 8dea340 commit 39056e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LXCastleGameFish.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions LXCastleGameFish/LXCastleGameFish.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 39056e5

Please sign in to comment.