Nov

28

iPhone proximity sensing IS in the API

16 years ago, at the end of November | Leave a Comment

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.



»crosslinked«

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

Tagged with:
November 28, 2008 11:43


Comments

Name (required)

Email (required)

Website

Speak your mind

Current Electricity Use (15min)


iPhone/Webkit RSS Reader

Links


Tags

1-Wire android api Apple arduino currentcost DDAR development DVD FIC freerunner G1 google Google Phone gphone gprs GPS hardware image image builds inspiration iphone jailbreak kiosk linux Mac monitoring Music neo 1973 Nokia openmoko opensource OSX Pachube personal qtopia rhubarb rikki Rio slimp3 slimserver software tracking Trolltech u-boot


Twitpic


Graphy Stuff






Nasty Spam Monkeys