LiveView Native platform for SwiftUI


License
MIT

Documentation

LiveViewNative

The LiveViewNative Swift package lets you use Phoenix LiveView to build native iOS apps with SwiftUI.

Installation

  1. In Xcode, select File → Add Packages...
  2. Enter the package URL https://github.com/liveview-native/liveview-client-swiftui
  3. Select Add Package

Usage

Create a LiveView to connect to a Phoenix server running on http://localhost:4000.

import SwiftUI
import LiveViewNative

struct ContentView: View {
    var body: some View {
        LiveView(.localhost)
    }
}

Now when you start up your app, the LiveView will automatically connect and serve your native app.

Elixir Library

This library is experimental in the current implementation. As we continue to develop the LiveView Native ecosystem this library will likely see rapid evolution and changes.

Installation

If available in Hex, the package can be installed by adding live_view_native_swiftui to your list of dependencies in mix.exs:

def deps do
  [
    {:live_view_native_swiftui, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/live_view_native_swiftui.

Resources