错误代码500,同时保存Estimote室内位置的位置
问题描述:
我有3个室内位置信标包与电子邮件地址,并在保存位置估计云时我收到一条错误消息....错误消息如下: -错误代码500,同时保存Estimote室内位置的位置
保存位置时出错:可选(错误域= ESTRequestBaseErrorDomain代码= 500“Estimote Cloud无法处理请求。”UserInfo = {NSLocalizedDescription = Estimote云无法处理请求。,NSLocalizedRecoverySuggestion =检查原因字段以验证错误类型发生。})
下面是我的实现: -
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
locationBuilder.setLocationName("my space")
locationBuilder.setLocationBoundaryPoints([
EILPoint(x: 0.00, y: 0.00),
EILPoint(x: 0.00, y: 9.85),
EILPoint(x: 4.56, y: 9.85),
EILPoint(x: 4.56, y: 0.00)])
locationBuilder.addBeacon(withIdentifier: "mybeaconid1", atBoundarySegmentIndex: 0, inDistance: 3.5, from: .leftSide)
locationBuilder.addBeacon(withIdentifier: "mybeaconid2", atBoundarySegmentIndex: 1, inDistance: 1.1, from: .rightSide)
locationBuilder.addBeacon(withIdentifier: "mybeaconid3", atBoundarySegmentIndex: 2, inDistance: 5.7, from: .leftSide)
locationBuilder.addBeacon(withIdentifier: "mybeacon4", atBoundarySegmentIndex: 3, inDistance: 3, from: .rightSide)
locationBuilder.setLocationOrientation(50)
let location = locationBuilder.build()
ESTConfig.setupAppID("myAppId", andAppToken: "myAppToken")
let addLocationRequest = EILRequestAddLocation(location: location!)
addLocationRequest.sendRequest { (location, error) in
if error != nil {
print("Error when saving location: \(String(describing: error))")
} else {
print("Location saved successfully: \(String(describing: location?.identifier))")
}
}
beaconManager.requestAlwaysAuthorization()
return true
}
答
我已经询问了有关此问题的估计支持,并且此错误是由于其服务器上的某个问题而发生的,现在这种工作就像一个魅力。
https://forums.estimote.com/t/error-when-saving-location-estimote-cloud-failed-to-handle-request/6121/2? – Larme
我查了,我确实购买了硬件,一个云帐户和一个应用程序令牌 – aznelite89
的应用程序响应表明存在服务器端错误,所以很可能您的代码是正确的。如果您的代码存在任何问题,则您尚未以后端预期的格式设置网络请求,从而导致错误。 –