9

I want to run my app in iOS simulator with VPN.

My mac is connected to a VPN network, i want to run my app in simulator, is this possible.

Please help.

Ashwani
  • 378
  • 1
  • 3
  • 13

3 Answers3

13

If your VPN is "L2TP over IPSec", just need to make sure you've checked "Send all traffic over VPN connection" in System Preferences / Network / YourVPN / Advanced:

enter image description here

Kjuly
  • 34,476
  • 22
  • 104
  • 118
  • I want client to run an app in his device but he is in china and the app is not responding as it uses Google firebase in the backend.Anyway to run his app because he cant use VPN.Is there anyway to do something in code?Run a code without users knowing? – zyonneo Dec 11 '18 at 05:47
  • @zyonneo you can setup your own vpn server for user to use. But once ur vpn server ip address is detected by China mainland's gfw, it might be blocked again. Another choice is to use a secondary service instead of Google firebase, which works well in China. But i'm sure there must be some better choices that i don't aware of, i suggest u create a new question in community to gain a best solution. ;) – Kjuly Dec 11 '18 at 06:11
  • @Kjuly https://stackoverflow.com/questions/53664141/how-to-make-mobile-applications-install-and-run-in-chinaany-option-for-the-app – zyonneo Dec 11 '18 at 06:19
  • I did not found this window on macOS Mojave 10.14.4, kindly help me how to do on that – iAj Jul 26 '19 at 10:06
  • Hi @iAj , mine is 10.14.4 as well, it doesn't change, just go to "System Preferences" - "Network" - "YourVPN" - "Advanced", but need to make sure your VPN is "L2TP over IPSec", cause I just tried other two options "Cisco IPSec" & "IKEv2", they don't have such setting, not familiar w/ these two, guess need to set in somewhere else. – Kjuly Jul 27 '19 at 03:06
  • For some reason don't work for me. – ChikabuZ May 17 '22 at 10:55
4

The answered marked as correct works but you need to start/restart the simulator once you are successfully connected to the VPN.

I make this comment in order to avoid what happened to me. I spend a day trying to making vodo magic and at the end the solution was just restarting the simulator.

FedeH
  • 1,343
  • 18
  • 24
-1

Yes it is possible and i have already worked on iOS simulator with VPN connection. Basically you don't have to install or make any changes for this.

When you connect to VPN on Mac you can browser the sites or system to which you are VPN connected. Since iOS simulator uses your Mac's connection it will also be able to connect to the VPN network.

Arun Gupta
  • 2,628
  • 1
  • 20
  • 37