我有一个全新构建的 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:
是什么导致了 Resetting plugins due to page load
消息?该应用程序在我构建时似乎运行良好。
最佳答案
这是 Resetting plugins due to page load - Issue 的副本在这个网站上。
这似乎是与 jQuery Mobile 和类似库的已知冲突。查看另一篇文章以获取对此的非常简单的补救措施。
编辑:
谢谢,我纠正了错误,@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]];
}
看来这段代码无论如何都会被命中 (CDVViewController),所以您看到的消息只是一个可以忽略的新 NSLog 条目。
关于javascript - Phonegap/Cordova 3.1 由于页面加载而重置插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19671249/