Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and error on Xcode14 #58

Open
eebrian123tw93 opened this issue Sep 14, 2022 · 12 comments
Open

Build and error on Xcode14 #58

eebrian123tw93 opened this issue Sep 14, 2022 · 12 comments

Comments

@eebrian123tw93
Copy link

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

@kb100824
Copy link

kb100824 commented Sep 14, 2022

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

@kennyevo
Copy link

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

wklim00 added a commit to wklim00/RxWebKit that referenced this issue Sep 19, 2022
wklim00 added a commit to wklim00/RxWebKit that referenced this issue Sep 19, 2022
@wekrato
Copy link

wekrato commented Sep 29, 2022

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?

@kennyevo
Copy link

kennyevo commented Sep 29, 2022 via email

@wekrato
Copy link

wekrato commented Sep 29, 2022

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

@eebrian123tw93
Copy link
Author

eebrian123tw93 commented Sep 30, 2022

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

@AlexeyPelekh
Copy link

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

@fodderkonoko
Copy link

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

@wekrato
Copy link

wekrato commented Nov 8, 2022

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

@mkowszewicz
Copy link

When can we expect a fix release for Xcode 14?

@jackson0122
Copy link

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

@eebrian123tw93
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants