Reputation: 1489
Morning,
My production build seems to be missing getOrientation function. It seems that sencha-touch-all.js is not being copied into the build folder.
After doing much forum reading, etc, I have discovered that I actually need to use Cmd to create an all-classes.js file.
According to http://docs.sencha.com/touch/2.2.0/#!/guide/building, the following command should do the job:
sencha create jsb -a index.html -p app.jsb3
When I run this in command from within the root of my app (where index.html lives), I get the following error:
[ERR] Unknown command: "create"
I have tried using commands generate
or build
instead of create
but they do not work either.
So, why does it not recognise that command?
When I run the command from within my SenchaSDKTools folder, but use the full path/to/app, it seems to accept the command, but does not create a file.
I have sencha touch 2.2.1 and Cmd 3.1.2.342
Upvotes: 0
Views: 2979
Reputation: 3608
In order for you to use sencha create jsb
command, you have to:
Install Sencha SDK Tools
Mac - http://cdn.sencha.io/sdk-tools/SenchaSDKTools-2.0.0-beta3-osx.app.zip
Windows - http://cdn.sencha.io/sdk-tools/SenchaSDKTools-2.0.0-beta3-windows.exe
Open terminal and change directory to where the Sencha SDK is installed.
cd /Applications/SenchaSDKTools-2.0.0-beta3/
Generate a JSB3 file by executing the ff. command:
/sencha create jsb -a index.html -p app.jsb3
wherein:
-a (required) The location of the HTML file containing the scripts you want to include
-p (required) The location where the output .jsb3 file should be created
This scans your index.html file for all framework and application files that are actually used by the app, and then creates a JSB file called app.jsb3.
Upvotes: 2
Reputation: 1489
SOLVED:
It was working fine from within the SenchaSDKtools folder. I hadn't told it the right place to create the file.
Upvotes: 0