Notifications work perfectly when the app is in the background. When it is in the foreground it crashes the main thread. I am using the WKwebview plugin. Also note that in a desktop browser, I can call the jsCallBack function without any issues. The below snippet is from PushPlugin.m
Any suggestions?
[jsonStr appendString:@"}"];
NSString *jsCallBack = [NSString stringWithFormat:@"%@(%@);", self.callback, jsonStr];
NSLog(@"CALLBACK %@", jsCallBack); //added just to see what it had for the callback
//the line below seems to be the offending line
[self.webView performSelectorOnMainThread:@selector(evaluateJavaScript:completionHandler:) withObject:jsCallBack waitUntilDone:NO];
self.notificationMessage = nil;
}
}
Notifications work perfectly when the app is in the background. When it is in the foreground it crashes the main thread. I am using the WKwebview plugin. Also note that in a desktop browser, I can call the jsCallBack function without any issues. The below snippet is from PushPlugin.m
Any suggestions?