A simple step procedure to stop “Accept Incoming Network Connection” Pop-up in your iOS Simulator

iOSSimulatorPopup (1)

Developing an iOS Application with Xamarin.iOS is a great task, which is no-doubt a fast, convenient, and fun experience too. Likewise, it deploying this app is also a amazing experineg. Expect that pop-up notifications that occurs at the run time of the app and creates an annoyingness in its behavior every time a user run the application, by forcing them to accept it.

iOSSimulatorPopupMost of the time the users file a complaint to the developer to stop such irritating pop-up windows on the app in a way to deliver the better user experience.

Well, as a solution to this, a developer need to this short lenght coding script into thei app code base, this script will be helpful to stop the annoying pop-up window.

Add this script in you code file to stop pop-up notification:

# Script to disable the iOS Simulator app from showing the “Do you want the application xxxx to accept incoming network connections?” pop-up every time the app is run

echo “> Enter password to temporarily shut firewall off”

sudo /usr/libexec/ApplicationFirewall/socketfilterfw –setglobalstate off

echo “> Add Xcode as a firewall exception”

/usr/libexec/ApplicationFirewall/socketfilterfw –add /Applications/Xcode.app/Contents/MacOS/Xcode

echo “> Add iOS Simulator as a firewall exception”

/usr/libexec/ApplicationFirewall/socketfilterfw –add /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator

echo “> Re-enable firewall”

sudo /usr/libexec/ApplicationFirewall/socketfilterfw –setglobalstate on

exit 0

Adding the script is not just enough to debug it to get better performance result, a developer must have to learn the exact usage of the script.

Create a new file, paste the avove mentioned script in it and save the file with .sh extension. After that you need to change the access permission of the file to execute in a proper way, else you may recieved a “permission denied” message. Then you need to run this command:

chmod u+x [the path to your new script file.sh]

This command will give permission a user to execute the code file in your application.

For the final step, just drag and drop the scripted file into the terminal and hit enter to run it. While doing this, you will be requested to enter your system password here just for once to access the code.

by admin

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>