Installing Sencha Touch 2 framework - extjs

I've a problem with getting Sencha Touch to work. I'm using a MacBook Pro and it's really been a hell installing this framework. Sencha don't seem to have any documentation that fits the latest version of their product and there is no way for me to download an older version from their website. Therefore I need your help!
I've downloaded Sencha SDK, SDKTools and their Cmd-software. The version of the SDK is 2.1.1, the SDKTools is 2.0.0 and I dont know the version of the cmd-software. All three softwares is however the latest from Senchas webpage.
I've placed the SDK under the root of the web server, and I've also installed the SDKTools in the root.
This is the structure I'm currently using:
Root of webbserver:
- SDK
- SDKTools
The SDK works in the way that I can surf into it, by using my browser into the "SDK"-folder. On that page I can view examples of Sencha applications.
When I go the SDK folder via the Terminal, and type "Sencha" - I get the error:
[WARN] The current working directory (/Applications/MAMP/htdocs/SDK) is not a recognized Sencha SDK or application folder. Running in backwards compatible mode.
I've googled this and tried the following actions:
1. Placed the SDKTools in the same folder as the SDK.
2. Created a systemfile named .senchasdk with the content "sdk".
3. Created a systemfile named .senchasdk with the content ".".
The first option, naturally doesn't work (didn't differ anything from the previous setup). The 2nd and 3rd action resulted in compilationerrors when typing Sencha in the SDK-folder. Example down below:
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module '/Applications/MAMP/htdocs/SDK/command/sencha.js'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
I've also tried typing "Sencha" from the SDKTools folder, but that doesn't work either. I don't know what this problem comes from and can't find any other solutions to solve this. Does anyone know? Or have any suggestions on solution or part of solution?

Sencha Touch 2.1 doesn't work with SDK Tools anymore. The documentation bundled with Sencha Touch 2.1 is not up-to-date. Here is the good documentation :
http://docs.sencha.com/touch/2-1/#!/guide/command

On their website, you can download the 2.0 version of the Sencha CMD tool which is used instead of SDKTools nowadays. However, if you use the 2.0 version you will meet nothing but trouble since that is outdated. The latest version as of right now is 3.1 and can only be downloadable from your account at support.sencha.com, and not from the download page when not logged in.

Related

How do I migrate an older theme contribution to Qooxdoo 6.0?

I've recently been asked whether it was possible for me to convert my older theme contributions to the new Qooxdoo packaging system. So I installed Qooxdoo 6.0 and got a first test app running - not without problems because the instructions in the official docs are a bit buggy (e.g "npx qx" is an unknown command with my Ubuntu 18.04). I also read about the packaging system and what to do to install one of the existing packages from the Qooxdoo repository.
Then I followed the steps described in section "Create a new package". This procedure resulted in a folder structure which looked familiar at first sight, but a closer look made me wonder: There are two resource folders now, one is under "source" (as I would have expected) and the other one is under "source/class/[mypackage]". I also noticed that there is a "demo" folder in "source/class/[mypackage]", which used to be a top-level folder in previous Qooxdoo versions.
I then copied the theming files of my contribution to "source/class/theme", the demo app files to "source/class/[mypackage]/demo" and the demo resources to "source/class/[mypackage]/resource". After compiling the project I managed to run the demo app, but only without the expected resources (no icons, no fonts, no background images). The theming as such appears to be applied properly, but I keep getting plenty of error messages telling me "404 (Not found)" and "Image could not be loaded".
What am I doing wrong?
I guess you are running into a bug with our template for packages ... please open an issue https://github.com/qooxdoo/qooxdoo-compiler/issues/
As for how to do it. Have a look at an actual theme package for 6.0 https://github.com/ITISFoundation/qx-osparc-theme there you can see the required structure.
Also, for this kind of question, interactive help is probably best. Visit the qooxdoo chat on https://gitter.im/qooxdoo/qooxdoo

How to add Scandit barcode plugin to custom build of Phonegap developer ios app?

I use Phonegap Desktop and Phonegap Developer app for a while now. This is really interesting for quickly testing my development.
But I'm facing a limitation with the embedded barcode scanner which is displaying the camera display in full screen.
I need to embed the camera display into a container so I have space for displaying information in the same time.
After searching for a while, I've discovered the Scandit SDK for PhoneGap was the only plugin which allows cropping the camera display.
I spent a lot of time trying to implement Scandit, but no success. At least I can build the app, but when using it, scanner is not working...
Here are the steps I've followed:
clone the PhoneGap Developer project from Git
Install using npm
add ios platform
open the xcode project file
build the application and run it on device
=> At this time the PG Dev is running well and my application is working fine
Then, i continued:
remove all reference to the default barcode scanner plugin
build the application and run it on device
==> PG Dev still working fine and my application is working fine
Next steps:
clone the Scandit phonegap plugin from Git
download the Scandit SDK from my scandit account
put the SDK into the cloned scandit phonegap plugin
modify the plugin.xml to change the path to the bundle and framework (mismatch of version name in the path)
<resource-file src="src/ios/scanditsdk-community-ios_4.16.1/ScanditBarcodeScanner.bundle"/>
<framework src="src/ios/scanditsdk-community-ios_4.16.1/ScanditBarcodeScanner.framework" custom="true"/>
copy bundle and framework into the correct folder of scandit
modify the config.xml to include reference to Scandit and set the spec attribut to the version of the SDK
build the application and run it on device
==> PG Dev still working fine and my application is working fine (it doesn't use scandit for the moment)
Next steps:
Remove my project from PhoneGap desktop
add Scandit Sample project to PG Desktop
I used the "Continuous Scaled/Cropped" example from there: http://docs.scandit.com/4.12/phonegap/cordova-examples.html
add my App Key for the license
launch my PG Dev app on my device and download the project files
==> PG Dev is running fine and download the Scandit Sample App.
But the app doesn't work. When clicking on the scan button, nothing happends..
After some investigation, I found that I ran through an exception on Scandit class.
Adding a try on the command 'Scandit.License.setAppKey' allowed me to report in the PG Desktop log the following error:
ReferenceError: Can't find variable: Scandit
Adding this try/catch made the app raising an exception at the next line:
var settings = new Scandit.ScanSettings();
After searching the web about my error, and some posts were suggesting to manually add the framework and bundle into xcode.
So I did it by drag&droping the framework and bundle into the framework folder of the xcode project.
But when I try building my project, it is failing with many errors...
To solve it, I had to had manually all the scandit plugin files (*.h and *.m) into my xcode project.
All previous errors have been solved, but new ones appeared.
This was due to some other missing native ios frameworks...
Once these framework added, all errors were solved and I managed to successfully build the application.
But when running it, I'm still having the error: "ReferenceError: Can't find variable: Scandit"
I'm now running out of idea..
What did I do wrong?
Is there anyone having managed to build a PG Desktop with Scandit embedded?
Thanks.
Sorry for this long post, just tried to be the more precise I could be.
The issue here is two fold. First you need to be aware that the Scandit Barcode Scanner plugin makes use of native code and can therefore not be used in the Phonegap Developer app, as the only thing transmitted to it is your html/css/javascript and the javascript part of the plugin. To also include the native parts of the plugin you have to build and deploy the project yourself. As you are trying to build the XCode project it seems like you are now doing this.
The second part is that you are way overcomplicating the adding of the plugin. There is no need for you to manually clone the git repo, add our libraries, adjust paths in the plugin.xml etc. You can directly download the entire plugin as a zip from your account at scandit.com where the library is contained and the plugin.xml is correct. After that you can simply add the plugin to your project through the CLI (also see our documentation for this at http://docs.scandit.com/stable/phonegap/cordova-integrate.html) and there is no need to do anything manually unless you are using a very outdated Phonegap version that fails to properly handle the plugin.xml. Doing it the automated way with our properly prepared plugin zip will remove most error sources, please try it that way.
Thanks #moritzha. It helped me finding the solution.
I followed this doc at the beginning but it was not working.
After adding the plugin and building the application, I never managed to see it in my xcode project.
I took the opportunity of changing my mac to restart everything from scratch, and after many tries I found where I was wrong.
In fact, the documentation provided by scandit is missing one step.
The command ' phonegap plugin add < path to downloaded and unzipped plugin > ' is doing half of the job.
The command is correctly copying the plugin files to my project but it is not updating the config.xml.
So before building your application, you have to edit the config.xml located at the root of your project folder.
You need to manually reference the plugin with the following:
and replace the x by the version of the sdk you will use.
Once the config.xml updated, you will be able to build the app for your targeted platform.
I now have my own version of the Phonegap Developer App with the Scandit plugin in place of the default barcode scanner plugin. And it works perfectly.
This plugin is awesome!
PhoneGap Developer App version: 1.7.2 (taken on Github)

Ext JS 4: Sencha CMD issues

Ok, I've been trying and trying my hardest to build a simple application with the Sencha CMD tool. I've tried this with versions 4.0.7 (located on Sencha website), 4.1.0 (here), 4.1.1 (here), and 4.2.1 (Sencha website) with varying results but no success. When I issue the commands:
sencha -sdk extjs-4.0.7 generate workspace ext407
sencha -sdk extjs-4.1.0 generate workspace ext410
sencha -sdk extjs-4.1.1 generate workspace ext411
I get a directory with only the empty directory packages. As I've read the documentation, my directories should have ext and packages. When I issue sencha -sdk ext-4.2.1.883 generate workspace ext421, I get the proper folders. However, when I take the next step:
cd ext421
sencha -sdk ext generate app ThemeDemoApp appDemo
per the Theming Guide, it appears to fail, even though I get my ext421 directory. I say it appears to fail because this is the error I get:
[INF] Loading classpath entry /var/www/html/applications/web/ext421/ext/src
/home/ec2-user/bin/Sencha/Cmd/3.1.2.342/sencha: line 58: 19461 Killed
java $jvmArgs -jar $BASEDIR/sencha.jar "$#"
And it looks like my sass/config.rb is a bit unfinished...
cur_dir = File.dirname(__FILE__)
output_style = :nested
I'm running Ruby 1.9.3, Sencha CMD 3.1.2.342, and Java 1.7.0_25. I'm also on a 64-bit Amazon Linux AMI instance.
I'm so confused what the problem is... I have this working on my work laptop (Mac OSX Lion), but I cannot figure out what I'm doing wrong on my ec2 instance. Any help would be greatly appreciated!
Cross posted from Sencha forums.
I have no idea what I did, but I diffed sencha and sencha-3.1.2.342... the only difference was the end of the file, indicating that the sencha binary did not have a newline at the end. I did a hexdump on both of the files, and sure enough, it did not. I edited the file and added one by just hitting return at the end of the file. This seemed to make the file happy.
Now, I've gone back and removed this newline, and the file still runs. Baffling. I have no idea why it's working... I even went back and re-ran the installer, now it works. Maybe I'm just going crazy?
There's been a great deal of discussing this topic in the Sencha thread I started... it kind of sounds like Java is running out of memory, but we're not 100% sure on this diagnosis. If someone comes up with a better answer, I'll mark that.
Why do you need to generate workspaces and applications on EC2 instance? Use source control repository instead, generate the files once on your laptop and check them in so you don't have to repeat this every time
Sencha Cmd is compatible with Ext JS 4.1.1a+ and 4.2.x, so no luck with other versions
Not quite sure about Ruby compatibility issues, their versioning system is weird; in Linux Cmd worked for me with Ruby 1.8.7.

Wikitude Phonegap iOS Plugin

I have configured the Wikitude iOS plugin as suggested here -
https://github.com/phonegap/phonegap-plugins/tree/master/iOS/AugmentedReality-Wikitude/Plugin
However, during the compilation it is showing me build error - WTArchitechview.h not found in WTWikitiudePlugin.m file.
I am currently having iOS 6 device and using Cordova 2.0.0. I found one guide in the wikitude documentation -
http://forum.wikitude.com/documentation?p_p_id=2_WAR_knowledgebaseportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_2_WAR_knowledgebaseportlet_mvcPath=%2Fdisplay%2Fview_article.jsp&_2_WAR_knowledgebaseportlet_resourcePrimKey=128189
It says I have to remove the armv7s architecture and have to do some modification files. I was not able to understand that modification part. I mean which file I have to modify.
I think you're having two problems.
The first is, that you have to download the Wikitude SDK from there website and then add the files from the SDK into your phonegap Xcode project (Follow the steps described in your first link). If you did this and still having compile time errors, make sure that either your user header search path from your Xcode project is set correctly or you copied the Wikitude SDK files into the folder which are already setup in the sample project. You can also remove the existing Wikitude SDK folder in your Xcode project and drag the one in, which you have downloaded.
The second link describes what you need to change in order to build your project with the Wikitude SDK in Xcode 4.5. You need to change this in your Xcode project settings. You have to do this because the Wikitude SDK needs some libraries which are not available for the armv7s architecture right now.

stbuild not found

I am trying to build native application for ios using sencha touch but every time I use packaging command it gives me error that stbuild in not an external and internal command.
I searched a lot on this problem but did not get any solution.
I had a same problem.
But it worked when I run SenchaSDKTools/stbuild.pkg.
like below:
/Applications/SenchaSDKTools-2.0.0-Beta/stbuild.pkg
Have you installed "Sencha SDK Tools"? If not, then you should install it.
You can also use the sencha command for native packaging of the application.
Like,
sencha package generate <configTemplate.json>
Sencha Touch 2 Native Packaging for Android
Sencha Touch 2 Native Packaging for iOS
If you have already installed the Sencha SDK Tools, the executable file stbuild.exe file will be installed into the windows system root folder (e.g. C:\Windows) while a subdirectory named stbuild will be installed in the same folder. Check to see if it is there. If it is not, it can be downloaded separately from http://dl.dropbox.com/u/8793605/stbuild.msi.
This can happen if the SenchaTouch installer goes awry. In my case the installer won't run on my Windows 7 system, so I duplicated it's effects manually from a Windows XP install.
NOTE: From my research it appears that from the version 2.1 tools onwards, the stbuild will be installed to the sencha tools location and no longer into the windows system directory (which is as it always should have been! - I don't know what they were thinking).

Resources