Integrate with iOS
Before you start: document delivery.
In Xcode, choose File → Add Package Dependencies and enter https://github.com/swarthout/relo-ui.git. Select Exact Version and enter 0.1.0-rc.1. Add ReloUI to your app target, plus ReloSwiftUI for SwiftUI hosting or ReloUIComponents for the shared Components library. The minimum deployment target is iOS 16.
ReloCore is UIKit-free. ReloUIKit is the sole renderer. ReloUI provides convenience exports; ReloSwiftUI hosts the UIKit surface.
Mount a screen
import ReloUI
let runtime = ReloUI()
let document = try RemoteDocument(
source: "<Text text=\"Hello, native UI\" />"
)
let session = try runtime.session(document: document)
let controller = RemoteViewController(session: session, sizing: .viewport)
// Present or embed controller using your application's containment.
Register your actions, bindings, native adapters, and Components support before creating sessions. Sessions snapshot registrations.
import ReloUIComponents
ReloUIComponents.install(into: runtime)
Link the ReloUIComponents product from the same Swift package.
Manage session lifetime
Retain the session for the logical destination lifetime. Removing a native attachment doesn't necessarily discard the session. Explicitly close it on permanent removal so pending work and retained state are released.
The host owns navigation, credentials, permissions, fallback presentation, and business services. Register an ordinary native view adapter when the document needs an app-specific UIKit capability.
Explore a complete host
The iOS guide and ExamplesApp show transport, navigation, custom adapters, and session handling. SwiftUI integration embeds this renderer; native SwiftUI component registration is outside current scope.