Commit 9ad32cf2 by Sparsh

iOS 10 - all events fired as other iOS versions

parent eaa35350
...@@ -736,28 +736,26 @@ ...@@ -736,28 +736,26 @@
}]; }];
} }
if ((IsAtLeastiOSVersion(@"10.0") && [event isEqual: @"click"]) || !IsAtLeastiOSVersion(@"10.0")) { NSString* js;
NSString* js; NSString* params = [NSString stringWithFormat:
NSString* params = [NSString stringWithFormat: @"\"%@\"", self.applicationState];
@"\"%@\"", self.applicationState];
if (notification) { if (notification) {
NSString* args = [notification encodeToJSON]; NSString* args = [notification encodeToJSON];
params = [NSString stringWithFormat: params = [NSString stringWithFormat:
@"%@,'%@'", @"%@,'%@'",
args, self.applicationState]; args, self.applicationState];
} }
js = [NSString stringWithFormat: js = [NSString stringWithFormat:
@"cordova.plugins.notification.local.core.fireEvent('%@', %@)", @"cordova.plugins.notification.local.core.fireEvent('%@', %@)",
event, params]; event, params];
if (deviceready) { if (deviceready) {
[self.commandDelegate evalJs:js]; [self.commandDelegate evalJs:js];
} else { } else {
[self.eventQueue addObject:js]; [self.eventQueue addObject:js];
}
} }
} }
......
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