I'm building a hybrid application based on native iOS with parts over Cordova 3.1.0 (known as Cleaver component). The app is working with the sample index.html and it shows the "DEVICE IS READY" message (I suppose it means it's working fine). The problem now is how to add a custom plugin for communicating the native and the Phonegap components.
I've followed some tutorials:
http://moduscreate.com/building-a-custom-phonegap-plugin-for-ios/ http://devgirl.org/2013/09/17/how-to-write-a-phonegap-3-0-plugin-for-android/ (this one for Android)
I've tried installing the "connectivity" plugin on a base/canonical Cordova and copying the structure and the .m and .h to my project, and adding it's own config.xml part, but it didn't work.
Does anyone knows another resource for looking in, or someone else has been in the same situation?
Thanks!
Edited:
I've tested my custom plugin on a new created Cordova project and it works like a charm.
Edited #2:
Making a debug on the Phonegap Cleaver classes, most of it on the CDVViewController, I did realize that the UIWebView Delegate Methods are not being called:
- (void)webViewDidStartLoad:(UIWebView*)theWebView
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
- (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
Is there a way for it to reasign the delegate for them to be called?