Skip to content
Discussion options

You must be logged in to vote

Excellent! Thanks @ibrahima.

You can do this without a PR:

Hotwire.config.makeCustomWebView = { config in
    config.allowsInlineMediaPlayback = true

    let webView = WKWebView(frame: .zero, configuration: config)
    #if DEBUG
        if #available(iOS 16.4, *) {
            webView.isInspectable = true
        }
    #endif
    return webView
}

The inspectable stuff is so you can debug via Safari - feel free to leave that out if you don't need it.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ibrahima
Comment options

@joemasilotti
Comment options

Answer selected by joemasilotti
@ibrahima
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants