-
-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add raw payload and send out a native ApplePushNotification
- Loading branch information
Showing
2 changed files
with
10 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
using System.Collections.Generic; | ||
using Foundation; | ||
|
||
namespace Shiny.Push; | ||
|
||
/// <summary> | ||
/// The "native" data for iOS in a strongly typed package | ||
/// </summary> | ||
/// <param name="Data">A dictionary of the custom payload data</param> | ||
/// <param name="Aps">NULL if received in the background</param> | ||
/// <param name="Notification">The generic notification details - NULL if in the background</param> | ||
public record ApplePushNotification( | ||
IDictionary<string, string> Data, | ||
Aps? Aps, | ||
NSDictionary? RawPayload, | ||
Notification? Notification | ||
) | ||
: PushNotification( | ||
Data, | ||
Notification | ||
); | ||
|
||
public record Aps(IDictionary<string, string> AdditionalPayloadData, int? Badge, ApsAlert? Alert, ApsSound? Sound, bool? ContentAvailable); | ||
public record ApsAlert(string Title, string Body); | ||
public record ApsSound(bool Critical, string Name, double? Volume); | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters