iOS - As a Developer, I want to use Segment's trackLink() functionality in mobile webviews
When navigationAction.navigationType != .linkActivated , this line of code returns false without evaluating the rest of the boolean statement. But when navigationAction.navigationType == .linkActivated it does evaluate the rest of the statement and thus makes a call to delegate?.webView(webView, shouldLoad: request). This calls DiscoveryHelper.navigate(to: url, from: self, bottomBar: bottomBar), which actually presents the course detail.
When trackLink() is use in the webpage, it makes navigationAction.navigationType = .other. This breaks the navigation.
Draft PR with a fix is up here :
We are currently attempting to consistently reproduce the issue in a sandbox environment, and then validate the fix. We also need to evaluate whether this fix might cause other issues.
Sandbox is now working as expected, I’ll put up a PR a little later today.
There have been several issues deploying this sandbox correctly. As of today there is currently a bug affecting the course card links (multiple ? characters are present due to a bug in how additional query parameters are being added, so the query parameters are not able to be correctly parsed).
A new sandbox with the bug fix is expected to be deployed later today.