New to phonegap/cordova Questions

18 views
Skip to first unread message

iOSguy

unread,
Mar 21, 2012, 5:13:04 PM3/21/12
to phonegap
Hi All,

I am an iOS developer looking for some information about phonegap/
cordova.
My Company just decided to switch between a native app to an hybrid
one using phonegap,
so I have to learn as fast as I can. I have btw some question :

1) The assets of the app (html/css/javascript) must be stored locally
or is possible to use remote content
2) The interaction between Javascript and objective-c is possible only
using the plugin paradigm or there are other way?
3) There is around some doc about the classes contained in the cordova
framework?

That's all for now, thanks in advance

Cheers
Elio

Kerri Shotts

unread,
Mar 21, 2012, 11:18:06 PM3/21/12
to phon...@googlegroups.com
Regarding 1), you can do both, but if you're going to be aiming for the app store, you need to provide a good portion of the experience locally and in a way that differentiates it from just a typical mobile webpage. Otherwise you risk Apple's rejection.
2) Within PG/Cordova most interaction is done via plugins. It's easy to write your own (usually you can build off of a simpler plugin to get a feel for it), but the callback structure means that your code executes asynchronously. This makes things like reading and writing from files a little painful in that you must have several functions that act as callbacks for each step of the process. Not hard to get used to, but it is something to be aware of. You can also do JS<->Obj C directly, but I haven't done so myself. Apple has some documentation on it (IIRC, look for JavascriptBridge).
Reply all
Reply to author
Forward
0 new messages