• Stars
    star
    378
  • Rank 113,272 (Top 3 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 3 years ago
  • Updated 30 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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_swift_ui to your list of dependencies in mix.exs:

def deps do
  [
    {:live_view_native_swift_ui, "~> 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_swift_ui.

Resources