I can't seem to get the bottom of this one, so I am posting here. This is a similar problem to @domseb 's Problems device ownership doing Simple Authentication in my iOS app - #4 by KyleG although I get a slightly different error in that I can't claim the device:
"Setup process failed at claiming your Bug, if your Bug LED is blinking blue or green this means that you provided wrong Wi-Fi credentials, please try setup process again"
However, my Photon has successfully connected to wifi (breathing cyan). Here is my relevant code:
func sparkSetupViewController(_ controller: SparkSetupMainController!, didFinishWith result: SparkSetupMainControllerResult, device: SparkDevice!) {
switch result {
case.failureClaiming:
print("sparkSetupViewController result: SparkSetupMainControllerResult.failureClaiming")
default:
print("didFinishWith result: \(result)")
}
}
@IBAction func addDeviceBtn(_ sender: Any) {
if let newDeviceSetupController = SparkSetupMainController() {
let newDeviceCustomization = SparkSetupCustomization.sharedInstance()
newDeviceCustomization!.deviceName = "Bug"
newDeviceCustomization!.productMode = true
newDeviceCustomization!.productId = xxxx // 4-digit from console
newDeviceCustomization!.productName = "xxxxxxxxxxxx" // Exactly as appears in console (with case-matching)
newDeviceSetupController.delegate = self
self.present(newDeviceSetupController, animated: true, completion: nil)
}
}
And here are the logs I get:
And just to be sure, here is my latest pod update:
And I also just df-util'ed the Photon so it has the latest firmware.
Any help would be appreciated as Im now at a dead-end!