So there are very good libraries for accessing serial ports, but most of them require a lot of code to get the list of serial ports. I took an approach I haven't seen on the internet and thought I would document it here.
When I search for getting a list of USB serial ports it typically involves importing IOKit. However I noticed that if you do a directory search in the terminal you will get a list of the usb-serial ports; for example:
```
ls -l /dev/tty.usb*
```
This will give you a list of the usb serial ports. Why not try executing a shell command of the ls command? Which is the approach I took. There was a good tutorial on processing shell commands in swift here:
https://techreflect.org/2017/03/creating-command-line-tool-in-swift/
I took this as the basis and created some additional static method to return the list of serial ports.