Hi! So i'm trying to get into mod/hack development for iOS, and have been following some of the pinned tutorials. In there their new function simply returns a number (like 999 I think), but what I'm currently trying to do is overwrite a function that normally sets a property inside the class (It's an NSSet). My question is, how can I set that property from my own function? For example:
#import <substrate.h>
#import <Foundation/Foundation.h>
static void customPowersSet() {
// I imagine it would be something like this, but that's a complete guess
self.powersSet = [NSSet setWithArray:@[@1,@3,@7,@6,@8,@5,@2]];
}
%ctor {
MSHookFunction(MSFindSymbol(NULL, "____BikeInfo_setPowersSet__"),(void*)customPowersSet, NULL);
}
I'm coming from C# so this sudden switch to Objective-C has been... interesting so far! It would be great if someone could point me in the right direction