1. #1
    bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      7  

    Default Sencha Cordova Builder - Automated Builds for PhoneGap Projects

    Sencha Cordova Builder - Automated Builds for PhoneGap Projects


    Hey All,

    I have been experimenting with Ant integration in the Sencha Touch build process lately. I'm totally new to Ant but quickly became excited by its capability.

    As a way to dig in, I created a project that automates the creation, building, and running of Android and iOS enabled PhoneGap projects with Sencha Touch. My goal was to make something that worked with the framework and was as easy to use as possible without requiring any extra installs. I'd be glad to get some feedback on it. I have been using it for quick mockups and light development tasks.

    You can check it out on github: https://github.com/bricemason/sencha-cordova-builder

    I'll also do a screencast early next week to go over how to use it.

    Brice
    Brice Mason
    Front End Developer
    Modus Create

    @bricemason
    bricemason.com

    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,227
    Vote Rating
    859
    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

      0  

    Default


    Pretty nice!
    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.

  3. #3
    Touch Premium Member
    Join Date
    Dec 2010
    Location
    Jakarta, Indonesia
    Posts
    49
    Vote Rating
    0
    trinitrotoluen is on a distinguished road

      0  

    Default


    cool, It's gonna be very useful coz for now I more prefer using phonegap compared with sencha native packager. Waiting for the screencast

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    15
    Vote Rating
    0
    bcichowlas is on a distinguished road

      0  

    Default


    This looks really useful, but I'm not sure that I completely understand. Can this be used with Sencha Architect/Touch 2.1 to make .api's that will run on IOS devices? I would really like a working example that I could examine carefully and model. Thanks.

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Posts
    15
    Vote Rating
    0
    bcichowlas is on a distinguished road

      0  

    Default


    Just when I was about to give up for the time being, I managed to use Architect/Touch 2.1 to build one Sencha app and then another, rather than using PhoneGap. (I had originally shifted to PhoneGap because Architect was not packaging correctly for me, but now I know how to do it.)

    There are simply a lot of details necessary to get the packager file right. When it is wrong, the error message can be quite obscure, sometimes consisting of just a number. Also, sometimes one sees seemingly contradictory messages in the output: one messages says packaging has failed, another says it has succeeded.

    For me, here were some important points:

    I had thought that Certificate alias was a path to my Certificate copy. That's wrong. It's a name for the *developer* certificate. If you are the only developer, you may be able to get away by just saying "iPhone Developer", but if you have several developer accounts on your machine you may need to say as much as iPhone Developer: Bruce Cichowlas (XLBH3396K5) . How did I find this out? Try saying just "iPhone Developer" and if it doesn't like it, it will say it is ambiguous and give you some idea of what it wants.

    I also put my password on the next entry in the packager. I'm not sure that it was necessary and I'm not sure exactly which password it wanted.

    I used "Production" for my Ad Hoc build, but maybe "Debug" would have worked.

    Your application id must match what you set up at the Apple development site. In my case, it was com.realkeysmusic.divs . I used my Ad Hoc provision file (after setting up the UDID's etc. at the Apple developer site. I copied it to my project root directory (the one with app.html) and said ./Divs_Ad_Hoc.mobileprovision for provisionProfile.

    So I ended up using the packager within Sencha Architect rather than using PhoneGap at all for IOS, even though it seemed OK for Android --- so in some ways this is not an answer to the question here but rather an alternative.

  6. #6
    bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      2  

    Default


    Here's the screencast which runs through an example of setting up a project and building for both android and ios.

    The goal of this project is to give a simple way to wrap a sencha touch 2.1 app with phonegap using the build process exposed by sencha cmd.

    https://vimeo.com/56231285

    Brice
    Brice Mason
    Front End Developer
    Modus Create

    @bricemason
    bricemason.com

    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.

  7. #7
    Sencha User
    Join Date
    Mar 2012
    Posts
    28
    Vote Rating
    0
    snam is on a distinguished road

      0  

    Default


    This is excellent material!!

    Thanks for taking the time to put this ant script together.
    And for the nicely done tutorial...

    Keep up the good work.

    Cheers

  8. #8
    Sencha User
    Join Date
    Nov 2011
    Location
    Argentina
    Posts
    33
    Vote Rating
    1
    azche is on a distinguished road

      0  

    Default


    This is great!

  9. #9
    Sencha User
    Join Date
    Oct 2012
    Posts
    71
    Vote Rating
    2
    Tioecomp is on a distinguished road

      0  

    Default


    Brice,

    Your tutorial is very detailed, but I'm having problem to get it working on windows 7 with the path to the files, I tried C:\Users\Bernardo\Desktop\sencha-cordova-builder-master\build.cordova.xml and C:/Users/Bernardo/Desktop/sencha-cordova-builder-master/build.cordova.xml but at the build process the build.cordova.xml cant be found. Anyone have this working on windows 7?

  10. #10
    bricemason's Avatar
    Join Date
    Jan 2008
    Location
    Upstate NY
    Posts
    280
    Vote Rating
    44
    bricemason has a spectacular aura about bricemason has a spectacular aura about bricemason has a spectacular aura about

      0  

    Default


    You're close. Assuming the project is extracted to your desktop, the path to the main build file would be:

    Code:
    C:/Users/Bernardo/Desktop/sencha-cordova-builder-master/build-cordova.xml
    In addition to this you'll need to modify the path to the 'create' scripts in the cordova.properties file. Specifically, change:

    Code:
    cordova.ios.tools.bin.create=${cordova.ios.tools.bin}/create
    to:


    Code:
    cordova.ios.tools.bin.create=${cordova.ios.tools.bin}/create.bat
    and change:

    Code:
    cordova.android.tools.bin.create=${cordova.android.tools.bin}/create
    to:


    Code:
    cordova.android.tools.bin.create=${cordova.android.tools.bin}/create.bat
    I have had others report that they've used this on windows with success. I'll be including better out of the box support for windows very soon, probably the next week or two so be sure to check back for updates.

    Brice
    Brice Mason
    Front End Developer
    Modus Create

    @bricemason
    bricemason.com

    Sencha Touch Screencasts
    Vimeo - Sencha Touch Channel

    Github Projects:
    Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.

    Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.

    Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.