Xamarin IOS Push Killed app

前端 未结 1 2020
青春惊慌失措
青春惊慌失措 2021-01-29 07:36

Push =>

{{
aps =     {
    alert =         {
        \"loc-args\" =             (
        );
        \"loc-key\" = \"new_chat\";
    };
    \"content-available\         


        
1条回答
  •  旧巷少年郎
    2021-01-29 08:09

    Assuming you are targeting iOS 10+, you can add a Notification Services extension app (UNNotificationServiceExtension) to your app bundle.

    modifies the content of a remote notification before it is delivered to the user.

    In the DidReceiveNotificationRequest override, extract your content from the UNNotificationRequest and modify it and return it via the contentHandler provided.

    Required reading to understand how/when the extension is used:

    • Modifying Content in Newly Delivered Notifications

    Also:

    Xamarin Docs: iOS Extensions in Xamarin.iOS

    Apple docs: UNNotificationServiceExtension

    0 讨论(0)
提交回复
热议问题