In some cases the user is required to go through some kind of an event before continuing to application page pointed by deep linking destination.
Examples for such user events:
- Consenting to usage terms
In order to sync easily and safely between the user event and the deferred deep linking flow, it is recommended to initiate and start the SDK in the
view controller where the user event is performed. For example, the main view controller, which holds the authentication status. This is different from the normal flow, where the SDK and initiated and started in the
The callbacks which are used in the Extended Deferred Deep Linking flow should also be called in the
It is the developer's responsibility to save the deferred deep linking and direct deep linking data, route the user to the required destination only after the event is performed.
In this Github branch you can find a code sample which waits for a pseudo-user authencation before continuing to the deep linking destination. Once the authentication is verified, the user is directed to the destination. This flow is relevant for both deferred deep linking and direct deep linking (when the app is already installed).
You can see that the
AppDelgate has no AppsFlyer SDK initiazation, except the optional
AppTrackingTransparency code. The AppsFlyer SDK moved into the main view controler which performs the user event (authentication in this case).