Quantcast
Channel: ..the cat came back.. » Apple
Viewing all articles
Browse latest Browse all 3

iPhone proximity sensing IS in the API

$
0
0

There seems to have been a lot of misinformation flying about of late. With Google releasing a new version of their app incorporating proximity sensing, some blogs have claimed this is breaking AppStore rules by using undocumented hidden (non public) API calls. I’m here to tell you that’s just rubbish. All that has happened is the people reporting it haven’t even bothered to check. Want to prove this to yourself?

1. Start Xcode and pick one of the templates.
2. Load up the AppDelegate code and skip to ‘applicationDidFinishLaunching’.
3. Type ‘application.’ (note the full stop after the word application)
4. Hit escape and you’ll get a list, scroll down to items starting with P
5. Oh look there it is…

For those without Xcode here’s a picture.

Oh, that must be the non-public public api...

Oh, that must be the non-public public api...

For those that want to see the what the documentation says


proximitySensingEnabled

A Boolean value that determines whether proximity sensing is enabled.

@property(nonatomic, getter=isProximitySensingEnabled) BOOL proximitySensingEnabled

Discussion
YES if proximity sensing is enabled; otherwise NO. Enabling proximity sensing tells iPhone OS that it may need to blank the screen if the user’s face is near it. Proximity sensing is disabled by default.

Availability

Available in iPhone OS 2.0 and later.

Declared In
UIApplication.h

Unfortuneately once some people grab hold of false information no facts will get in their way. Anyone that knows me will tell you that I’m really not fond of either Google or Apple, but let’s just get stuff right shall we.


Update:
I’ve had some discussion on irc and it was felt that I should point out that proximityStateChanged is used and following some additonal chatter on IRC with UncleBob who pointed out that “It’s not private in the OBjC sense just the Apple documented SDK sense. ” he then went on to say “the whole thing is definately a peanut-gallery cockfest” which sums it all up really.




[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon] [Twitter]


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles



Latest Images