Skip to content
Discussion options

You must be logged in to vote

We managed to do this using bridge component, inspired by the Ruby friends authentication video by @joemasilotti .

On Swift side it looks like this:

//  Components/ConfigurationComponent.swift

import HotwireNative
import UIKit
import WebKit

final class ConfigurationComponent: BridgeComponent {
    nonisolated override class var name: String { "configuration" }
    
    private var viewController: UIViewController? {
        delegate?.destination as? UIViewController
    }
    
    private var tabBarController: HotwireTabBarController? {
        viewController?.tabBarController as? HotwireTabBarController
    }
    
    override func onReceive(message: Message) {
        guard let data: M…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by janpeterka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant