CoreLocation kCLErrorDomain错误5 [英] CoreLocation kCLErrorDomain error 5
问题描述
我子类化一个 CLRegion
以支持多边形通过重写 containsCoordinate:
使用光线投射逻辑代替原始距离嘎吱声逻辑。子类通过正常方法( initCircularRegionWithCenter:radius:identifier:
)初始化,然后 CLLocationCoordinate2d
code> NSValue 到可变数组。这些坐标在光线投射逻辑期间使用。
I subclassed a CLRegion
to support Polygons via overriding containsCoordinate:
to use ray casting logic instead of the original distance crunching logic. The subclass is initialized via the normal method (initCircularRegionWithCenter:radius:identifier:
), then CLLocationCoordinate2d
s are added as NSValue
s to a mutable array. These coordinates are used during the ray casting logic.
一旦我尝试使用CLRegion子类,我面临着我的应用程序逻辑中的大量错误,如以及以下错误:
As soon as I try to use the CLRegion subclass, I am confronted with a ton of errors in my application logic, as well as the following error:
2013-07-18 16:46:44.515 Geofencing[4816:907] (identifier 6C11CBAF-3EE4-4257-9D75-9724F4349B5D) <+39.86605072,-75.54420471> radius 186.54m: Error Domain=kCLErrorDomain Code=5 "The operation couldn’t be completed. (kCLErrorDomain error 5.)"
b $ b
我也试过一个不同的子类,不修改任何方法,但增加了一个方法从NSDictionary读取元数据。我也面临着同样的错误。
I also tried a different subclass that does not modify any methods but adds a method for reading metadata from an NSDictionary. I was confronted with the same error.
发生了什么事?是子类化CLRegion可行吗?
What is going on? Is subclassing CLRegion feasible?
推荐答案
我讨厌回答自己的问题,但是我找到了我的问题的解决方案。 a kCLErrorDomain
代码/错误5表示您已尝试监控超过20个 CLRegions
。在我的情况下,这两个子类都有犯罪监测超过20个地区。
I hate to answer my own question, but I have found the solution to my issue. a kCLErrorDomain
code/error of 5 denotes that you have tried to monitor more than 20 CLRegions
. In my case, both subclasses were guilty of monitoring more than 20 regions.
这篇关于CoreLocation kCLErrorDomain错误5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!