Closed liuxuan30 closed 5 years ago
%init;
or %init();
with no group name implies initialising _ungrouped
. Groups can’t override each other — actually you can have a hook for the same method in multiple groups and they will be applied in the order you init them. Nothing is overridden on Logos’ level; it’s just allowing you to control exactly where in the program Logos places the calls to Substrate to create the hooks.
Running Logos directly or checking for the processed Logos output under .theos/obj/arm64/Tweak.x.m
might help you to understand what exactly Logos is doing and if it might be an issue on our side. See my example below.
Hi @kirb, thanks for answering! It turned out that one of my MSHookMessageEx crashed, so it seems the init is overwritten. Deleting the crash code will work like you said.
btw, in my path .theos/obj/debug/arm64
, I didn't see a Tweak.x.m like yours, just Tweak.xm.f4523a75.Td
and Tweak.xm.f4523a75.o
. Did I miss anything? Thank you.
I think this thread can be closed then
Hi there,
I'm not sure if this is the right place to ask; sorry.
I want to ask, can multiple conditional %init work together in one %ctor? For example,
I have some function hooks as a group, I only want to init this group for certain condition, and other non-grouped hooks get still inited.
I have below code sample:
Is this allowed? From what I tested, it seems %init(SomeGroup) will override %init(), meaning those ungrouped hooks is not initialized after %init(SomeGroup) is called.
If I am wrong, how can I achieve my goal? Thanks