[英]What is the simplest way to server apple-app-site-association file locally for testing
I am working on implementing universal links in an iOS app.我正在努力在 iOS 应用程序中实现通用链接。 As per the requirement to implement this I have to serve an apple-app-site-association file from our server end to ensure this is our website.根据实现这一点的要求,我必须从我们的服务器端提供一个 apple-app-site-association 文件,以确保这是我们的网站。
My concern is that we will serve this file from our real server of course but is there any quicker way to mock this process locally or remotely so that I can bypass the testing phase at the time of implementation?我担心的是我们当然会从我们的真实服务器上提供这个文件,但是有没有更快的方法在本地或远程模拟这个过程,以便我可以在实施时绕过测试阶段? As you know interrupting the other team for some small changes or trial and error seems boring.如您所知,因为一些小的更改或反复试验而打断其他团队似乎很无聊。
Currently, I am creating a localhost server using any language(in my opinion golang) then forwarding the localhost to the internet so that ios can access it from anywhere.目前,我正在使用任何语言(在我看来是golang)创建一个本地主机服务器,然后将本地主机转发到互联网,以便 ios 可以从任何地方访问它。
It is recommended to have a staging server before you move/deploy you changes in the production.建议在移动/部署生产中的更改之前拥有一个临时服务器。 In cases of small projects this could be you local machine.在小型项目的情况下,这可能是您的本地机器。 In order for universal links to work you need two things:为了使通用链接起作用,您需要两件事:
?mode=developer
, like this: applinks:ourDevServerURL?mode=developer
托管 apple-app-site-association 的服务器需要可公开访问,因为文件是通过 CDN 传递的,如果不是,当您需要修改授权文件以添加?mode=developer
时,如下所示: applinks:ourDevServerURL?mode=developer
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.