Exactly. I initially went with that approach [1], but eventually opted for on-screen QR code scanning. Suggested networks have lower connection priority and don’t always auto-connect. Also, passwords for suggested networks can’t be viewed or shared later, unlike regular WiFi connections. This is inconvenient because I often need to connect my Mac to the same network later.
[1] https://github.com/yilinjuang/wify/commit/7e63f2a9e6759847b4...