Titanium Mobile’s Android development now less painful than Prostate Exam – Mobile SDK 1.8 (!) + Fastdev

A few days ago, Appcelerator announced a really cool new feature: Fastdev for Titanium Mobile. This thing cuts dramatically development times for Android apps as all the wait time spent recompiling and re-publishing the app to the emulator simply disappears!

The problem

Normally, Titanium has to compile the entire titanium class library, then “dex” it and package all your app’s js files and resources and push it inside the emulator so you can test it – and this happens every time you change something in your app. The problem here is… this is slow, really slow. This fact alone almost drove me off Titanium Mobile, in favour of other, friendlier, platforms.

Using Fastdev

First download a recent nightly build of Titanium Mobile SDK (latest 1.7.x or 1.8.0) – more details in this previous post.

Now, the tricky part. This feature is still in beta, so there is no fancy UI integration inside Titanium Studio, and we need to do everything “by hand”.

First, add the 1.8.0 SDK folder to your system environment’s PATH (if you don’t know how to do this, click here). After this, in the command shell, go to your application’s folder and type:

start /B titanium fastdev start

This will start a new server that will send all the .js files and resources to your app, running in the emulator (according to Appcelerator, using fastdev on devices will be available soon). The files served are logged into this terminal window, so keep it open and visible, to check what is happening under the hood.

After this, just run the app on the emulator, as always, but do it only ONCE – if you need to update your app, don’t recompile: just close it inside the emulator and run it again – it will download all the resources from the fastdev server started above!

And that’s it, much faster and less painful… unless you are targeting honeycomb; but here the problem is that the emulator is, I think officially, the slowest emulator in the world.

Update: fastdev is already available inside the latest Titanium Studio – update it ASAP


Posted

in

by

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from try {} except

Subscribe now to keep reading and get access to the full archive.

Continue reading