Jump to content

 Something great is coming! 🤖

Stay tuned for the big reveal happening here on iOSGods on the 20th of February!

The countdown has finished!

First time hacking a -(void) help


Go to solution Solved by KingRalph,

17 posts in this topic

Recommended Posts

Posted

so like this

%hook CLPEngine

-(void)removeSubsriptionTimeObserver:(id)arg1

arg1 = // NULL

%end

No, like this:

 

%hook CLPEngine

-(void)removeSubsriptionTimeObserver:(id)arg1
arg1 = NULL;

%end
  • Solution
Posted

So the void I'm trying to hack it has the class of course so %hook then the class then it has -(void) removeSubsriptionTimeObserver:(id) then it has a return value (void) then below it is Argument #1 (Id) then below the Argument is NULL how would I put this ^ in my tweak.xm

This is the answer to your question:

%hook CLPEngine

-(void)removeSubsriptionTimeObserver:(id)arg1 {
    %orig(nil)
}
%end
Posted

This is the answer to your question:

 

%hook CLPEngine

-(void)removeSubsriptionTimeObserver:(id)arg1 {
    %orig(nil)
}
%end
do I do yours or shmoos
Posted (edited)

do I do yours or shmoos

TBH, it doesn't make much of a difference, but using nil instead of NULL is generally a better habit. (Due to system level programming) :3

 

EDIT:

I just remembered that %orig calls the original function. The (correct) answer to your question, is:

%hook CLPEngine
 
-(void)removeSubsriptionTimeObserver:(id)arg1 {
    arg1 = nil;
}
%end

 

Updated by KingRalph
Posted

 

TBH, it doesn't make much of a difference, but using nil instead of NULL is generally a better habit. (Due to system level programming) :3

 

EDIT:

I just remembered that %orig calls the original function. The (correct) answer to your question, is:

%hook CLPEngine
 
-(void)removeSubsriptionTimeObserver:(id)arg1 {
    arg1 = nil
}
%end

 

do i put %orig if so where because im no pro at his yet im still learning a alot about it  

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