Hybrid View

  1. #1
    Sencha User 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,647
    Vote Rating
    899
    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
    Sencha User 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
    May 2013
    Location
    Portugal
    Posts
    16
    Vote Rating
    0
    samuel5_89 is on a distinguished road

      0  

    Default Debug vs Release - Sencha cordova builder

    Debug vs Release - Sencha cordova builder


    Hi all.

    I'm using Sencha Cordova Builder to develop an app to iOS and Android. But when I build the application, the name of the created apk is "MyApp-debug.apk".
    Am I supposed to change any configuration?

    Thank you.

  8. #8
    Touch Premium Member
    Join Date
    Nov 2010
    Posts
    13
    Vote Rating
    1
    harleyflh75 is on a distinguished road

      0  

    Default deploying to webserver

    deploying to webserver


    First off, thank you very much for the tool.

    This problem pertains to my main project, but i decided to do a test case by starting a brand new project from scratch.
    i have the latest version of sencha-cordova-builder as well as sencha cmd v 3.1, cordova v 2.6, phonegap v2.4, and sencha v2.1.1
    i built a new app with sencha generate app which worked fine.
    modified the cordova.properties file as per the screencast.
    then i opened the build.xml file and added both the import of build-cordova.xml and target -after-build with -build-cordova-all
    then i ran sencha app build package
    i moved the contents of the package folder to a webserver and tried to access it from the browser on my phone....the blue loading screen with white dots is the only thing that shows and there are no errors.
    I have even tried to use the assets/www folder in the android build and the www folder in the ios build to no avail.

    If I repeat the process but skip adding the 2 nodes to the build.xml file, the browser serves up the site correctly.

    Is this as intended? or am I missing something

  9. #9
    Sencha User
    Join Date
    Feb 2012
    Location
    Munich, Germany
    Posts
    58
    Vote Rating
    1
    kodak is on a distinguished road

      0  

    Default


    @harleyflh75
    I have the same issue that I cannot access the phonegap build with a webbrowser. I think the problem is that the cordova lib is not able to load if you dont run it on a device... My solution is that I just have to build, one for native and one for web without cordova.
    But I would also be interested in a better solution.

    And here is just a quick tipp I want to share:
    I had to manually delete the _ios.built file befor every new "sencha app build package".
    But its possible to modify the build.xml ant script like this:

    build.xml
    Code:
    <target name="-after-clean">        
        <delete file="${build.dir}/_ios.built" />
    </target>
    If you add those line after
    Code:
    <target name="-after-build" depends="-build-ios" />
    the _ios.built file gets deleted before every build...

  10. #10
    Sencha User
    Join Date
    Nov 2013
    Posts
    1
    Vote Rating
    0
    anxin is on a distinguished road

      0  

    Default


    I used cordova 2.9.0, in this version, the cordova.js has no version in its name,so I changed such code:
    Code:
     <property name="cordova.android.tools.js" value="${cordova.android.project.www}/cordova-${cordova.lib.version}.js" />
    in the build-cordova-android.xml into:
    Code:
    <property name="cordova.android.tools.js" value="${cordova.android.project.www}/cordova.js" />
    and it worked!but, when it is going to update app.json file, add the cordova-android.js to it,it went wrong:
    Code:
    [INF] -before-init-android-internal:[INF]
    [INF] -init-android-internal:
    [INF]
    [INF] -after-init-android-internal:
    [INF]
    [INF] -init-android:
    [INF]
    [INF] -before-build-android-internal:
    [INF]
    [INF] -before-build-android:
    [INF]
    [INF] -build-android-internal:
    [INF]      [echo] building android...
    [INF]      [echo] backing up app.json to app.json.bak
    [INF]      [echo] app.json was backed up successfully
    [INF]      [echo] modifying app.json to include E:\project\transport\cordova-and
    roid.js javascript
    [INF]
    [INF] -modify-app-json:
    [ERR] The following error occurred while executing this line:
    E:\project\sencha-cordova-builder\build-cordova-android.xml:90: The following er
    ror occurred while executing this line:
    E:\project\sencha-cordova-builder\util-cordova.xml:24: javax.script.ScriptExcept
    ion: sun.org.mozilla.javascript.internal.WrappedException: Wrapped org.json.JSON
    Exception: Missing value at character 735 (<Unknown source>#28) in <Unknown sour
    ce> at line number 28
    can any one help me?
    Last edited by anxin; 27 Nov 2013 at 11:43 PM. Reason: the format of the content is not suitable