- static NSString* (*_orig_CTTelephonyNetworkInfo_currentRadioAccessTechnology)(id _self, SEL _cmd1);
- NSString *CTTelephonyNetworkInfo_currentRadioAccessTechnology(id _self, SEL _cmd1){
-
- NSLog(@"CTTelephonyNetworkInfo_currentRadioAccessTechnology");
- return _orig_CTTelephonyNetworkInfo_currentRadioAccessTechnology(_self, _cmd1);
- }
-
- MSHookMessageEx(objc_getClass("CTTelephonyNetworkInfo"), @selector(currentRadioAccessTechnology), (IMP)CTTelephonyNetworkInfo_currentRadioAccessTechnology, &_orig_CTTelephonyNetworkInfo_currentRadioAccessTechnology);
复制代码尝试Hook [CTTelephonyNetworkInfo currentRadioAccessTechnology],但是上面这个代码编译不了,提示No matching function for call to 'MSHookMessageEx' 这是为什么?
|