Код: Выделить всё
NSNumber *addition(NSNumber *num1, NSNumber *num2) {
double result = [num1 doubleValue] + [num2 doubleValue];
return @(result);
}
Код: Выделить всё
#import
NSInteger addition(NSInteger num1, NSInteger num2);
%hookf(NSInteger, addition, NSInteger num1, NSInteger num2) {
return 99;
}
Код: Выделить всё
==> Linking tweak objchooker (armv7)…
ld: warning: -multiply_defined is obsolete
Undefined symbols for architecture armv7:
"_addition", referenced from:
__logosLocalInit in Tweak.x.f54e192c.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/hnin.sin/Desktop/objchooker/.theos/obj/debug/armv7/objchooker.dylib] Error 1
make[2]: *** [/Users/hnin.sin/Desktop/objchooker/.theos/obj/debug/armv7/objchooker.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [objchooker.all.tweak.variables] Error 2
Подробнее здесь: https://stackoverflow.com/questions/784 ... an-ios-app
Мобильная версия