application(_:open:options:) can take a few seconds to be called making firebase dynamic link to show up late

放肆的年华 提交于 2021-01-29 20:55:56

问题


I am implementing Firebase Dynamic Links since we want to have deferred deep linking, ie. opening the app on a specific screen when the app is not installed and has to be downloaded from the store. We already had universal links in place.

Following the documentation, one of the methods we should add dynamic link functionality is here: application:openURL:options: however, this method is not called immediately after launch, but it can take up to several seconds (depending on the device, it can take more than 5 seconds) to start. If I put my dynamic link here, the user will see the first screen (maybe interact with it, or move to another screen) before the deep link will be presented. I'm targeting iOS 9 and above, so this method should only be called on first launch.

This delay would not be acceptable in my case, and I wonder if I'm missing something.

I have some workarounds in mind, like fake extend the launch screen until that method is called (only the first time, so I would have to save in defaults something) and notify my root vc that this method is finally called. I don't like the idea to make the user wait, though.

来源:https://stackoverflow.com/questions/63741191/application-openoptions-can-take-a-few-seconds-to-be-called-making-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!