Closed Mike1707 closed 5 years ago
I've started getting this problem as well (but using the regular WkWebView). I think this is an iOS 12 (or maybe even 12.1) issue, because after upgrading to iOS 12 I get this problem on older versions of my app as well. Don't know of any workaround yet.
Latest version of wkwebview plugin is causing inconsistent behaviour as described above with apps in the background or needing to restart. Especially with cordova-background-geolocation-lt
.
With Version 2.3.1 and iOS 12.1 it's still broken.
@Mike1707 I was asked if you could please provide a repo so that this can be further looked into.
@dylanvdmerwe I started a new Ionic project and added successively some cordova plugins and npm packages I use in my main project. I used the tabs template and modified it to use a custom component, a backendService provider and ionic lazy loading as I do it in my main project. I'm not sure if this needs to be done necessarily.
I was able to reproduce the bug using the @auth0/angular-jwt@1.2.0 package. I used the configuration for Ionic 2+. Therefore, I use also the @ionic/storage which can be a starting point for further looks into as well. When I delete this plugin and configurations related to this plugin it works again.
I pushed the code to this public repo: https://github.com/Mike1707/webviewdemo
I do the following to reproduce the bug:
Unfortunately, I have no idea how to dig deeper into this issue from this point. Therefore, I would appreciate your help!
Thanks in advance!
At first glance, after upgrading to 3.0.0 the issue seems to be fixed. I will run more tests and report.
I can confirm that this issue is not resolved after upgrading to 3.1.2.
@giladrom for me it‘s resolved after upgrading to >3.0.0. I use 3.1.2 as well.
Did you try <preference name="WKSuspendInBackground" value="false" />
?
@Mike1707 yeah, I tried it last night. No change.
I seem to have the same issue with WKWebView in iOS 12+, I’m working on Apple Wallet feature and using cordova-apple-wallet plugin. It works fine in iOS 11 tho.
People is starting to mix different issues here.
The original issue was when using <preference name="WKSuspendInBackground" value="false" />
. That preference is gone on 2.4.0 and 4.0.0, so going to close the issue.
Hey Guys,
after upgrading vom UiWebView to WkWebView 2.2.x I noticed the following on my iOS device.
The app starts normally and works fine in foreground. When I lock my screen and immediately unlock it, it works also. After waiting a few minutes for the app to be suspended and opening the app again in foreground, all my backend calls stop working. The problem: I don't get any http errors or something similar. They just stop working and the JavaScript Code will not be executed further.
If I delete
<preference name="WKSuspendInBackground" value="false" />
it works again as expected.I used WkWebView in the past but had to stop using it due to conflicts with background geolocation tracking; but this bug is new. If I downgrade again to UiWebView everything works again.
The following code snipped is interesting:
The getFriendsForDog-Method:
The following logs are posted in the XCode console (I deleted the debug Google Analytics logs):
Ionic Info:
Cordova Plugins:
Config.xml:
If you need further information please feel free to ask. I appreciate any help! Thanks Mike