-
Notifications
You must be signed in to change notification settings - Fork 1k
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
No working from iOS 12.2 #419
Comments
I'm experiencing this too after testing the application on 12.2 |
Can confirm, having the same problem. |
it looks like it's because the plugin is using a private api which is no longer allowed: ionic-team/cordova-plugin-ionic-webview#293 |
is there a solution to use background mode in iOS 12.2? |
@CodingAnonymous As of right now, no. My team is now actively moving away from Ionic and Cordova because of this issue. We've been meaning to start going fully native for awhile, but this issue cemented our path. |
@BuddyLReno The issue on Ionic’s end has been fixed in latest webview plugin. Also, We don’t maintain this background plugin |
We are experiencing the same problem. We cannot just let our app crash on the new version of the system. Please let us know if this issue can be fixed soon (@katzer ). Or any possible solutions are welcome. |
@mlynch yes but the solution doesn't restore original functionality. Without the background mode working as before, we're unable to save the progress through a users audio. Our app plays 40+ minute podcasts so it's important so save the progress about every ten seconds while the phone is locked. |
Same problem. To fix I went to the plugin in Xcode. I was able to get a build working. Haven't tested beyond that. |
@iowayankee Can the plugin still work properly after your change? |
Can confirm, having the same problem. |
Encountered the same issue.Thanks @iowayankee! Your fix works. However, I still need to check the impact of the fix in background mode... |
Try in file src\ios\APPBackgroundMode.m replace following lines
with
|
This actually worked for me. Basically what you did was changing the base64 encoded string from: |
Wow! works good |
Apply fix from katzer#419 (comment)
@BuddyLReno I submitted a PR to the Ionic Webview repository that should restore the background functionality, is backward compatible and has no issues with app store submissions that I have seen as long as you have valid background capability set and actual valid activity when in background (as it was previously). Give it a try if you like. |
Note that this was a wildly used hack, which stopped working. This is a quick fix, but it's not future proof. See: katzer#419 See: ionic-team/cordova-plugin-ionic-webview#293
Note that this was a wildly used hack, which stopped working. This is a quick fix, but it's not future proof. See: katzer#419 See: ionic-team/cordova-plugin-ionic-webview#293
@ghenry22 can you link your PR? |
link for @ghenry22's PR ionic-team/cordova-plugin-ionic-webview#343 |
Can someone confirm if it worked? |
@gpartida It worked? |
@silvanavlima it passed our QA on testflight, we havent submitted the app for public release but we should be doing this soon. |
@gpartida but the background mode is working as before? or lost functionality? |
For my use case it works as before. I think this fix is about using the new name for an API which is still private not tapping into a more legit way to handle background functionality, so this is still bad and could easily just disappear one day, but it fixes my app from being completely broken today. |
@BuddyLReno the background mode plugin does not work? my audios stop when it's in the background. Is it the same with you? |
+1 |
1 similar comment
+1 |
Fixes the hack for the private setting alwaysRunsAtForegroundPriority see: katzer#419 see: ionic-team/cordova-plugin-ionic-webview#293
I did what seems to be quickest way to get it working. It just doesn't make sense that it also works on iOS 11.4. I tested in a simulator. Does anyone know why it works in earlier versions of iOS? |
Has anyone got a fix for this not working on iOS 12? |
So maybe you have suggestion how we can make app runs backgroud |
thank @iowayankee , your save my time. |
@iowayankee sir tried but got same error again ? |
None of the solutions worked for me. |
@mlynch I understand that nobody is maintaining this plugin anymore, but I've tried with both From your message above, I'm assuming the latest version of edit: alrighty, got it working with the latest of both the I'm happy, my boss is happy, and life is good again. (: |
hi team |
@ZaLiTHkA Have you actually tested the background activity? this fix fixes the app crash, but all http requests that are triggered by location change (which is working properly) when the app is in the background fail:
I have tried updating Any leads? |
@edento, if you have a look at the edit to my previous message, you might notice I've actually switched to a fork of a fork of this project.. this is just one of the unfortunate side-effects of dealing with Cordova plugins in general, most of them tend to either get ignored for long periods of time or abandoned completely, so when one dev with good intentions forks the project to fix something, their PR never gets back to the original. and so this one has (currently) 752 forks. O.o that said, I'm not sure about handling things like HTTP calls while the app is in the background. in our case, we have a socket connection with observables that give me data when the data source updates, so it's not an action I need to explicitly call. I do know that the webview engine does limit the frequency of function calls made in background mode, but I'm not sure if it affects them in any other ways. if you're trying to explicitly fetch data from a remote source while your app is in the background, perhaps you might benefit from moving that "fetch" logic into a service worker? haven't played with them much myself, but as I understand these are specifically designed to operate "in the background" behind the main app thread, so they aren't restricted by the same means. beyond that, I'm not really sure what else to suggest. |
@ZaLiTHkA You're right, I missed the fork link. Anyway I tested it and unfortunately its not working for my case. I want to make a post request with the new user location to do some server calculation, but the request never makes it to the server =\ Thank you for the response anyway :) |
@ZaLiTHkA well, eventually changing the HTTP package resolved this issue. Changed angulars package |
I don't think it relates to this issue specifically, that's just the module Eden was trying to use while their app was in background mode..
nope, not by changing the webview plugin (doing that made no difference), I "fixed" mine by changing to this fork of the background mode plugin. note: I see there was actually an update to this project recently, so have you tried using version |
@ZaLiTHkA : ok sir I tried above mentioned fork and tell me one more thing sir why its not working in IOS 10 version also. |
@iowayankee and @sergey-mohov : sir i tried ur solution but not worked for me? |
try solution katzer#419
After updating to iOS 12.2 the application ends just run. If I delete the plugin it works correctly
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key _alwaysRunsAtForegroundPriority.'
The text was updated successfully, but these errors were encountered: