The syntax of Logos makes creating tweaks way easier. Logos helps us 'hook' into methods and allow us to run our own code on top of apples original code.
Every hook in Logos needs to consist of four things
%hookA Method%orig%end
You can compare the syntax of logos to html, they both need to be closed when you open a tag
<body>
Your Code here
</body>Ok, so what does that actually look like
%hook RandomClass
-(void)aRandomMethod {
%orig;
// our added code here
}
%endThis may look complicated but I assure you it isn't. logos syntax is incredibly easy to learn
In logos there are a few specific identifiers so its important to learn them all, for the sake of the Guide
I am only going to include the basic ones the rest are available here - LINK
%hook - This hooks into a class and allows us to modify the code that runs
%hook RandomClass%end - Just like in <HTML> we need to tell the complier we are finished with the hook
%hook RandomClass
%endNow we need to add a method or a variable, I will talk more about them later in the guide All you need to know right now is it is something from the original code that we can hook into and edit
%hook RandomClass
-(void)aRandomMethod {
}%orig - This tells the complier to execute the original code
%hook RandomClass
-(void)aRandomMethod {
%orig;
}Now all we need to do is add our modified code
%hook RandomClass
-(void)aRandomMethod {
%orig;
// Here is where our code we want to run will be
}That is logos syntax summed up