RSP87

RSP87

I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a user log in, open a websocket and a channel specific to that user, and wait for updates.

When we send a message to that user via their channel, we see the message without issue on a Windows system (all major browsers), Linux (Chrome) and AndroidOS (Chrome). However, if we go to the application on an iPhone via Chrome, we dont see the message when it’s pushed to the channel. No alert is generated indicating the message was even received.

I’ve seen some talk about webRTC sockets not working on an iPhone and was wondering if this is the case or not?

Edit: For clarity

Showing Posts 1 to 6

maz

maz

Did you check with an android phone?

idi527

idi527

:waving_hand:

What does webrtc have to do with phoenix channels? Do you mean websockets? Can you post some code from the ios app?


Just in case, yes, webrtc on ios browsers has limited support as of now, and works only in safari.

RSP87

RSP87 OP

Yes - I unfortunately do not remember the OS they had. But I can confirm their mobile version of Chrome rendered the same as the desktop rendition of the application. Same user/channel as well.

RSP87

RSP87 OP

I realize now that my original post was confusing. Sorry for that.

I have a simple Phoenix based web application. It’s nothing specific to any client. The same application can be accessed via browsers on MacOS, Windows, mobile OS, etc.

The point I was trying to make is - when I open a web socket and a channel:

  • Windows (Chrome): Good
  • Linux (Chrome): Good
  • AndroidOS (version unknown, Chrome): Good
  • iOS: Doesn’t work

I was told that webrtc and iOS don’t play nice together - Hence my original point in the topic. I wondered if maybe that was the reason it wouldn’t work on iOS and work on other mediums without issue,

idi527

idi527

I was told that webrtc and iOS don’t play nice together

Are you actually using webrtc? I think you might be confusing it with websockets.

Phoenix channels can’t use webrtc as its transport, but they do use websockets by default. All browsers on iOS support websockets.

I was told that webrtc and iOS don’t play nice together - Hence my original point in the topic. I wondered if maybe that was the reason it wouldn’t work on iOS and work on other mediums without issue,

So, no. WebSockets work just fine in iOS browsers.


To better suggest why your iOS app fails to setup a channel, we might need to see some source code.

Metti

Metti

I don’t think WebSockets themselves are the problem here. iOS supports WebSockets, and Chrome on iOS uses Apple’s WebKit rather than the same Chromium networking stack you get on Windows or Android.

So if the connection works everywhere else but not on the iPhone, I’d look at the actual WebSocket handshake and connection lifecycle rather than assuming WebSockets aren’t supported.

I’d add explicit onopen, onmessage, onerror and onclose logging on the client, and check the server logs at the same time. Also make sure you’re using wss:// if the page is being served over HTTPS. If the socket opens successfully but messages aren’t arriving, that’s a different problem from the connection failing altogether.

There have also been real WebKit/iOS WebSocket regressions, so the iOS version can matter. But I’d first establish whether the socket is actually reaching OPEN on the iPhone. That should narrow this down considerably.

One other thing worth checking is whether the code depends on a browser-specific WebSocket implementation or on background execution. iOS can be much more aggressive about suspending web pages, so a socket that works continuously on a desktop shouldn’t automatically be assumed to behave the same way on a phone.

— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
mnkhod
So i have been using ash framework for a while and i love it. However currently the issue im having with ash framework is the error handl...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New

Other Trending Topics Top

GenericJam
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
JesseHerrick
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
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews