RxWebKit icon indicating copy to clipboard operation
RxWebKit copied to clipboard

Build and error on Xcode14

Open eebrian123tw93 opened this issue 3 years ago • 12 comments

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)?)

Xcode Version: 14 RxWebKit: 2.0.0 build and show "Type of expression is ambiguous without more context" error message Screen Shot 2022-09-14 at 4 31 59 PM

eebrian123tw93 avatar Sep 14 '22 08:09 eebrian123tw93

@eebrian123tw93 like this just do it :

 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)?)

kb100824 avatar Sep 14 '22 09:09 kb100824

I think this is already in master, so we "just" need a release

kennyevo avatar Sep 19 '22 08:09 kennyevo

I tried the above solution but it does not build on Xcode < 14. Screenshot 2022-09-28 at 12 51 05 Are there any solutions which build on both versions?

wekrato avatar Sep 29 '22 08:09 wekrato

Try the master branch of the repo2022. szept. 29. dátummal, 10:41 időpontban Werner Kratochwil @.***> írta: I tried the above solution but it does not build on Xcode < 14.

Are there any solutions which build on both versions?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

kennyevo avatar Sep 29 '22 09:09 kennyevo

Thanks, found it. Here is the solution for all that don't want to search:

#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

wekrato avatar Sep 29 '22 09:09 wekrato

Pretty Good! Waiting RxWebKit 2.0.1 on cocopods https://github.com/CocoaPods/Specs/tree/master/Specs/1/a/c/RxWebKit

eebrian123tw93 avatar Sep 30 '22 07:09 eebrian123tw93

please, release this 2.0.1 version, really looking forward to this fix 🙂 thanks in advance

AlexeyPelekh avatar Oct 18 '22 10:10 AlexeyPelekh

on which date do you have a plan to release the version 2.0.1 on Cocoapods? we are waiting for the fix

fodderkonoko avatar Oct 21 '22 07:10 fodderkonoko

You mean, 2.0.2 correct? 2.0.1 does not include the fix AFAIK I am waiting for it, too

wekrato avatar Nov 08 '22 08:11 wekrato

When can we expect a fix release for Xcode 14?

mkowszewicz avatar Dec 04 '22 22:12 mkowszewicz

we don't found v2.0.1 on cocopods please release v2.0.1 on cocopods https://github.com/CocoaPods/Specs/tree/master/Specs/1/a/c/RxWebKit

jackson0122 avatar Dec 15 '22 07:12 jackson0122

use this line in podfile pod 'RxWebKit', :git => 'https://github.com/RxSwiftCommunity/RxWebKit.git'

eebrian123tw93 avatar Feb 20 '23 10:02 eebrian123tw93