Using PhoneGap/Cordova on iOS with external URL

前端 未结 2 1502
你的背包
你的背包 2021-02-02 01:45

I want my phonegap/cordova app to load an external page and nothing local.

Now that i do that , however my plugins (javascript) dont work because they are called from th

相关标签:
2条回答
  • 2021-02-02 02:14

    d0nparalias,

    Look at this project: https://dl.dropbox.com/u/930742/so/CordovaBrowserSO.zip

    As you can see there is no index.html or www/ folder inside.

    All files were uploaded to the server and app will download them as needed.

    I've accomplished it by doing steps from p.1. from https://stackoverflow.com/a/15319156/753878 answer.

    At the server I have all files that you can see in basic www/ folder created with template Cordova project: Server contents

    All plugins & stuff you include directly in index.html on your server.

    If you check config.xml from the archive above you'll see
    <content src="http://dymv.comeze.com/www/index.html" />

    And the app on launch will say: Launching sample app

    Hope it's what you want to reach.
    If it's not — please provide more info about result you want to achieve.

    BR.
    Eugene

    0 讨论(0)
  • 2021-02-02 02:17
    window.loadURL = function(url){
        navigator.app.loadUrl(url, { openExternal:true });
        return false;
    }
    

    to use it in a tag eg

    <a href='#' onclick="window.loadUrl('http://google.com'); return false;">open</a>
    
    0 讨论(0)
提交回复
热议问题