我对Gimbal框架有这个问题: 当我尝试使用选项启动FYXVisitManager时,系统不会调用delgate方法: 我用这些代码行初始化对象:
self.visitManager = [[FYXVisitManager alloc] init];
self.visitManager.delegate = self;
NSMutableDictionary *options = [NSMutableDictionary new];
[options setObject:[NSNumber numberWithInt:-40] forKey:FYXVisitOptionArrivalRSSIKey];
[options setObject:[NSNumber numberWithInt:-75] forKey:FYXVisitOptionDepartureRSSIKey];
[self.visitManager startWithOptions:options];
答案 0 :(得分:0)
为了正常工作,你必须: -
[FYX disableLocationUpdates];
[FYX setAppId:@"your_app_id"
appSecret:@"your_app_secret"
callbackUrl:@"your_callback_url"];
[FYX startService:self];
-(void)serviceStarted{}
中,并在代码NSMutableDictionary *options = [[NSMutableDictionary alloc] init];
[options setObject:[NSString stringWithString:FYXHighAccuracyLocation] forKey:FYXLocationModeKey];
[FYX enableLocationUpdatesWithOptions:options];
之前添加此代码
附: : - 如果你想使用后台处理,这必须在appdelegate中完成