Post

Replies

Boosts

Views

Activity

iOS 15.4 got "TypeError" when setting WKWebView address to a custom url scheme
I am using custom url scheme to transfer some data from WKWebView to App. The JS code I use in WKWebView is similar to this: try{ window.location.href = 'bsfit://'+window.some_custom_data; }catch(err){ alert(err); } Before iOS 15.4, this has worked perfectly. When tested on iOS 15.4 Beta5, I got an error "TypeError: Invalid URL". Is this change intended in iOS 15.4 regarding custom URL schemes? Since I can't change the existing app code, is there a workaround? Thanks.
3
0
2.3k
Mar ’22