29 Mar 2012 12:26 PM #1
app build with phonegap and navigator failing
Can't find anything on this yet. I'm trying to use 'sencha app build' on my project that uses phonegap apis and i get an error when the build tool finds any calls to phonegap apis like 'navigator.network'.
[INFO] Resolving your application dependencies...
[ERROR] Error thown from your application with message: TypeError: 'undefined' is not an object
Is there the equivalent of a header file for phonegap that i need to inform the sencha tool about?
30 Mar 2012 8:46 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
The build will use the native wrapper that comes with ST. PhoneGap isn't an option to build for.Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
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 email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
5 Nov 2012 8:29 AM #3
I had the same issue. The solution is to test that this call is possible before doing it, and if not exit the function with something like that :
if (!navigator.network) return false;