I am trying to debug my web based HLS player (with HTML5 tag) and would like to monitor the network request to fetch the segments of the stream. This works fine in all desktop browsers (safari, chrome, firefox), and works with the OSX Safari, as well.
But when I connect to a iOS Safari (Simulator or real iPhone), only the request of the m3u-file shows up in the network monitor, not the requests to the segments of the stream.
Is there a way to monitor those requests on iOS Safari?
The reason I want to do this is trying to avoid automatic loading of segments while the player is paused/stopped. This works fine with hls.js, but I am not sure how iOS Safari handles the preload=none attribute. Although here Apple says that "Safari on iOS never preloads", this does not seem to be true when pausing the player. (see https://developer.apple.com/documentation/webkitjs/htmlmediaelement/1633059-preload, too)
Thanks!
P.S.: I tried to get any information in Apple's forums before, unfortunately without any success (https://discussions.apple.com/message/32027089#32027089).
You can monitor these requests like any other. I recommend Fiddler... It works as a proxy server and can be used to monitor or edit traffic, even with HTTPS. For lower level debugging or cases where you can't use a proxy, use a packet sniffer like Wireshark.
Related
Since last week one user of an app of mine is reporting that the app cannot reach the server on a cellular network. His phone is running iOS 14.7.1 and he has an LTE network connection. The app works perfectly on wifi and I have not had any reports of other users not being able to use the app on cellular networks.
First I thought it was a network detection issue (reachability not being able to see the cellular network), but when I ignore the network detection and simply make the HTTPS request, it does not connect. There is no response from the server. The weird thing is that this is an app with a Google map. The map loads, but the location markers that come from my server are not loaded.
I cannot think of any reason why this is happening and as my testing options are very limited (only this one user is reporting it, I cannot replicate myself), I am kind of lost as to what causes the issue, let alone how to fix it. Are there any settings that I should be aware of for connections over LTE networks to work? Have any new settings been introduced in iOS 14.7 that might affect this? Should the user make any changes on his phone to allow my app to use the cellular network?
I am using a very standard URLSession datatask with an URLRequest to make the call (which works without any issue over wifi).
I am working on a NetworkExtension which uses the NEPacketTunnelProvider to provide VPN-like tunnel so I can modify the traffic.
This works great for basically all the apps I tried so far, but Facebook Messenger seems to be able to ignore it. I first see that the traffic goes through the tunnel, should be blocked (for testing), but then the messages are successfully sent anyway.
To me this suggests that Messenger first goes through the tunnel and when that does not work, it has some kind of fallback. This happens whether I am on Wifi or cellular data. At first I thought that it may somehow fallback to cellular when WiFi does not work, but even when I disable cellular on the iOS level, Messenger still works when the tunnel is active.
I tried getting all the system routes (meaning the IPs and masks) and manually setting them to includedRoutes on the NEIPv4Settings but this has no effect.
Does this look like the Messenger is indeed bypassing the VPN tunnel? Or maybe something else is at play?
So far I have tried basically all configuration combinations and nothing seems to affect Messenger in any way. Apps like Signal, Instagram, YouTube and other can be successfully cut off the network with the tunnel.
EDIT: Found this on the official Apple forums: https://developer.apple.com/forums/thread/122330
Actually Facebook Messanger sends traffic to all active interfaces in iOS. It even sends tarffic out trough Cellular, when mobile data is disabled from settings.
EDIT 2: I tried the new iOS 14 configuration option includeAllNetworks which seems to work for Messenger but somehow messes up other apps like Signal or WhatsApp.
When I don't have this flag on, Signal work with my VPN on and I can see its traffic, but when I enable this flag Signal does not send messages nor receives them.
Apps can use low level API and force traffic via some interface (using bind for example), and go outside your VPN.
The way to enforce using the VPN is to enable the flag includeAllNetworks on your VPN configuration -
manager.protocolConfiguration!.includeAllNetworks = true
I have an mp4 (h.264) file that I want to play on an IPhone (via HTTP). When the file sits on a Windows IIS server, my IPhone and IPad will play the video without any issues.
The file is here: test file
I will leave access to this server for a few days for testing purposes.
When the file sits on our proprietary server, my IPhone and IPad request the download, but then stops the process almost immediately. Non IOS phones and desktop browsers have no problems requesting and viewing the video from the proprietary server. I don't believe that it has anything to do with the HTTP response headers because of the fact that non-IOS phones can play the video.
I use Wireshark to see the http/tcp requests between the IPhone and the server. I see the IPhone request the mp4 and then I see the server send a "200 OK" response and then start to send the file. Soon after the server starts to send the file, the IPhone sends a "reset" request which stops the sending of the file.
Any ideas why the IPhone would reset the communication and stop the file from being sent? I am far from a regular user of Wireshark, so hopefully, my reading of the file is correct.
Here is an image of my Wireshark capture if anyone is interested. It clearly shows the reset from the IPhone.
Wireshark Image
Any help will be appreciated.
Thanks,
Dana
This has been solved. Our server did not handle HTTP requests for partial content (i.e. Range: bytes=0-999). Range headers in incoming requests were being ignored.
We updated the server to handle these requests and IOS devices are now able to download video from our server.
See the link below for more info:
http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p5-range-latest.html
I am working on a simple app that initiates Skype calls.
It successfully initiates Skype audio call using apple's URI scheme
[NSURL URLWithString:#"skype:skype_id?call"]).
But when I try to make a video call using
[NSURL URLWithString:#"skype:skype_id?call&video=true"]
it still initiates audio call and launches Skype but nothing happens after that (no audio call or video call is made). I have seen some posts where people mentioned that they used similar URI for making video calls for Skype in iOS that worked fine before but now it doesn't work.
I should mention that Android version of the app our team is working on have no such issue. It successfully starts making video call using same URI.
Is this a problem of latest version of skype developed for iOS?
this seems to be totally bust in skype for iOS.
even skype://username?call comes up with a fairly unintuitive modal saying "Placing call with..." which does NOTHING unless you click "Voice Call"
All works fine in other systmes / browsers (windows, mac osx, android), though https is bust in chrome. which is just dandy.
maybe https://stackoverflow.com/users/1383154/allen-smith or someone from skypes side can comment??
according to http://handleopenurl.com/scheme/skype you can use skype://username?chat in an html link. Now that sort of works - as in it opens skype, but still doesnt initiate the call.
You can't use the &video=true - IOS doesn't like it. Just use the ?call and it will work the same way it should (as if you appended the &video=true to it) and place a video call if video is available.
The skype stuff is pretty flaky - and my only success has been to use the skype buttons (using the skype-uri.js file and associated javascript for creating the buttons under HTTP (NOT HTTPS). HTTPS tends to break things in Chrome, and a few others.
What I did was sniff for IOS and remove the video=true accordingly so it works fine for all the other browsers too. End of the day, Skype really needs to clean up their act.
I need to do video streaming to iPhone.
However, I don't have a homebrewed application playing the H.264 stream yet.
I have to understand first, how much delay there's for iPhone to receive the first packet/frame.
Anyone knows how to get some "sniffer" like WireShark on iPhone? Is it possible at all?
You can configure Fiddler as a reverse proxy and monitor the traffic from mobile devices. I don't know if this will do exactly what you want (I haven't done it in a long time) but the company I work at has analytics products for the various mobile platforms and that was the method we used to monitor their network usage.
http://www.fiddler2.com/Fiddler/help/reverseproxy.asp