diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d8ab5e..b167892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixes + +- Fix iframe loading issue. [RMET-4517](https://outsystemsrd.atlassian.net/browse/RMET-4517). + ## 2.3.0 ### Features - Enable WebKit inspector for debugging on iOS 16.4+ in DEBUG builds. - ## 2.2.1 ### Fixes diff --git a/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift b/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift index e042092..cb8d2d6 100644 --- a/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift +++ b/Sources/OSInAppBrowserLib/WebView/OSIABWebViewModel.swift @@ -186,8 +186,9 @@ class OSIABWebViewModel: NSObject, ObservableObject { // MARK: - WKNavigationDelegate implementation extension OSIABWebViewModel: WKNavigationDelegate { + func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { - guard let url = navigationAction.request.url, url == navigationAction.request.mainDocumentURL else { return decisionHandler(.cancel) } + guard let url = navigationAction.request.url else { return decisionHandler(.cancel) } // if is an app store, tel, sms, mailto or geo link, let the system handle it, otherwise it fails to load it if ["itms-appss", "itms-apps", "tel", "sms", "mailto", "geo"].contains(url.scheme) {