I'm testing VMProtect on macOS latest demo version.
My product is dynamic library with objc classes. I did load dylib successfully with turning off packing option. But it seems to fail load objc classes in dylib. (tested on 10.15)
Test code:
Code: Select all
//
// in dylib
//
@interface Hello : NSObject
- (void)greeting;
@end
Code: Select all
//
// in app linking with dylib
//
- (void)someMethod {
//
// This code is work well with non protect code.
//
Hello *hello = [[Hello alloc] init];
[hello greeting];
}
I can lookup C-level symbols with dlsym like this:
Code: Select all
Class cls = (__bridge Class)dlsym(RTLD_DEFAULT, "OBJC_CLASS_$_Hello");
I think C-level linking works successfully but objc runtime don't load classes correctly. Is there way to fix?