Sockets and Connection Refusal Issue during setup

I’m using the Spark-SDK and SparkSetup cocoapods to create my own version of the photon setup app.
Generally everything goes well through the method SparkSetupCommManager calling configureAP with network credentials. However when SparkSetupCommManager tries to connectAP I continue to get the error localized description of “The operation couldn’t be completed. Connection refused”.

Also, when I had the methods being called last week in a separate connectionController file, that wasn’t the issue and sockets kept being unconnectable.
Strange thing that kept happening during last week’s issue was that SparkSetupCommManager’s deviceID method was being called somehow while the final connection and setup was trying to finish up.

Any ideas? Anyone? Anyone?