Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
621 views
in Technique[技术] by (71.8m points)

cordova - Resetting plugins due to page load - Issue

After upgrading to Phonegap 2.5 from 2.3 Xcode hangs on this message "Resetting plugins due to page load".

I have reviewed all these answers:

Error loading external URL in Phonegap 2.5

https://stackoverflow.com/questions/15569327/cordova-2-5-0-query-regarding-ios-plugin

Failed to load webpage with error: Frame load interrupted

which tell you to move cordova-2.5.0.js to the root (same level as index.html) but this didn't fix the issue for me.

I originally had the file in "js/cordova-2.5.0.js" and my index file has the same reference. I made the change as above and I got the same failed result.

After using the "create" command to upgrade and going through the process I've used

"cordova-2.5.0.js" "/cordova-2.5.0.js" "js/cordova-2.5.0.js"

I'm performing a "hard clean" every time I change it too.

any ideas what else I can try or what I'm missing?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Are you using Jquery Mobile or something similar? I had the same issue as i had a login page which it would skip if you were already logged in.

Looks like there is an issue when fading from the splash screen and doing a hash change at the same time.

My code before

$('#LoginPage').live('pagebeforeshow', function(event) {
    if(window.localStorage.getItem("UserID"))
    {
        $.mobile.changePage("#MainPage");
        appRefresh();
    }
});

My code after

$('#LoginPage').live('pagebeforeshow', function(event) {
    if(window.localStorage.getItem("UserID"))
    {
        $.mobile.changePage("#MainPage", {changeHash: false});
        appRefresh();
    }
});

This is now working for me.

There is an issue log for this

https://issues.apache.org/jira/browse/CB-2602


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...