2 Replies Latest reply on Apr 11, 2017 1:44 AM by mambas

    inappbrowser window is not shown automatically

    mambas

      We need to create a simple iOS App that is wrapper for some existing website (will be used internally, not for Apple Store of course).

      We're using Phonegap Build service and built a few successfull apps already. But with this app we have some issue. We want the App opens inappbrowser window when starts, and that's all we need. We include plugin in config.xml:

      <plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0" /> 

      then we have a js code that should open inappbrowser onDeviceReady state:

      ...
      document.addEventListener('deviceready', function(){
      window.open("http://www.website.com/", '_blank','toolbar=no,location=no');
      }, false);
      ...

      So when App is started nothing happens, no matter how long you wait. But if you minimize App and restore (Home button and then open again), you see that window opened fullscreen and site loaded well. So why it is not opened automatically? We trye to assign that function to button click, no success - same behaviour. We tried to change that to cordova.InAppBrowser.open instead and change options to toolbar=yes etc. No success. When you minimize and restore - window shown. On Android that works well - window is opened automatically on App load and you can see website. Any suggestions or help?

       

      I've seen similar questions here, but there were no mention about minimize/restore case. So I decided to ask and explain in details what we have.