Get info about iOS Simulator traffic - macos

When using a mobile Android Wi-Fi hot spot on macOS Catalina and MenuMeters utility to see total mobile traffic I noticed that every time I launch iOS Simulator (tested on iPhone Pro Max and iPhone SE 2nd generation both with iOS 13.5) it starts downloading huge amounts of data (approx. 450-800 MB) on every launch, so it gets rather expensive. I know that's Simulator because when I quit it traffic stops.
So I'd like to find out what and why Simulator may download maybe to try to block/work around this expensive operations.
I tried to use Charles and Proxyman to detect addresses Simulator could connect to - but with no avail, I cannot see this hundreds of megabytes there. Another option was Wireshark, but I do not know how I could use it to get what I want (as I imagine it should be some addresses from where Simulator could download data).
Could you please give me some advices how to get needed info with these applications or in some other way.
Edit
Thanks to accepted answer and Little Snitch I was able to catch and block "evil" connection

If it's not appearing at all in Charles or Proxyman then it's probably not being sent over HTTP. Wireshark will show the raw TCP & UDP connections, but it's very complicated if you're not familiar with it, and there'll be a lot of info there.
One good option for this is Little Snitch. It does exactly what you want, and can show you exactly who every app is connecting to and how much traffic is sent. It normally costs $30, but they let you try it out for free, and a quick check should be all you need.

Related

Extremely slow socket data throughput on Android 11?

I've seen some posts elsewhere about very slow file access after "upgrading" a device to Android 11. I'm not having that, but I AM having unbelievably slow performance in a small app that uses sockets. It's a client app that uses a socket to send a request to a server (mine) that monitors my solar installation, to get data back about how it has been performing etc. So the socket interaction is in a separate thread from the UI, and uses runOnUIThread to call a function that updates the UI with the received data. The request data is only a few bytes, maybe 20 or so maximum: the data coming back varies from a few hundred bytes to maybe 50000 bytes or thereabouts.
If I run this app on my phone (Android 8.1) it is fine - it takes 1.5 to 2 seconds to send the request, get the data back, and update the UI. Perfectly fine. It's the same on an older tablet running Android 7.1.2 too. But I have just recently acquired a flash (read expensive) new Samsung tablet running Android 11, and its performance is woeful - the same app doing the same operation takes anything up to 30 seconds, or even more. And it is exactly the same app, exactly the same code. Both devices are running on the same network, so the only significant difference seems to be the Android version. It is repeatable ad nauseum, so it isn't momentary network load either. The app is built to target API level 26 - it has to be so it can run on all the devices it needs to. It is not a commercial app, just something for my own use, but I am totally bewildered by this behaviour.
The other thing I have noted with this new tablet is that it is unable to provide a video stream from a surveillance IP camera I have at home. I use the TinyCam Pro app from Google Play for this. It can connect, but it has never yet managed to give me a picture, regardless of how good my connection is. Again, my phone and the older tablet can do this more often than not, and the new tablet would have far more horsepower than either of them. There is some sort of serious bottleneck in there!
Has anyone else seen this type of thing on Android 11? If so, is there anything that can be done about it, that is usable on earlier versions too? Or do we just have to wait for Android 11.1?
EDIT: I've done some more investigation on this, and I think I have now pinned it down to a 4G network bandwidth issue. I said that the tablet and the phone were doing exactly the same thing, but I have since remembered that they do NOT use the same carrier for their mobile connections. So it's not EXACTLY the same thing. I would actually expect the network capacity for the tablet's carrier to be superior to that of the phone's carrier, but that appears not to be the case where I am at the moment. So I think I have to take back my evil thoughts about the tablet, and maybe even Android 11. Interesting how easy it is to be misled, and how hard it can be to genuinely compare apples with apples when there are so many variables and so many links in the chain. I'll be doing some more tests and comparisons when back in the city, where network capacity should be much more alike for the two carriers.
yes its true. While compare to Android 11 and Android 8 there is a lot of changes updated because of security issue.
May be, If your managing some file in mobile storage mnt/sdcard/ here in this path its speed of access or managing a file in this path its restricted and its becomes less. So, if your using this path please change it like below because it will cause youe app to process slow.
solution - Try to use this file access path is Android/data/data/packageName/
I mean if your using this logic to access file - Environment.getExternalStorageDirectory()
instead of above try this - Context.getExternalFilesDir(null)
refer this link https://developer.android.com/about/versions/11/privacy/storage
I hopes it will help you...

Increase speed on RN-41 bluetooth SPP?

I'm using RN-41-APLX bluetooth evaluation board (based on RN-41-APL, very similar to RN-41 but also supports Apple devices) as a member of MFi.
I was able to establish connection and transfer some data to and from dev board with out-of-the-box configuration.
The problem is, in data sheet for RN-41 it is set, that SPP profile supports 240kbps speed, but when I transfer 10kB from iPod touch with Roving test iOS application installed, it takes 5 seconds to transfer.
Since UART speed is 230kbps, I think the bottle neck is the bluetooth link speed, but I can not find any way to change it. Can anybody help with that?
Thanks in advance!
I've run into this problem myself about this chip (well, the RN42 technically) and posted my findings here:
RN42 Bluetooth disconnects on iOS within seconds of streaming data
Short summary:
When the RN42 is used to communicate with an iOS device, it cannot
communicate faster than 2.5-3kB/s... If it's used to communicate with
an Android or computer or anything else, it can transfer at 35kB/s
(over SPP).
Hope it helps!
-SJ

WP7 Webbrowser/Http-request only working when connected to Zune

So I've been toiling over this app trying to figure out this strange behaviour and I'm just getting more and more confused so I thought maybe a more experienced WP7 developer could shed some light on the issue.
I have a (working?) application and I can run it perfectly fine when I'm running it though visual studio and even just when the phone is plugged into the computer but as soon as I disconnect the phone from the computer I can no longer send Httprequests and my webbrowser control no-longer loads pages from my server. Breakdown:
I open the app on the phone while it's plugged into the machine hosting the server and it works perfectly fine, no buggs, all requests go though and webbrowser navigates to pages.
Now if I unplug it from the computer while the app is running natively I lose all ability to make request or navigations (to server hosted pages) in my webbrowser.
Now if I plug it back in all the "Server not found" and "We're having trouble displaying this page" errors go away and my app returns to a usable state.
Is there some kind of permission that must be accepted before the phone can send and receive data from my server that is overridden when the phone is connected to the computer? Has anyone else run into this problem ever or do I just have something wrong with me? I'm am at a loss to find the issue, if you could point me in the right direction that would be great.
EDIT: Ok, so I think it has something to do with it being connected to a computer which is hosting the server. Because when I connect it to my mac (which doesn't have zune or any microsoft stuff) the app responds the same as not being connected (i.e no http or webbrowser)
Just tried running the app again while it was plugged into the server-computer but without Zune running and it did not work (i.e no http or webbrowser). So Zune is DEFINITELY and influencing factor, does anyone know what it's doing that I'm not doing when I unplug it or shut-down Zune? (note: the app is running natively, not through VS)
If I run it on a different computer with Zune running on it, it isn't working either, which I find strange....
Just found this: http://answers.microsoft.com/en-us/zune/forum/zune_install-pc/cannot-connect-to-server-or-dns-error-related-to/b224cffb-3ec0-456a-86f3-f9b931a92367 hopefully it will solve my problems.....we'll see....(Edit: couldn't find an answer here)
Thanks for the help!
Wow! I cannot believe I could have overlooked this. So the network that I thought I was using was different from the one my phone was using. Did you know that the windows phone (at least Lumia 800) automatically uses the internet from whatever computer it's plugged into and NOT the wireless network it's currently connected to if Zune is running on that computer? (well I didn't) On top of that the network that I thought it was connected to (and was using when I disconnected from the server computer) couldn't communicate with the network my server was running. This combination made it really hard to figure out what was going on and I spent WAY to much time trying to figure it out.
Thanks for the suggestions and sorry if I waisted anyones time.

WP7 Debugging without Tethering over USB?

i want to Debug some Networkproblem cases in my Application. But i can't really test it because my Phone has internet over USB. If I disconnect it from USB i can't debug... So is there anyway, I can disable the Tethering over USB on my Phone?
Edit: I have a HTC Trophy but it's the same with the Lumia 800 of my friend...
Assuming that you're connecting to a web service which isn't running on your machine, you can test this by disconnecting your PC from any network which gives it access to the internet (i.e. turn off wifi on the pc or pull the network cable.)
It's not an elegant solution or one that can be easily automated but it works. ;) (I used this method with testing an app which would progressively download large files in pieces and would stop and then resume as connectivity was lost and restored.)
You also can use Fiddler http://www.fiddler2.com/fiddler2/ as a Proxy for your emulator to simulate lossy connections or no connection at all. This way you can still surf and look for references while you code :-)
edit: fiddler doesnt seem to work for the Emulator(for more information, look into the comments), but if you want to simulate a lossy Connection then this is the way to go, even work for phones with the connection-cable.

Windows Phone - Application crashes when disconnected from PC

Whenever I disconnect my Windows Phone from PC (connected through USB) and if my application is running, my application hangs for sometime and then application crashes.
Does anyone experienced same behavior? I guess switching for PC connection to Wi-Fi/GPRS is causing the issue.
the windows Phone Requires that you Safely Remove hardware first, after a few times when i started Development on the windows phone i did the same and Ended up getting a new Phone. So plainly put, try to Safely Remove and Make sure it is installing the app to the Device.
Meaning if you Remove the phone, the App is still able to be ran just like a normal downloaded App form the Market place.
if you want more in depth information, i would suggest Reading the WP7 Everything Programming ebook lol
its filled with good information, and Definitely Helped me along my road to Love DEV for WP7.
As gamernb says, if you disconnect the USB from a properly tethered Windows Phone (i.e. connected to Zune, or using the WPConnect utility), the phone's network connection will be reset and your app's connections will be terminated. The phone will then start trying to connect using WiFi or cellular data (if they are on), but this can take quite a while.
You will have to handle this network disconnection in your app - I've found that pulling the USB cable in this way is a good ad-hoc test for WP7 apps: do an action which you know will use the network connection. Then watch if the app crashes, or handles this gracefully.
Actually you aren't guaranteed to always use the PC data connection: if you make sure that the computer has no data connection (i.e. pull the Ethernet cable, turn off WiFi etc ), the WP7 app can then use cellular data or WiFi on the phone instead.
Alas-
you could set perimeters in your application to Check what the connection type is, then Make changes accordingly.
You May have a slight freeze, but that's better then a crash....mainly when the phone switches from PC to WWAN, their would be a slight Pause.
use the Reachability Class and NSLog to Figure out whats going on exactly.
I really hope that helps!

Resources