In some of the apps, when you try to hack a class with a "." or a dot function.
Flex to Tweak.xm Tutorial:
https://iosgods.com/topic/904-tutorialvideo-hack-games-with-flex-and-convert-it-to-deb-tweak/
There are more on this kind, check them out!
Let's get started!
In Flex, it would work fine, but when you try to convert flex to tweak.xm and make package.
It gives you an error, "error: cannot use dot operator on a type"
*I don't hack this application, it's an example to solve this issue*
Using the tutorial, flex to tweak.xm.
I get this,
%hook OkCupid.OKMessage
-(BOOL)read {
return TRUE;
}
%end
It will throw me an error after "make package" command in terminal.
A way around the error template:
%hook AnyRandomNameHere
- (id)description {
return %orig();
}
%end
%ctor {
%init(AnyRandomNameHere = objc_getClass("ClassNameWithADotHere"));
}
Now, I will convert it in this way.
Final Code:
%hook CupidMess
-(BOOL)read {
return TRUE;
}
%end
%ctor {
%init(CupidMess = objc_getClass("OkCupid.OKMessage"));
};
I saved the file and use "make package" command and it proceed without error!
Adding 2 or more dot functions Guide
Credits:
@Amuyea for this tutorial.
@AnotherLurker for this post regard to this issue in Help & Support.
https://iosgods.com/topic/41019-theos-errorswift/?do=findComment&comment=1340552