Reputation: 2596
Every time I open Xcode Simulator it invokes an activity called nsurlsessiond
and it drains my network data. I just open simulator, I don't even make any api calls still it drains my network data.
I have restricted 1.5GB per day
The Xcode version is Version 11.2.1 (11B53).
I had deleted some of the simulators which I am not using.
Previously simulator wasn't draining data like this. Can anyone tell me why this is happening.
I got this output from the tcpDump file using Wireshark.
Upvotes: 6
Views: 1700
Reputation: 11
you could use bash script below which kills nsurlsessiond process. just copy it to *.sh file and run in terminal when you want to restrict nsurlsessiond activity.
#!/bin/sh
while true;
do
pid=$(pgrep "nsurlsessiond");
if [[ ! -z "$pid" ]]; then
echo "nsurlsessiond with PID:${pid} killed at $(date +'%X')";
echo $(pkill "nsurlsessiond");
fi
sleep 10;
done
Upvotes: 1
Reputation: 111
Finally i find a temporary solution!
rename the file com.apple.nsurlsessiond(Dont delete) in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/UserEventPlugins/com.apple.nsurlsessiond.plugin/
to something -com.apple.nsurlsessiond
and also the file nsurlsessiond(Dont delete) in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/
to something -nsurlsessiond
Upvotes: 6