My idea is to use Phonegap for the business logic of my application, but use my own transitions. Therefore, I need a CDVWebView in every UIViewController. This works fine with regular UIWebviews, but if I use multiple CDVViewControllers, for example. TabBar, the deviceReady event is fired only for the first CDVWebView.
Here is what I do in the App Delegate:
- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]; NSString* invokeString = nil; if (url && [url isKindOfClass:[NSURL class]]) { invokeString = [url absoluteString]; NSLog(@"NativeNavigationTest launchOptions = %@", url); } NSLog(@"invokeString = %@", invokeString); CGRect screenBounds = [[UIScreen mainScreen] bounds]; self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease]; self.window.autoresizesSubviews = YES; CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];
}
This is the error I get for every ViewController, except for the first one.
Error: executing module function 'setInfo' in module 'cordova/plugin/ios/device'. Have you included the iOS version of the cordova-1.9.0.js
and
ERROR: Attempting to call cordova.exec() before 'deviceready'. Ignoring.
Of course, I refer to cordova-1.9.0 in my HTML files, I think Cordova was not intended to use multiple WebViews, but does anyone know how to change this?
source share