From 99c07a56098ef407624db5eb129d71b762ea2fa0 Mon Sep 17 00:00:00 2001 From: ByungChul Kim Date: Fri, 22 Aug 2025 11:55:57 +0700 Subject: [PATCH] add getFullPayload --- index.d.ts | 5 +++++ js/index.js | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/index.d.ts b/index.d.ts index 67427049..3a6cf429 100644 --- a/index.d.ts +++ b/index.d.ts @@ -127,6 +127,11 @@ export interface PushNotification { */ getUserText(): string | undefined; + /** + * Gets the complete notification payload including aps and all custom fields + */ + getFullPayload(): Record; + /** * iOS Only * Signifies remote notification handling is complete diff --git a/js/index.js b/js/index.js index b2cd9502..ad786aff 100644 --- a/js/index.js +++ b/js/index.js @@ -464,6 +464,7 @@ class PushNotificationIOS { */ constructor(nativeNotif: Object) { this._data = {}; + this._fullPayload = nativeNotif; // Store the complete payload this._remoteNotificationCompleteCallbackCalled = false; this._isRemote = nativeNotif.remote; if (this._isRemote) { @@ -643,6 +644,13 @@ class PushNotificationIOS { getUserText(): ?string { return this._userText; } + + /** + * Gets the complete notification payload including aps and all custom fields + */ + getFullPayload(): ?Object { + return this._fullPayload; + } } export default PushNotificationIOS;