Jump to content

Tweak.xm hooking


Go to solution Solved by Goggwell,

5 posts in this topic

Recommended Posts

Posted (edited)

So I'm trying to get this right, just started trying "hack" on my own and create a tweak. In tweak file I'm a little bit unsure about hooking, I have a ss here. Should %Hooking "appnamehere" should I hook the app? Or?

 

reQD7xA.jpg

Updated by KESI
  • Solution
Posted

If this is a tweak (which I'm assuming it is), then just %hook classname, no need to do anything with the app name.

 

If you want the tweak to work for a specific app, simply add the bundle ID of the appwhen making the tweak (during the setup stage in the Terminal, when it asks for a bundle ID like com.apple.springboard).

 

This can be found in the Info.plist of the app (select Property List Viewer, then find CFBundleIdentifier and copy the name there into the setup in Terminal).

%hook ExampleClass //replace with your class name, and this is a comment

-(int)coins {
return 9999;
}

-(int)cash {
return 9999;
}

%end
Posted

If this is a tweak (which I'm assuming it is), then just %hook classname, no need to do anything with the app name.

 

If you want the tweak to work for a specific app, simply add the bundle ID of the appwhen making the tweak (during the setup stage in the Terminal, when it asks for a bundle ID like com.apple.springboard).

 

This can be found in the Info.plist of the app (select Property List Viewer, then find CFBundleIdentifier and copy the name there into the setup in Terminal).

 

%hook ExampleClass //replace with your class name, and this is a comment

-(int)coins {
return 9999;
}

-(int)cash {
return 9999;
}

%end

 

Aaah okay, now I get it. Already did that with bundle id. Thanks for the help @@Goggwell! :)

Posted

No problem! Feel free to ask me personally if something goes wrong :D

Yay! Thanks for helping again! :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines