Friday, August 29, 2008

The most useful iPhone app I can't release

Here's the most simple, yet useful application I've made for the iPhone. You click on the Bluetooth® icon and Bluetooth is toggled on or off. That's it. The app even immediately exits after you click on it.

This is much simpler than how you normally have to turn Bluetooth on or off via the iPhone settings. Compare. Here's a screen shot of my app. One tap and Bluetooth turns on or off.

Now here are the four screen shots of turning Bluetooth on or off via the iPhone settings menu.

Now, counting the final click of the home button, that's 5 clicks vs. just one with my app. Granted, it's a very simple app and many other people have suggested doing this same thing. However, what is frustrating is there's no way anyone can legally give this app to anyone. The Apple iPhone SDK specifically prohibits using private framework APIs, and unfortunately, to access the Bluetooth functionality requires using the private frameworks.

Hopefully some day soon Apple will change this policy. There's a lot more useful things that can be done in these apps if Apple would just allow developers to use the private frameworks. I currently have an outstanding query into Apple's developer support regarding this issue (I get two free tech support queries with my developer license) but it's been almost a month now and Apple still hasn't responded.

Interestingly, as of today, there are actually several applications in the iTunes App Store which do make use of the private frameworks - in direct violation of the SDK license agreement. It appears the people in charge of approving apps either have no way to automatically scan an app for private framework API calls or they are turning a blind eye on it since Apple gets 30% cut of all money these applications earn.

As for me, I'm currently not willing to risk my iPhone developer license by knowingly submitting an app that is in violation of this policy.

The Bluetooth® word mark and logos are registered
trademarks owned by Bluetooth SIG, Inc. and any use of
such marks by Stormy Productions is under license. Other
trademarks and trade names are those of their respective


Anonymous Peter said...

Very interesting! I've been trying to create an app that toggles the airplane mode feature on my non-jailbroken iphone (just for personal use) but it doesn't seem to work.

I've been trying to use dynamic linking via dlopen but I just get a NULL handle so I assume the apple sandboxing does not allow this.

Did you use dynamic linking or one of the private APIs? Have you found an API that toggles the airplanemode? I could only find a setAirplaneMode method in BluetoothManager but that did not have any effect on my phone...


September 7, 2008 12:47 PM  
Blogger Mostly Torn said...

Hi Peter,

I am using the BluetoothManager private framework to accomplish my toggling of it on and off. From the testing I've done, the setAirplaneMode method for the Bluetooth manager is Bluetooth specific - it's not the master control for shutting down all wireless services. It does get called when you click on Airplane Mode in the Settings screen. (When enabled, it silently prevents you from turning Bluetooth on.) You can verify this by viewing the console log on the iPhone.

If you haven't looked at that, it's very useful to see what is going on behind the scenes when you run different applications or change different settings.

I haven't yet found the function for performing the system-wide Airplane mode toggling just yet. I'm wondering if accessing it via the SCPreferences API might work. It's not something I really needed to do, so I haven't really invested much time in looking into it.

Good luck!

September 7, 2008 4:24 PM  
Anonymous Peter said...

Thanks for the info!

I hadn't thought about the console log, very useful!
I'll do some testing and see what I come up with...


September 8, 2008 7:24 AM  
Anonymous Anonymous said...

Yeah, this is the first app I conceived of writing when I got my iPhone. I planned to take it one step further and toggle the wifi radio, too. Or some simple combination.

Maybe one day we can do this within the bounds of the official API.

September 20, 2008 6:37 AM  
Anonymous Jinny said...

Do you know how to inquiry the devices and get mac addresses using bluetooth private framework in iphone? I wonder....
Thank you

October 21, 2008 7:06 AM  
Anonymous Anonymous said...

I can only join all of you in your attempts to make this kind of applications live :) I prefer unbroken iPhone (although I tried it with jailbreak and lots of custom Cydia applications) and I really dream of having legal simple prefs switching applications like the one for Bluetooth and Wi-Fi. Actually my idea of an application is having something similar to Nokia profiles (maybe even time-switchable) where you have all those simple things like ring type, bluetooth, wi-fi, etc. Pity we can't do that :((

November 24, 2008 8:49 AM  
Anonymous Anonymous said...

Hi - this is almost exactly what I want...
As the iphone is such a power hungry beast, I would like to see a power management app. where all the various connections can be turned on/off on one simple screen:
- 3G
- Wifi
- Bluetooth
- Locations services (GPS?)
- Airplane mode (although this is easily reached directly in settings)
- anything i've missed?

if apple allow whatever programming method is required to do this, i would be one of the first to download the app!

December 2, 2008 2:44 AM  
Blogger St0rM said...

Would be SO good to have it legally released... SOO good...

December 6, 2008 3:36 AM  
Anonymous Anonymous said...

How about an app that allows you to manage/toggle all of the following:

Location Manager

all in 1 or 2 taps?


January 12, 2009 7:58 AM  
Anonymous Anonymous said...

And if you could make it location aware...that would be truly great! I want something that will turn wifi on when in the office and at home. Off as soon as I drive away from either and at night after a set time. This should be a built in functionality or at the least, allowed through 3rd party apps. Here's hoping Apple sees the utility in this.

January 13, 2009 7:03 PM  
Blogger Lisa said...

I agree about the location awareness idea. I have just switched from a windows mobile device on which I'd installed an app that recognized what mobile cell the phone was connected to and changed settings accordingly. I had it set to turn wifi on but everything else off (including ringer) at home and work but to switch wifi off and bluetooth on when I left these cells for the car. It was so useful but I guess apple's policy prohibits anything like it for the iphone at present?

January 18, 2009 9:01 AM  
Anonymous KayZee Solutions said...

Great idea. If you are planning on selling this app then I understand your frustration. However, since you are a developer, you can put this app on your iPhone (and hand it out to any friends through Ad Hoc) and move on to something bigger/better :)

January 19, 2009 2:44 PM  
Anonymous Anonymous said...

Interesting article. I was looking for this application without jail breaking the phone. It seems Apple has crippled the phone in some areas, like this one. Location aware features for settings would be useful and definitely reduce some of the frustration of toggling settings so you can make it a full day on battery.

February 5, 2009 12:50 PM  
Blogger thecoleorton said...

The features we've all noted in the above comments are covered in the Android app, "Locale".

It's too bad there isn't an API to turn off wifi, bluetooth, set a different ringer, turn your phone to vibrate - based on your location.

Has Apple responded to your question about the availability of such API?


February 7, 2009 11:34 AM  
Anonymous Anonymous said...

I like the idea of a time/location-sensitive profile app that also allows for quick and basic toggles.

As an IT admin, I have several folks who need to use the iPhone in different ways in different environments. The previous "smartphones" we had couldn't do much, didn't suck down much data, and had decent battery life so there was little need for location/time-based profiles.

Fingers crossed that Apple either adds functionality or loosens API constraints...

February 13, 2009 8:59 AM  
Blogger Brian said...

I've been trying to create an application that provides a switch for WiFi, Bluetooth, and screen brightness, along with a graph of the battery usage since the last charge with percentage and estimated time remaining. I think it would be a very useful app, but unfortunately I won't get it completed unless Apple changes their mind and allows it (I was wondering why there wasn't any good power management apps). Oh well, on to something else.

February 22, 2009 11:42 AM  

Post a Comment

Links to this post:

Create a Link

<< Home