Monday, February 23, 2015

PhoneGap: Part 2

Bash, Bourne Again SHell, a pun from the Bourne Shell which was the usual shell from Unix. Or at least so says Wikipedia, the source that knows all. Before returning to phonegap I reviewed an UNIX tutorial, to happily find familiar commands (ls, cd) and new concepts such being able to review the rights and running processes.
  1. My commonly used commands that this tutorial skipped
    • $ which : which is looked down on for its inconsistent outputs 
    • $ open -e file : though I think once I set up the subl binary i'll prefer it
  2. Important lesson learned
    • .profile is best to store environment variables as it is consistent across most platforms, a bash will read .bash_profile first so its best to populate it with a path to the .profile file. I found this superuser forum useful.
  3. Favorite concept
    • the bin is filled with most of the systems commands or programs,  also known as binaries, these are precompiled binary code
After all the UNIX excitement I returned to my phonegap project. What took me days before was completed in a few hours.

  1. Recommendations prep before starting phonegap project
    • Familiarize yourself with your shell, where your files are and where you want them to be
    • Beforehand Install/Setup: java, node, Android Studio* (not just the tools), cordova, phonegap, ant, avd, $PATH, $ANDROID_HOME
    • Download the phonegap app and $ phonegap serve your app out easily for testing purposes

Wednesday, February 18, 2015

PhoneGap: Part 1

How do you build an app both android and ios compatible knowing neither objective-c nor java? Having spent the last month plus learning javascript, phonegap seems the way to go.

The biggest challenges were setting up the required parts, knowing what was needed and where to get it from. First my system needed java, then node, and after downloading the tools package from the android developer website I found it was not sufficient. By the end of the day the $PATH was defined in freshly created .bash_profile's, one in the ~(home) directory and one in the local directory.

Note: This last point is cringe worthy, .bash_profile does not belong in the local directory of the app.  This folly exposed that I did not know where the fundamental unix files belong, or the effects of basic commands such as touch.

In the end I had emulated my app, with luck and some understanding of what I was doing. The next step is to review a UNIX tutorial, and traverse this process again.


  1. What is npm?
  2. What is ant
  3. What is avd
  4. What is the difference between PhoneGap and Cordova?