Friday, August 29, 2008

The most useful iPhone app I can't release

PLEASE NOTE: This technique described here was originally done for iOS 2.0. It no longer works under iOS 4. If you want to turn on Bluetooth programmatically, you can do so using the iPhone GameKit SDK. However, this does not allow you to turn Bluetooth off. It only provides a method to turn it on.


I have long since abandoned using private APIs for any of my projects, so I unfortunately can not provide any advice on how you might be able to toggle Bluetooth under iOS 4.


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
owners.

Changing the Font in iPhone Notes

I just accidentally discovered a way to disable the default "handwritten" style font (officially called Marker Felt) used in the iPhone Notes app. This can be done on a note-by-note basis. Here's a screen shot illustrating the differences between the two fonts:


It's quite simple to get this behavior. First (and you only need to do this once) go into your main iPhone settings and enable an international keyboard. You can do it via the Keyboard settings (as shown below) or via the International settings. Choose to add a new keyboard, specifically one with Japanese support.


Then, when you are editing a note, press the world icon next to the space bar:



This will toggle your keyboard mode amongst the keyboard settings you chose earlier. When you get to the Japanese keyboard (as can be seen by the funky space bar) simply press any character on the keyboard and your current note will instantly revert to a normal non-handwritten font. And, as an added benefit, you can type Japanese characters.



Even if you delete the international characters from the note, it will remain in this font. I'm assuming the iPhone must be saving either font or character set information on each individual note. Too bad there's no way to select a specific font to make each note stand out from others on the main list.

All content copyright © 2009  Brian Stormont, unless otherwise noted.   All rights reserved.