我们可以在 iOS 设备上使用 appcelerator titanium liveview 吗?

can we use appcelerator titanium liveview in iOS devices?

我试图在来自 appcelerator studio 的 iPhone 设备上以实时取景模式 运行 我的应用程序并收到错误:

[LiveView] File Server unavailable. Host Unreachable @ 192.168.1.122:8324
[LiveView]Please ensure your device and computer are on the same network and the port is not blocked.

条件:
1. 设备:iPhone 5S 与 IOS 9.2.1
2. 钛 SDK 5.1.1.GA
3. 关闭防火墙并连接到同一个wifi
4. xcode 7.2
5.Appcelerator Studio 4.4.0
6. 最新的 appcelerator CLI

部署到 iOS 设备时我们不能使用实时取景吗?

nb:当我使用 iOS 模拟器和 android 设备时它有效

我刚刚查看了 LiveView 代码并确认当您的 iOS 应用程序中的 LiveView 代码无法在您的计算机上看到 LiveView 服务器 运行 时会发生此问题。您声称您的计算机和设备都在同一网络上并且防火墙已关闭。我想接下来要检查的是 LiveView 服务器 运行?

LiveView 位于 Appcelerator Studio 目录中。在我的机器上它位于 /Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1445037865.

您可以通过运行手动查看服务器状态:

/Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1445037865/node_modules/liveview/bin/liveview server status

实际上还有几个其他的子命令可以传入:启动、停止和重新启动。如果上面的状态命令表明服务器是 运行,请使用:

停止它
/Applications/Appcelerator_Studio/plugins/com.appcelerator.titanium.liveview.core_1.1.0.1445037865/node_modules/liveview/bin/liveview server stop

再次构建您的应用程序,Studio 将再次启动 LiveView 服务器,希望这次它能正常工作。我认为您不需要手动启动 LiveView 服务器。我什至不确定这是否可行。

希望这能解决您的问题。