cordova-plugin-background-mode
cordova-plugin-background-mode copied to clipboard
not working on ios
Hello, i did add this plugin to my cordova game (cordova iOS 5.1.1) cordova plugin add cordova-plugin-background-mode when device is ready i called cordova.plugins.backgroundMode.enable(); // or cordova.plugins.backgroundMode.setEnabled(true); same ... when the game / app go background it stop running any help? thanks
Facing same issue here. cordova.plugins.backgroundMode.moveToForeground(); > not working
@matrixreal can you test my Fork and check if this works for you? https://github.com/HansKrywaa/cordova-plugin-advanced-background-mode
@mknnaren The Function you mention there only works on Android.
Facing same issue.
Checking on: iPhone XR / Ionic app having WKWebview / iOS13.3
Tried with Both Methods to enable background mode and it never gets enabled.
cordova.plugins.backgroundMode.enable();
// AND
cordova.plugins.backgroundMode.setEnabled(true);
cordova.plugins.backgroundMode.isActive(); // => is never returning true, hence not working.
Any workaround to get this working ? Thanks!
In the APPBackgroundMode.m file
[session setCategory: AVAudioSessionCategoryPlayback error: NULL];
change to
[session setCategory: AVAudioSessionCategoryPlayback withOptions: AVAudioSessionCategoryOptionMixWithOthers error: NULL];
Got the same issue. Android is working fine but iOS never returned "true". Btw, I also added the permission to use background mode, background data processing in _info.plist
Same here. So this plugin is abandoned I presume?
I suspect the code is written only for playing audio. Not had worked for me too. Code owners can give more info on this but they seem to be silent from a very long.