Commit 09cd782c authored by Chris Scott's avatar Chris Scott

Fix ios geofencing bug, wrong listeners. Fix Android remove geofence bug

parent 5aa72dee
...@@ -129,11 +129,14 @@ ...@@ -129,11 +129,14 @@
if (![self.geofenceListeners count]) { if (![self.geofenceListeners count]) {
return; return;
} }
NSLog(@"- onEnterGeofence: %@", notification.userInfo);
CLCircularRegion *region = [notification.userInfo objectForKey:@"geofence"]; CLCircularRegion *region = [notification.userInfo objectForKey:@"geofence"];
for (NSString *callbackId in self.stationaryRegionListeners) { for (NSString *callbackId in self.geofenceListeners) {
NSDictionary *params = @{ NSDictionary *params = @{
@"identifier": region.identifier, @"identifier": region.identifier,
@"action": [notification.userInfo objectForKey:@"action"],
@"taskId": @([bgGeo createBackgroundTask]) @"taskId": @([bgGeo createBackgroundTask])
}; };
CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:params]; CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:params];
...@@ -141,7 +144,6 @@ ...@@ -141,7 +144,6 @@
[self.commandDelegate runInBackground:^{ [self.commandDelegate runInBackground:^{
[self.commandDelegate sendPluginResult:result callbackId:callbackId]; [self.commandDelegate sendPluginResult:result callbackId:callbackId];
}]; }];
} }
} }
......
...@@ -244,6 +244,7 @@ module.exports = { ...@@ -244,6 +244,7 @@ module.exports = {
'playSound', 'playSound',
[soundId]); [soundId]);
}, },
_setTimestamp: function(rs) { _setTimestamp: function(rs) {
// Transform timestamp to Date instance. // Transform timestamp to Date instance.
if (typeof(rs) === 'object') { if (typeof(rs) === 'object') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment