Thank you for reporting this bug. We will make it our priority to review this report.
SDK Tools with PhoneGap
SDK Tools with PhoneGap
Can the SDK tools build scripts not handle PhoneGap builds?
If I try to do something as simple as
I get the following error when trying to build for testing.
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, null);
Error thown from your application with message: ReferenceError: Can't find variable: LocalFileSystem
Is there something special I need to do to use PhoneGap features that are not abstracted by sencha? I understand I am not building a phonegap app with the SDK tools but I need to package it for PhoneGap. Is this possible?
FYI I am on windows 7 64-bit with SenchaSDKTools-2.0.0-beta2 using Cordova 1.5
Sencha - Senior Forum Manager
The SDK Tools does not build for PhoneGap. The build for native is for the Sencha native wrapper.
I do completely understand that and I am not trying to build a PhoneGap app WITH the SDK Tools I am trying to package my Sencha app FOR PhoneGap.
I am using:
Once it is packaged I want to copy this into my PhoneGap Android Project (assets/www) and package this using PhoneGap.
sencha app build package
Is this not possible with the SDK tools? If not how does one go about using PhoneGap API's with Sencha that are not abstracted, FILE API specifically. How does one package a sencha application for use with phonegap?
For now I have come up with a workaround. Before doing any calls to Cordova I do a check like this
This way when the "compiler" runs it will not step in there and not throw errors on undefined things, but when the application is deployed into a working phonegap environment everything is peachy keen.
Ext.browser.is.WebView && Ext.browser.is.PhoneGap && !Ext.os.is.Desktop
I have also made a quick utility getter to make this faster (cordova.enabled) but that's not as important. This should be enough for me to start working with Sencha touch 2 AND phonegap correctly.
I have tried your suggestions, but for some reason, it doesn't work:
Ext.Msg.alert("Info", "webView: "+Ext.browser.is.WebView+" / Phonegap: "+Ext.browser.is.PhoneGap+" / Desktop: "+Ext.os.is.Desktop);
displays an alert, but with following text:
webView: false / Phonegap: undefined / Desktop: undefined
What am I missing?
Last edited by jdesmedt; 4 Apr 2012 at 2:23 AM.
I have found a way to make the compiler stop complaining, but I'm still not getting everything working.
I want to access the device.platform property, but when I try that, I get an error: ReferenceError: device is not defined.
What am I doing wrong? Could you provide a minimal project that combines Phonegap & Sencha (& is built with the SDK tools?)
Whoops! I forgot to include this also sorry I am back and forth between multiple forum issues here.
Cordova 1.5.0 for iOS has broken sencha support. They removed the global PhoneGap object and replaced it with a Cordova object but unlike the Android version of the JS they did not provide a backwards compatibility in the iOS version.
Details on a fix here