Need public API to call from native code to WKWebView at arbitrary times

Originator:allen
Number:rdar://17254503 Date Originated:10-Jun-2014
Status:Open Resolved:
Product:iOS SDK Product Version:8.0 beta 1
Classification:Enhancement Reproducible:Always
 
Hybrid native/web apps need to call between native code and JavaScript at times, for example when a system event like a push notification comes in. This is possible in UIWebView with stringByEvaluatingJavaScriptFromString: but there is no equivalent functionality in the new, improved WKWebView API.

There is a private method _runJavaScriptInMainFrame: that appears to do this.

This is a serious issue for hybrid apps that use PhoneGap or similar frameworks.

Comments

Fixed in iOS 8 beta 3

Not in docs, but in the public header: evaluateJavaScript:completionHandler:


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!