iOS client-side code using Phonegap