当应用程序处于后台时,如何检测云台信标是否已离开特定区域?我尝试使用didDepart委托方法,但只在15分钟后调用它,任何解决方案都是为了
答案 0 :(得分:0)
这可能有点迟了但仍然回答你的问题。以防有人在那里不知道。实际上我们可以在后台模式中设置出发事件的值(didDepart)。这是一个例子:
NSMutableDictionary *options = [NSMutableDictionary new];
[options setObject:[NSNumber numberWithInt:FYXSightingOptionSignalStrengthWindowNone] forKey:FYXSightingOptionSignalStrengthWindowKey];
[options setObject:[NSNumber numberWithInt:5] forKey:FYXVisitOptionDepartureIntervalInSecondsKey];
[options setObject:[NSNumber numberWithInt:120] forKey:FYXVisitOptionBackgroundDepartureIntervalInSecondsKey];
[options setObject:[NSNumber numberWithInt:-60] forKey:FYXVisitOptionArrivalRSSIKey];
[options setObject:[NSNumber numberWithInt:-70] forKey:FYXVisitOptionDepartureRSSIKey];
[self.visitManager startWithOptions:options];