【问题标题】:Meteor run ios - not working at allMeteor run ios - 根本不工作
【发布时间】:2015-03-27 12:53:25
【问题描述】:

我只创建了新项目并添加了 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

【问题讨论】:

  • 您是否安装了 Xcode 并且您是否按照github.com/meteor/meteor/wiki/… 的说明进行操作?从上面的错误来看,您的计算机上似乎没有 Xcode
  • 是的,我已经安装了 Xcode,是的,我按照该说明进行操作。
  • 你的项目中是否有类似 require("console.log") 之类的行?
  • 您是否尝试过清理您的 cordova 项目并再次尝试? rm -rf .meteor/local/cordova-build && meteor run ios

标签: ios cordova meteor ios-simulator


【解决方案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 中的说明进行安装。

【讨论】:

  • 如果我使用 cordova 创建项目,它在设备和模拟器上运行良好。我再次安装了 Xcode 以及那些命令行工具。我尝试像您描述的那样添加 ios 平台,但它已经在项目中,并且添加该插件也没有任何作用:(
猜你喜欢
  • 1970-01-01
  • 2014-04-03
  • 1970-01-01
  • 2013-06-27
  • 2017-02-17
  • 2015-03-20
  • 1970-01-01
  • 2016-10-29
相关资源
最近更新 更多