From Rails app to to iOS app with Hotwire Native - Log #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 and should also server as a base for setting up iOS Push Notifications. 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
I was having issues with Path Configurations where tapping on a conversation from the Conversations Tab would result in in a replace presentation which means that you'd lose the ability to navigate back to the initial Conversations index view. The reason that was occurring seems to be that I was setting /conversations/ with a presentation of replace_root. I would've thought that doing so would affect navigating to that, but it seems to have also affected how it works navigating away from that.
Simplifying the config and removing the catch-all i had also initially added, has essentially solved the problem and it's now working correctly.
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 to add the HotwireNativeiOS source code in a directory that Claude Code can access and if Claude is able to reference the code to provide answers