WordPress and Phonegap (part2)
May 14, 2013
In Part 1, we learned how to get WordPress to work as backend platform for our future mobile app. Now we have nicely formatted JSON feed coming from WordPress and we can use it anywhere with ajax request. This part will explain how to get phonegap set up and prepare some boilerplate for our app using jQuery Mobile, CSS and HTML.
Phonegap has really well explained guides on setting up phonegap locally for iOS, Android or any other target platform. I recommend to read through the documentation and follow step by step direction, there are some terminal commands involved, but don't panic it's not that bad. Basically all you need to do is install Xcode (for ios) or Eclipse (for android), download phonegap SDK and latest phonegap source and then start executing some terminal commands while in source folder you just downloaded.
$ open -a Google\ Chrome --args --disable-web-security
It's not recommended to run chrome in this mode all the time due to security vulnerability.
That's it for preparation part. At this point you should have fully functional Phonegap starting point that includes jQuery mobile, HTML and CSS file and obviously all Phonegap dependencies files (which we'll not be touching anytime soon). Our focus for the next part will be creating html pages using JSON feed coming from WordPress.