Post

Replies

Boosts

Views

Activity

TipKit
When using Tips.showAllTipsForTesting() my tips are shown repeatedly again and again after ~2 seconds on 18.4 and 18.5. It is not happening on iOS 18.1 (only tested with simulator) Is this intended? It makes debugging very difficult. Edit: Also, Tips.resetDatastore() does not seem to work as the documentation says?
2
0
132
May ’25
WKNavigationDelegate
I have a problem when using WKNavigationDelegate. It seems like only some of the delegate methods are working. I have implemented some of the methods below, just for testing purposes. I have only had one active at the time. Am I doing something wrong, or could it be something wrong with WKNavigationDelegate? extension MyViewController: WKNavigationDelegate { // Not called public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction) async -> WKNavigationActionPolicy { return .cancel } // Called // func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, preferences: WKWebpagePreferences) async -> (WKNavigationActionPolicy, WKWebpagePreferences) { // return (.cancel, preferences) // } // Not called // func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { // decisionHandler(.cancel) // } // Called // func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: @escaping (WKNavigationActionPolicy, WKWebpagePreferences) -> Void) { // decisionHandler(.cancel, preferences) // } // Not called // func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse, decisionHandler: @escaping (WKNavigationResponsePolicy) -> Void) { // decisionHandler(.cancel) // } // Not called // func webView(_ webView: WKWebView, decidePolicyFor navigationResponse: WKNavigationResponse) async -> WKNavigationResponsePolicy { // return .cancel // } }
Topic: Safari & Web SubTopic: General Tags:
1
0
736
Jun ’23