LoginSignup
8
8

More than 5 years have passed since last update.

サードパーティアプリのメソッドをhookする。メモ

Posted at

目的のアプリから以下を参考にヘッダーをダンプします。

http://qiita.com/noppefoxwolf/items/314b3e12a32c8f4c6672

$class-dump -H binaryname -o gender

LogosTweakによるプロジェクトを作成します。
iOSOpenDevや手動で作って下さい。(割愛)

プロジェクト内の
/Package/Library/MobileSubstrate/DynamicLibraries
に存在するFilterディクショナリ内のBundles配列にhookしたいアプリのBundle Identifierを文字列型で書き込みます。

.xmファイルにhookするクラスとメソッドを書き込み、処理も書きます。

%hook classname
- (void)method{
//your action
%orig;
}
%end

%で始まる行はマクロとして扱われ、例えば%orig;であれば通常通りの動作を実行します。

8
8
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8