Implementing image support
We left a few features unfinished in the last chapter. Currently, you cannot attach images to a to-do item or choose a location from the map. Let's implement the first of these now.
Installing the Cordova camera plugin
As Sencha Touch is a platform-agnostic framework, it doesn't have hooks in any of the native capabilities of your devices, including the camera. The downside is that there isn't a platform-independent way to attach photos. You have to implement separate solutions for different platforms. To keep things simple, we'll implement a solution for iOS. You'll be able to continue using the app with your desktop browser; you just won't be able to attach photos.
In Chapter 2, Building a To-do App we used Cordova to package our Sencha Touch app and deploy it to iOS. Cordova provides you with the ability to integrate with your phone's native capabilities through a plugin system. We'll use the camera plugin to give the app...