Skip to content

cordova-plugin-background-mode thread 1: signal SIGABRT ios #381

Open
@abdelhamidTsouli

Description

@abdelhamidTsouli

hello guys
i need your help for resolve my solution
when i add cordova-plugin-background-mode
(ionic cordova add cordova-plugin-background-mode )
(npm install --save @ionic-native/background-mode)
and i run ios
my app stop running and he take me error
int retval = uiapplicationMain(argc,argv,nil,@"AppDelegate"); Thread 1 : signal SIGABRT

and when i remove ionic cordova add cordova-plugin-background-mode
(ionic cordova rm cordova-plugin-background-mode)

my app run normal and when i run app in backgroung he take me alert ("cordova not install")

please help me

Activity

ghost

ghost commented on Jun 26, 2018

@ghost

@abdelhamidTsouli did you find any solution for this issue?
Even I am facing the same issue in my app.

adan92

adan92 commented on Jul 3, 2018

@adan92

Has someone found the solution? I have the same issue.

Mathias-seemyapps

Mathias-seemyapps commented on Aug 22, 2018

@Mathias-seemyapps

Anyone please? Just installing the base plugin, like the original post explain, cause the issue. It works just fine in android but in ios there is no error, the debugger stop at "int retval = uiapplicationMain(argc,argv,nil,@"AppDelegate"); Thread 1 : signal SIGABRT" and there is nothing we can do.

DanielDimanov

DanielDimanov commented on Sep 1, 2018

@DanielDimanov

Please tell us if you found a solution!

clearblood

clearblood commented on Sep 4, 2018

@clearblood

Alright guys, this is what you need to do. Open up xcode (Or your editor of choice), and search for
"_requiresUserActionForMediaPlayback" (No quotes)

Replace that string with "requiresUserActionForMediaPlayback"

This is an issue that was fixed on the latest git repo, but for some reason has not made itself to npm.

DanielDimanov

DanielDimanov commented on Sep 5, 2018

@DanielDimanov

You can also pull it directly from the repo, but for some reason I still can’t play my media on background. It plays, but it lags and kind of loops every 2 seconds and then continues.

luatvudinh

luatvudinh commented on Apr 11, 2019

@luatvudinh

Alright guys, this is what you need to do. Open up xcode (Or your editor of choice), and search for
"_requiresUserActionForMediaPlayback" (No quotes)

Replace that string with "requiresUserActionForMediaPlayback"

This is an issue that was fixed on the latest git repo, but for some reason has not made itself to npm.

This worked for ios under 12.
It comes back again when I tried to install on IOS 12.2. Please give me a solution. Thanks.

Yask00

Yask00 commented on Apr 15, 2019

@Yask00

+1 for the crash on 12.2 from the example of @luatvudinh
Also i think it caused some damage on latest android version, but this is not confirmed

rodrigoti

rodrigoti commented on Apr 30, 2019

@rodrigoti

Alright guys, this is what you need to do. Open up xcode (Or your editor of choice), and search for
"_requiresUserActionForMediaPlayback" (No quotes)
Replace that string with "requiresUserActionForMediaPlayback"
This is an issue that was fixed on the latest git repo, but for some reason has not made itself to npm.

This worked for ios under 12.
It comes back again when I tried to install on IOS 12.2. Please give me a solution. Thanks.

I'm also having the same problem

tahminabs23

tahminabs23 commented on May 16, 2019

@tahminabs23

I am also having the same problem in iOS 12.2

rodrigoti

rodrigoti commented on May 16, 2019

@rodrigoti

I am also having the same problem in iOS 12.2

Try in file src\ios\APPBackgroundMode.m replace following lines

  • (NSString*) wkProperty
    {
    NSString* str = @"X2Fsd2F5c1J1bnNBdEZvcmVncm91bmRQcmlvcml0eQ==";
    NSData* data = [[NSData alloc] initWithBase64EncodedString:str options:0];

    return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    }
    with

  • (NSString*) wkProperty
    {
    NSString* str = @"YWx3YXlzUnVuc0F0Rm9yZWdyb3VuZFByaW9yaXR5";
    NSData* data = [[NSData alloc] initWithBase64EncodedString:str options:0];

    return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    }

remove and add the platform again

tahminabs23

tahminabs23 commented on May 17, 2019

@tahminabs23

@rodrigoti Thanks, it works!

kapilSoni101

kapilSoni101 commented on May 28, 2019

@kapilSoni101

@rodrigoti not working for me sir..

rodrigoti

rodrigoti commented on May 28, 2019

@rodrigoti

@rodrigoti não está funcionando para mim senhor ..

try to change directly in the file inside the ios platform:

platforms/ios/project/Plugins/cordova-plugin-background-mode/APPBackgroundMode.m

(NSString*) wkProperty
{
NSString* str = @"X2Fsd2F5c1J1bnNBdEZvcmVncm91bmRQcmlvcml0eQ==";
NSData* data = [[NSData alloc] initWithBase64EncodedString:str options:0];

return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}
with

(NSString*) wkProperty
{
NSString* str = @"YWx3YXlzUnVuc0F0Rm9yZWdyb3VuZFByaW9yaXR5";
NSData* data = [[NSData alloc] initWithBase64EncodedString:str options:0];

return [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
}

remember that requiresUserActionForMediaPlayback must be without (_)
_requiresUserActionForMediaPlayback, if downloaded by github, should already be correct UserActionForMediaPlayback ...

Sorry for my english, I'm not native, I'm from Brazil.

dhayaljaswantgit

dhayaljaswantgit commented on Jul 4, 2019

@dhayaljaswantgit

use following commands to fix that issue :

ionic cordova plugin rm cordova-plugin-background-mode
ionic cordova plugin add https://github.com/iowayankee/cordova-plugin-background-mode.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @dhayaljaswantgit@rodrigoti@tahminabs23@adan92@DanielDimanov

        Issue actions

          cordova-plugin-background-mode thread 1: signal SIGABRT ios · Issue #381 · katzer/cordova-plugin-background-mode