sindresorhus / Actions

⚙️ Supercharge your shortcuts
https://sindresorhus.com/actions
MIT License
2.49k stars 103 forks source link

Action proposal: Join Wifi Action #223

Closed Rihcus closed 5 months ago

Rihcus commented 5 months ago

Description

Give an action that allows user to input a wifi ssid and password to trigger join wifi prompt. Uses NEHotspotConfigurationManager

https://developer.apple.com/documentation/networkextension/nehotspotconfigurationmanager

https://forums.developer.apple.com/forums/thread/111307

Rihcus commented 5 months ago

IMG_0757

Example

sindresorhus commented 5 months ago

I added this in the latest TestFlight build: https://testflight.apple.com/join/fJGUrsZx

Rihcus commented 5 months ago

It works. Out of curiosity is there any reason the join Wi-Fi action opens the action app first before prompting the join option.

sindresorhus commented 5 months ago

It's explained in the action description.

Rihcus commented 5 months ago

Do you have any issues with disconecting wifi? I tested the action with a ipad with and a hotspot hotspot on my android phone and I noticed after connecting the ipad gets disconnected within a few seconds.

On the other hand if I try joining the hotspot via control center wifi menu or settings wifi menu I don't experience disconnections.

One other strange thing I noticed is if I create a shortcut that runs the join wifi action with wait for connectin setting off and have a open actions app acction:

IMG_D7F9B867DF35-1

If I wait to for the above shortcut to finish then click "join" the network will stay connected as long as the actions app is kept open. However when you leave the app within 20 seconds the network will disconnect.

iPadOS Version: 17.3.1 Actions app Version: 3.1.1 (66)

Rihcus commented 5 months ago

Do you have any issues with disconecting wifi? I tested the action with a ipad with and a hotspot hotspot on my android phone and I noticed after connecting the ipad gets disconnected within a few seconds.

On the other hand if I try joining the hotspot via control center wifi menu or settings wifi menu I don't experience disconnections.

One other strange thing I noticed is if I create a shortcut that runs the join wifi action with wait for connectin setting off and have a open actions app acction:

IMG_D7F9B867DF35-1

If I wait to for the above shortcut to finish then click "join" the network will stay connected as long as the actions app is kept open. However when you leave the app within 20 seconds the network will disconnect.

iPadOS Version: 17.3.1 Actions app Version: 3.1.1 (66)

Also not sure if this should be moved to a bug report

sindresorhus commented 5 months ago

@Rihcus Should be fixed in the latest TestFlight build (67).

Rihcus commented 5 months ago

@Rihcus Should be fixed in the latest TestFlight build (67).

Thanks for the fix, bug is gone 👍

No issues with with wait for connection (both on and off)