Ionic 2 cli命令"离子模拟ios --livereload"没有在iOs工作9

时间:2016-06-28 01:56:55

标签: angular ios-simulator ionic2 livereload

所以我正在试用Ionic 2.我发现这个Ionic Cli命令不起作用:

ionic emulate ios --livereload

ionic emulate ios --lc

它显示"设置Live Live Reload"在日志中但应用程序只是挂在开始的启动画面中。在日志中找不到更多错误(没有错误输出),但整个事情都被冻结了。它没有-lc标志。所以,如果我只是运行

ionic emulate ios

它的工作原理和应用程序启动。有人知道解决方法吗?我在iOs 9.3上。

2 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,这些是我遵循的步骤:

  1. 打开应用的根文件夹。
  2. 查找<allow-navigation href="" />文件。
  3. 查找专栏<allow-navigation href="http://YOUR_IP_ADDRESS:8100/" />
  4. 将其更改为<allow-navigation href="http://192.168.118.25:8100/" />并保存。例如。 ionic emulate ios -lcs
  5. 现在再次运行FILE * file; // right_thumb.bin is located in the same directory as the file. // right_thumb.bin is created using fwrite. file = fopen("right_thumb.bin", "rb"); // program crashes right at the line above, with the segmentation fault error. ABS_BIR * readImage; fread(&readImage, sizeof(ABS_BIR), sizeof(&var), file); // &var is a pointer to the fingerprint that was written // ABS_BIR is the fingerprint data type fclose(file); 命令。
  6. 这次它应该可以在您的模拟器上完美运行。

答案 1 :(得分:0)

执行ionic address first
然后执行ionic emulate ios --livereload
经过一些步骤,你必须选择一个IP。选择你想要的东西,它会起作用!