我知道这个问题已经被问过很多次了,但是用这段代码:
static void callback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
NSString *notifyname = (__bridge NSString *)name;
if ([notifyname isEqualToString:@"kCTCallIdentificationChangeNotification"]) {
NSDictionary *info = (__bridge NSDictionary *)userInfo;
CTCall *call = (__bridge CTCall *)[info objectForKey:@"kCTCall"];
NSString *caller = CTCallCopyAddress(NULL, call);
NSLog(@"RECEIVED CALL: %@", caller);
CTCallDisconnect(call);
}
我看到了 1 秒的通话((如何确保它不是并且它作为 iBlacklist 工作?