简体   繁体   English

如何在iOS 10.3.3上访问Windows本地主机

[英]How to access to Windows localhost on iOS 10.3.3

We are developing a Progressive Web Application and we would like to preview changes on Safari on my phone before building it. 我们正在开发一个渐进式Web应用程序,我们想在构建手机之前在我的手机上预览Safari上的更改。 However, we have issues accessing our localhost website (on Windows 10) on my iPhone 6. 但是,在iPhone 6上访问我们的localhost网站(在Windows 10上)时遇到问题。

It worked on an iPhone connected to the same Wifi with iOS 11.X doing : 它可以在与iOS 11.X连接到同一Wifi的iPhone上运行,方法是:

ng serve --open --host=0.0.0.0

and then writing in safari : 然后用Safari编写:

my.computer.ip:4200

But with iOS 10.3.3, this method seems to be blocked by Apple because we can only see the background-color , and the website's name . 但在iOS 10.3.3中,Apple似乎阻止了此方法,因为我们只能看到background-color网站名称

We have tried to this method : 我们尝试了这种方法:

https://<computer_name>.local

We have also tried localtunnel , works fine with Android and Windows but still not on iOS 10.3.3 iPhone. 我们还尝试了localtunnel ,可在Android和Windows上正常运行,但仍不能在iOS 10.3.3 iPhone上运行。

It seems to be iOS and not Safari because it doesn't work with Chrome neither. 它似乎是iOS,而不是Safari,因为它也不能与Chrome一起使用。

Hope we will find a solution because we have to build everytime to check if changes work. 希望我们能找到一个解决方案,因为我们必须每次进行构建以检查更改是否有效。

Did you try 你试过了吗

ng serve --host 0.0.0.0 -port 4200 --disable-host-check

The disable host check flag should only be used for development. 禁用主机检查标志应仅用于开发。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM