In iOS, how can I call an Objective-C method from Javascript which is loaded in web page(UIWebView)?

I have an IOS application which has a web browser in it.

When this web browser is displayed, it navigates to a page on Internet, say

Is it possible to place a javascript code on this web site, which communicates with the native application? Can it call an Objective-C method?

I tried this, but didn't work.

On Javascript side:

Your javascript code will navigate to a 'fake' URL that you will filter on the method above. Something like:

window.location = "js2objc://save:param";