Files
orca/mobile/patches/expo-notifications@55.0.27.patch
T
Jinwoo Hong 341b13cf67 Restore mobile push and fix cold-start dismissals (#20068)
* Restore mobile push for delivery validation

* fix(mobile): register push task before headless startup

* Add authenticated mobile push test and fix iOS release entitlements

* Mock push-test transport in notification consent tests

* Fix slept workspace test for structured remount result

* Fix mobile notification review findings

* Pad Android notification icon to prevent square cropping

* fix(mobile): present visible Android data pushes in foreground

* test: use deterministic clock for teardown deadline

* fix(mobile): present foreground pushes through Expo public APIs

* fix(mobile): check push eligibility before foreground scheduling

* fix(mobile): register push from shared host connection lifecycle
2026-09-12 01:03:57 -04:00

37 lines
1.6 KiB
Diff

diff --git a/build/getDevicePushTokenAsync.js b/build/getDevicePushTokenAsync.js
index f0875c5eaa84d45d646edd1ad5f21a962f68ab02..d93813b2636f1ac5e09081c3207407410a404698 100644
--- a/build/getDevicePushTokenAsync.js
+++ b/build/getDevicePushTokenAsync.js
@@ -20,8 +20,11 @@ export async function getDevicePushTokenAsync() {
else {
// Create a new Promise and clear it afterwards
nativeTokenPromise = PushTokenManager.getDevicePushTokenAsync();
- devicePushToken = await nativeTokenPromise;
- nativeTokenPromise = null;
+ try {
+ devicePushToken = await nativeTokenPromise;
+ } finally {
+ nativeTokenPromise = null;
+ }
}
// @ts-ignore: TS thinks Platform.OS could be anything and can't decide what type is it
return { type: Platform.OS, data: devicePushToken };
diff --git a/src/getDevicePushTokenAsync.ts b/src/getDevicePushTokenAsync.ts
index ab518dff463bc1a92052329ce5ac7c9055cbcf62..ad164f162998b5c1e218f089be82ab474727d68e 100644
--- a/src/getDevicePushTokenAsync.ts
+++ b/src/getDevicePushTokenAsync.ts
@@ -24,8 +24,11 @@ export async function getDevicePushTokenAsync(): Promise<DevicePushToken> {
} else {
// Create a new Promise and clear it afterwards
nativeTokenPromise = PushTokenManager.getDevicePushTokenAsync();
- devicePushToken = await nativeTokenPromise;
- nativeTokenPromise = null;
+ try {
+ devicePushToken = await nativeTokenPromise;
+ } finally {
+ nativeTokenPromise = null;
+ }
}
// @ts-ignore: TS thinks Platform.OS could be anything and can't decide what type is it