cordova-plugin-background-mode icon indicating copy to clipboard operation
cordova-plugin-background-mode copied to clipboard

not working on ios

Open matrixreal opened this issue 4 years ago • 7 comments

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

matrixreal avatar Feb 26 '20 20:02 matrixreal

Facing same issue here. cordova.plugins.backgroundMode.moveToForeground(); > not working

mknnaren avatar Mar 09 '20 14:03 mknnaren

@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.

EinfachHans avatar Mar 13 '20 13:03 EinfachHans

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!

Anuj-logiciel avatar Apr 14 '20 14:04 Anuj-logiciel

In the APPBackgroundMode.m file

[session setCategory: AVAudioSessionCategoryPlayback error: NULL];

change to

[session setCategory: AVAudioSessionCategoryPlayback withOptions: AVAudioSessionCategoryOptionMixWithOthers error: NULL];

rodrigoti avatar May 13 '20 23:05 rodrigoti

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

azn1viet avatar Jun 22 '20 14:06 azn1viet

Same here. So this plugin is abandoned I presume?

louisameline avatar Jan 26 '21 12:01 louisameline

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.

Anuj-logiciel avatar Jan 26 '21 12:01 Anuj-logiciel