Following the article here, I’m trying to turn on monitoring: https://community.estimote.com/hc/en-us/articles/233440227-How-to-enable-Estimote-Monitoring-with-SDK-
I’ve done my best to translate the Objective C into Swift as follows:
func estDeviceConnectionDidSucceed(_ device: ESTDeviceConnectable) {
print("Connected to device: " + device.description)
let locationBeacon = device as! ESTDeviceLocationBeacon
let featureset = ESTFeaturesetEstimoteMonitoring.init(device: locationBeacon)
featureset.writeEnableSettings(true, withCompletion: {(_ errors: [Error]?) -> Void in
if (errors != nil) {
print("Failed to enable monitoring. Errors: \(String(describing: errors))")
}
else {
print("Estimote Monitoring enabled!")
}
})
}
It looks like I’m successfully connecting to the device as I see that output, but then I get the following error on the writeEnableSettings call:
Error Domain=ESTRequestBaseErrorDomain Code=400 "The server cannot or will not process the request due to an apparent client error." UserInfo={NSLocalizedDescription=The server cannot or will not process the request due to an apparent client error., NSLocalizedRecoverySuggestion=Verify provided URL and params.
Any suggestions or pointers?