iphone - CLLocationManager: didEnterRegion & didExitRegionAlert method did not called -
i using clregion geofencing. monitored clcircularregion set notifyonexit , notifyonentry. here code:
cllocationcoordinate2d coordinategym = cllocationcoordinate2dmake(lat,lng); clcircularregion *regionset = [[clcircularregion alloc]initwithcenter:coordinategym radius:radius identifier:strtitle]; if(isexit) { regionset.notifyonexit = yes; regionset.notifyonentry = no; } else { regionset.notifyonexit = no; regionset.notifyonentry = yes; } [self.locationmanager startmonitoringforregion:regionset]; [self.locationmanager startupdatingheading];
before monitor region try removed region motinored before it. monitored region. directly invote monitoringdidfailforregion delegate method error: operation couldn’t completed. (kclerrordomain error 4.) error. , not called delegate method.
-(void)locationmanager:(cllocationmanager *)manager didenterregion:(clregion *)region { -(void)locationmanager:(cllocationmanager *)manager didexitregion:(clregion *)region { }
can me error in code? thanks,
Comments
Post a Comment