我想从以下示例中读取原始的动态链接域和缩短的url值: https://APPID.app.goo.gl/XYZT
可以为Firebase中的动态链接创建不同的域,我将这些域用于标识。
在iOS上,动态链接在其中处理
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
//Get the original domain from url variable, but shortened path cannot be fetched as well on iOS -> if anybody knows how this is done, I appreciate any tips
}
然后我可以找到域APPID.app.goo.gl,但之后找不到路径
和Android
FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent())
.addOnFailureListener(this, new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
e.printStackTrace();
}
})
.addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() {
@Override
public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
// pendingDynamicLinkData.getLink(); //deep link but not dynamic link value
}
});
如何通过原始链接在Android(域+路径)和iOS(路径)上获取这些值?