Multiple installed VPNs, and Shortcuts to turn Settings switches ON/OFF

Can you have Two VPNs on your iphone if you use only one at a time? And can you make one or two shortcuts to turn your vpn OFF (in Settings, 3 "switches") and then back ON again?


Thanks.

iPhone 12 Pro Max, iOS 15

Posted on Mar 31, 2023 09:08 PM

Reply

Similar questions

6 replies

Apr 1, 2023 09:17 AM in response to NCiPhoneDude

Ok, I had a chance to "play" with the Shortcuts app, and the following is something I came up with that you can consider trying for this. No guarantees ...


To use the Apple Shortcuts app to toggle an iPhone's VPN app:

  1. Open the Shortcuts app on your iPhone.
  2. Tap the "+" button to create a new shortcut.
  3. Tap "Add Action" and search for "Open App".
  4. Select "Open App" and choose your VPN app from the list.
  5. Tap the "+" button again to add another action.
  6. Search for "Wait" and select "Wait".
  7. Set the "Wait" time to a few seconds to ensure that the VPN app has enough time to open.
  8. Tap the "+" button again to add another action.
  9. Search for "Scripting" and select "Scripting".
  10. Tap "Open in Script Editor" and enter the following script:


let app = await App.current()
let vpn = await app.windows.find(w => w.title() === "Your VPN app name")
vpn.buttons["Connect"].tap()


Replace "Your VPN app name" with the actual name of your VPN app.


11. Save the script and tap "Done" to return to the Shortcuts app.

12. Tap "Next" and give your shortcut a name.

13. Tap "Done" to save your shortcut.

Apr 1, 2023 06:27 PM in response to Tesserax

I really appreciate your time and help with this. I was wondering if there is something in the shortcuts app like a “macro learn by keystrokes” function that would work this way:

turn the function ON

• do the keystrokes

turn the function OFF

Then presumably everything you did between the ON and the OFF would be saved as code that you could go in and edit.


I’ve also been doing some YouTube video watching on this to learn and found these two useful videos:

https://youtu.be/V4LBqcB4oQw

https://youtu.be/WIZUhfp22QM


I asked the VPN company by email if they have any already existing code to do this, and I may visit an Apple Store to ask at the Genius Bar about it.


By the way, I’m keeping a browser window open to this thread so I don’t lose it. Is there a simple way to get back to “here” and your replies if I had to do it from scratch?


Thank you again for your kindness and help.

Mar 31, 2023 09:25 PM in response to NCiPhoneDude

NCiPhoneDude Said:

"Multiple installed VPNs, and Shortcuts to turn Settings switches ON/OFFL Can you have Two VPNs on your iphone if you use only one at a time? And can you make one or two shortcuts to turn your vpn OFF (in Settings, 3 "switches") and then back ON again?"

-------


VPN and iPhone:

Keep VPNs off of your devices. Security Software just gets in the way on an Apple device. Reading these forums over the years, There's thousands of examples of how and why.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Multiple installed VPNs, and Shortcuts to turn Settings switches ON/OFF

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.