sencha app build -run native Errors - extjs

I'm starting with sencha touch, and I trying to prepare the environment with Sencha Touch (Cmd 4.0.1.45) and touch 2.3.1 and Cordova 3.2.0-0.4.0. I saw in some posts that in MAC we don't need to install SDK, just Cmd.
I did many many things, configure Java, Android, Paths, Ruby, Ant, Compass, Phonegap, Cordova, etc.
It's all right with comands:
sencha generate app and sencha cordova init or in case of phonegap sencha phonegap init. It works.
The big big problema is when I try to do sencha app build -run native. That works, but i have the follow message:
[INF] -cordova-platform-add:
[INF] [script] Cordova: Missing platforms ios. Attempting add.
[INF] [shellscript] Checking iOS requirements...
[INF] [shellscript] Creating ios project...
[INF] [shellscript] [Error: An error occured during creation of ios sub-project.
[INF] [shellscript] cp: /Applications/MAMP/htdocs/appUm/cordova/platforms/ios/www/cordova.js: No such file or directory
[INF] [shellscript] ]
[ERR] The following error occurred while executing this line:
/Applications/MAMP/htdocs/appUm/.sencha/app/build-impl.xml:422: The following error occurred while executing this line:
/Applications/MAMP/htdocs/appUm/.sencha/app/cordova-impl.xml:170: The following error occurred while executing this line:
jar:file:/Users/zetoniazzo/Documents/Mobile/senchaCmd/Sencha/Cmd/4.0.1.45/sencha.jar!/com/sencha/ant/antlib.xml:608: shellscript returned: 1
Environment:
MAC OS
Sencha Touch Cmd 4
Touch 2.3.1
Cordova 3.2
Java 1.7
Ant 1.9.2
I believe Java, ant, Cordova, Ruby, COmpass, etc, it's all right. The big problem is app build. I had many kinds of errors, but this one i can't solve!!!!
The problem is to cordova and phonegap, trying to generate to IOS and android. I`m desgusting about it!
Another thing, where I take cordova.js?
It's hard! And in windows 8 it works to Android....
Thanks

Though i think it's too late, but have you installed the ios simulter?
sudo npm install ios-sim
Anyway,you need to do this in the root of the sencha projeci even if it doesn't work:
sencha cordova remove
then, remove the dir of /cordova
rm -r cordova
then:
sencha cordova init
and:
sencha app build native
I wish it will help you.

Related

Build error compiling ExtJS app using Sencha Cmd v5.1.3.61

My build is failing in my ExtJS 5 project - I am using Ubuntu 15 desktop version.
[ERR] com.sencha.exceptions.ExProcess: Failed creating background process
[ERR] at com.sencha.command.plugin.PluginManager.executeRe
[ERR] verseFirst(PluginManager.java:134)
Older versions of Sencha Cmd were dependent on Ruby 1.9.3 or below. It's likely this is the cause as Ruby is being used to compile Sass themes and the [INF] lines immediately above the error indicate that this step is where the build process is failing.
You can verify which version you currently have by running ruby -v in your terminal window. If you'd rather not downgrade Ruby - you could instead try upgrading your version of Sencha Cmd as later versions were patched to work with Ruby 2.
If you do try to upgrade Cmd, the build might complain about differing project and compiler versions - you can run the following inside your existing ExtJS project directory (do a backup first) to upgrade the build configuration independently of the framework:
sencha app upgrade --noframework
Thanks all, I uninstalled sencha cmd 5.1.1 and installed sencha cmd 6, then it worked perfectly, thanks for the support.

Running sencha app watch on MacOS Sierra fails with the error- 'PhantomJS sass build exited with code : 139'

When I run Sencha app watch (sencha app watch), my build fails with the following error:
BUILD FAILED
[ERR] com.sencha.exceptions.ExBuild: PhantomJS sass build exited with code : 139
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
This started happening right after an upgrade to MacOS Sierra.
My Sencha CMD version is 6.1.3.42
ExtJS version 6.0.2
After reading a lot of posts, I have come to the conclusion that Sierra requires a 2.x version of phantomJS while this specific version of Sencha requires PhantomJS version of 1.9.8.
Is there no workaround apart from a Sencha CMD upgrade for this problem?
Sencha Cmd uses the version of PhantomJS that comes bundled with it. For Sencha Cmd 6.1.3.42, that's 2.1.1.
You can test that yourself - <Sencha CMD location>/bin/osx/phantomjs/phantomjs --version
Earlier versions of Sencha Cmd (e.g. 6.0.1.76) used PhantomJS 1.9.x, which doesn't work under Sierra. It's possible you're still configured to use one of those.

Sencha Cmd won't build on another workstation

So I am trying to set up another ExtJS (4.2.1) dev workstation I've got Ruby 1.9.3, Sencha Cmd 4.0.4.84 installed and latest Java VM too.
The build won't work on this one though, I'm getting:
[INF] executing compass using system installed ruby runtime
Errno::ENOENT on line ["38"] of C: No such file or directory - C:/devtfs/CustomerPortal/CustomerPortal.UI/Content/Customer_Portal_UI/build/temp/production/Customer_Portal_UI/slicer-temp/.sass-cache/82daaa66b7a4761963814fd25131bf0f81370ec9/Customer_Portal_UI-example.scssc
82daaa66b7a4761963814fd25131bf0f81370ec9 folder does exist, but it's empty.
I've tried
sencha ant clean
sencha app refresh
sencha app build --clean
No go. Ever seen this issue ?
Thanks!
EDIT: Hmm, even after this error, the application seems to be running fine on the Sencha web server, but the index.html file is the last thing that's not created in build/production.

how to run sencha touch examples in iOS simulator

I installed sencha touch and sencha touch command and was able to view the examples in localhost.
But How do I run these examples in iOS simulator?
I tried below commands from with in the examples directory on iMac
from directory: touch-2.3.1/examples/kitchensink
sencha app package run packager.json
User-iMac:list-horizontal yuyutsu$ sencha app package run packager.json
Sencha Cmd v4.0.4.84
[ERR]
[DEBUG] Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The application that opened iOS Simulator failed to send all of the required information (sessionUUID, sdkRoot, deviceInfo)." UserInfo=0x7fe4f0d0ce40 {NSLocalizedDescription=The application that opened iOS Simulator failed to send all of the required information (sessionUUID, sdkRoot, deviceInfo)., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
The application was successfully packaged
[ERR] stbuild exited with non-zero code : 1
or from another app, directory: touch-2.3.1/examples/list-horizontal
Also tried running sencha app build -run native.
It failed with
/Users/yuyutsu/work/Software/mobile/Sencha/touch-2.3.1/examples/kitchensink/.sencha/app/packager-impl.xml:83: /Users/yuyutsu/work/Software/mobile/Sencha/touch-2.3.1/examples/kitchensink/resources/loading does not exist
I have Xcode 5. OS X version 10.9.2. I am able to run the native XCode projects in simulator using XCode.
Any idea on how can I run the sencha examples in iOS simulator? Is there a document which has the steps?
One very easy way (if you don't need device api) is to build the webapp through Sencha CMD and navigate in iOS Simulators Safari to the index.html file. You can do "add to Homescreen" and if you click the icon on your homescreen now you get the app in fullscreen.
The big advantage is that you can do really quick builds, but it does not fit always, because it's just the webapp, not the native one.
If you need to package your app native (e.g. for Device API) you can follow this guide: http://frightanic.com/software-development/sencha-touch-native-packaging-for-ios-done-right/
As it is running on localhost, you can simply check on simulators by using the same urls as on browser
iPhone 4
iPhone 5
Also, you can try Intel XDK, it has inbuilt iPhone simultors. It is easy to use. Simply put application and run.
Intel XDK
Or you can try packaging it in native iOS so that you can run in Xcode and see on Xcode simulator your app working. For that you can use Phonegap, refer link
http://docs-origin.sencha.com/touch/2.3.2/#!/guide/cordova-section-iOSNote
Also,
http://docs.sencha.com/touch/2.3.2/#!/guide/native_provisioning
Hope this helps you with your problem.
Failure to launch iOS simulator could be because of the below bug mentioned in sencha forum
"There is currently a bug open SDKTOOLS-783 where Sencha Native packager fails to locate Xcode 5.1 and thus unable to run in simulator."
I will try Phonegap/Cordova and post my observations.

Creating Sencha Touch native app

I want to create the native app in sencha touch 2. I have go trough the Sencha Documents and try to create it but I am using the Sencha Cmd v3.1.1.274 and I have tried to run sencha package run command on Sencha CMD.
I got the error like,Sencha Cmd v3.1.1.274 [ERR] Unknown command: "run". anybody knows why i got this error?
Thanks in advance.
in your app folder, type:
sencha app build native
# neo worked for me..thanks.
`sencha app build native' created a packager.temp.json
Then type
'sencha app package run'
Its build a native app and opens up ios simulator with the buid app.

Resources