24 May 2012 1:27 AM #1
Unanswered: Build Phonegap with Plugins
i got an app with sencha touch 2 and phonegap 1.6.1.
I use the Facebook Plugin and Native Plugins.
1. Cause my Development and testing i got an Project with Xcode, with the complete Project from sencha.
All works fine with the iOS Simulator but i want to minify my Project.
The Problem is, if i want to build a package, i get an error with undefined type.
When i start the index.html in the browser an error occurs with the message:
TypeError: 'undefined' is not a function (evaluating 'cordova.exec')
I know that the browser don't know the Cordova Functions but i want to build my app and want to avoid this.
can anyone help me with that?
2. I want to test my app on my real device with Xcode, but it didn't work with the same repo like the Simulator.
I don't need to make any configurations at the app.json or packager,json right?
So i dont understand why it still not work.
I get the Splashscreen and my testing alerts appears.
I got two alerts in sencha-touch.js at the start and the end. These two alerts appear.
My alert at the app.js at the start appears to, but not in my Application Launch function.
To be sure that the installing is right, i make a new app with Xcode, phone gap and sencha. Now with build app package and this works on my device. It works with build package and without any build.
Did anyone know this Problem and can me help out with that?
26 May 2012 3:29 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
Sounds like you aren't including the phonegap lib. You may enjoy this blog post: http://robertdougan.com/posts/packag...onegap-cordovaMitchell Simoens @LikelyMitch
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.
26 May 2012 9:09 AM #3
thx for your reply, this could solve my Problem.
I didnt know anything about the all command from creating.
The whole problem is thaf i use the Facebookplugin written with objective C, cause i dont want to build server side thinks for this connection.
If i search for the app id in my project, i added the plugin vaeiables that creates my error, not nice, but i will see what i get when creating a project with the all command.
my second question is solved with building the app with package and placed in xcode.
28 May 2012 10:42 PM #4
no this didn't helps, cause aim using the iOS Facebook Plugin i think.
I use at the FB.init the option
and thats the error for the build.
23 Aug 2012 6:49 AM #5
23 Aug 2012 9:03 PM #6
just add this
1 Nov 2012 3:54 AM #7
1 Nov 2012 5:47 AM #8
only if cordova.exec() is tru, you can make your Action with cordova.
And the compiler wont throw an error.