Closing InAppBrowser itself in Phonegap Application is not working in Iphone .

We  have a hybrid mobile app and we are using InAppBrowser to display external pages. We want to close the InAppBrowser itself once on click of a button inside the InAppBrowser page.  I was able to make it work in android using polling. We put the executeScript() call in a loop and continuously check for a status change in the child window.  var "myurl", "_blank"); win.addEventListener( "loadstop", function(){        var loop = window.setInterval(function(){            win.executeScript({                    code: "window.shouldClose"                },                function(values){                    if(values[0]){                      win.close();                      window.clearInterval(loop);                    }                }            );        },100);    });     and making variable true at the time of close event ( window.shouldClose=true ). However the same is not working when I am trying this in Iphone, How to make this work in iphone? please help
1 answers

That is more a stackoverflow or phonegap question. This one might help: