Xamarin IOS推杀应用程序
推送=>Xamarin IOS推杀应用程序,ios,xamarin,xamarin.forms,xamarin.ios,Ios,Xamarin,Xamarin.forms,Xamarin.ios,推送=> {{ aps = { alert = { "loc-args" = ( ); "loc-key" = "new_chat"; }; "content-available" = 1; id = 3; message = Aaa; sound = default; subject = "new_chat"; type = chat;
{{
aps = {
alert = {
"loc-args" = (
);
"loc-key" = "new_chat";
};
"content-available" = 1;
id = 3;
message = Aaa;
sound = default;
subject = "new_chat";
type = chat;
};
}}
当应用程序被终止并且我收到推送通知时,它会显示文本“new_chat”。如何将其更改为其他文本?假设您的目标是iOS 10+,您可以将Notification Services扩展应用程序(
UnnotificationService extension
)添加到应用程序包中
在将远程通知传递给用户之前修改其内容
在DidReceiveNotificationRequest
覆盖中,从UNNotificationRequest
中提取您的内容,并对其进行修改,然后通过提供的contentHandler返回
理解如何/何时使用扩展所需的阅读: