简体   繁体   English

签署apple-app-site-association

[英]Sign apple-app-site-association

I try to implement the iOS9 Universal Links . 我尝试实现iOS9 Universal Links

I m using this tutorial: http://blog.hokolinks.com/how-to-implement-apple-universal-links-on-ios-9/ And this: https://developer.apple.com/library/ios/documentation/Security/Reference/SharedWebCredentialsRef/ 我正在使用这个教程: http//blog.hokolinks.com/how-to-implement-apple-universal-links-on-ios-9/这个: https//developer.apple.com/library/ios /文档/安全/参考/ SharedWebCredentialsRef /

But none of them did the whole process. 但他们都没有完成整个过程。

I would apple-app-site-association file. 我会apple-app-site-association文件。

The above links say to do it this way: 以上链接说这样做:

cat json.txt | openssl smime -sign -inkey example.com.key
                            -signer example.com.cert
                            -certfile intermediate.cert
                            -noattr -nodetach
                            -outform DER > apple-app-site-association

And I don't have the .cert files (and don't know how to create it). 我没有.cert文件(并且不知道如何创建它)。

Form Apple docs: 表格Apple文档:

The file must be CMS signed by a valid TLS certificate. 该文件必须由有效的TLS证书进行CMS签名。

Any support will be great. 任何支持都会很棒。

Thanks in advance! 提前致谢!

As of iOS 9 developer seed 2, you no longer need to sign the apple-app-site-association file for Universal links. 从iOS 9开发人员种子2开始,您不再需要为通用链接签署apple-app-site-association文件。 Most places on the web still reference the need to sign the file as do the official Apple Docs. 网络上的大多数地方仍然像正式的Apple Docs那样引用了对文件签名的需求。 Here's the WWDC session where it was announced that you no longer need to sign the file. 这是WWDC会议,宣布您不再需要签署该文件。 https://developer.apple.com/videos/play/wwdc2015-509/ goto ~14 mins in to the video where they announce this and the limitations (not backwards compatible with iOS 8). https://developer.apple.com/videos/play/wwdc2015-509/转到〜14分钟到视频,他们宣布这个和限制(不向后兼容iOS 8)。

I have verified that Universal Links work with unsigned files on the official iOS 9 release. 我已经验证了Universal Links与官方iOS 9版本上的未签名文件一起使用。

This is definitely not an easy process. 这绝对不是一个简单的过程。 You can find another helpful blog post here . 你可以在这里找到另一个有用的博客文章 I'm pulling straight from that post. 我直接从那篇文章中拉出来。

And I don't have the .cert files (and don't know how to create it). 我没有.cert文件(并且不知道如何创建它)。

From the post: 从帖子:

Acquire SSL certification 获得SSL认证

You need to acquire SSL certification files for the domain you'll use to host the Universal Links. 您需要获取用于托管Universal Links的域的SSL认证文件。 In order to do this, you'll need to use a third party service to register your domain for SSL, and create the files you need. 为此,您需要使用第三方服务为SSL注册域名,并创建所需的文件。 After looking around, we've chosen Digicert to handle branch.io and associated subdomains. 环顾四周后,我们选择了Digicert来处理branch.io和相关的子域。

Here are the steps to create your SSL certification: 以下是创建SSL认证的步骤:

  1. Visit https://www.digicert.com/easy-csr/openssl.htm and fill out the form at the top to generate an openSSL command. 访问https://www.digicert.com/easy-csr/openssl.htm并填写顶部的表单以生成openSSL命令。 Keep this window open 保持此窗口打开

  2. Login to your remote server 登录到远程服务器

  3. Execute the openSSL command to generate a certificate signing request (.csr) and certification file (.cert) 执行openSSL命令以生成证书签名请求(.csr)和证书文件(.cert)

  4. Pay for your SSL certification at https://www.digicert.com/welcome/ssl-plus.htm 通过https://www.digicert.com/welcome/ssl-plus.htm支付您的SSL认证

  5. Wait for Digicert to approve and send you the final files 等待Digicert批准并向您发送最终文件

  6. In the end, move yourdomain.com.cert, yourdomain.com.key and digicertintermediate.cert into the same directory on your remote server 最后,将yourdomain.com.cert,yourdomain.com.key和digicertintermediate.cert移动到远程服务器上的同一目录中

You can also try another process if you want to get certs for free. 如果您想免费获得证书,也可以尝试其他流程。 startssl.com is fairly popular. startssl.com相当受欢迎。 There's a step-by-step guide here . 有一个一步一步的指导这里

Lastly, you can use CloudFlare for free TLS. 最后,您可以使用CloudFlare免费TLS。 That won't help you with signing the apple-app-site-association file, but it will help with making sure your (sub)domain is serving up the apple-app-site-association over HTTPS, which is required. 这对于签署apple-app-site-association文件没有帮助,但它有助于确保您的(子)域通过HTTPS提供apple-app-site-association ,这是必需的。 This is how your (sub)domain should look when properly configured: 这是您的(子)域在正确配置时应该看起来的样子:

CloudFlare的

When you do get this working, please post about what steps you got caught on to help other devs. 如果你确实这样做了,请发布你为了帮助其他开发者而采取的步骤。 While this is something large companies easily have the manpower to set up, for sole developers it's quite tricky. 虽然这是大型公司很容易设置的人力资源,但对于唯一的开发人员来说,这是非常棘手的。

cat json.txt | openssl smime -sign -inkey website.key -signer website_com.cert -noattr -nodetach -outform DER > apple-app-site-association

This command creates apple-app-site-association file that you have store on root directory of your web server. 此命令创建存储在Web服务器根目录中的apple-app-site-association文件。 ANd website.key and webiste.cert these files you'll get in ssl folder when you connect to your webserver via ftp if you have ssl website if not then first get ssl certifcate for your server 和web.key和webiste.cert这些文件,当你通过ftp连接到你的网络服务器时,你将获得这些文件,如果你有ssl网站,如果没有,那么首先获得服务器的ssl certifcate

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

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