Commit 58391c55 by Sparsh Committed by Sebastián Katzer

iOS 10 - all events fired as other iOS versions

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