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

Fix for app crashes when receiving notification on Cordova IOS 4 #84

Open
deedw opened this issue Sep 28, 2016 · 1 comment
Open

Fix for app crashes when receiving notification on Cordova IOS 4 #84

deedw opened this issue Sep 28, 2016 · 1 comment

Comments

@deedw
Copy link

deedw commented Sep 28, 2016

After updating to Xcode 8, Cordova to 6 and IOS platform to 4, the plugin causes application crashes whenever any IOS push notifications arrive.

I have got the plugin working by adjusting line 433 (from master branch) of the function notificationReceived in PushPlugin.m.

I replaced the line

[self.webView performSelectorOnMainThread:@selector(evaluateJavaScript:completionHandler:) withObject:jsCallBack waitUntilDone:NO];

with

[self.commandDelegate evalJs:jsCallBack];

The application now appears to be working fine, but are there any other side-effects of my change?

@brandon-objectstudio
Copy link

You're a hero! This fixed my issue as well.

I have numerous apps that this was impacting - though others that seem to be working fine without this fix. It seems though that this plugin has been left to die - this is a SEV 1 type bug with no fix in over a year. Though I have only recently noticed this (likely due to the need to update Cordova versions as iOS11 approached).

I also would like to understand if there is any impact to your fix as it seems to do the job.

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

2 participants