[英]Accessing the number of an incoming call on iPhone
Assuming a jailbroken iPhone, how can I discover the number of an incoming call programmatically? 假设iPhone越狱,如何以编程方式发现来电号码? And how can I access the call logs?
以及如何访问通话记录?
There is quite a good post about file locations on the jailbroken device at this page: http://www.ihackintosh.com/2009/07/manually-backup-iphone-contacts-sms/ 在此页面上,关于越狱设备上文件位置的文章很不错: http : //www.ihackintosh.com/2009/07/manually-backup-iphone-contacts-sms/
They use it as backup but I assume you can easily use SQLite to get content from it. 他们使用它作为备份,但是我认为您可以轻松地使用SQLite从中获取内容。
Try using the following observer to find the incoming call event: 尝试使用以下观察者查找来电事件:
id ct = CTTelephonyCenterGetDefault();
CTTelephonyCenterAddObserver(ct, NULL, callback, NULL, NULL, CFNotificationSuspensionBehaviorHold);
and then base on the type: kCTCallStatusChangeNotification
and using this function CTCallCopyAddress
you will be able to get the caller ID. 然后根据类型:
kCTCallStatusChangeNotification
并使用此函数CTCallCopyAddress
您将能够获取呼叫者ID。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.