Backstory
Many a times I get asked which version of Ubuntu I use to develop and test Ubuntu Touch apps or even which device I run my stuff on. So I figured that it would be interesting to share how I get around doing what I do and also at the same time share some tips that might help you setup your workflow.
I am going to start of with my needs which are,
- Develop core apps like Clock, Calendar and be able to test them on a phone form factor (amongst others) to ensure they work as expected.
- Develop test suites (Autopilot, QML, Manual Tests) which needs to be run on the device before every merge proposal to prevent regressions.
1. Developing and running Core Apps
My primary machine runs Trusty 14.04 period. It is my main machine that I use for development and also for other important purposes like University, Personal uses cases etc, and I am not a big fan of updating it every 6 months. And to be honest it has served me quite well up and I don't want to pass that on.
My primary machine runs Trusty 14.04 period.
When I heard that the Ubuntu SDK wouldn't be updated in Trusty, I was shocked! I was so fixated on keeping Trusty that I decided to look for alternative ways of developing core apps while still keeping Trusty. So I naturally created a Utopic Virtualbox VM and used that for a while.
Disclamier: You have to understand though that it is a legitimate challenge to backport newer versions of the SDK to Trusty since it requires the entire Qt 5.3 which is a massive undertaking if it was to be backported.
That's when I talked to Zoltán Balogh and he explained things to me. There is a distinction between the development environment and the testing environment. So while it is necessary for an application developer to test his application on an environment that best simulates the real device may that be a phone, tablet or anything, the developing environment can very well just be any ordinary system (without the latest ubuntu-ui-toolkit and other packages).
This is done by integrating the test environment (Ubuntu Emulator) closely with the Ubuntu SDK IDE. In recent times, it has been a breeze getting the core apps like Clock and Calendar running on the phone and the emulator. The i386 emulator starts up rather quickly (around 20-40 seconds) and running your app on the emulator takes about 4-5 seconds. The SDK devs also ensure that the test environment tools like the ubuntu emulator runtime package, qtcreator-ubuntu-plugin are up to date on Trusty.
David Callé has done a brilliant job in adding some much needed tutorials to get started with the Ubuntu Emulator and the SDK that you can find here.
And as such I use Trusty 14.04 to develop and run all core apps.
2. Test suites for Core Apps
This one is a bit tricky and is part of the reason why I cannot have one universal golden device to work with. Test suites are an important part of the core apps development process. If your merge proposal doesn't pass the tests, then it certainly will not be accepted. As a result it is important that your testing environment is able to run the test suite to verify that you are aren't introducing any regressions.
With Autopilot tests this isn't so much of an issue since with the help of autopkgtests, running tests on the device is quite simple. However as of now, I haven't found a way to run QML tests on the device or emulator despite my best attempts at it. If you do find a way please do answer it here and you would be my hero :D. As a result the next best environment is the development environment. However since Trusty isn't getting the latest SDK which is required for running the tests, I was rather stuck with a Virtualbox VM (which I hate since they are awfully slow and heavy).
As usual, I did what I do best which is to go and complain about that on IRC :P. That's when Sergio Schvezov introduced me to LXC Containers. I had absolutely no idea about them at the time. If I were to describe LXC Containers in a few words it would be,
"LXC Containers are schroots on steroids. They allow you to have any distro's environment without the unnecessary overhead of the desktop shell, linux kernel etc.."
So they are somewhat like the smarter cousins of Virtualbox VMs which requires a hefty amount of resources to run. If you are interested in reading more about LXC then I highly recommend that you take a look at this. If you want a shorter version of how to apply that for Ubuntu Touch development, you will have to wait for my next post :-) which will be about setting up LXC containers and installing the Ubuntu SDK in it.
Summary
As a 3rd party app dev, you should be able to do pretty much everything related to developing Ubuntu Touch apps on Trusty 14.04 LTS. Don't let anyone convince you otherwise that you would need the latest release of Ubuntu to do that. If you are having issues getting your emulator up and running after reading through the tutorials here, please bring it up in the mailing list or on IRC at #ubuntu-app-devel, #ubuntu-touch.