Firebase动态深层链接安装后无效 [英] Firebase dynamic deep link arrives nil after install
问题描述
为了测试这一点,我按照Firebase文档和Firecast在大约12分40秒处此处。步骤如下:
- 首先我从设备上删除应用程序。 然后我请按链接打开应用商店。
- 然后我从xcode运行我的应用程序。
- 预期:dynamicLink.url属性等于https://www.example.com/data/helloworldin application:openURL
- 现实:dynamicLink.url属性为零。
- 如果您的
application:openURL
方法被调用,并且
-
dynamicLinkFromCustomSchemeURL
方法中有效的dynamicLink
对象,但
url
该动态链接对象的参数为零
- First I delete the app from my device.
- Then I press the link to open the app store.
- Then I run my app from xcode.
- Expected: The dynamicLink.url property will be equal to "https: //www.example.com/data/helloworld" in application:openURL
- Reality: The dynamicLink.url property arrives nil.
- If your
application:openURL
method is getting called, and - You do seem to be getting a valid
dynamicLink
object from yourdynamicLinkFromCustomSchemeURL
method, but - The
url
parameter of that dynamicLink object is nil
ol>
这是我在Firebase控制台中创建的深层链接网址: https ://nqze6app.goo.gl/RIl8
这是传递到application:openURL之前被传递到dynamicLinkFromCustomSchemeURL:com.johnbogil
<$> (NSURL *)url选项:(NSDictionary< NSString *,id> *)options {
FIRDynamicLink * dynami cLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
if(dynamicLink){
NSLog(@我正在通过openURL方法处理链接);
[self handleDynamicLink:dynamicLink];
返回YES;
} else {
return NO;
$ b
不知道为什么dynamicLink.url到达零。任何援助表示赞赏。
对于其他遇到同样错误的人...
然后再仔细检查一下在Safari中进入私人模式。这会让Firebase动态链接检索您点击的原始链接的功能变得混乱。
I am attempting to use Firebase to pass deep links into my app that survive install.
To test this I am following the steps provided by the Firebase documentation and Firecast video here at about the 12min 40s mark. The steps are as follows:
This is the deeplink url that I created in the Firebase console: https://nqze6app.goo.gl/RIl8
This is the url that is passed into application:openURL prior to being passed into dynamicLinkFromCustomSchemeURL : com.johnbogil.voices://google/link/dismiss?fdl_cookie
This is the code in my openURL call:
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
FIRDynamicLink *dynamicLink = [[FIRDynamicLinks dynamicLinks] dynamicLinkFromCustomSchemeURL:url];
if (dynamicLink) {
NSLog(@"I am handling a link through the openURL method");
[self handleDynamicLink:dynamicLink];
return YES;
} else {
return NO;
}
}
Not sure why dynamicLink.url is arriving nil. Any assistance is appreciated.
For anybody who else who's encountering this same error...
Then double-check to see if you're in "Private" mode in Safari. That will kinda mess with Firebase Dynamic Links' ability to retrieve the original link that you clicked on.
这篇关于Firebase动态深层链接安装后无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!