[Hotwire][Native][iOS] prevent tab bar items from having their title changed on page load

in turbo-ios there is:

...

open class VisitableViewController: UIViewController, Visitable {
...
    open func visitableDidRender() {
        title = visitableView.webView?.title
    }
...
}
...

here this is HotwireNative.HotwireWebViewController, visitableView is HotwireNative.VisitableView, webView is WKWebView, and visitableDelegate is HotwireNative.Session

i understand this is used to change the title of the top bar

but it’s also changing the title of my tab bar item, it should be “account” and it’s the user name (the title of the html page)

i’m pretty new to swift, just read the hotwire native book

found a solution Working with native controls · Issue #101 · turbolinks/turbolinks-ios · GitHub

import HotwireNative
import UIKit

open class VisitableViewController: UIViewController, Visitable {
    public var visitableDelegate: (any HotwireNative.VisitableDelegate)?
    public var visitableView: HotwireNative.VisitableView!
    public var visitableURL: URL!
    
    open func visitableDidRender() {
        navigationItem.title = visitableView.webView?.title
    }
}

here is the fix