Hammerspoon / Hammerspoon/Spoons

PersonalHotspot spoon does not work on macOS 12

Open
#275 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
567
Forks
171
PR merge metrics
No merged PRs in 30d

Description

The following sample code does nothing:

```lua
spoon.SpoonInstall:andUse(
"PersonalHotspot",
{
config = {
hotspotName = "iPhone",
},
}
)

spoon.PersonalHotspot:connect()
```

I had a look into the spoon's code and it is apparently supposed to open the Wi-Fi menu bar item and click on the entry. When I copy the [relevant Javascript code](https://github.com/Hammerspoon/Spoons/blob/master/Source/PersonalHotspot.spoon/init.lua#L56) over to macOS' script editor, it already fails to fetch the menu bar item:

```
Error: TypeError: undefined is not an object (evaluating 'wifiMenuBarItem.menus')
```

This might be a result of somewhat recent macOS updates. I can't find an easy solution right away but I leave this here for reference, in case I get around having a closer look.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.