我正在使用Firebase动态链接在我的颤振应用程序。我允许用户在应用程序中生成动态链接,该链接可以通过sms/email/whatsApp等方式共享。这个链接对于Android很好,但是对于iOS,我得到了这个异常。
提前谢谢。
下面是我的Xcode日志。
[Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
"_cpb" = 1;
"_cpt" = cpit;
"_fpb" = "XXAHEJ4DGgVlbXXXXX==";
"_iumchkactval" = 1;
"_iumenbl" = 1;
"_osl" = "https://app.XXXXXXX.com/PPZbgKsKpKvukDWZ8";
"_plt" = 1400;
"_uit" = 1400;
amv = 1;
apn = "com.xxx.xxxx";
cid = 000000;
ibi = "com.xxx.xxxx";
imv = 1;
isi = X4967XXXXX;
link = "https://app.xxxxx.com/data?userid=Bzhm1TScavV2&refcode=3DWIN11329206";
}
下面是我的防火墙动态链接详细信息
Link name
Invite Friends
Deep link
https://app.xxxxx.com/data?userid=Bzhm1TScavV2&refcode=WIN11329206
Android app
com.xxx.xxxx
iOS app
com.xxx.xxxx
Long Dynamic Link
https://app.xxxxx.com/?link=https://app.xxxxx.com/data?userid%3DBzhm1TScavV2%26refcode%3DWIN11329206&apn=com.xxx.xxxx&isi=X4967XXXXX&ibi= com.xxx.xxxx
Short Dynamic Link
https://app.xxxxx.com/invitefriends
发布于 2022-09-01 01:29:43
这个问题似乎存在于firebase_dynamic_links的旧版本中,正如在这个发行票上讨论的那样。解决此问题的解决办法是在iOS中启动链接时使用链接。
import 'dart:io' show Platform;
...
if (Platform.isIOS) {
// Handle link using app_links in iOS
initDynamicLinksIOS();
}
else {
// Use the firebase_dynamic_links per usual
initDynamicLinksAndroid();
}
然后使用app_links
处理iOS中的深层链接。
initDynamicLinkIOS() async {
final _appLinks = AppLinks(
// Called when a new uri has been redirected to the app
onAppLink: (Uri deepLink) async {
final PendingDynamicLinkData data =
await FirebaseDynamicLinks.instance.getDynamicLink(deepLink);
deepLink = data?.link;
if (deepLink != null) {
debugPrint('$deepLink');
// Handle the deep link
}
},
);
}
https://stackoverflow.com/questions/65085691
复制相似问题