I love playing with iPhone URL schemes. And if you ask me, just like for Mail.app and Safari, I think there should be a “default” Twitter client URL scheme in the iPhone, with an interface in the Settings application allowing you to set the application that you prefer to tweet. Alas, this is not the case, and each application must manually allow users to select their preferred client, from a list of known ones.
Having documented iPhone URL schemes for TwitterFon, Twitterrific, Tweetie and Twittelator, I’ve created a project, available in Github, called TwitThis, which helps users choose their preferred Twitter client, and makes it easy to remember the user choice, and to launch the associated application with a single command:
This application has the following features:
- The class TwitterClientManager loads a list list of supported Twitter clients is loaded from a plist file, which can be extended to support more clients in the future;
- Each Twitter client is represented by an instance of the TwitterClient class;
- The user can choose his preferred Twitter client at any time, and launch the application by a simple touch; the TwitterClientManager class stores the selected value in the user settings.
If you have to support several different Twitter clients, feel free to use these classes in your own project! The project, as usual, is available in Github with a liberal BSD license. Enjoy! I’d love to hear your comments below.