I was trying a simple example. WebSocket on iOS failed to connect to certain link, while it's working on web browser.
// only working on browser. iOS throw error code 404 NSString *urlString = @"wss://pubsub.pubnub.com/demo/demo/webrtc-app";
Someone suggest it's certificate problem. What's the reason it fails only on iOS? How to fix it?
For iOS your best bet is to use the latest official SDK.
Visit the developers page iOS SDK V4 for Realtime Apps. This SDK supports the latests connection capabilities from Apple and PubNub for better performing user communication and realtime apps.
I was using WebSocket js directly (not PubNub js SDK). On browser, I could connect to that link without any problems.
Since the problem happened iOS WebSocket, someone suggest that it might be certificate issue. I will try PubNub iOS SDK for sure. It's still worth to figure out this problem.