码迷,mamicode.com
首页 > 其他好文 > 详细

Logos

时间:2014-05-11 15:50:10      阅读:305      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   code   ext   c   

Logos

  Logos is a component of the Theos development suite that allows method hooking code to be written easily and clearly, using a set of special preprocessor directives.

  Logos是Theos的三大组件之一,通过一系列的预处理命令,使得method hooking代码可以写得简单干净。

  The syntax provided by Logos greatly simplifies the development of MobileSubstrate extensions ("tweaks") which can hook other methods throughout the OS. In this context, "method hooking" refers to a technique used to replace or modify methods of classes found in other applications on the phone.

  Logos is distributed with Theos, and you can use Logos‘ syntax in any Theos-built project without any extra setup. For more information about Theos, visitits page.

1、You can use logify.pl to create a Logos source file from a header file that will log all of the functions of that header file. You can find logify.pl at $THEOS/bin/logify.pl and you would use it as so:

  bubuko.com,布布扣

2、%init

  用于初始化group,未提供group名时,使用‘_ungrouped‘。

3、%group

  必须以%end结尾。一个%group可以包含多个%hook。必须用%init初始化的group才会生效。

4、%ctor

  如果不显示指定,Theos会自动生成一个%ctor,并在里面调用%init(_ungrouped)。

5、%new

  用于为一个现有classs添加新函数。

6、%c

  等于于objc_getClass()。

参考:http://iphonedevwiki.net/index.php/Logos

Logos,布布扣,bubuko.com

Logos

标签:style   blog   class   code   ext   c   

原文地址:http://www.cnblogs.com/tekkaman/p/3721648.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!