Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Require CoreTelephony framework examples

Greetings everyone.

Can any one has a working example for the CoreTelephony framework? I dumped all the CoreTelephony headers using class-dump and added them to "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.3.sdk/System/Library/PrivateFrameworks/CoreTelephony.framework". Now I'm following the Erica's tutorial (http://blogs.oreilly.com/iphone/2008/08/iphone-notifications.html).

I added these following lines of code in my main.m,

  id ct = CTTelephonyCenterGetDefault();
  CTTelephonyCenterAddObserver(
        ct, 
        NULL, 
        callback,
        NULL,
        NULL,
        CFNotificationSuspensionBehaviorHold);

but I'm getting a warning like,

Implicit declaration of function "CTTelephonyCenterGetDefault()" and "CTTelephonyCenterAddObserver(...)".

Can any one has full working example, which will explain how to get the CoreTelepony notifications?

like image 353
prathumca Avatar asked Mar 10 '26 02:03

prathumca


1 Answers

I have been successfully using this private framework. The warnings will not prevent your code from running, but you could put the following declaration in your code to get rid of the warning on CTTelephoneCenterGetDefault():

id CTTelephonyCenterGetDefault();

(you can do something similar for the CTTelephonyCenterAddObserver() warning, if you like)

like image 188
Tony Avatar answered Mar 12 '26 15:03

Tony