Skip to content

Commit

Permalink
fix(ios): equality check for location manager corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
petermetz committed May 11, 2019
1 parent 0fa7553 commit 9e221fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ios/CDVLocationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ - (void) checkIfDomSignaldDelegateReady {

- (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegionState)state forRegion:(CLRegion *)region {

if (manager == self.locationManager) return;
if (manager != self.locationManager) return;
[self.commandDelegate runInBackground:^{

[[self getLogger] debugLog:@"didDetermineState: %@ for region: %@", [self regionStateAsString:state], region];
Expand All @@ -108,7 +108,7 @@ - (void)locationManager:(CLLocationManager *)manager didDetermineState:(CLRegion

-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {

if (manager == self.locationManager) return;
if (manager != self.locationManager) return;
[self.queue addOperationWithBlock:^{

[self _handleCallSafely:^CDVPluginResult *(CDVInvokedUrlCommand *command) {
Expand All @@ -130,7 +130,7 @@ -(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)r

-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {

if (manager == self.locationManager) return;
if (manager != self.locationManager) return;
[self.queue addOperationWithBlock:^{

[self _handleCallSafely:^CDVPluginResult *(CDVInvokedUrlCommand *command) {
Expand All @@ -152,7 +152,7 @@ -(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)re

- (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region {

if (manager == self.locationManager) return;
if (manager != self.locationManager) return;
[self.queue addOperationWithBlock:^{

[self _handleCallSafely:^CDVPluginResult *(CDVInvokedUrlCommand *command) {
Expand All @@ -173,7 +173,7 @@ - (void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion

- (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:(CLRegion *)region withError:(NSError *)error {

if (manager == self.locationManager) return;
if (manager != self.locationManager) return;
[self.queue addOperationWithBlock:^{

[self _handleCallSafely:^CDVPluginResult *(CDVInvokedUrlCommand *command) {
Expand All @@ -195,7 +195,7 @@ - (void)locationManager:(CLLocationManager *)manager monitoringDidFailForRegion:

- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region {

if (manager == self.locationManager) return;
if (manager != self.locationManager) return;
NSMutableArray* beaconsMapsArray = [NSMutableArray new];
for (CLBeacon* beacon in beacons) {
NSDictionary* dictOfBeacon = [self mapOfBeacon:beacon];
Expand Down

0 comments on commit 9e221fe

Please sign in to comment.