-
14 Dec 2012 10:47 PM #1
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.
BriceBrice 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.
-
17 Dec 2012 6:53 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
Pretty nice!
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
21 Dec 2012 9:35 PM #3
cool, It's gonna be very useful coz for now I more prefer using phonegap compared with sencha native packager. Waiting for the screencast

-
22 Dec 2012 1:12 PM #4
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.
-
22 Dec 2012 5:26 PM #5
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.
-
23 Dec 2012 11:51 PM #6
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
BriceBrice 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.
-
27 Dec 2012 11:03 AM #7
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
-
28 Dec 2012 8:38 AM #8
-
7 Jan 2013 5:10 PM #9
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?
-
7 Jan 2013 5:27 PM #10
You're close. Assuming the project is extracted to your desktop, the path to the main build file would be:
In addition to this you'll need to modify the path to the 'create' scripts in the cordova.properties file. Specifically, change:Code:C:/Users/Bernardo/Desktop/sencha-cordova-builder-master/build-cordova.xml
to:Code:cordova.ios.tools.bin.create=${cordova.ios.tools.bin}/create
and change:Code:cordova.ios.tools.bin.create=${cordova.ios.tools.bin}/create.bat
to:Code:cordova.android.tools.bin.create=${cordova.android.tools.bin}/create
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.Code:cordova.android.tools.bin.create=${cordova.android.tools.bin}/create.bat
BriceBrice 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.


Reply With Quote