Assuming a jailbroken iPhone, how can I discover the number of an incoming call programmatica开发者_如何学编程lly? 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/
They use it as backup but I assume you can easily use SQLite to get content from it.
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.
精彩评论