acrolink
I thought of rendering the HTML containg the LiveView components using webview, but I prefer a more native way. How to achieve that ? Is there any helper libraries to use with Flutter (providing a similar experience to LiveView in the mobile applicatiin while communicating with a Phoenix back-end application) ?
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
arcanemachine
There’s a Dart package for interacting with Phoenix Channels:
I haven’t used it but it looks to be under active development.
There’s also a tutorial on GitHub showing how to put the pieces together:
https://github.com/dwyl/flutter-phoenix-channels-demo
Again, I haven’t done this tutorial, but I found the dwyl tutorials on GitHub to be very good when I was learning Phoenix.
Also, when I did go down this road, I did embed webviews into a Flutter app. The webview content can communicate with the “native” Flutter widgets via JS message passing. So your web stuff can be plain LiveView, and you can still interact with “native” Flutter widgets. Best of both worlds IMO since your web stuff can be reused on your mobile app. I encourage you to take a look at that before you make up your mind. (If you do, I found that this Dart webview package is way better than the official one, which was barely useable when I tried it ~2 years ago.)
jack456jokky
That sounds like a fascinating challenge! If you’re aiming for a seamless experience like LiveView in Flutter, have you considered using Flutter’s stream and StreamBuilder? They can handle real-time data efficiently. Plus, integrating Phoenix Channels with Flutter can give you that native feel while keeping everything in sync. Excited to see where this project takes you!
Nicodemus
Another option might be LiveView Native… I think it would be theoretically possible to embed both LVN and Flutter in a single app for different parts of it, wherever it makes sense. Of course, LVN is not yet ready, but something to keep an eye on.
LostKobrakai
I don’t think this has been mentioned yet, but LV does use more than just a phoenix channels client. The client would need to implement an alternative to morphdom and it would need to implement a resolver for the template diffing structure LV uses to send diffs on the wire. Then there’s all the event integrations for clicks, submits, … LiveView Native did invest a lot to make those things work for iOS and android. They do however have a shared library in rust, so they don’t duplicate work between the platforms. Maybe that one could (eventually) be used to power a flutter based approach as well. Though if you can go native why use flutter then I guess.
outlog
There is this PoC GitHub - alex-min/live_view_native_flutter_client: A flutter client for LiveView Native · GitHub, Releasing LiveView native with Flutter preview ⋅ Alex-min's tech blog
most likely a bit outdated by now..
acrolink
In the Flutter Application I will use
Firebsase Authentication. Do you think it will be possible to initiate the authentication in Flutter natively and use theFirebase access tokeninside thewebview?! I mean to send theaccess tokeninside theconnof LiveView inside thewebview?arcanemachine
If there is a reason that you can’t just use Postgres, you could probably make it work.
I have wrapped the
mix phx.gen.authgenerators to work with an external token before. It isn’t super difficult to do.But it would be way easier if you could just do the auth in Phoenix, and use that auth token to determine which screens should be displayed in the Flutter app.
acrolink
I need to authenticate the user in order to retrieve his personalized data .. Not just a matter of allowing or preventing access to certain pages.
arcanemachine
OK and where is this personalized data stored? In Postgres or Firebase?
I don’t remember if Phoenix has out-of-the-box bearer auth token support, but you can modify the
phx.gen.authgenerators to support this.acrolink
Postgres, will be eventually on AWS Aurora (Postgres based) with all nodes (Phoenix instances) accessing the same DB.
I guess even if I will be using an embedded
webviewin the smartphone application, I can still initiate theFirebase authenticationnatively inFlutterand then use the access token in order to initiate the socket connection, which will on Phoenix side, on connect event, look up the UID inPostgreSQLand assigns it toconn.assignsand that’s it.