在用反射调用sdk动态库,发现必须要加载一次,所以备注dlopen提前加载动态库
NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
NSString* dlPath = [NSString stringWithFormat: @"%@/Frameworks/###.framework/###", resourcePath];
const char* cdlpath = [dlPath UTF8String];
void* hModule = dlopen(cdlpath, RTLD_LAZY);
dlclose(hModule);
网友评论