jvdvleuten
PhoenixNectar is a Swift client for Phoenix Channels, built from the ground up for Swift 6 strict concurrency.
It builds on the great work of SwiftPhoenixClient by David Stump and Daniel Rees, which has been the go-to Swift client for years. PhoenixNectar takes a different approach by embracing Swift’s modern concurrency model (actors, async/await, and AsyncStream) rather than the JS-style callback API.
What it looks like
import PhoenixNectar
struct ChatMessage: Codable, Sendable {
let body: String
}
let client = try Socket(endpoint: "wss://api.example.com/socket")
try await client.connect()
let channel = try await client.joinChannel("room:lobby")
// Subscribe with AsyncStream
let posted = Event<ChatMessage>("message:posted")
for try await message in await channel.subscribe(to: posted) {
print(message.body)
}
// Typed push with reply
let send = Push<ChatMessage, ChatMessage>("message:send")
let reply = try await channel.push(send, payload: ChatMessage(body: "hello"))
print(reply.body)
Features
- Swift 6 strict concurrency — actor-owned runtime, no
@unchecked Sendableworkarounds Push<Request, Response>andEvent<T>for compile-time payload type safety- Auto reconnect, heartbeat, and channel rejoin
- Auth token providers that re-evaluate on each reconnect
- Connection state observation via
AsyncStream - Binary channel support
- iOS 16+, macOS 15+, tvOS 18+, watchOS 11+
Feedback welcome, especially from anyone running Phoenix Channels with iOS/macOS clients.
A demo project (demo iOS project with chat and image upload) and E2E tests are provided as well.
Trending in Announcing
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub.
Docs are at OpenaiEx User Gu...
New
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Castle is a package I put together to assist with building Elixir releases capable of being live-upgraded via the ‘official’ release hand...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Storex is a frontend store with state management handled on the backend. It allows you to update the store state both from the frontend a...
New
Other Trending Topics
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #ai
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
_pk
This is awesome to see! I’m quite interested as I make heavy use of Phoenix Channels in iOS apps, and have been thinking of working up something like this.
SwiftPhoenixClient has been great, I’m grateful for it and have made a few contributions. But it would need a ton of work to adopt strict concurrency and I agree that starting from scratch is the better move.
I’ll try dropping this into a project and send some detailed feedback soon.