expo-notifications 57.0.22 → 57.0.23

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/build/DevicePushTokenAutoRegistration.fx.d.ts.map +1 -1
  4. package/build/DevicePushTokenAutoRegistration.fx.js +7 -2
  5. package/build/DevicePushTokenAutoRegistration.fx.js.map +1 -1
  6. package/expo-module.config.json +1 -1
  7. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.module → 57.0.23/expo.modules.notifications-57.0.23.module} +7 -7
  8. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.module.md5 +1 -0
  9. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.module.sha1 +1 -0
  10. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.module.sha256 +1 -0
  11. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.module.sha512 +1 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.pom → 57.0.23/expo.modules.notifications-57.0.23.pom} +1 -1
  13. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.pom.md5 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.pom.sha1 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.pom.sha256 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.23/expo.modules.notifications-57.0.23.pom.sha512 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml +4 -4
  18. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.md5 +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha1 +1 -1
  20. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha256 +1 -1
  21. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/maven-metadata.xml.sha512 +1 -1
  22. package/package.json +4 -4
  23. package/src/DevicePushTokenAutoRegistration.fx.ts +8 -2
  24. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.module.md5 +0 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.module.sha1 +0 -1
  26. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.module.sha256 +0 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.module.sha512 +0 -1
  28. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.pom.md5 +0 -1
  29. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.pom.sha1 +0 -1
  30. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.pom.sha256 +0 -1
  31. package/local-maven-repo/host/exp/exponent/expo.modules.notifications/57.0.22/expo.modules.notifications-57.0.22.pom.sha512 +0 -1
  32. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22-sources.jar → 57.0.23/expo.modules.notifications-57.0.23-sources.jar} +0 -0
  33. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22-sources.jar.md5 → 57.0.23/expo.modules.notifications-57.0.23-sources.jar.md5} +0 -0
  34. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22-sources.jar.sha1 → 57.0.23/expo.modules.notifications-57.0.23-sources.jar.sha1} +0 -0
  35. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22-sources.jar.sha256 → 57.0.23/expo.modules.notifications-57.0.23-sources.jar.sha256} +0 -0
  36. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22-sources.jar.sha512 → 57.0.23/expo.modules.notifications-57.0.23-sources.jar.sha512} +0 -0
  37. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.aar → 57.0.23/expo.modules.notifications-57.0.23.aar} +0 -0
  38. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.aar.md5 → 57.0.23/expo.modules.notifications-57.0.23.aar.md5} +0 -0
  39. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.aar.sha1 → 57.0.23/expo.modules.notifications-57.0.23.aar.sha1} +0 -0
  40. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.aar.sha256 → 57.0.23/expo.modules.notifications-57.0.23.aar.sha256} +0 -0
  41. /package/local-maven-repo/host/exp/exponent/expo.modules.notifications/{57.0.22/expo.modules.notifications-57.0.22.aar.sha512 → 57.0.23/expo.modules.notifications-57.0.23.aar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 57.0.23 — 2026-10-14
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [Android] Fix importing `expo-notifications` crashing the app in Expo Go. Backport of [#49062](https://github.com/expo/expo/pull/49062). ([#51476](https://github.com/expo/expo/pull/51476) by [@khushal87](https://github.com/khushal87))
18
+
13
19
  ## 57.0.22 — 2026-10-06
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -5,13 +5,13 @@ plugins {
5
5
  }
6
6
 
7
7
  group = 'host.exp.exponent'
8
- version = '57.0.22'
8
+ version = '57.0.23'
9
9
 
10
10
  android {
11
11
  namespace "expo.modules.notifications"
12
12
  defaultConfig {
13
13
  versionCode 21
14
- versionName '57.0.22'
14
+ versionName '57.0.23'
15
15
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16
16
  consumerProguardFiles 'proguard-rules.pro'
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DevicePushTokenAutoRegistration.fx.d.ts","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAyBnC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,qCAAqC,CAAC,OAAO,EAAE,OAAO,iBAsB3E;AAGD,wBAAsB,sCAAsC,CAC1D,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,iBAiC5C"}
1
+ {"version":3,"file":"DevicePushTokenAutoRegistration.fx.d.ts","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AA0BnC;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAsB,qCAAqC,CAAC,OAAO,EAAE,OAAO,iBAsB3E;AAGD,wBAAsB,sCAAsC,CAC1D,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,iBAiC5C"}
@@ -1,5 +1,6 @@
1
1
  import 'abort-controller/polyfill';
2
- import { UnavailabilityError } from 'expo-modules-core';
2
+ import { isRunningInExpoGo } from 'expo';
3
+ import { Platform, UnavailabilityError } from 'expo-modules-core';
3
4
  import ServerRegistrationModule from './ServerRegistrationModule';
4
5
  import { addPushTokenListener } from './TokenEmitter';
5
6
  import { getDevicePushTokenAsync } from './getDevicePushTokenAsync';
@@ -72,7 +73,11 @@ export async function __handlePersistedRegistrationInfoAsync(registrationInfo) {
72
73
  console.warn('[expo-notifications] Error encountered while updating server registration with latest device push token.', e);
73
74
  }
74
75
  }
75
- if (ServerRegistrationModule.getRegistrationInfoAsync) {
76
+ if (isRunningInExpoGo() && Platform.OS === 'android') {
77
+ // Registering the module-scope push token listener would throw and make the import fatal.
78
+ console.warn('[expo-notifications] Push notifications (remote notifications) are unavailable in Expo Go on Android since SDK 53. Local notifications remain available. Use a development build for push notifications: https://docs.expo.dev/develop/development-builds/introduction/');
79
+ }
80
+ else if (ServerRegistrationModule.getRegistrationInfoAsync) {
76
81
  // A global scope (to get all the updates) device push token
77
82
  // subscription, never cleared.
78
83
  addPushTokenListener(async (token) => {
@@ -1 +1 @@
1
- {"version":3,"file":"DevicePushTokenAutoRegistration.fx.js","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,0BAA0B,IAAI,oCAAoC,EAClE,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAE5C,IAAI,mBAAmB,GAA2B,IAAI,CAAC;AACvD,KAAK,UAAU,oBAAoB,CAAC,KAAsB;IACxD,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,KAAK,CAAC,CAAC;IACxD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;IACT,CAAC;IAED,+BAA+B;IAC/B,mBAAmB,EAAE,KAAK,EAAE,CAAC;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EACtC,CAAC,CAAC,EAAE,EAAE;QACJ,OAAO,CAAC,KAAK,CAAC,yEAAyE,EAAE,CAAC,CAAC,CAAC;IAC9F,CAAC,CACF,CAAC;AACJ,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,IAAI,CACV,2IAA2I,EAC3I,IAAI,mBAAmB,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAChF,CAAC;AACJ,CAAC","sourcesContent":["import 'abort-controller/polyfill';\nimport { UnavailabilityError } from 'expo-modules-core';\n\nimport ServerRegistrationModule from './ServerRegistrationModule';\nimport { addPushTokenListener } from './TokenEmitter';\nimport type { DevicePushToken } from './Tokens.types';\nimport { getDevicePushTokenAsync } from './getDevicePushTokenAsync';\nimport {\n updateDevicePushTokenAsync as updateDevicePushTokenAsyncWithSignal,\n hasDeviceTokenChangedAsync,\n} from './utils/updateDevicePushTokenAsync';\n\nlet lastAbortController: AbortController | null = null;\nasync function updatePushTokenAsync(token: DevicePushToken) {\n const changed = await hasDeviceTokenChangedAsync(token);\n if (!changed) {\n return;\n }\n\n // Abort current update process\n lastAbortController?.abort();\n lastAbortController = new AbortController();\n return await updateDevicePushTokenAsyncWithSignal(lastAbortController.signal, token);\n}\n\n/**\n * Encapsulates device server registration data\n */\nexport type DevicePushTokenRegistration = {\n isEnabled: boolean;\n};\n\n/**\n * @hidden - the comment is misleading and the purpose of the function needs to be reevaluated\n *\n * Sets the registration information so that the device push token gets pushed\n * to the given registration endpoint\n * @param enabled\n */\nexport async function setAutoServerRegistrationEnabledAsync(enabled: boolean) {\n // We are overwriting registration, so we shouldn't let\n // any pending request complete.\n lastAbortController?.abort();\n\n if (!ServerRegistrationModule.setRegistrationInfoAsync) {\n throw new UnavailabilityError('ServerRegistrationModule', 'setRegistrationInfoAsync');\n }\n\n if (!enabled) {\n await ServerRegistrationModule.setRegistrationInfoAsync(null);\n } else {\n let existing: Record<string, unknown> = {};\n try {\n const info = await ServerRegistrationModule.getRegistrationInfoAsync?.();\n if (info) {\n existing = JSON.parse(info);\n }\n } catch {}\n existing.isEnabled = true;\n await ServerRegistrationModule.setRegistrationInfoAsync(JSON.stringify(existing));\n }\n}\n\n// note(Chmiela): This function is exported only for testing purposes.\nexport async function __handlePersistedRegistrationInfoAsync(\n registrationInfo: string | null | undefined\n) {\n if (!registrationInfo) {\n // No registration info, nothing to do\n return;\n }\n\n let registration: DevicePushTokenRegistration | null = null;\n try {\n registration = JSON.parse(registrationInfo);\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while fetching registration information for auto token updates.',\n e\n );\n }\n\n if (!registration?.isEnabled) {\n // Registration is invalid or not enabled, nothing more to do\n return;\n }\n\n try {\n // Since the registration is enabled, fetching a \"new\" device token\n // shouldn't be a problem.\n const latestDevicePushToken = await getDevicePushTokenAsync();\n await updatePushTokenAsync(latestDevicePushToken);\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while updating server registration with latest device push token.',\n e\n );\n }\n}\n\nif (ServerRegistrationModule.getRegistrationInfoAsync) {\n // A global scope (to get all the updates) device push token\n // subscription, never cleared.\n addPushTokenListener(async (token) => {\n try {\n // Before updating the push token on server we always check if we should\n // Since modules can't change their method availability while running, we\n // can assert it's defined.\n const registrationInfo = await ServerRegistrationModule.getRegistrationInfoAsync!();\n\n if (!registrationInfo) {\n // Registration is not enabled\n return;\n }\n\n const registration: DevicePushTokenRegistration | null = JSON.parse(registrationInfo);\n if (registration?.isEnabled) {\n // Dispatch an abortable task to update\n // registration with new token.\n await updatePushTokenAsync(token);\n }\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while updating server registration with latest device push token.',\n e\n );\n }\n });\n\n // Verify if persisted registration\n // has successfully uploaded last known\n // device push token. If not, retry.\n ServerRegistrationModule.getRegistrationInfoAsync().then(\n __handlePersistedRegistrationInfoAsync,\n (e) => {\n console.error('[expo-notifications] Error reading persisted server registration info: ', e);\n }\n );\n} else {\n console.warn(\n `[expo-notifications] Error encountered while fetching auto-registration state, new tokens will not be automatically registered on server.`,\n new UnavailabilityError('ServerRegistrationModule', 'getRegistrationInfoAsync')\n );\n}\n"]}
1
+ {"version":3,"file":"DevicePushTokenAutoRegistration.fx.js","sourceRoot":"","sources":["../src/DevicePushTokenAutoRegistration.fx.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,0BAA0B,IAAI,oCAAoC,EAClE,0BAA0B,GAC3B,MAAM,oCAAoC,CAAC;AAE5C,IAAI,mBAAmB,GAA2B,IAAI,CAAC;AACvD,KAAK,UAAU,oBAAoB,CAAC,KAAsB;IACxD,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,KAAK,CAAC,CAAC;IACxD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;IACT,CAAC;IAED,+BAA+B;IAC/B,mBAAmB,EAAE,KAAK,EAAE,CAAC;IAC7B,mBAAmB,GAAG,IAAI,eAAe,EAAE,CAAC;IAC5C,OAAO,MAAM,oCAAoC,CAAC,mBAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACvF,CAAC;AASD;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,qCAAqC,CAAC,OAAgB;IAC1E,uDAAuD;IACvD,gCAAgC;IAChC,mBAAmB,EAAE,KAAK,EAAE,CAAC;IAE7B,IAAI,CAAC,wBAAwB,CAAC,wBAAwB,EAAE,CAAC;QACvD,MAAM,IAAI,mBAAmB,CAAC,0BAA0B,EAAE,0BAA0B,CAAC,CAAC;IACxF,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb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import { isRunningInExpoGo } from 'expo';\nimport { Platform, UnavailabilityError } from 'expo-modules-core';\n\nimport ServerRegistrationModule from './ServerRegistrationModule';\nimport { addPushTokenListener } from './TokenEmitter';\nimport type { DevicePushToken } from './Tokens.types';\nimport { getDevicePushTokenAsync } from './getDevicePushTokenAsync';\nimport {\n updateDevicePushTokenAsync as updateDevicePushTokenAsyncWithSignal,\n hasDeviceTokenChangedAsync,\n} from './utils/updateDevicePushTokenAsync';\n\nlet lastAbortController: AbortController | null = null;\nasync function updatePushTokenAsync(token: DevicePushToken) {\n const changed = await hasDeviceTokenChangedAsync(token);\n if (!changed) {\n return;\n }\n\n // Abort current update process\n lastAbortController?.abort();\n lastAbortController = new AbortController();\n return await updateDevicePushTokenAsyncWithSignal(lastAbortController.signal, token);\n}\n\n/**\n * Encapsulates device server registration data\n */\nexport type DevicePushTokenRegistration = {\n isEnabled: boolean;\n};\n\n/**\n * @hidden - the comment is misleading and the purpose of the function needs to be reevaluated\n *\n * Sets the registration information so that the device push token gets pushed\n * to the given registration endpoint\n * @param enabled\n */\nexport async function setAutoServerRegistrationEnabledAsync(enabled: boolean) {\n // We are overwriting registration, so we shouldn't let\n // any pending request complete.\n lastAbortController?.abort();\n\n if (!ServerRegistrationModule.setRegistrationInfoAsync) {\n throw new UnavailabilityError('ServerRegistrationModule', 'setRegistrationInfoAsync');\n }\n\n if (!enabled) {\n await ServerRegistrationModule.setRegistrationInfoAsync(null);\n } else {\n let existing: Record<string, unknown> = {};\n try {\n const info = await ServerRegistrationModule.getRegistrationInfoAsync?.();\n if (info) {\n existing = JSON.parse(info);\n }\n } catch {}\n existing.isEnabled = true;\n await ServerRegistrationModule.setRegistrationInfoAsync(JSON.stringify(existing));\n }\n}\n\n// note(Chmiela): This function is exported only for testing purposes.\nexport async function __handlePersistedRegistrationInfoAsync(\n registrationInfo: string | null | undefined\n) {\n if (!registrationInfo) {\n // No registration info, nothing to do\n return;\n }\n\n let registration: DevicePushTokenRegistration | null = null;\n try {\n registration = JSON.parse(registrationInfo);\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while fetching registration information for auto token updates.',\n e\n );\n }\n\n if (!registration?.isEnabled) {\n // Registration is invalid or not enabled, nothing more to do\n return;\n }\n\n try {\n // Since the registration is enabled, fetching a \"new\" device token\n // shouldn't be a problem.\n const latestDevicePushToken = await getDevicePushTokenAsync();\n await updatePushTokenAsync(latestDevicePushToken);\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while updating server registration with latest device push token.',\n e\n );\n }\n}\n\nif (isRunningInExpoGo() && Platform.OS === 'android') {\n // Registering the module-scope push token listener would throw and make the import fatal.\n console.warn(\n '[expo-notifications] Push notifications (remote notifications) are unavailable in Expo Go on Android since SDK 53. Local notifications remain available. Use a development build for push notifications: https://docs.expo.dev/develop/development-builds/introduction/'\n );\n} else if (ServerRegistrationModule.getRegistrationInfoAsync) {\n // A global scope (to get all the updates) device push token\n // subscription, never cleared.\n addPushTokenListener(async (token) => {\n try {\n // Before updating the push token on server we always check if we should\n // Since modules can't change their method availability while running, we\n // can assert it's defined.\n const registrationInfo = await ServerRegistrationModule.getRegistrationInfoAsync!();\n\n if (!registrationInfo) {\n // Registration is not enabled\n return;\n }\n\n const registration: DevicePushTokenRegistration | null = JSON.parse(registrationInfo);\n if (registration?.isEnabled) {\n // Dispatch an abortable task to update\n // registration with new token.\n await updatePushTokenAsync(token);\n }\n } catch (e) {\n console.warn(\n '[expo-notifications] Error encountered while updating server registration with latest device push token.',\n e\n );\n }\n });\n\n // Verify if persisted registration\n // has successfully uploaded last known\n // device push token. If not, retry.\n ServerRegistrationModule.getRegistrationInfoAsync().then(\n __handlePersistedRegistrationInfoAsync,\n (e) => {\n console.error('[expo-notifications] Error reading persisted server registration info: ', e);\n }\n );\n} else {\n console.warn(\n `[expo-notifications] Error encountered while fetching auto-registration state, new tokens will not be automatically registered on server.`,\n new UnavailabilityError('ServerRegistrationModule', 'getRegistrationInfoAsync')\n );\n}\n"]}
@@ -35,7 +35,7 @@
35
35
  "publication": {
36
36
  "groupId": "host.exp.exponent",
37
37
  "artifactId": "expo.modules.notifications",
38
- "version": "57.0.22",
38
+ "version": "57.0.23",
39
39
  "repository": "local-maven-repo"
40
40
  }
41
41
  }
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.notifications",
6
- "version": "57.0.22",
6
+ "version": "57.0.23",
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.22.aar",
28
- "url": "expo.modules.notifications-57.0.22.aar",
27
+ "name": "expo.modules.notifications-57.0.23.aar",
28
+ "url": "expo.modules.notifications-57.0.23.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.22.aar",
140
- "url": "expo.modules.notifications-57.0.22.aar",
139
+ "name": "expo.modules.notifications-57.0.23.aar",
140
+ "url": "expo.modules.notifications-57.0.23.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.22-sources.jar",
160
- "url": "expo.modules.notifications-57.0.22-sources.jar",
159
+ "name": "expo.modules.notifications-57.0.23-sources.jar",
160
+ "url": "expo.modules.notifications-57.0.23-sources.jar",
161
161
  "size": 100296,
162
162
  "sha512": "577e9667d10356e13dbe0e068e9e2bb2471d2b3779e7dac73cfceb3da4229c57f94633d598ede255debd9810a4427f39272bc17e76c7b77b4d0a7fef35757f85",
163
163
  "sha256": "148252dd1787d13e6671cd522ac117da77b195820b40fad96f416fe9a14719a1",
@@ -0,0 +1 @@
1
+ 74fd42cc860d87e6551df12921ec1b7adea57f06f349e8df11576e78e3b18249
@@ -0,0 +1 @@
1
+ bdf3a8001cf729699140b161ff3b3324a5746eb310d465d73576beaddb3e043fb153e930b52eb04862fd920e144764c15c828ff24f411d1dcef17830c743090a
@@ -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.22</version>
12
+ <version>57.0.23</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
+ e14ab4a54d901dc59c5af652948fd1dab8f81436a827bf21be97ce4a480221d3
@@ -0,0 +1 @@
1
+ 066aaff23c18d14b97d5b8c2eadc8467b40bac92699a153dea51130a9498567cd16c58fd8aa455aa878d6760af2061f27e2af3f85cfd850b3679e1f83dab1e82
@@ -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.22</latest>
7
- <release>57.0.22</release>
6
+ <latest>57.0.23</latest>
7
+ <release>57.0.23</release>
8
8
  <versions>
9
- <version>57.0.22</version>
9
+ <version>57.0.23</version>
10
10
  </versions>
11
- <lastUpdated>20261006120046</lastUpdated>
11
+ <lastUpdated>20261014162606</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 68ca988ce68416166798f8bacb8f8837
1
+ 0727d804e51192e8044b4e12c1ab4ea0
@@ -1 +1 @@
1
- 4d236d62f06cf0931b64a22f642720282266f84e
1
+ 5b03f1753e87a8d15f63b0fe18aafebed7bb7abf
@@ -1 +1 @@
1
- aa7623f969ddfcd16a6e53da9a17e53d7e0836a188bebbbab42fefeebc3bbc75
1
+ b9947236d1bc0f7ac7c23a60b9cf5dde1643d47a96e89acba5f7c54ef239a47c
@@ -1 +1 @@
1
- 79d09d5f2d91757dc881953767b09845d6b41699db6fcb32f22a5d3025663343a36e0e5e3257776672c76d2c3ff4dba1be964d4ec9b28d3bbcefb8d573b1fbe2
1
+ d25a143f9ba8eca68d12d1f34d98d9a06c195bef68c14a23ad11e991d26ef231d46e9ec2e3cd692c12e872a9946af0441ca04ba189e1fe28e1dae390422a2001
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-notifications",
3
- "version": "57.0.22",
3
+ "version": "57.0.23",
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,13 +37,13 @@
37
37
  "abort-controller": "^3.0.0",
38
38
  "badgin": "^1.1.5",
39
39
  "expo-application": "~57.0.3",
40
- "expo-constants": "~57.0.21"
40
+ "expo-constants": "~57.0.22"
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": "57.0.27",
46
+ "expo": "57.0.29",
47
47
  "expo-module-scripts": "56.0.3"
48
48
  },
49
49
  "peerDependencies": {
@@ -51,7 +51,7 @@
51
51
  "react": "*",
52
52
  "react-native": "*"
53
53
  },
54
- "gitHead": "50ac74f1ab5682c8e32b24da6e5e97dd4dbbb80f",
54
+ "gitHead": "0607af7a70d0ea3e58a6d55824aac5cfd3e78613",
55
55
  "scripts": {
56
56
  "build": "expo-module build",
57
57
  "build:plugin": "expo-module build plugin",
@@ -1,5 +1,6 @@
1
1
  import 'abort-controller/polyfill';
2
- import { UnavailabilityError } from 'expo-modules-core';
2
+ import { isRunningInExpoGo } from 'expo';
3
+ import { Platform, UnavailabilityError } from 'expo-modules-core';
3
4
 
4
5
  import ServerRegistrationModule from './ServerRegistrationModule';
5
6
  import { addPushTokenListener } from './TokenEmitter';
@@ -98,7 +99,12 @@ export async function __handlePersistedRegistrationInfoAsync(
98
99
  }
99
100
  }
100
101
 
101
- if (ServerRegistrationModule.getRegistrationInfoAsync) {
102
+ if (isRunningInExpoGo() && Platform.OS === 'android') {
103
+ // Registering the module-scope push token listener would throw and make the import fatal.
104
+ console.warn(
105
+ '[expo-notifications] Push notifications (remote notifications) are unavailable in Expo Go on Android since SDK 53. Local notifications remain available. Use a development build for push notifications: https://docs.expo.dev/develop/development-builds/introduction/'
106
+ );
107
+ } else if (ServerRegistrationModule.getRegistrationInfoAsync) {
102
108
  // A global scope (to get all the updates) device push token
103
109
  // subscription, never cleared.
104
110
  addPushTokenListener(async (token) => {
@@ -1 +0,0 @@
1
- 9b8e843233595ab839467d7cd4220484276c8c55ab036cfb17106ddfe9d983cd
@@ -1 +0,0 @@
1
- b8b958bbdd4438b74129f63013cb1ac3394ff695489e874941d1782c6f47dead4ea67d0a0ecb9fe76f77cd061bd2a34bc4561cef399d87bcf93043465d6209c6
@@ -1 +0,0 @@
1
- 7dc8e00dbdc053ce852f51bbebad15d9cd5051ec3fd8ede7db1ef152ebbf0b99
@@ -1 +0,0 @@
1
- 1ab644c5c282329d9f6defe729663fc153809f53f4ead0e72b5dd6a5ee402d0159e34a24aaa44b909cd19e0e582f8707a0b5bd4cffd937f4ac1578f24dbeb246