You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deeplink In App Custom HTML Not Working Since 7.2.0 #490
We are using CleverTap SDK version 7.3.3, upgrading from version 6.1.0. We noticed that starting with version 7.2.0, there were changes related to cleanupWebViewResources (see release notes).
Core Issue: The cleanupWebViewResources function sets the WKWebView navigation delegate to nil, which breaks deeplink functionality in In-App Native Display campaigns.
To Reproduce
Steps to reproduce the behaviour:
Go to Clevertap Dashboard
Create some campaign with In App Native Display, attach some deeplink <a href="https://sample.com/sample-deeplink"
Trigger the campaign
Observe that deeplinks do not work properly
The issue occurs in the cleanupWebViewResources function within the CTInAppHTMLViewController class:
Problem: When cleanupWebViewResources is executed, it sets webView.navigationDelegate = nil. This prevents the WKWebView from properly handling navigation events, including deeplink redirects. As a result, when users tap on deeplinks within the In-App display, the navigation is not processed correctly.
Expected behaviour
The navigation delegate should remain functional until the webview is completely dismissed to ensure deeplinks continue to work throughout the In-App display lifecycle.
Screenshots
Environment (please complete the following information):
Xcode version: 16.4
CleverTap SDK Version: 7.3.3
Device: iPhone 11
OS: iOS 18.4.1
Possible Solution
Suggest a fix: keep the navigation delegate active until the webview is removed from the view hierarchy.
Additional context
This issue was introduced in version 7.2.0 and affects deeplink functionality across all subsequent versions, including the current 7.3.4 release.
Activity