我已经查看了 Stack Overflow 上几乎所有与通用链接相关的问题,但仍然没有任何进展。值得一提的是,这似乎都通过了 Branch 验证器。
我正在运行 iOS 10.3,并在 https 下提供我的 aasa 文件,所以理论上我不需要对其进行签名。
这就是我的情况:
当应用程序安装时,跟踪我的临时服务器的 Heroku 日志会给我这个:
7-07-27T17:24:59.818724+00:00 heroku[router]: at=info method=GET path="/.well-known/apple-app-site-association" host=trueey-staging.herokuapp.com request_id=54b817e2-1d89-4c7a-9ed8-f52bdb3ad46e fwd="24.23.197.78" dyno=web.1 connect=1ms service=6ms status=200 bytes=618 protocol=https
2017-07-27T17:24:59.812926+00:00 app[web.1]: Started GET "/.well-known/apple-app-site-association" for 24.23.197.78 at 2017-07-27 17:24:59 +0000
2017-07-27T17:24:59.814845+00:00 app[web.1]: Processing by Web::AppSiteController#show as */*
2017-07-27T17:24:59.815538+00:00 app[web.1]: Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.0ms)
1) 我的权益:
applinks:trueey-staging.herokuapp.com
applinks:https://trueey-staging.herokuapp.com
这些是同样的东西吗?很可能是,但让我们再确认一下
2)我的苹果应用关联文件、路由和提供它的Rails控制器:
apple-app-site-association(位于/public
目录下,命名为apple-app-site
):
{
"applinks": {
"apps": [ ],
"details": [
{
"appID": "[Prefix].[AppId]",
"paths": [ "*", "/" ]
}
]
}
}
路线:
get "/apple-app-site-association", to: "web/app_site#show"
get "/.well-known/apple-app-site-association", to: "web/app_site#show"
控制器:
module Web
class AppSiteController < ApplicationController
def show
data = File.read("#{Rails.root}/public/apple-app-site")
render json: data
end
end
end
3) 在我的AppDelegate中,我已经实现了application:continueUserActivity:restorationHandler:
函数,并将其设置为与didFinishLaunchingWithOptions被调用时做完全相同的事情(还会额外打印出一堆====
)
然而...
没有任何反应。在部署到staging之后,我在手机上加载应用程序,通过我们的共享功能生成链接并将其保存到notes中,然后单击该链接,只想将其在Safari中打开。长按没有任何反应,也没有其他迹象表明Safari正在打开而不是应用程序。设备日志似乎没有显示任何问题,但也许我没有搜索正确的内容?
帮帮忙。