1

Possible Duplicate:
cordova/phonegap 2.0 iOS

I have just upgraded to Phonegap 2.1.0 and Xcode 4.5 and I am getting warning messages stating that 'invokeString' is deprecated in the MainViewController.m. I know that I need to use the window.handleOpenURL(url) function. However, I am not exactly sure what I need to change and where I need to change it? I am using a childbrowser and I believe this is causing it to not open.

   - (void) webViewDidFinishLoad:(UIWebView*) theWebView 
 {
 // only valid if ___PROJECTNAME__-Info.plist specifies a protocol to handle
if (self.invokeString)
 {
    // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
    NSLog(@"DEPRECATED: window.invokeString - use the window.handleOpenURL(url) function instead, which is always called when the app is launched through a custom scheme url.");
   NSString* jsString = [NSString stringWithFormat:@"var **invokeString = \"%@\";", self.invokeString];**
  [theWebView stringByEvaluatingJavaScriptFromString:jsString];
 }

 // Black base color for background matches the native apps
 theWebView.backgroundColor = [UIColor blackColor];

return [super webViewDidFinishLoad:theWebView];

}

Community
  • 1
  • 1
stat8
  • 689
  • 1
  • 6
  • 10

0 Answers0