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

Ios12 & 12.1 bindings #335

Merged
merged 180 commits into from Nov 27, 2018
Commits
Jump to file or symbol
Failed to load files and symbols.
+24 −1
Diff settings

Always

Just for now

Viewing a subset of changes. View all

* added workaround to fix #336 (crash when using WKWebView navigation…

… delegate)
  • Loading branch information...
dkimitsa committed Nov 17, 2018
commit 05b08d640efd7eef198c8f3080ed673696e94e21
@@ -0,0 +1,22 @@
package org.robovm.apple.webkit;
import org.robovm.apple.foundation.NSURLAuthenticationChallenge;
import org.robovm.objc.annotation.NativeClass;
import org.robovm.rt.bro.annotation.Library;
/**
* dkimitsa: this is very special workaround for bug #336
* it happens when didReceiveAuthenticationChallenge navigation delegate's
* callback being called and challenge is instance of WKNSURLAuthenticationChallenge class
* the issue here is that WKNSURLAuthenticationChallenge itself doesn't inherit
* NSURLAuthenticationChallenge and RoboVM can't build java object for it as it is not known
* and hangs with exception. WKNSURLAuthenticationChallenge is a NSProxy which is ok
* on obj-c side.
* Workaround is to register empty WKNSURLAuthenticationChallenge with methods of
* NSURLAuthenticationChallenge. It will not make harm on obj-c side as it is proxy and will deal
* with all selectors being sent
*/
@Library("WebKit") @NativeClass
public class WKNSURLAuthenticationChallenge extends NSURLAuthenticationChallenge {
}
@@ -37,7 +37,8 @@
/*</javadoc>*/
/*<annotations>*//*</annotations>*/
/*<visibility>*/public/*</visibility>*/ interface /*<name>*/WKNavigationDelegate/*</name>*/
@ForceLinkClass(WKNSURLAuthenticationChallenge.class) // FIXME: manually added to workaround issue #336
/*<visibility>*/public/*</visibility>*/ interface /*<name>*/WKNavigationDelegate/*</name>*/
/*<implements>*/extends NSObjectProtocol/*</implements>*/ {
/*<ptr>*/
ProTip! Use n and p to navigate between commits in a pull request.