我只创建了新项目并添加了ios-platform。 这是我在iOS模拟器上运行它时得到的结果:
$ meteor run ios
[[[[[ ~/Dropbox/Projects/testapp ]]]]]
=> Started proxy.
ios: failed to start the app.
ENOENT, open
'/Users/lehtu/Dropbox/Projects/testapp/.meteor/local/cordova-build/platforms/ios/cordova/console.log'
=> Started app on iOS Simulator.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
此路径中没有平台文件夹,它告诉我应该是console.log
任何想法为何失败以及ENOENT意味着什么?或者更好..如何使这项工作?
在设备中运行也不起作用:
$ meteor run ios-device
WARNING: You are testing your app on a remote device.For the mobile app to be able to connect to
the local server, make sure your device is on the same network, and that the network
configuration allows clients to talk to each other (no client isolation).
[[[[[ ~/Dropbox/Projects/testapp ]]]]]
=> Started proxy.
Could not open your project in Xcode.
Try running again with the --verbose option.
Instructions for running your app on an iOS device:
https://github.com/meteor/meteor/wiki/How-to-run-your-app-on-an-iOS-device
答案 0 :(得分:1)
在第一种情况下,当Console plugin无法用于平台iOS时,您似乎会尝试使用console.log
,因此您需要先运行
cordova platform add ios
安装iOS作为平台。此命令还将生成文件夹 platforms / ios / 。然后,使用
运行插件安装cordova plugin add org.apache.cordova.console
在第二种情况下( ios-device ),很明显你错过了Xcode,因为 Akshat 已在他的评论中提出。因此,您需要按照他提供的link中的说明进行安装。