问题
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