iPhoneTiddlyWiki: Working Offline
September 13, 2007
So, here at Osmosoft been lucky enough to have access to an iPhone to play with for the last few weeks. Our first discovery was that TiddlyWiki works just fine on the iPhone - apart from being excruciatingly slow. TiddlyWiki is so meaty you really feel the 20x speed difference between a MacBook Pro and an iPhone. Anyhow, I’m confident that we can slim TiddlyWiki down to the extent that it runs at a reasonable speed on these new portable slow AJAX devices. (If you try the leaner and meaner first version of TiddlyWiki on an iPhone, it’s a good deal snappier).
The other problem is that saving doesn’t work properly because the TiddlyWiki is being accessed via http. We can expect that TiddlyWiki adaptations that support serverside saving (like TiddlySpot) will work, but that doesn’t really speak to the TiddlyWiki vision of untethered access to the information that you need.
I quickly discovered a potential solution: the iPhone supports bookmarks whose URL is a data URI. The procedure is to use something like Hixie’s data: URI kitchen to encode a file (HTML, images or PDFs all seem to work fine; possibly Word and Excel Documents too) into a data: link. Then right-click on the link and select “add to bookmarks”. You’ll end up with a bookmark that starts something like this:
data:text/html;base64,PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBY....
When that bookmark is invoked, the base64 data is converted back into a binary file, which is then displayed by the browser - all without recourse to the Internet.
The really interesting thing is that Safari/iPhone support bookmarks of up to 32 megabytes or so, which suggested the possibility of embedding an entire TiddlyWiki in a bookmark. And, it turns out that it works — giving you offline read-only access to TiddlyWiki files on an iPhone.
Here are the steps to convert any TiddlyWiki to use offline on the iPhone
1. Locate the TiddlyWiki file you want to convert (it can be stored locally or on the internet)
2. Go to Hixie’s data: URI kitchen in Safari
3. Make sure the ‘base64′ checkbox is enabled
4. Either enter the URL of the TiddlyWiki file in the text box, or use the ‘Choose file’ button to select a local file
5. Click ‘Generate’
6. Wait; it can be quite slow to do the conversion with a big TiddlyWiki file
7. Right click on the resulting link and select ‘Add Link to Bookmarks…’
8. Go to iTunes and make sure that you’ve selected to sync your Safari bookmarks with the iPhone
9. Sync the iPhone
10. On the iPhone, select the bookmark
This is all still quite rough and ready; there’s still a bunch of work to do to get a first-class TiddlyWiki experience on the iPhone. In my next post I’ll be looking at optimising the TiddlyWiki user interface for the iPhone, to make it look and feel more like a native application.
Apple Speculo-predictions for June 2007
June 4, 2007
In decreasing predictiveness and increasing speculativeness:
- LED displays. Gorgeously lush shiny displays with a scary resolution (160dpi? 200dpi?) that show solid, tangible textures
- In Leopard, one new window frame look and feel to rule them all, with brushed metal and new-fangled unified both banished, but subtly different textures for different types of window background
- A slimline MacBook ProLite weighing less than 1lb, without a hard-drive optical drive or PCI slot, with the ability to keep your home folder on an attached iPod. Happiness would be the touch sensitive undercarriage
- New transition animations to replace the Genie effect in the dock, and for windows closing, fast user switching and so on. And maybe new animations for higher level UI operations like copy, paste and printing
- The death of swooping dialogues; just because they’re so 2000. The new dialogues will do something more like a lightbox effect, because that’s trendy
- A new finder based on a multi-touch friendly ZUI with piles of documents and aliases
- Relaunch of .Mac as a mashup service brand, offering easy mashup-y widget tools across the web and the OS X Dashboard (Mac + iPhone)
- An Apple Television channel in partnership with Google viewed in iTunes and the AppleTV, based on YouTube and possibly Google’s existing local TV channel partnership
- A gleaming, animated sparkling effect around window borders and titles that reflects off nearby windows, used to draw attention to windows and to show relationships as windows are dragged around
…but I’d like to make it clear that I’m only a breathless Mac fanboy until something shinier comes along.









