A minimal iOS app demonstrating Hotwire Native driving an Inertia-powered web app. It wraps a server-rendered site in a native shell, adds native navigation/tabs, intercepts selected routes with native screens, and exposes native UI to the web layer through bridge components.
The app loads https://demo.inertia-native.dev by default.
Note
This project started as a copy of the official Hotwire Native iOS demo and is currently almost identical to it, adapted to point at an Inertia-powered backend. See Credits.
- Xcode 26+
- iOS 26.5 deployment target
- Swift 5 language mode
Dependencies are managed with Swift Package Manager and resolve automatically on first build.
The only dependency is hotwire-native-ios,
currently pinned to the main branch (see Package.resolved).
- Open
inertia-native-demo.xcodeprojin Xcode. - Select the
inertia-native-demoscheme and an iOS Simulator. - Build & Run (⌘R).
By default the app talks to the hosted demo. To run against a local Inertia/Rails server,
edit Demo.swift:
static var current: URL {
local // http://localhost:3000
}AppDelegate.swift— configures Hotwire: loads the path configuration, registers bridge components, and sets global options (back button mode, modal done button, debug logging).SceneController.swift— sets up theHotwireTabBarController, handles navigation proposals (routing/numbersto a native screen), and handles auth (401 →/session/new).Tabs.swift— defines the native tab bar tabs.path-configuration.json— declarative rules: present/new,/edit,/modalas modals; render/numberswith a native view controller; reset the stack at root. Merged with a server-hosted configuration atconfigurations/ios_v1.json.NumbersViewController.swift— example of a fully native screen replacing a web route.Bridge/— bridge components that let the web page drive native UI:FormComponent— native toolbar submit button wired to a web form.MenuComponent/OverflowMenuComponent— native menus populated from the web.
inertia-native-demo/
├── AppDelegate.swift # Hotwire configuration
├── SceneController.swift # Scene + navigation + auth
├── Tabs.swift # Native tab definitions
├── Demo.swift # Base URL (remote/local switch)
├── ViewController.swift
├── NumbersViewController.swift # Native screen for /numbers
├── path-configuration.json # Routing/presentation rules
└── Bridge/ # Bridge components (web ↔ native)
├── FormComponent.swift
├── MenuComponent.swift
└── OverflowMenuComponent.swift
Based on the official Hotwire Native iOS demo by Hotwire, also released under the MIT License. This repository adapts it to demonstrate an Inertia-powered backend.
Released under the MIT License.
