开发者

Accessing the number of an incoming call on iPhone

开发者 https://www.devze.com 2023-02-12 21:13 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消