120 likes | 241 Views
PHONEGAP/CORDOVA. GETTING STARTED WITH CREATING HYBRID APPS. WHAT IS PHONEGAP?. T echnology to create real native mobile apps using only HTML(5) Can be sold in major App Stores PhoneGap was sold to Adobe but is still Open Source Cordova is the Open Source Name
E N D
PHONEGAP/CORDOVA GETTING STARTED WITH CREATING HYBRID APPS
WHAT IS PHONEGAP? • Technology to create real native mobile apps using only HTML(5) • Can be sold in major App Stores • PhoneGap was sold to Adobe but is still Open Source • Cordova is the Open Source Name • Your app can run on IOS, Android, Win Mobile, Blackberry and many others.
Getting STARTING WITH IOS • Comprehensive documentation on their website • Download Xcode (http://developer.apple.com) • Download Cordova 2.5 (http://cordova.apache.org) • Apple Developer Program Membership is required to test on device. • It’s MUCH easier to register with a personal account that a corporate
Getting STARTed WITH ANDROID • Download ADK (Android Developer Kit) • http://developer.android.com/sdk/index.html • Eclipse • Android SDK • Android Simulators • Setup your environment by platform • Windows – JRE and paths • Cordova 2.5 (http://cordova.apache.org)
Create a new project • Command line tool makes this process really easy and straightforward • IOS • create ~\Username\Cordova22\refreshSDcom.refresh.sdrefreshSD • Then simply open the created project with XCode • Android • create c:\dev\refreshAppcom.refresh.sdrefreshSD • Then, simply import as an existing Android App in Eclipse
Facebook Integration http://github.com/phonegap/phonegap-facebook-plugin Requires Facebook Mobile SDK PhoneGap Facebook Plugin works on both IOS and Android with the same syntax Not trivial to setup Need to register the app on FB developer page (separate for IOS and Android) Take the dev id and put it in the app where required Default app has LOTS of out of the box functionality including an app pagination system.
SiMulators • IOS • Simulate all iPhones, iPads • No camera simulation • Android • Simulates most screen resolutions and major phones • Based on screen resolution and Android version • Can setup multiple device simulations
3rd Party Libraries • jQMobile(http://jquerymobile.com) • YUI (http://yuilibrary.com/projects/yui3/) • All elements touch enalbed • ScrollView adds mobile and swipe scroll functionality • SenchaTouch– (http://www.sencha.com/products/touch)
Device Demos • Camera • Location • Compass • Download • Local Storage
Debugging • <IOS6 – iWebInspector - http://www.iwebinspector.com • IOS6+ – Safari debug • Android – Ripple - http://ripple.incubator.apache.org • Last resort if app won’t init – console.log or alerts
On device testing • IOS • Requires IOS Dev Account • Debug on device • Android • Which versions do you wish to support? • < 4.0 – many more phones but 2 year old OS • > 4.0 - latest big screen phones and tablets
Publishing TO App Store • IOS • Provision • Package • Submit • Android • Google Play Store • Amazon App Store