Skip to content

Instantly share code, notes, and snippets.

@joemccann
Created January 31, 2011 20:19
Show Gist options
  • Save joemccann/804728 to your computer and use it in GitHub Desktop.
Save joemccann/804728 to your computer and use it in GitHub Desktop.
Quick setup of Phonegap and Sencha tutorial.

Note: You need to be on a Mac.

Note: This is purposely verbose. Yes, I know a lot of this can be simplified. Fork it and show me.

  1. Install git
  2. Open your terminal.
  3. mkdir ~/Documents/phonegap_sencha
  4. cd ~/Documents/phonegap_sencha
  5. git clone https://github.com/phonegap/phonegap-iphone.git && cd phonegap-iphone
  6. git reset --hard HEAD
  7. git pull origin master
  8. make && open .
  9. Double click the "PhoneGapLibInstaller.pkg" file and walk thru the installation steps. Go back to terminal when finished.
  10. cd ~/Documents
  11. mkdir sencha_sdk
  12. cd sencha_sdk
  13. wget http://downloads.sencha.com/touch/sencha-touch-1.0.1a.zip && unzip sencha-touch-1.0.1a.zip
  14. cd ~/Documents/phonegap_sencha && wget http://staging.sencha.com/assets/images/learn/phonegap/Contacts.zip && unzip Contacts.zip
  15. cd Contacts
  16. mkdir www/lib/touch
  17. cp -r ~/Documents/sencha_sdk/sencha-touch-1.0.1a/ ./www/lib/touch
  18. open /Developer/Applications/Xcode.app Contacts.xcodeproj
  19. At this point in Xcode, Build and Run. You will get an error in the build. Flip back to terminal and enter:
  20. mv ~/Documents/PhoneGapLib/javascripts/phonegap-0.9.3.min.js ~/Documents/PhoneGapLib/javascripts/phonegap.js
  21. Build and run again and compiler is happy.
  22. Contacts will be empty. You need to add a contact or two in the Address book.
@joemccann
Copy link
Author

20 & 21 yeah there's something weird with the build; it yui compresses the phonegap.js file then tries to copy it, but it is attempting to copy the phonegap.js instead of phonegap.min.js. Just a typo in the shell script.

22 My simulator didn't have any contacts in it so I just added a few and it works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment