Unable to establish websocket connection when using Apple devices - ios

I have a web application (hobby project) with a chat function that is implemented with Express.js and socket.io.
Everything works fine on PC and on Android phones, but as soon as you connect with an Apple device, there will be problems since it seems that no websocket connection can be established between the server and the Apple device.
After a bit of googling I found this page:
https://socket.io/docs/v4/troubleshooting-connection-issues/?fbclid=IwAR2XeuehqJkkgFoshFKSVN7sz4UUfWkZ0CPYmsWnqXm-0Q17iVC3dRDyEEI#problem-the-socket-is-stuck-in-http-long-polling
I have limited abilities to troubleshoot on the client side since we do not have a Mac but I followed the troubleshooting that they recommend for the server side. When you connect with an Apple device, it seems that the event "upgrade" is never triggered and you therefore have to settle with HTTP Polling instead of web socket, which does not provide a good user experience.
I have got a certificate from Lets Encrypt and am using HTTPS to access the webpage. I have also tried with several different browsers on the Apple devices.
Anyone have an idea why you can not create a web socket connection with Apple devices and what you could do about it?
Feeling a bit lost and would love some help!

Related

Peer-To-Peer chat iOS Application

Is it possible to create a chat application that works with Peer-To-Peer, so without a server connecting the devices?
I think this would be more trustworthy for users...
Yes it is possible, but you will still need some type of server or middleman that everyone connects to at first in order to find the people to chat and distribute their ips to each client, but from that point onward you can use tcp to connect the devices without a middleman.

How to debug Android and/or iOS apps on a Windows Desktop Environment

I work with web analytics and have somewhat of a web developer background, BUT I am not a programmer. I need a way to debug the tracking code I request our mobile app team to implement. They are also not Web Analysts so they struggle to be able to verify if it works too.
I need a way to take one of their builds, run it on a desktop environment, and monitor it with a network monitoring tool like Charles Proxy or the network monitoring tools in the developer tools of most browsers.
I want to at least be able to see the information being passed back to our analytics tracking tool via the network connection. That will tell me if what I requested works or not. If there are other tools that a non-programmer can use to achieve this and more I would be grateful to hear about them. The few tools I have seen seem to be more about testing web pages via a mobile device. I need to test apps that you will eventually download from the an app store.
Thanks!
In our company, we found that Charles is perfect for testing all that concerns tracking.
Charles will record all your requests and responses from your computer, SSL traffic included.
(You can also let physical Android/iOS devices use your desktop as a proxy to catch all traffic there, which is even more impressive and useful, but I understand that this is not what you want.)
You can even do fancy stuff like throttling your connection and adding breakpoints, to see what would happen in "real" situations with bad connection...
Hope this helps.

inspect http requests in ios simulator/devices

I am working on an ios app which communicate with the server via http request. And I want to monitor the network traffic when testing my app in ios simulator/devices.
Is there any software or tools I can used to inspect the http requests of a specified application on mac/ios, just like firebugs for web developers?
Thanks.
As far as I know, there are several tools in App Store that provide the network traffic monitor feature. But, they could only view iPhone as a whole and stay at that level. In other words, they could only tell how much traffic has been consumed of this iPhone. For each app? No data.
You can use HTTP Catcher to capture web traffic. It's a Web debugging proxy for iOS, so you can view requests and responses directly on iPhone.
You can use Proxyman to record/capture all the requests & responses from your app while developing.It will support ios simulators also. Without doing any code change we use this.
First Download the Proxyman app form the above link after that just go through this documentation for references.
Charles has recently released an iOS version for http traffic monitoring. it is a paid app though. Good news is that you can set up Charles free desktop version then setup HTTP proxy from your iOS device.

APN Settings for O2 service in UK + Blackberry

I am developing an application which requires connection to the internet. Till now i have been using Wifi and WAP 2 connection UID for Http connection and everything has been working fine. But now the client is telling that he wishes to use direct TCP connection as using WAP2.0 connection costs him a big amount.
I am not having clear understanding about APN settings. I have goggled a bit and appended 'deviceside=true' to the url and then set the APN in the Settings->Advanced Options->TCP/IP. But everytime I run the application, I am getting 'Timed Out' Exception.
My client is using O2 carrier. I googled and found out that APN for 2 are 'mobile.o2.co.uk' and 'wap.o2.co.uk' but using these two also client is not able to make Http connection. Is there any way of free unlimited internet connectivity in third party applications?
I am not having a clear understanding of APN settings so kindly bear with me. I am using OS 4.5
Eargerly waiting for reply.
Welcome to the confusing world of network transports on BlackBerry! You will want to start with the article Connecting your BlackBerry - http and socket connections to the world.

Blackberry application to establish an http connection

i have been working on developing an blackberry application. as per now i want the application to connect to a local server on my network and fetch a file from that machine. i have been using the library given by a named blackberry developer Mr.peter strange....here is the link for the same Http connection through BIS-B
my requirement would be setting up connection to the local server using any transport mode but it should be able to render the text downloaded.
i tried using the demos provided by blackberry samples as it comes with the plugin for eclipse the http demo from those samples shows only trying to setup an http connection string and the networkapidemo sample shows diffrent http codes when the url is entered as desired.i am running all the applications on the simulator. i havent tried running any of my apps on the hardware
may i know why this problem arises of http codes....ill also want to know guidelines about how to set a simple http connection just to download a file(text file) from a local server.
I have tried many forums too. if anybody would have a look at it i would post it here.
Only a simple connection is becoming a headache!
anyways...waiting for replies..
thanx in advance guys :)
It does not matter whether you want to communicate with local or remote server.
1) See the API docs on HttpConnection. There are sample code in there.
2) Unfortunatelly, on BB you should be aware of Network Transports. Check this thread to get all info you need on Network Transports.
UPDATE:
The second point explains an approach that will work on any OS. If you need an OS 5+ only approach, then check the ConnectionFactory API. ConnectionFactory usage sapmles.

Resources