I am testing my project in iOS 8 preview 2. And now I faces two problems about the uiwebview I use the following code to inject my script NSString *jsCLOSE_WINDOW = @"function CLOSE_WINDOW(){ document.location ='mySchema://FUNCTION=CLOSE_WINDOW'; }"; [self.webView stringByEvaluatingJavaScriptFromString:jsCLOSE_WINDOW]; in "-(void)webViewDidFinishLoad:(UIWebView *)webView" and get the response in -
![javascript inject in uiwebview of iOS 8](https://cdn-ak-scissors.b.st-hatena.com/image/square/98d6f053a97a87156775f60757c60865d0f2c47d/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fstackoverflow%2FImg%2Fapple-touch-icon%402.png%3Fv%3D73d79a89bded)