【问题标题】:Targeting a particular device in the iOS simulator using Meteor使用 Meteor 在 iOS 模拟器中定位特定设备
【发布时间】:2014-12-27 13:12:47
【问题描述】:

我目前正在使用 Meteor v1.0 开发一个移动应用程序,并尝试使用 iOS 模拟器测试 iOS 设备。

对于 Cordova 应用程序,我习惯于这样做:

cordova emulate ios --target "iPad"

对于 Meteor,替代方法是:

meteor run ios

在我的 Mac 上,运行上述 Meteor 命令会导致应用程序在 iPhone 4S 模拟器上运行。在使用 Cordova 时,我无法选择要模拟的设备。

最初加载应用后,我尝试通过 iOS 模拟器切换设备,但该应用在我切换到的设备上不可用。

我找到的唯一解决方案是导航到 Cordova 目录 (.meteor/local/cordova-build) 并直接从 Cordova 运行 iOS 模拟器。

有没有人知道使用 Meteor 本身的更好解决方案,或者这目前不可能?我无法在文档中找到任何内容。我愿意使用其他东西对其进行测试,但最好将所有东西与 Meteor 保持在一起。

【问题讨论】:

    标签: ios cordova meteor


    【解决方案1】:

    目前的解决方案是通过运行meteor run ios-device打开Xcode,然后在Xcode中选择正确的模拟器。不幸的是,ios-sim(Meteor 用于模拟器的包)并不容易选择要模拟的设备。

    【讨论】:

      【解决方案2】:

      meteor run ios-device -p 3000 是我的工作。然后下载适用于 iPad 的 phone gap 应用程序并在您的 IP 上运行它:

      ipconfig getifaddr en0

      然后将其放入电话间隙应用程序中。例如:192.168.0.8:3000

      【讨论】:

      • 这没有回答问题 - 问题是关于使用特定的模拟设备,您的答案是关于在物理设备上运行。
      猜你喜欢
      • 1970-01-01
      • 2014-06-16
      • 1970-01-01
      • 2018-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多