johnno1962/InjectionApp

.m file duplicate error

Closed this issue · 11 comments

for the .m file changes it tries to compile but does not update and prints in the console as
"Loading .dylib - Ignore any duplicate class warning..."
also, it does not detect if the .cpp file is updated in case people use .c/.cpp projects with swift together

note also that function i am trying is
void doit(); in .h file

and in .m file

void doit(){
    printf("ahaa");
}

You can ignore the “Duplicate class warning” but I’m afraid you can’t inject C++!

but it is in objective-c file inside .m file and the code is not updated

the class variable methods inside objective-c get updated but strangely not the ordinary global methods/functions

You can only inject Objective-C or Swift methods, not global functions. They need to be dynamically dispatched.

what do you mean "dynamically dispatched"?

You can google that and get the answer but from injection’s point of view you can only inject methods of Objective-C or Swift classes is what you need to know.

what about c++ virtual methods ?

if i use them inside .mm file

I appreciate your feedback this tool is great