9

So I have built this Cordova 4.0 app which works fine on Android, but when running on my iPhone I run into an error.

When launching the app I get a white screen for about two minutes and in the Xcode console it says Resetting plugins due to page load.

On SO I have found some suggested solutions to this error:

1. Resetting plugins due to page load

This one looks reasonable because it suggests it's a problem with jQuery Mobile which I am using. However, I don't use $.changePage(); anywhere in my code. Also, it would appear that this is solved in Cordova 4.0 https://issues.apache.org/jira/browse/CB-2602

2. Phonegap/Cordova 3.1 Resetting plugins due to page load

This one concludes that this is an error message you can safely ignore. In my case, I can't really ignore those two minute of white screen.

Here's the code which is loaded on app-load: http://pastebin.com/zSAYkdUB

What can be done?

4
  • 1
    what version of JQM are you using???. If 1.4.5 drop to 1.4.3 and see if the problem persists.
    – Tasos
    Nov 25, 2014 at 17:31
  • @Tasos I've been using 1.3.2 for some reason. You recommend upgrading to 1.4.3 then? Nov 25, 2014 at 19:30
  • 1
    The latest is 1.4.5. Well it Depends on how big and complex your App is. There have been a lot of changes since 1.3 so it may take time to get your App running in 1.4.5. i recommend starting a New Project and do you App again from scratch. Visit the demo JQM pages also. It wont take long if your plugins are compatible with Jquery (1.11.1)
    – Tasos
    Nov 25, 2014 at 22:24
  • 1
    You could be jumping to conclusions when you think there is causality between the message and the load time. It could be two different things, so don't stare yourself blind on the error message, look for other causes of slow startup.
    – Jesper We
    Apr 19, 2015 at 18:35

1 Answer 1

3

You'll see this message in every Cordova iOS app. (Try with the sample app.) It's printed when the webView begins to load resources. See the code here.

It also fires the CDVPluginResetNotification at the same time which calls onReset on all of the plugins. According to the code this method should be overridden to cancel long running requests when the webview refreshes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.