Working with Hotwire Native # 2
I stepped away from the iOS app for a number of weeks to implement some other features for Missionbase. I particularly wanted to have Web Push Notifications working—which is now in place and working well. The Rails notification logic should also serve as a base for iOS Push Notifications, although native delivery will still require a separate APNs integration. Anyway, I got back to work on the Hotwire Native side of things this past week and made some decent progress.
Bridge Components are working great
I’ve been able to implement a number of bridge components and this is working great. I copied the implementation from the Hotwire Native iOS demo for Menu and Button components which get added to the top bar. I also set up two custom bridge components: FloatingButtonComponent so I can easily add a floating button to any page, and also a DayNavigationComponent for adding day navigation arrow buttons the the Days pages. These are working very smoothly and have turned out exactly as I was wanting.
Finally sorted out Path Configurations
The /conversations/ rule was also matching conversation detail URLs. Because path configuration is applied to the destination URL, opening a conversation received the same replace_root presentation as the conversations index. Anchoring the index pattern so it only matched /conversations fixed the navigation stack.
Authentication and tabs
I’m currently trying to figure out how to conditionally show tabs. The tabs should only be visible for authenticated users, so they should not display on /sessions/new, /signup/, /passwords/new (password reset). So I’m working on figuring out how and what approach to take for this. I initially was thinking that I’d need to check for authentication state but that seems not very simple. I’m wondering if maybe I could just display based on which url is being visited. For example, if the URL is any of the above pages which are only available for un-authenticated users, then don’t create tabs, otherwise, create them. I’m skeptical this approach will work because, based on my limited understanding so far, the tabs are created before any page routing occurs.
AI usefulness
AI has been essentially useless so far. The biggest problem is that it isn’t able to communicate when it’s guessing or basing answers upon assumptions, rather than answers based on the limited docs. One thing I’m going to try is adding the Hotwire Native iOS source code to a directory that Claude Code can access, then seeing whether referencing the implementation leads to more reliable answers.