iOS 9上的切换和通用链接失败

我正在设置我的苹果应用程序站点关联文件遵循本教程:切换在iOS 8上工作,但切换不能在iOS 9上工作。我设置一个免费的托pipe站点,并上传苹果应用程序站点关联文件到根网站:universallink.net46.net 1.我创build了一个JSON文件并命名为handoff.json:

{ "activitycontinuation": { "apps": ["XXXXXXXXXX.com.home.handoff"] }, "applinks": { "apps":[], "details": { "XXXXXXXXXX.com.home.handoff": { "paths":["*"] } } } } 

此处的XXXXXXXXXX是分发预配configuration文件的组标识

  1. 我使用Keychain Access应用程序将iPhone Distribution证书导出到Certificates.p12密钥。
  2. 我用这些命令签署了JSON文件:

在openssl命令中创build一个证书。

 openssl pkcs12 -in Certificates.p12 -clcerts -nokeys -out output_crt.pem 

创build一个密钥。

 openssl pkcs12 -in Certificates.p12 -nocerts -nodes -out output_key.pem 

创build一个中间证书。

 openssl pkcs12 -in Certificates.p12 -cacerts -nokeys -out sample.ca-bundle 

使用以下命令签署handoff.json文件。

 cat handoff.json | openssl smime -sign -inkey output_key.pem -signer output_crt.pem -certfile sample.ca-bundle -noattr -nodetach -outform DER> apple-app-site-association 
  1. 我将签名文件“apple-app-site-association”上传到网站universallink的根目录
  2. 我configuration了权利:
 <dict> <key>com.apple.developer.associated-domains</key> <array> <string>activitycontinuation:www.universallink.net46.net</string> <string>activitycontinuation:universallink.net46.net</string> <string>applinks:www.universallink.net46.net</string> <string>applinks:universallink.net46.net</string> </array> </dict> 
  1. 我实现了function应用程序:continueActivity ….并返回YES。
  2. 我在iOS 9 beta 4设备上安装了应用程序,并在步骤3中将Certificates.p12安装到设备中。
  3. 我给自己发了一个消息universallink网站的链接
  4. 我预计我的应用程序将启动,但实际上,它是Safari。

我不知道我做错了什么。

你签错了。 你需要一个

由iOS所信任的证书颁发机构颁发的身份证书和密钥

请参阅苹果官方文档: https : //developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/Handoff/AdoptingHandoff/AdoptingHandoff.html#//apple_ref/doc/uid/TP40014338-CH2-SW10

我认为这:

  "details": { "XXXXXXXXXX.com.home.handoff": { "paths":["*"] } } 

应该是这样的:

  "details": [{ "appID": "XXXXXXXXXX.com.home.handoff", "paths": ["*"] }] 

我试图通过使用本地服务器(一个OTA https python服务器)使用SSL自己创build的证书使它工作,它没有工作。 我可以跟踪通信,听通道,但在我试过的不同testing中,json文件从来没有被要求过,所以有问题,SSL证书。 转到: https : //support.apple.com/en-gb/HT205205作为“不是所有的根证书”是由苹果支持(大多数是虽然)。