javascript Phonegap/Cordova 3.1 由于页面加载而重置插件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19671249/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Phonegap/Cordova 3.1 Resetting plugins due to page load
提问by bart_88
I have a fresh build of a iOS Phonegap/Cordova 3.1 hello world application and I am getting the following message in the xcode output :
我有一个全新的 iOS Phonegap/Cordova 3.1 hello world 应用程序,我在 xcode 输出中收到以下消息:
2013-10-30 08:20:17.768 HelloWorld[51492:c07] Multi-tasking -> Device: YES, App: YES
**2013-10-30 08:20:17.914 HelloWorld[51492:c07] Resetting plugins due to page load.**
2013-10-30 08:20:18.394 HelloWorld[51492:c07] Finished load of:
What is causing the Resetting plugins due to page load
message? The application appears to run fine when I build it.
是什么导致Resetting plugins due to page load
消息?当我构建它时,该应用程序似乎运行良好。
采纳答案by Matt Ray
This is a duplicate of Resetting plugins due to page load - Issueon this very site.
It appears to be a known conflict with jQuery Mobile and similar libraries. Check the other post for a very simple remedy to this.
它似乎是与 jQuery Mobile 和类似库的已知冲突。检查另一篇文章以获取对此的非常简单的补救措施。
EDIT:
编辑:
Thanks and I stand corrected, @bart_88. I looked in the Cordova project code and see the following:
谢谢,我更正了,@bart_88。我查看了 Cordova 项目代码,看到以下内容:
- (void)webViewDidStartLoad:(UIWebView*)theWebView {
NSLog(@"Resetting plugins due to page load.");
[_commandQueue resetRequestId];
[[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginResetNotification object:self.webView]];
}
It appears that this code will be hit (CDVViewController) no matter what, so the message you are seeing is just a new NSLog entry that can be ignored.
似乎无论如何都会命中此代码(CDVViewController),因此您看到的消息只是一个可以忽略的新 NSLog 条目。