expo-notifications 57.0.9 → 57.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/android/build.gradle +2 -2
- package/build/utils/updateDevicePushTokenAsync.d.ts.map +1 -1
- package/build/utils/updateDevicePushTokenAsync.js +4 -10
- package/build/utils/updateDevicePushTokenAsync.js.map +1 -1
- package/expo-module.config.json +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.module → 57.0.11/expo.modules.notifications-57.0.11.module} +7 -7
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.module.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.module.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.module.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.module.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.pom → 57.0.11/expo.modules.notifications-57.0.11.pom} +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.pom.md5 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.pom.sha1 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.pom.sha256 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.11/expo.modules.notifications-57.0.11.pom.sha512 +1 -0
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml +4 -4
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512 +1 -1
- package/package.json +5 -5
- package/src/utils/updateDevicePushTokenAsync.ts +4 -10
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.module.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.module.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.module.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.module.sha512 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.pom.md5 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.pom.sha1 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.pom.sha256 +0 -1
- package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.9/expo.modules.notifications-57.0.9.pom.sha512 +0 -1
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9-sources.jar → 57.0.11/expo.modules.notifications-57.0.11-sources.jar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9-sources.jar.md5 → 57.0.11/expo.modules.notifications-57.0.11-sources.jar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9-sources.jar.sha1 → 57.0.11/expo.modules.notifications-57.0.11-sources.jar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9-sources.jar.sha256 → 57.0.11/expo.modules.notifications-57.0.11-sources.jar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9-sources.jar.sha512 → 57.0.11/expo.modules.notifications-57.0.11-sources.jar.sha512} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.aar → 57.0.11/expo.modules.notifications-57.0.11.aar} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.aar.md5 → 57.0.11/expo.modules.notifications-57.0.11.aar.md5} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.aar.sha1 → 57.0.11/expo.modules.notifications-57.0.11.aar.sha1} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.aar.sha256 → 57.0.11/expo.modules.notifications-57.0.11.aar.sha256} +0 -0
- /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.9/expo.modules.notifications-57.0.9.aar.sha512 → 57.0.11/expo.modules.notifications-57.0.11.aar.sha512} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,10 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 57.0.11 — 2026-08-14
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 57.0.10 — 2026-08-10
|
|
18
|
+
|
|
19
|
+
_This version does not introduce any user-facing changes._
|
|
20
|
+
|
|
13
21
|
## 57.0.9 — 2026-08-06
|
|
14
22
|
|
|
15
23
|
### 🐛 Bug fixes
|
|
16
24
|
|
|
25
|
+
- [iOS] Avoid warning when an aborted push token registration request rejects with a native fetch cancellation error. ([#48547](https://github.com/expo/expo/pull/48547) by [@JoaoPauloCMarra](https://github.com/JoaoPauloCMarra))
|
|
17
26
|
- [Android] Prevent a crash on notification tap when `getLaunchIntentForPackage` throws on some OEM ROMs. ([#47889](https://github.com/expo/expo/pull/47889) by [@nunocaseiro](https://github.com/nunocaseiro))
|
|
18
27
|
- [web] Fixed crash when browser storage is blocked (e.g. Safari's "Block All Cookies"), where reading `localStorage` throws a `SecurityError` instead of returning `null`. ([#48033](https://github.com/expo/expo/pull/48033) by [@Ignigena](https://github.com/Ignigena))
|
|
19
28
|
|
package/android/build.gradle
CHANGED
|
@@ -5,13 +5,13 @@ plugins {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
group = 'host.exp.exponent'
|
|
8
|
-
version = '57.0.
|
|
8
|
+
version = '57.0.11'
|
|
9
9
|
|
|
10
10
|
android {
|
|
11
11
|
namespace "expo.modules.notifications"
|
|
12
12
|
defaultConfig {
|
|
13
13
|
versionCode 21
|
|
14
|
-
versionName '57.0.
|
|
14
|
+
versionName '57.0.11'
|
|
15
15
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
16
16
|
consumerProguardFiles 'proguard-rules.pro'
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateDevicePushTokenAsync.d.ts","sourceRoot":"","sources":["../../src/utils/updateDevicePushTokenAsync.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAmDvD;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAuBzF;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"updateDevicePushTokenAsync.d.ts","sourceRoot":"","sources":["../../src/utils/updateDevicePushTokenAsync.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAmDvD;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAuBzF;AAED,wBAAsB,0BAA0B,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,iBA+F3F"}
|
|
@@ -103,16 +103,10 @@ export async function updateDevicePushTokenAsync(signal, token) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
catch (error) {
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
// - which creates exceptions like
|
|
111
|
-
// https://github.com/github/fetch/blob/75d9455d380f365701151f3ac85c5bda4bbbde76/fetch.js#L490-L494
|
|
112
|
-
if (typeof error === 'object' && error?.name === 'AbortError') {
|
|
113
|
-
// We don't consider AbortError a failure, it's a sign somewhere else the
|
|
114
|
-
// request is expected to succeed and we don't need this one, so let's
|
|
115
|
-
// just return.
|
|
106
|
+
// Depending on the fetch implementation, an aborted request may reject
|
|
107
|
+
// with `AbortError` or a native cancellation error.
|
|
108
|
+
if (signal.aborted || (typeof error === 'object' && error?.name === 'AbortError')) {
|
|
109
|
+
// An aborted request is not a failure, so don't log or retry it.
|
|
116
110
|
return;
|
|
117
111
|
}
|
|
118
112
|
console.warn('[expo-notifications] Error thrown while updating the device push token with the server:', error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateDevicePushTokenAsync.js","sourceRoot":"","sources":["../../src/utils/updateDevicePushTokenAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAGnE,MAAM,wBAAwB,GAAG,mDAAmD,CAA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AAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC;QACf,gFAAgF;QAChF;YACE,OAAO,eAAe,CAAC,IAAI,CAAC;IAChC,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,KAAK,UAAU,uCAAuC;IACpD,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,8BAA8B,GAClC,MAAM,WAAW,CAAC,6CAA6C,EAAE,CAAC;YACpE,IAAI,8BAA8B,KAAK,aAAa,EAAE,CAAC;gBACrD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,2DAA2D;QAC7D,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import * as Application from 'expo-application';\nimport { CodedError, Platform, UnavailabilityError } from 'expo-modules-core';\n\nimport { computeNextBackoffInterval } from './backoff';\nimport ServerRegistrationModule from '../ServerRegistrationModule';\nimport type { DevicePushToken } from '../Tokens.types';\n\nconst updateDevicePushTokenUrl = 'https://exp.host/--/api/v2/push/updateDeviceToken';\n\nconst LAST_TOKEN_KEY = 'lastRegisteredDeviceToken';\n\ntype StoredTokenData = {\n deviceToken: string;\n appId: string | null;\n development: boolean;\n type: string;\n registeredAt: number;\n};\n\n// Force re-registration after 7 days even if nothing changed, in case the\n// server lost the device record (cleanup, migration, etc.).\nconst REGISTRATION_TTL_MS = 7 * 24 * 60 * 60 * 1000;\n\nasync function getLastRegisteredTokenDataAsync(): Promise<StoredTokenData | null> {\n try {\n if (!ServerRegistrationModule.getRegistrationInfoAsync) {\n return null;\n }\n const info = await ServerRegistrationModule.getRegistrationInfoAsync();\n if (!info) {\n return null;\n }\n const parsed = JSON.parse(info);\n return parsed?.[LAST_TOKEN_KEY] ?? null;\n } catch {\n return null;\n }\n}\n\nasync function setLastRegisteredTokenDataAsync(tokenData: StoredTokenData): Promise<void> {\n try {\n if (\n !ServerRegistrationModule.getRegistrationInfoAsync ||\n !ServerRegistrationModule.setRegistrationInfoAsync\n ) {\n return;\n }\n const info = await ServerRegistrationModule.getRegistrationInfoAsync();\n const existing = info ? JSON.parse(info) : {};\n existing[LAST_TOKEN_KEY] = tokenData;\n await ServerRegistrationModule.setRegistrationInfoAsync(JSON.stringify(existing));\n } catch {\n // Best-effort — next app open will re-register\n }\n}\n\n/**\n * Returns `true` if the device token or metadata has changed since the last\n * successful registration, or if the check cannot be performed (fail-open).\n */\nexport async function hasDeviceTokenChangedAsync(token: DevicePushToken): Promise<boolean> {\n try {\n const development = await shouldUseDevelopmentNotificationService();\n const lastTokenData = await getLastRegisteredTokenDataAsync();\n\n if (lastTokenData == null) {\n return true;\n }\n\n const age = Date.now() - (lastTokenData.registeredAt ?? 0);\n if (age < 0 || age >= REGISTRATION_TTL_MS) {\n return true;\n }\n\n return (\n token.data !== lastTokenData.deviceToken ||\n Application.applicationId !== lastTokenData.appId ||\n development !== lastTokenData.development ||\n getTypeOfToken(token) !== lastTokenData.type\n );\n } catch {\n return true;\n }\n}\n\nexport async function updateDevicePushTokenAsync(signal: AbortSignal, token: DevicePushToken) {\n const doUpdateDevicePushTokenAsync = async (retry: () => void) => {\n const [development, deviceId] = await Promise.all([\n shouldUseDevelopmentNotificationService(),\n getDeviceIdAsync(),\n ]);\n const body = {\n deviceId: deviceId.toLowerCase(),\n development,\n deviceToken: token.data,\n appId: Application.applicationId,\n type: getTypeOfToken(token),\n };\n\n try {\n const response = await fetch(updateDevicePushTokenUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\n body: JSON.stringify(body),\n signal,\n });\n\n // Help debug erroring servers\n if (!response.ok) {\n console.debug(\n '[expo-notifications] Error encountered while updating the device push token with the server:',\n await response.text()\n );\n }\n\n if (response.ok) {\n await setLastRegisteredTokenDataAsync({\n deviceToken: token.data,\n appId: Application.applicationId,\n development,\n type: getTypeOfToken(token),\n registeredAt: Date.now(),\n });\n }\n\n // Retry if request failed\n if (!response.ok) {\n retry();\n }\n } catch (error: any) {\n // Error returned if the request is aborted should be an 'AbortError'. In\n // React Native fetch is polyfilled using `whatwg-fetch` which:\n // - creates `AbortError`s like this\n // https://github.com/github/fetch/blob/75d9455d380f365701151f3ac85c5bda4bbbde76/fetch.js#L505\n // - which creates exceptions like\n // https://github.com/github/fetch/blob/75d9455d380f365701151f3ac85c5bda4bbbde76/fetch.js#L490-L494\n if (typeof error === 'object' && error?.name === 'AbortError') {\n // We don't consider AbortError a failure, it's a sign somewhere else the\n // request is expected to succeed and we don't need this one, so let's\n // just return.\n return;\n }\n\n console.warn(\n '[expo-notifications] Error thrown while updating the device push token with the server:',\n error\n );\n\n retry();\n }\n };\n\n let shouldTry = true;\n const retry = () => {\n shouldTry = true;\n };\n\n let retriesCount = 0;\n const initialBackoff = 500; // 0.5 s\n const backoffOptions = {\n maxBackoff: 2 * 60 * 1000, // 2 minutes\n };\n let nextBackoffInterval = computeNextBackoffInterval(\n initialBackoff,\n retriesCount,\n backoffOptions\n );\n\n while (shouldTry && !signal.aborted) {\n // Will be set to true by `retry` if it's called\n shouldTry = false;\n await doUpdateDevicePushTokenAsync(retry);\n\n // Do not wait if we won't retry\n if (shouldTry && !signal.aborted) {\n nextBackoffInterval = computeNextBackoffInterval(\n initialBackoff,\n retriesCount,\n backoffOptions\n );\n retriesCount += 1;\n await new Promise((resolve) => setTimeout(resolve, nextBackoffInterval));\n }\n }\n}\n\n// Same as in getExpoPushTokenAsync\nasync function getDeviceIdAsync() {\n try {\n if (!ServerRegistrationModule.getInstallationIdAsync) {\n throw new UnavailabilityError('ExpoServerRegistrationModule', 'getInstallationIdAsync');\n }\n\n return await ServerRegistrationModule.getInstallationIdAsync();\n } catch (e) {\n throw new CodedError(\n 'ERR_NOTIFICATIONS_DEVICE_ID',\n `Could not fetch the installation ID of the application: ${e}.`\n );\n }\n}\n\n// Same as in getExpoPushTokenAsync\nfunction getTypeOfToken(devicePushToken: DevicePushToken) {\n switch (devicePushToken.type) {\n case 'ios':\n return 'apns';\n case 'android':\n return 'fcm';\n // This probably will error on server, but let's make this function future-safe.\n default:\n return devicePushToken.type;\n }\n}\n\n// Same as in getExpoPushTokenAsync\nasync function shouldUseDevelopmentNotificationService() {\n if (Platform.OS === 'ios') {\n try {\n const notificationServiceEnvironment =\n await Application.getIosPushNotificationServiceEnvironmentAsync();\n if (notificationServiceEnvironment === 'development') {\n return true;\n }\n } catch {\n // We can't do anything here, we'll fallback to false then.\n }\n }\n\n return false;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"updateDevicePushTokenAsync.js","sourceRoot":"","sources":["../../src/utils/updateDevicePushTokenAsync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AAGnE,MAAM,wBAAwB,GAAG,mDAAmD,CAAC;AAErF,MAAM,cAAc,GAAG,2BAA2B,CAAC;AAUnD,0EAA0E;AAC1E,4DAA4D;AAC5D,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEpD,KAAK,UAAU,+BAA+B;IAC5C,IAAI,CAAC;QACH,IAAI,CAAC,wBAAwB,CAAC,wBAAwB,EAAE,CAAC;YACvD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,wBAAwB,CAAC,wBAAwB,EAAE,CAAC;QACvE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,MAAM,EAAE,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC;IAC1C,CAA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AC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,KAAK,UAAU,gBAAgB;IAC7B,IAAI,CAAC;QACH,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,EAAE,CAAC;YACrD,MAAM,IAAI,mBAAmB,CAAC,8BAA8B,EAAE,wBAAwB,CAAC,CAAC;QAC1F,CAAC;QAED,OAAO,MAAM,wBAAwB,CAAC,sBAAsB,EAAE,CAAC;IACjE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,UAAU,CAClB,6BAA6B,EAC7B,2DAA2D,CAAC,GAAG,CAChE,CAAC;IACJ,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,SAAS,cAAc,CAAC,eAAgC;IACtD,QAAQ,eAAe,CAAC,IAAI,EAAE,CAAC;QAC7B,KAAK,KAAK;YACR,OAAO,MAAM,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC;QACf,gFAAgF;QAChF;YACE,OAAO,eAAe,CAAC,IAAI,CAAC;IAChC,CAAC;AACH,CAAC;AAED,mCAAmC;AACnC,KAAK,UAAU,uCAAuC;IACpD,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,IAAI,CAAC;YACH,MAAM,8BAA8B,GAClC,MAAM,WAAW,CAAC,6CAA6C,EAAE,CAAC;YACpE,IAAI,8BAA8B,KAAK,aAAa,EAAE,CAAC;gBACrD,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,2DAA2D;QAC7D,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import * as Application from 'expo-application';\nimport { CodedError, Platform, UnavailabilityError } from 'expo-modules-core';\n\nimport { computeNextBackoffInterval } from './backoff';\nimport ServerRegistrationModule from '../ServerRegistrationModule';\nimport type { DevicePushToken } from '../Tokens.types';\n\nconst updateDevicePushTokenUrl = 'https://exp.host/--/api/v2/push/updateDeviceToken';\n\nconst LAST_TOKEN_KEY = 'lastRegisteredDeviceToken';\n\ntype StoredTokenData = {\n deviceToken: string;\n appId: string | null;\n development: boolean;\n type: string;\n registeredAt: number;\n};\n\n// Force re-registration after 7 days even if nothing changed, in case the\n// server lost the device record (cleanup, migration, etc.).\nconst REGISTRATION_TTL_MS = 7 * 24 * 60 * 60 * 1000;\n\nasync function getLastRegisteredTokenDataAsync(): Promise<StoredTokenData | null> {\n try {\n if (!ServerRegistrationModule.getRegistrationInfoAsync) {\n return null;\n }\n const info = await ServerRegistrationModule.getRegistrationInfoAsync();\n if (!info) {\n return null;\n }\n const parsed = JSON.parse(info);\n return parsed?.[LAST_TOKEN_KEY] ?? null;\n } catch {\n return null;\n }\n}\n\nasync function setLastRegisteredTokenDataAsync(tokenData: StoredTokenData): Promise<void> {\n try {\n if (\n !ServerRegistrationModule.getRegistrationInfoAsync ||\n !ServerRegistrationModule.setRegistrationInfoAsync\n ) {\n return;\n }\n const info = await ServerRegistrationModule.getRegistrationInfoAsync();\n const existing = info ? JSON.parse(info) : {};\n existing[LAST_TOKEN_KEY] = tokenData;\n await ServerRegistrationModule.setRegistrationInfoAsync(JSON.stringify(existing));\n } catch {\n // Best-effort — next app open will re-register\n }\n}\n\n/**\n * Returns `true` if the device token or metadata has changed since the last\n * successful registration, or if the check cannot be performed (fail-open).\n */\nexport async function hasDeviceTokenChangedAsync(token: DevicePushToken): Promise<boolean> {\n try {\n const development = await shouldUseDevelopmentNotificationService();\n const lastTokenData = await getLastRegisteredTokenDataAsync();\n\n if (lastTokenData == null) {\n return true;\n }\n\n const age = Date.now() - (lastTokenData.registeredAt ?? 0);\n if (age < 0 || age >= REGISTRATION_TTL_MS) {\n return true;\n }\n\n return (\n token.data !== lastTokenData.deviceToken ||\n Application.applicationId !== lastTokenData.appId ||\n development !== lastTokenData.development ||\n getTypeOfToken(token) !== lastTokenData.type\n );\n } catch {\n return true;\n }\n}\n\nexport async function updateDevicePushTokenAsync(signal: AbortSignal, token: DevicePushToken) {\n const doUpdateDevicePushTokenAsync = async (retry: () => void) => {\n const [development, deviceId] = await Promise.all([\n shouldUseDevelopmentNotificationService(),\n getDeviceIdAsync(),\n ]);\n const body = {\n deviceId: deviceId.toLowerCase(),\n development,\n deviceToken: token.data,\n appId: Application.applicationId,\n type: getTypeOfToken(token),\n };\n\n try {\n const response = await fetch(updateDevicePushTokenUrl, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\n body: JSON.stringify(body),\n signal,\n });\n\n // Help debug erroring servers\n if (!response.ok) {\n console.debug(\n '[expo-notifications] Error encountered while updating the device push token with the server:',\n await response.text()\n );\n }\n\n if (response.ok) {\n await setLastRegisteredTokenDataAsync({\n deviceToken: token.data,\n appId: Application.applicationId,\n development,\n type: getTypeOfToken(token),\n registeredAt: Date.now(),\n });\n }\n\n // Retry if request failed\n if (!response.ok) {\n retry();\n }\n } catch (error: any) {\n // Depending on the fetch implementation, an aborted request may reject\n // with `AbortError` or a native cancellation error.\n if (signal.aborted || (typeof error === 'object' && error?.name === 'AbortError')) {\n // An aborted request is not a failure, so don't log or retry it.\n return;\n }\n\n console.warn(\n '[expo-notifications] Error thrown while updating the device push token with the server:',\n error\n );\n\n retry();\n }\n };\n\n let shouldTry = true;\n const retry = () => {\n shouldTry = true;\n };\n\n let retriesCount = 0;\n const initialBackoff = 500; // 0.5 s\n const backoffOptions = {\n maxBackoff: 2 * 60 * 1000, // 2 minutes\n };\n let nextBackoffInterval = computeNextBackoffInterval(\n initialBackoff,\n retriesCount,\n backoffOptions\n );\n\n while (shouldTry && !signal.aborted) {\n // Will be set to true by `retry` if it's called\n shouldTry = false;\n await doUpdateDevicePushTokenAsync(retry);\n\n // Do not wait if we won't retry\n if (shouldTry && !signal.aborted) {\n nextBackoffInterval = computeNextBackoffInterval(\n initialBackoff,\n retriesCount,\n backoffOptions\n );\n retriesCount += 1;\n await new Promise((resolve) => setTimeout(resolve, nextBackoffInterval));\n }\n }\n}\n\n// Same as in getExpoPushTokenAsync\nasync function getDeviceIdAsync() {\n try {\n if (!ServerRegistrationModule.getInstallationIdAsync) {\n throw new UnavailabilityError('ExpoServerRegistrationModule', 'getInstallationIdAsync');\n }\n\n return await ServerRegistrationModule.getInstallationIdAsync();\n } catch (e) {\n throw new CodedError(\n 'ERR_NOTIFICATIONS_DEVICE_ID',\n `Could not fetch the installation ID of the application: ${e}.`\n );\n }\n}\n\n// Same as in getExpoPushTokenAsync\nfunction getTypeOfToken(devicePushToken: DevicePushToken) {\n switch (devicePushToken.type) {\n case 'ios':\n return 'apns';\n case 'android':\n return 'fcm';\n // This probably will error on server, but let's make this function future-safe.\n default:\n return devicePushToken.type;\n }\n}\n\n// Same as in getExpoPushTokenAsync\nasync function shouldUseDevelopmentNotificationService() {\n if (Platform.OS === 'ios') {\n try {\n const notificationServiceEnvironment =\n await Application.getIosPushNotificationServiceEnvironmentAsync();\n if (notificationServiceEnvironment === 'development') {\n return true;\n }\n } catch {\n // We can't do anything here, we'll fallback to false then.\n }\n }\n\n return false;\n}\n"]}
|
package/expo-module.config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "host.exp.exponent",
|
|
5
5
|
"module": "expo.modules.notifications",
|
|
6
|
-
"version": "57.0.
|
|
6
|
+
"version": "57.0.11",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
26
|
{
|
|
27
|
-
"name": "expo.modules.notifications-57.0.
|
|
28
|
-
"url": "expo.modules.notifications-57.0.
|
|
27
|
+
"name": "expo.modules.notifications-57.0.11.aar",
|
|
28
|
+
"url": "expo.modules.notifications-57.0.11.aar",
|
|
29
29
|
"size": 425993,
|
|
30
30
|
"sha512": "fbe3317e826721d3e5f36ec14b2d5f5e1479b9c16d24d61104e5be2e6d32105271acdfdaf0d539efe6f5fa9527a8e1d749bb996c19fed6c0d7eced774fc47bae",
|
|
31
31
|
"sha256": "e6d92a1bc2481a0676636c715cd467c96d2ec2816ae0edec9fef02421f8febbe",
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
],
|
|
137
137
|
"files": [
|
|
138
138
|
{
|
|
139
|
-
"name": "expo.modules.notifications-57.0.
|
|
140
|
-
"url": "expo.modules.notifications-57.0.
|
|
139
|
+
"name": "expo.modules.notifications-57.0.11.aar",
|
|
140
|
+
"url": "expo.modules.notifications-57.0.11.aar",
|
|
141
141
|
"size": 425993,
|
|
142
142
|
"sha512": "fbe3317e826721d3e5f36ec14b2d5f5e1479b9c16d24d61104e5be2e6d32105271acdfdaf0d539efe6f5fa9527a8e1d749bb996c19fed6c0d7eced774fc47bae",
|
|
143
143
|
"sha256": "e6d92a1bc2481a0676636c715cd467c96d2ec2816ae0edec9fef02421f8febbe",
|
|
@@ -156,8 +156,8 @@
|
|
|
156
156
|
},
|
|
157
157
|
"files": [
|
|
158
158
|
{
|
|
159
|
-
"name": "expo.modules.notifications-57.0.
|
|
160
|
-
"url": "expo.modules.notifications-57.0.
|
|
159
|
+
"name": "expo.modules.notifications-57.0.11-sources.jar",
|
|
160
|
+
"url": "expo.modules.notifications-57.0.11-sources.jar",
|
|
161
161
|
"size": 100296,
|
|
162
162
|
"sha512": "577e9667d10356e13dbe0e068e9e2bb2471d2b3779e7dac73cfceb3da4229c57f94633d598ede255debd9810a4427f39272bc17e76c7b77b4d0a7fef35757f85",
|
|
163
163
|
"sha256": "148252dd1787d13e6671cd522ac117da77b195820b40fad96f416fe9a14719a1",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a569ae1ed80eab3515af5ad1de9848af
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
351372d52d04211bc5719f1889299382eb369889
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
afadf7fb684401535c7f92fd9ab99d0622ac17e6e461c8e54f3df0ecf771c22e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ca0f5fab5bde1d07513e70951c2ffb23225dcbbd32ac7552fb5169404b27386c5833193344e86261331626337d57f509a385c39771778594eb062fe53fea80ea
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>host.exp.exponent</groupId>
|
|
11
11
|
<artifactId>expo.modules.notifications</artifactId>
|
|
12
|
-
<version>57.0.
|
|
12
|
+
<version>57.0.11</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>expo.modules.notifications</name>
|
|
15
15
|
<url>https://github.com/expo/expo</url>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fae427a92d1d6e9ee7508680cb90b2e2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1bb239173b03247a0ad3d353e57bf44bc4adcb7c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
e893cf6d672b02b61c56fe3cd37233032221ceb78a433be45c9787ded915c344
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b0235e0d5744bb541fdb9ebaf32a6fea307ce364b0da21466194c764a0234fe548863bb85b6d7d9d14879a781ad3ae204a556330c65bea99ca26b8ccb01b7dec
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>host.exp.exponent</groupId>
|
|
4
4
|
<artifactId>expo.modules.notifications</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>57.0.
|
|
7
|
-
<release>57.0.
|
|
6
|
+
<latest>57.0.11</latest>
|
|
7
|
+
<release>57.0.11</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>57.0.
|
|
9
|
+
<version>57.0.11</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20260814141306</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
83920ec333e577bf77e7b6914d6ec00f
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
70b5aa9b68ebd27e1c6df517851f88b284794b83
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bd0451ca097cbfc555a74cf946b19b04372b66d273146efe39030885434765ba
|
package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
798284eb315b2f1f4918d7cb418b52f2708c66b093aaf4e75517d8e59278f25d49b17c1ab8fe9f14f78ba5273c9e1858479e6c2d149f42a1b9ea99f65a610e3c
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-notifications",
|
|
3
|
-
"version": "57.0.
|
|
3
|
+
"version": "57.0.11",
|
|
4
4
|
"description": "Provides an API to fetch push notification tokens and to present, schedule, receive, and respond to notifications.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
"abort-controller": "^3.0.0",
|
|
38
38
|
"badgin": "^1.1.5",
|
|
39
39
|
"expo-application": "~57.0.2",
|
|
40
|
-
"expo-constants": "~57.0.
|
|
40
|
+
"expo-constants": "~57.0.11"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^22.14.0",
|
|
44
44
|
"@types/react": "~19.2.0",
|
|
45
45
|
"memfs": "^3.2.0",
|
|
46
|
-
"expo": "
|
|
47
|
-
"expo
|
|
46
|
+
"expo-module-scripts": "56.0.3",
|
|
47
|
+
"expo": "57.0.13"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"expo": "*",
|
|
51
51
|
"react": "*",
|
|
52
52
|
"react-native": "*"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "125b8d4472432db3dc4ae047730432d7bd5bd30c",
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "expo-module build",
|
|
57
57
|
"build:plugin": "expo-module build plugin",
|
|
@@ -130,16 +130,10 @@ export async function updateDevicePushTokenAsync(signal: AbortSignal, token: Dev
|
|
|
130
130
|
retry();
|
|
131
131
|
}
|
|
132
132
|
} catch (error: any) {
|
|
133
|
-
//
|
|
134
|
-
//
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// - which creates exceptions like
|
|
138
|
-
// https://github.com/github/fetch/blob/75d9455d380f365701151f3ac85c5bda4bbbde76/fetch.js#L490-L494
|
|
139
|
-
if (typeof error === 'object' && error?.name === 'AbortError') {
|
|
140
|
-
// We don't consider AbortError a failure, it's a sign somewhere else the
|
|
141
|
-
// request is expected to succeed and we don't need this one, so let's
|
|
142
|
-
// just return.
|
|
133
|
+
// Depending on the fetch implementation, an aborted request may reject
|
|
134
|
+
// with `AbortError` or a native cancellation error.
|
|
135
|
+
if (signal.aborted || (typeof error === 'object' && error?.name === 'AbortError')) {
|
|
136
|
+
// An aborted request is not a failure, so don't log or retry it.
|
|
143
137
|
return;
|
|
144
138
|
}
|
|
145
139
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
065065627ed268617c692096322d16ea
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1f8e1ee42aa07a1d4a8a11dbc6189729e4e902ff
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
50218ca1b28c61eb6edc4d1a34dc192670ede9a0a084d0500a262f2a37489503
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
66de9f319736d53422bd977ecab6cdb74d5129807c9ad1e620455c97a792a8e5a262c6a65b1946d44129f8892a8c9aaabf062b852a12464a0a13cb048c5bfab8
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b316866db01965ca2e561e065e838ceb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c3306f61a2eeca4e72e11fbdfd939d0b572ec41e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
58cc4a909c2e644baa513ab7f11e06ee069271ba26ad1976d996b412eb33ba3e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1770ddec0f0ad2325c08360391ecc6b4fadac072a58b5ae152777c5dfae11e06108be17301fca12c1a64b23c725833005458539a6f5bce25af5a0a084185c376
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|