This is a great tool, but I have encountered some problems while using it. Can you help me?
I specified a custom Framework, but the hook did not work.
r16Menu.frameworkNamed = @"UnityFramework";
The address `0x1E15468` is directly obtained from IDA after decompiling the UnityFramework file.
int (*old_get_Gem)();
int new_get_Gem() {
NSLog(@"hook---------new_get_Gem");
return 102;
}
hook code
[r16Hook hook:@"0x1E15468" with:(void *)new_get_Gem original:(void **)&old_get_Gem];
I checked the dylib loading order through LLDB and found that my own `UnityTest.dylib` was loaded before `UnityFramework`.
[364] 0x0000000102da4000 /Library/MobileSubstrate/DynamicLibraries/UnityTest.dylib(0x0000000102da4000)
...
[369] 0x0000000109000000 /private/var/containers/Bundle/Application/D4AE8F9F-1403-4B4C-A533-9B8C5677D9C1/cookingadventure.app/Frameworks/UnityFramework.framework/UnityFramework(0x0000000109000000)
I don't know what I should do to load my own dylib after `UnityFramework`, nor how to get the offset address of UnityFramework in Tweak.