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

How to detect when app was closed?

Open Taxi4you opened this issue 5 years ago • 1 comments

I got this error in iOS:

UIKitCore`UIApplicationEndBackgroundTaskError:
->  0x7fff4786e252 <+0>:  pushq  %rbp
    0x7fff4786e253 <+1>:  movq   %rsp, %rbp
    0x7fff4786e256 <+4>:  movq   %rdi, %rdx
    0x7fff4786e259 <+7>:  leaq   0x3eed7020(%rip), %rdi    ; @"Can't end BackgroundTask: no background task exists with identifier %lu (0x%lx), or it may have already been ended. Break in UIApplicationEndBackgroundTaskError() to debug."
    0x7fff4786e260 <+14>: movq   %rdx, %rsi
    0x7fff4786e263 <+17>: xorl   %eax, %eax
    0x7fff4786e265 <+19>: callq  0x7fff47de1138            ; symbol stub for: NSLog
    0x7fff4786e26a <+24>: popq   %rbp
    0x7fff4786e26b <+25>: retq   

I think that it caused due to app was closed without calling the cordova.plugins.backgroundMode.disable()

Which event can tell me if app was fully closed - not only moved to background - closed by the user or OS.

Taxi4you avatar Dec 08 '19 20:12 Taxi4you

I am having the same problem, Please need a solution...

Haroon6138 avatar Mar 11 '20 08:03 Haroon6138