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

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

parent 5aa72dee
......@@ -129,19 +129,21 @@
if (![self.geofenceListeners count]) {
return;
}
NSLog(@"- onEnterGeofence: %@", notification.userInfo);
CLCircularRegion *region = [notification.userInfo objectForKey:@"geofence"];
for (NSString *callbackId in self.stationaryRegionListeners) {
for (NSString *callbackId in self.geofenceListeners) {
NSDictionary *params = @{
@"identifier": region.identifier,
@"action": [notification.userInfo objectForKey:@"action"],
@"taskId": @([bgGeo createBackgroundTask])
};
CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:params];
[result setKeepCallbackAsBool:YES];
[self.commandDelegate runInBackground:^{
[self.commandDelegate sendPluginResult:result callbackId:callbackId];
}];
}];
}
}
......
......@@ -244,6 +244,7 @@ module.exports = {
'playSound',
[soundId]);
},
_setTimestamp: function(rs) {
// Transform timestamp to Date instance.
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