1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    15
    Vote Rating
    0
    itinance is on a distinguished road

      0  

    Default Answered: How to start with Phonegap / Cordova?

    Answered: How to start with Phonegap / Cordova?


    Hi

    i am new to sencha, but NOT new to Phonegap. Anyway, can someone point me to a working tutorial for Sencha Touch 2 with Phonegap/Cordova? The one mentioned at sencha.com isnt working any more (it was build for ST 1)

    Thans a lot in advance!
    Kind regards, itinance

  2. Instead of editing index.html (if you are using Sencha Command it is not recommended) you could specify the cordova file in app.json. Here is a more step by step way of doing it http://robertdougan.com/posts/packag...onegap-cordova

  3. #2
    Sencha User grgur's Avatar
    Join Date
    Aug 2007
    Location
    Split, Croatia
    Posts
    155
    Vote Rating
    24
    Answers
    10
    grgur has a spectacular aura about grgur has a spectacular aura about

      0  

    Default


    If you're not new to Cordova, then this is a no-brainer for you. Just drop your app folder to your Cordova app in xcode, and build. Of course, you should remember to add the cordova's JS file into index.html

    Grgur Grisogono
    Ext JS in Action SE co-author
    Exercising awesomeness at Modus Create - Official Sencha Partner

    Get in touch for Sencha Touch Training
    @ggrgur

  4. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,548
    Vote Rating
    872
    Answers
    3566
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      1  

    Default


    Instead of editing index.html (if you are using Sencha Command it is not recommended) you could specify the cordova file in app.json. Here is a more step by step way of doing it http://robertdougan.com/posts/packag...onegap-cordova
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #4
    Sencha User grgur's Avatar
    Join Date
    Aug 2007
    Location
    Split, Croatia
    Posts
    155
    Vote Rating
    24
    Answers
    10
    grgur has a spectacular aura about grgur has a spectacular aura about

      0  

    Default


    +1 Mitch
    Grgur Grisogono
    Ext JS in Action SE co-author
    Exercising awesomeness at Modus Create - Official Sencha Partner

    Get in touch for Sencha Touch Training
    @ggrgur

  6. #5
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    122
    Vote Rating
    3
    Answers
    3
    clifficious is on a distinguished road

      0  

    Default


    also here ist a great tutorial for ST2 and Phonegap to run on Android

    http://andidog.de/blog/2012/06/packa...p-for-android/

  7. #6
    Sencha User
    Join Date
    Jun 2012
    Posts
    15
    Vote Rating
    0
    itinance is on a distinguished road

      0  

    Default


    Thanks a lot, guys!!

  8. #7
    Sencha User
    Join Date
    Apr 2012
    Posts
    47
    Vote Rating
    0
    Answers
    5
    BörnR is on a distinguished road

      0  

    Default


    the tutorial don't work clifficious.

    DId you try to use Phonegap methods? like cordova.exec (phone gap 1.6 and above)?
    i get all the time an error that i use cordova.exec before device ready event. I thought sencha touch did cathct it, but shouldn't works for android. On IOS all is fine, but on android i get this crash

    Should i use Ext.Setub -> OnReady?

  9. #8
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    122
    Vote Rating
    3
    Answers
    3
    clifficious is on a distinguished road

      0  

    Default


    Hi BörnR

    I'm sorry, I can't help you out here, as I used this method only for building the .app file as the SenchaArchitect native packaging function does not work for me. I haven't accessed any PhoneGap features yet. But maybe the author of the blog I linked might help you as he is in the process of writing a master thesis on comparing different architectures.

    Good luck

  10. #9
    Sencha User
    Join Date
    Apr 2012
    Posts
    47
    Vote Rating
    0
    Answers
    5
    BörnR is on a distinguished road

      0  

    Default


    i contact him now, thx for your reply ;-)

  11. #10
    Sencha User
    Join Date
    Apr 2012
    Posts
    47
    Vote Rating
    0
    Answers
    5
    BörnR is on a distinguished road

      0  

    Default


    ... what should i say ... iam stupid
    i used the cordova...js from iOS folder ... thats the problem ... (doh)