Search code examples
iosxcode4cordova

javascript call from appDelegate : phonegap iOS


How I got the instance of phonegap webview in the appDelegate.m class

I want to call javascript function on the notification receive(i.e. from the appDelegate class)


Solution

  • Solved for me...

    just calling with self.webView in didReceiveRemoteNotification

    like

    NSString * jsCallBack = [NSString stringWithFormat:@"pushCallBack();"];
    [self.webView stringByEvaluatingJavaScriptFromString:jsCallBack];