【发布时间】:2014-09-26 14:19:52
【问题描述】:
我新使用 Meteor 和 Cordova/Phonegap,似乎遇到了问题(希望它很容易解决)。
我正在使用:
科尔多瓦 3.5.0-0.2.6 流星 0.8.3 我已经安装了: 科尔多瓦插件添加 org.apache.cordova.inappbrowser 我还安装了meteor-oauth-demo (https://github.com/AdamBrodzinski/meteor-oauth-demo),因为我的应用需要它。
& 今天早些时候得到了 MeteorRider 的副本,并遵循(也许我错过了一些东西)安装/配置指南。
我在指向排行榜示例应用程序 (http://leaderboard.meteor.com/) 时遇到问题,我看到的只是:
在浏览器上我看到了完整的应用程序:
MeteorRider 初始化为:
document.addEventListener('deviceready', function() {
// do whatever stuff on deviceready
// ....
// put all your phonegap specific initializer code here
// ....
// if testing phonegap api/plugin, you may want to disable MeteorRider
// in which case you can display your own HTML w/o Meteor
// ....
// ok - go ahead and initialize MeteorRider (go get some!)
//MeteorRider.init("http://test.buzzy.buzz/");
/*** for more control ***/
var config = {
meteorUrl: 'http://leaderboard.meteor.com/',
currentPath: '',
localStorage: true,
// step 1) loading text
doLoading: true,
// step 2) AJAX request
doRequest: true,
// step 3) AJAX response (or cache) replacing DOM
doReplace: true
};
MeteorRider.init(config);
}, false);
模拟器日志文件有:
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SimulatorBridge[53325] <Warning>: LaunchServices: installing app for existing placeholder LSApplicationProxy: io.cordova.hellocordova
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SimulatorBridge[53325] <Warning>: LaunchServices: Not creating progress for LSApplicationProxy: io.cordova.hellocordova since it is not a placeholder.
Aug 4 16:25:08 Adams-MacBook-Pro-2.local installd[53332] <Notice>: 0xb0115000 handle_install_for_ls: Install of "/Users/adamginsburg/Documents/Development/cordova-info-app/platforms/ios/build/emulator/HelloCordova.app" requested by SimulatorBridge
Aug 4 16:25:08 Adams-MacBook-Pro-2.local installd[53332] <Notice>: 0xb0115000 MobileInstallationInstall_Server: Installing app io.cordova.hellocordova
Aug 4 16:25:08 Adams-MacBook-Pro-2.local installd[53332] <Notice>: 0xb0115000 install_application: Performing developer delta patch
Aug 4 16:25:08 Adams-MacBook-Pro-2.local installd[53332] <Notice>: 0xb0115000 MobileInstallationInstall_Server: Staging: 0.01s; Waiting: 0.00s; Installation: 0.01s; LS Sync: 0.00s; Overall: 0.02s
Aug 4 16:25:08 Adams-MacBook-Pro-2.local lsd[53341] <Warning>: LaunchServices: Updating identifier store
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SpringBoard[60501] <Error>: libMobileGestalt MobileGestalt.c:835: still-camera is static and will never generate a notification
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SpringBoard[60501] <Error>: libMobileGestalt MobileGestalt.c:835: stand-alone-contacts is static and will never generate a notification
Aug 4 16:25:08 Adams-MacBook-Pro-2.local backboardd[53326] <Warning>: Application 'UIKitApplication:io.cordova.hellocordova[0xe98]' exited abnormally with signal 9: Killed: 9
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SpringBoard[60501] <Warning>: BKSWorkspace: Ignoring exit of io.cordova.hellocordova as it is pending activation, and will be relaunched.
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SimulatorBridge[53325] <Warning>: Application launched after 0.00 seconds.
Aug 4 16:25:08 Adams-MacBook-Pro-2.local backboardd[53326] <Error>: HID: The 'Passive' connection 'HelloCordova' access to protected services is denied.
Aug 4 16:25:08 Adams-MacBook-Pro-2.local backboardd[53326] <Warning>: CoreAnimation: timed out fence b6a3
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Notice>: BUG in libdispatch: 13E28 - 866 - 0x2
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Notice>: BUG in libdispatch client: kevent[EVFILT_VNODE] add: "Bad file descriptor" - 0x9
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Warning>: Multi-tasking -> Device: YES, App: YES
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Warning>: Unlimited access to network resources
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Warning>:
Started backup to iCloud! Please be careful.
Your application might rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines"
You could find it at the following address https://developer.apple.com/icloud/documentation/data-storage/ .
Aug 4 16:25:08 Adams-MacBook-Pro-2.local SpringBoard[60501] <Warning>: No transaction in -[SBWorkspace workspace:applicationActivated:]
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Warning>: Resetting plugins due to page load.
Aug 4 16:25:08 Adams-MacBook-Pro-2.local HelloCordova[61082] <Warning>: Finished load of: file:///Users/adamginsburg/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/C0C98109-404D-44B6-B34A-BBCEF78151F9/HelloCordova.app/www/index.html
我确实看到了一些错误,但我不是 100% 确定它们的含义以及哪个是罪魁祸首?
顺便说一句,我确实用我自己的简单应用程序成功地创建了 hello world 示例......但是,我在这个示例和我自己的真实应用程序上都失败了。我想如果我可以在这个基本的应用程序上解决它,我希望可以将该解决方案应用于我更复杂的应用程序。
任何帮助表示赞赏。
【问题讨论】:
-
您发布的所有内容看起来都正确...您有 github 存储库供我参考吗?您是仅从模拟器还是从设备进行测试?你只看iOS平台吗?它可以在 Android 上运行吗?
-
感谢您的回复。我跳船了,因为我认为我需要使用 Cordova 插件,而且根据您的一些 cmets,它们似乎很麻烦。我正在使用meteor-cordova-loader,到目前为止它似乎正在工作。所以现在可能会坚持这种方法。再次感谢。
-
我认为我遇到的“插件问题”不一定与 MeteorRider 有关,但我也在看 meteor-cordova-loader ...一旦他们找出版本的问题,我会可能开始推荐这种方法。 github.com/andrewreedy/meteor-cordova-loader/issues/16