简体   繁体   English

在本地服务器苹果应用站点关联文件进行测试的最简单方法是什么

[英]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:为了使通用链接起作用,您需要两件事:

  1. The server that hosts the apple-app-site-association needs to have a valid ssl certificate.托管 apple-app-site-association 的服务器需要具有有效的 ssl 证书。 It will refuse to get the file from a http:// connection or from a https:// with an invalid (eg self signed) certificate, unless it is trusted by the device.它将拒绝从 http:// 连接或从具有无效(例如自签名)证书的 https:// 获取文件,除非设备信任它。 To make a self signed certificate trusted check here .要使自签名证书受信任,请在此处检查。
  2. The server that hosts the apple-app-site-association needs to publicly accessible because the file is delivered thru CDN , if not when you need to modify the entitlement file to add ?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.

相关问题 Apple-app-site-association:横幅显示,而服务器中没有文件 - Apple-app-site-association : banner displays while no file in server 配置 apple-app-site-association 文件并上传到服务器 - Configure apple-app-site-association file and upload on server apple-app-site-association文件的位置 - Location for apple-app-site-association file 如何在 ReactJS 中的 /apple-app-site-association 页面上提供 apple-app-site-association 文件 - How to serve apple-app-site-association file on /apple-app-site-association page in ReactJS 如何上传文件 apple-app-site-association 以在 iOS 应用程序的服务器中进行通用链接? - How to upload file apple-app-site-association for universal linking in server for iOS app? 苹果应用站点关联文件无法为某些用户下载 - Apple-app-site-association file fails to download for certain users iOS 通用链接 apple-app-site-association 文件问题 - iOS Universal links apple-app-site-association file issue DeepLinking apple-app-site-association文件是否需要签名? - Does DeepLinking apple-app-site-association file need signing? apple-app-site-association文件格式错误 - The apple-app-site-association file format error >= 400 错误代码与 apple-app-site-association json 文件 - >= 400 error code with apple-app-site-association json file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM