I am trying to develop an App in Swift Playgrounds that will use the SwiftMQTT package. SwiftMQTT needs to open an outgoing network connection to connect the app to an MQTT server. To integrate the package, I wrote a basic manager class as an observable object.
When I try to make a connection with this manager, Swift Playgrounds appears to block the connection. Searching around, I found that this was likely due to sandboxing but couldn't figure out how to fix it in Swift Playgrounds. To test this idea, I moved my manager class over to XTools and created a test app to make the connection. Initially, I got the same error. However, XTools let me make the needed sandbox setting on the Signing & Capabilities page of the app. Click/checkmarking "Outgoing Connections (Client)" under Network solved my problem there.
I would still like to do this in Playgrounds but can't for the life of me figure out how to open up the sandbox. Can anybody point me there (or wave me off if this is currently impossible).