Skip to content
Discussion options

You must be logged in to vote

Turbo.js won't visit pages across subdomains due to security concerns. Instead, this should be intercepted and handled manually via a custom WebViewPolicyDecisionHandler in Hotwire Native.

Here's a rough sketch of how you could handle this. I left the TODO for you to provide your custom logic of "resetting" the app for the new subdomain. I hope this helps!

import HotwireNative
import UIKit
import WebKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        configureHotwire()
        return true
    }

    private func configureH…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@timfrazee
Comment options

Answer selected by timfrazee
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