katzer / cordova-plugin-background-mode

Keep app running in background
Apache License 2.0
1.38k stars 1.02k forks source link

iOS not working - seems to return nothing #450

Open sts-ryan-holton opened 5 years ago

sts-ryan-holton commented 5 years ago

Hi, I'm using Cordova v8.0.0, with iOS 12.2, iPhone X. I'm using Nuxt JS an have Vue Axios set up to perform GET requests every X number of minutes using a setInterval function

I'd like to be able to keep the setInterval function running even when the app isn't open, and even potentially closed as well.

When I initialise this plugin, the code after it seems to just stop working and not do anything, e.g:

created() {
    // other code above this alert
    alert('one')
    cordova.plugins.backgroundMode.enable();
    alert(cordova.plugins.backgroundMode.isActive())
    alert('two')
}

This code will do the first alert, but then anything after enable() just doesn't do anything.

zhangxiongwang commented 5 years ago

Because some of the keynames in ios12.2 are private you need to change two things。 0E63252E-D0EF-4ECA-B0CF-AB1EFAB45179 change function