Skip to content

Commit

Permalink
[fix] adapter for swift 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenYj authored and freak4pc committed Jul 5, 2022
1 parent 4f70b83 commit 6225dd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/RxWebKit/WKNavigationDelegateEvents+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,13 @@ extension Selector {
/// Ambiguous use of 'webView(_:decidePolicyFor:decisionHandler:)'
/// please see this link for further understanding
/// https://bugs.swift.org/browse/SR-3062
#if swift(>=5.7)
static let decidePolicyNavigationResponse = #selector(WKNavigationDelegate.webView(_:decidePolicyFor:decisionHandler:) as (WKNavigationDelegate) -> ((WKWebView, WKNavigationResponse, @escaping(WKNavigationResponsePolicy) -> Void) -> Void)?)
static let decidePolicyNavigationAction = #selector(WKNavigationDelegate.webView(_:decidePolicyFor:decisionHandler:) as (WKNavigationDelegate) -> ((WKWebView, WKNavigationAction, @escaping (WKNavigationActionPolicy) -> Void) -> Void)?)
#else
static let decidePolicyNavigationResponse = #selector(WKNavigationDelegate.webView(_:decidePolicyFor:decisionHandler:) as ((WKNavigationDelegate) -> (WKWebView, WKNavigationResponse, @escaping(WKNavigationResponsePolicy) -> Void) -> Void)?)
static let decidePolicyNavigationAction = #selector(WKNavigationDelegate.webView(_:decidePolicyFor:decisionHandler:) as ((WKNavigationDelegate) -> (WKWebView, WKNavigationAction, @escaping(WKNavigationActionPolicy) -> Void) -> Void)?)
#endif
}


0 comments on commit 6225dd5

Please sign in to comment.