简体   繁体   中英

iPhone ChildBrowser redirect after splash screen

I have two questions, and should mention I am an Java programmer going into the web/mobile world.

  1. Using PhoneGap's childbrowser plugin I want to redirect to a web page directly after the splash screen I am trying to do this now by using document.ready/onload functions, without success. I have also tried the onDeviceReady(). Any suggesions on how I can do this?

  2. What affect would this have for the app getting accepted in the appstore?

1 - The childbrowser only starts working after the onDeviceReady event I believe. So something like this should work:

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
    window.plugins.childBrowser.showWebPage(myurl);       
} 

2 - If the web page is contained within the app files. No problem.

If the app is trying to redirect to an external page which has the potential to change without the app being updated, then it will not be accepted. It breaks Apples T&C and they will just flatout deny your app. More information can be found here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM