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

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...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
psy-q
I’m trying to set up Emacs with elixir-ls via lsp-mode and credo via Flycheck. This should mostly be preconfigured as Flycheck picks up c...
New

Other Trending Topics Top

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
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
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

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews