Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS 11 app in foreground crash #7

Open
ftKnox opened this issue Nov 11, 2017 · 0 comments
Open

IOS 11 app in foreground crash #7

ftKnox opened this issue Nov 11, 2017 · 0 comments

Comments

@ftKnox
Copy link

ftKnox commented Nov 11, 2017

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;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant