I try to do some handling when the remote notification is received.
I sent the following notification to my device:
{
aps = {
alert = {
body = Test1234;
title = 4556;
};
badge = 1;
“mutable-content” = 1;
sound = default;
};
buttonlist = (
);
image = “”;
nid = 1;
}
I want to parse the data – userInfo of – (void)application: didReceiveRemoteNotification: userInfo fetchCompletionHandler: to do something.
But I always get the content of userInfo as following:
{
aps = {
alert = {
};
“content-available” = 1;
};
}
BTW, the background mode of remote notification is not enabled.
Does anyone has any idea?
Get the expected data of userInfo like this:
{
aps = {
alert = {
body = Test1234;
title = 4556;
};
badge = 1;
“mutable-content” = 1;
sound = default;
};
buttonlist = (
);
image = “”;
nid = 1;
}
Lucas Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.