实际上,您不需要在 App Store 中发布应用程序即可运行——单击链接,关闭 App Store,然后通过 Xcode(或任何其他 beta 分发平台,如 TestFlight 或Fabric)具有完全相同的效果。
根据Firebase docs,第一次安装调用的方法是openURL(不,这对我来说也没有意义)。 continueUserActivity 方法适用于通用链接,仅在打开链接时已安装应用程序使用。
我不知道有什么方法可以检测应用程序在从“延迟”链接安装后首次打开的时间,但只要有深层链接,您就可以直接路由到共享内容(跳过介绍)展示。如果没有深层链接,请显示常规介绍。
备选方案
您可以查看Branch.io(完全披露:我在 Branch 团队)。除其他外,Branch 是 Firebase 动态链接的绝佳免费替代品,具有大量附加功能。下面是一个分支在didFinishLaunchingWithOptions 中立即返回的所有参数的示例:
{
"branch_view_enabled" = 0;
"browser_fingerprint_id" = "<null>";
data = "{
\"+is_first_session\":false,
\"+clicked_branch_link\":true,
\"+match_guaranteed\":true,
\"$canonical_identifier\":\"room/OrangeOak\",
\"$exp_date\":0,
\"$identity_id\":\"308073965526600507\",
\"$og_title\":\"Orange Oak\",
\"$one_time_use\":false,
\"$publicly_indexable\":1,
\"room_name\":\"Orange Oak\", // this is a custom param, of which you may have an unlimited number
\"~channel\":\"pasteboard\",
\"~creation_source\":3,
\"~feature\":\"sharing\",
\"~id\":\"319180030632948530\",
\"+click_timestamp\":1477336707,
\"~referring_link\":\"https://branchmaps.app.link/qTLPNAJ0Jx\"
}";
"device_fingerprint_id" = 308073965409112574;
"identity_id" = 308073965526600507;
link = "https://branchmaps.app.link/?%24identity_id=308073965526600507";
"session_id" = 319180164046538734;
}
您可以在分支文档here 上阅读有关这些参数的更多信息。