ASi

iOS未リンクシンボルへの動的アクセス方法

#import 

{
    void* sym;

    void* hn = dlopen("/System/Library/Frameworks/CoreBluetooth.framework/CoreBluetooth", RTLD_NOW);
    sym = **1;
    NSLog(@"%@", (NSString*)(sym));
    
    sym = **2;
    NSLog(@"%@", (NSString*)(sym));
}

*1:void**)dlsym(hn, "CBUUIDGenericAccessProfileString"

*2:void**)dlsym(RTLD_SELF, "NSGenericException"