Skip to Content
Sindre Sorhus
Back to Actions

Updated

How to Join a Wi-Fi Network with Shortcuts on iPhone and Mac

By Sindre Sorhus, who makes the Actions and Shortcutie apps

On iPhone with Actions

  1. Install Actions, and open it once.
  2. In your shortcut, add the “Join Wi-Fi” action of Actions.
  3. Type the name of the network in “Name (SSID)”, and its password in “Password”. Leave the password empty for an open network.
  4. Run the shortcut, and tap “Join” when iOS asks.

iOS always asks before an app joins a network, so the shortcut cannot join without you. To ask, the action opens the Actions app for a moment, and then goes back to Shortcuts. When the shortcut runs in the background, like from a widget, add the “Go to Home Screen” action after it.

The action has more options: “Wait for Connection”, “Is WEP” for an old network, and “Is Hidden” for a network that does not show its name.

On Mac with Shortcutie

  1. Install Shortcutie, and open it once.
  2. In your shortcut, add the “Join Wi-Fi” action of Shortcutie.
  3. Type the name of the network, and its password. Leave the password empty for an open network.
  4. Run the shortcut. If Wi-Fi is off, the action turns it on first.

Get Actions

Additional actions for the Shortcuts app

Download on the App Store

Free

Requires
macOS, iOS, or visionOS 26 or later
Updated
June 2026
US App Store rating
4.8/5 (703 ratings)

More about Actions

Without an app

The “Set Wi-Fi” action of Shortcuts turns Wi-Fi on or off, but it cannot choose a network. To join one, use the settings:

  • iPhone: Open “Settings › Wi-Fi”, and tap the network.
  • Mac: Click Wi-Fi in the menu bar, and click the network.

Your devices join known networks by themselves. On Mac, you can also join a network with a Terminal command, where en0 is usually the Wi-Fi:

Terminal
networksetup -setairportnetwork en0 'Network Name' 'password'