expo-linking 56.0.12 → 56.0.13

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 (68) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/linking/ExpoLinkingModule.kt +4 -0
  4. package/build/ExpoLinking.d.ts +1 -0
  5. package/build/ExpoLinking.d.ts.map +1 -1
  6. package/build/ExpoLinking.js.map +1 -1
  7. package/build/ExpoLinking.web.d.ts +1 -0
  8. package/build/ExpoLinking.web.d.ts.map +1 -1
  9. package/build/ExpoLinking.web.js +1 -0
  10. package/build/ExpoLinking.web.js.map +1 -1
  11. package/build/Linking.d.ts +9 -0
  12. package/build/Linking.d.ts.map +1 -1
  13. package/build/Linking.js +11 -0
  14. package/build/Linking.js.map +1 -1
  15. package/build/Linking.server.d.ts +1 -0
  16. package/build/Linking.server.d.ts.map +1 -1
  17. package/build/Linking.server.js +1 -0
  18. package/build/Linking.server.js.map +1 -1
  19. package/expo-module.config.json +1 -1
  20. package/ios/ExpoLinkingModule.swift +4 -0
  21. package/ios/ExpoLinkingRegistry.swift +19 -2
  22. package/local-maven-repo/host/exp/exponent/expo.modules.linking/{56.0.12/expo.modules.linking-56.0.12-sources.jar → 56.0.13/expo.modules.linking-56.0.13-sources.jar} +0 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13-sources.jar.md5 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13-sources.jar.sha1 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13-sources.jar.sha256 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13-sources.jar.sha512 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.aar +0 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.aar.md5 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.aar.sha1 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.aar.sha256 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.aar.sha512 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.linking/{56.0.12/expo.modules.linking-56.0.12.module → 56.0.13/expo.modules.linking-56.0.13.module} +22 -22
  33. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.module.md5 +1 -0
  34. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.module.sha1 +1 -0
  35. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.module.sha256 +1 -0
  36. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.module.sha512 +1 -0
  37. package/local-maven-repo/host/exp/exponent/expo.modules.linking/{56.0.12/expo.modules.linking-56.0.12.pom → 56.0.13/expo.modules.linking-56.0.13.pom} +1 -1
  38. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.pom.md5 +1 -0
  39. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.pom.sha1 +1 -0
  40. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.pom.sha256 +1 -0
  41. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.13/expo.modules.linking-56.0.13.pom.sha512 +1 -0
  42. package/local-maven-repo/host/exp/exponent/expo.modules.linking/maven-metadata.xml +4 -4
  43. package/local-maven-repo/host/exp/exponent/expo.modules.linking/maven-metadata.xml.md5 +1 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.linking/maven-metadata.xml.sha1 +1 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.linking/maven-metadata.xml.sha256 +1 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.linking/maven-metadata.xml.sha512 +1 -1
  47. package/package.json +2 -2
  48. package/src/ExpoLinking.ts +1 -0
  49. package/src/ExpoLinking.web.ts +2 -0
  50. package/src/Linking.server.ts +2 -0
  51. package/src/Linking.ts +12 -0
  52. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12-sources.jar.md5 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12-sources.jar.sha1 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12-sources.jar.sha256 +0 -1
  55. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12-sources.jar.sha512 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.aar +0 -0
  57. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.aar.md5 +0 -1
  58. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.aar.sha1 +0 -1
  59. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.aar.sha256 +0 -1
  60. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.aar.sha512 +0 -1
  61. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.module.md5 +0 -1
  62. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.module.sha1 +0 -1
  63. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.module.sha256 +0 -1
  64. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.module.sha512 +0 -1
  65. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.pom.md5 +0 -1
  66. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.pom.sha1 +0 -1
  67. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.pom.sha256 +0 -1
  68. package/local-maven-repo/host/exp/exponent/expo.modules.linking/56.0.12/expo.modules.linking-56.0.12.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 56.0.13 — 2026-05-29
14
+
15
+ ### 🎉 New features
16
+
17
+ - Added `Linking.clearInitialURL()` to reset the cached deep-link URL. ([#46265](https://github.com/expo/expo/pull/46265) by @gabrieldonadel)
18
+
13
19
  ## 56.0.12 — 2026-05-26
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '56.0.12'
7
+ version = '56.0.13'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.linking"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName "56.0.12"
13
+ versionName "56.0.13"
14
14
  }
15
15
  lintOptions {
16
16
  abortOnError false
@@ -23,6 +23,10 @@ class ExpoLinkingModule : Module() {
23
23
  initialURL?.toString()
24
24
  }
25
25
 
26
+ Function("clearInitialURL") {
27
+ initialURL = null
28
+ }
29
+
26
30
  OnStartObserving("onURLReceived") {
27
31
  val weakModule = WeakReference(this@ExpoLinkingModule)
28
32
  val observer: (Uri?) -> Unit = { uri: Uri? ->
@@ -4,6 +4,7 @@ type ExpoLinkingModuleEvents = {
4
4
  };
5
5
  declare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {
6
6
  getLinkingURL(): string | null;
7
+ clearInitialURL(): void;
7
8
  }
8
9
  declare const ExpoLinking: ExpoLinkingNativeModule;
9
10
  export default ExpoLinking;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoLinking.d.ts","sourceRoot":"","sources":["../src/ExpoLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtE,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,OAAO,OAAO,uBAAwB,SAAQ,YAAY,CAAC,uBAAuB,CAAC;IACjF,aAAa,IAAI,MAAM,GAAG,IAAI;CAC/B;AAED,QAAA,MAAM,WAAW,yBAA8D,CAAC;AAChF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ExpoLinking.d.ts","sourceRoot":"","sources":["../src/ExpoLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtE,KAAK,uBAAuB,GAAG;IAC7B,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,OAAO,OAAO,uBAAwB,SAAQ,YAAY,CAAC,uBAAuB,CAAC;IACjF,aAAa,IAAI,MAAM,GAAG,IAAI;IAC9B,eAAe,IAAI,IAAI;CACxB;AAED,QAAA,MAAM,WAAW,yBAA8D,CAAC;AAChF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoLinking.js","sourceRoot":"","sources":["../src/ExpoLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAUtE,MAAM,WAAW,GAAG,mBAAmB,CAA0B,aAAa,CAAC,CAAC;AAChF,eAAe,WAAW,CAAC","sourcesContent":["import { requireNativeModule, NativeModule } from 'expo-modules-core';\n\ntype ExpoLinkingModuleEvents = {\n onURLReceived(url: string): void;\n};\n\ndeclare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {\n getLinkingURL(): string | null;\n}\n\nconst ExpoLinking = requireNativeModule<ExpoLinkingNativeModule>('ExpoLinking');\nexport default ExpoLinking;\n"]}
1
+ {"version":3,"file":"ExpoLinking.js","sourceRoot":"","sources":["../src/ExpoLinking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWtE,MAAM,WAAW,GAAG,mBAAmB,CAA0B,aAAa,CAAC,CAAC;AAChF,eAAe,WAAW,CAAC","sourcesContent":["import { requireNativeModule, NativeModule } from 'expo-modules-core';\n\ntype ExpoLinkingModuleEvents = {\n onURLReceived(url: string): void;\n};\n\ndeclare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {\n getLinkingURL(): string | null;\n clearInitialURL(): void;\n}\n\nconst ExpoLinking = requireNativeModule<ExpoLinkingNativeModule>('ExpoLinking');\nexport default ExpoLinking;\n"]}
@@ -4,6 +4,7 @@ declare const _default: {
4
4
  remove(): void;
5
5
  };
6
6
  getLinkingURL(): string;
7
+ clearInitialURL(): void;
7
8
  };
8
9
  export default _default;
9
10
  //# sourceMappingURL=ExpoLinking.web.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoLinking.web.d.ts","sourceRoot":"","sources":["../src/ExpoLinking.web.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;;2BAG1B,eAAe,GAAG,MAAM,YAAY,WAAW,GAAG;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE;qBAoB1E,MAAM;;AArBzB,wBAyBE"}
1
+ {"version":3,"file":"ExpoLinking.web.d.ts","sourceRoot":"","sources":["../src/ExpoLinking.web.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;;2BAG1B,eAAe,GAAG,MAAM,YAAY,WAAW,GAAG;QAAE,MAAM,IAAI,IAAI,CAAA;KAAE;qBAoB1E,MAAM;uBAKJ,IAAI;;AA1BzB,wBA2BE"}
@@ -19,5 +19,6 @@ export default {
19
19
  return '';
20
20
  return window.location.href;
21
21
  },
22
+ clearInitialURL() { },
22
23
  };
23
24
  //# sourceMappingURL=ExpoLinking.web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoLinking.web.js","sourceRoot":"","sources":["../src/ExpoLinking.web.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,eAAe;IACb,WAAW,CAAC,SAAmC,EAAE,QAAqB;QACpE,SAAS,CACP,SAAS,KAAK,eAAe,EAC7B,0BAA0B,SAAS,uBAAuB,CAC3D,CAAC;QACF,qCAAqC;QACrC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;QACzB,CAAC;QAED,MAAM,cAAc,GAAG,CAAC,WAAyB,EAAE,EAAE,CACnD,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACvD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO;YACL,MAAM,EAAE,GAAG,EAAE;gBACX,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YACxD,CAAC;SACF,CAAC;IACJ,CAAC;IAED,aAAa;QACX,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;CACF,CAAC","sourcesContent":["import invariant from 'invariant';\n\nimport type { URLListener } from './Linking.types';\n\nexport default {\n addListener(eventName: 'onURLReceived' | string, listener: URLListener): { remove(): void } {\n invariant(\n eventName === 'onURLReceived',\n `Linking.addListener(): ${eventName} is not a valid event`\n );\n // Do nothing in Node.js environments\n if (typeof window === 'undefined') {\n return { remove() {} };\n }\n\n const nativeListener = (nativeEvent: MessageEvent) =>\n listener({ url: window.location.href, nativeEvent });\n window.addEventListener('message', nativeListener, false);\n return {\n remove: () => {\n window.removeEventListener('message', nativeListener);\n },\n };\n },\n\n getLinkingURL(): string {\n if (typeof window === 'undefined') return '';\n return window.location.href;\n },\n};\n"]}
1
+ {"version":3,"file":"ExpoLinking.web.js","sourceRoot":"","sources":["../src/ExpoLinking.web.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAIlC,eAAe;IACb,WAAW,CAAC,SAAmC,EAAE,QAAqB;QACpE,SAAS,CACP,SAAS,KAAK,eAAe,EAC7B,0BAA0B,SAAS,uBAAuB,CAC3D,CAAC;QACF,qCAAqC;QACrC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;QACzB,CAAC;QAED,MAAM,cAAc,GAAG,CAAC,WAAyB,EAAE,EAAE,CACnD,QAAQ,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;QACvD,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC;QAC1D,OAAO;YACL,MAAM,EAAE,GAAG,EAAE;gBACX,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;YACxD,CAAC;SACF,CAAC;IACJ,CAAC;IAED,aAAa;QACX,IAAI,OAAO,MAAM,KAAK,WAAW;YAAE,OAAO,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,CAAC;IAED,eAAe,KAAU,CAAC;CAC3B,CAAC","sourcesContent":["import invariant from 'invariant';\n\nimport type { URLListener } from './Linking.types';\n\nexport default {\n addListener(eventName: 'onURLReceived' | string, listener: URLListener): { remove(): void } {\n invariant(\n eventName === 'onURLReceived',\n `Linking.addListener(): ${eventName} is not a valid event`\n );\n // Do nothing in Node.js environments\n if (typeof window === 'undefined') {\n return { remove() {} };\n }\n\n const nativeListener = (nativeEvent: MessageEvent) =>\n listener({ url: window.location.href, nativeEvent });\n window.addEventListener('message', nativeListener, false);\n return {\n remove: () => {\n window.removeEventListener('message', nativeListener);\n },\n };\n },\n\n getLinkingURL(): string {\n if (typeof window === 'undefined') return '';\n return window.location.href;\n },\n\n clearInitialURL(): void {},\n};\n"]}
@@ -39,6 +39,15 @@ export declare function getInitialURL(): Promise<string | null>;
39
39
  * @return The URL string that launched your app, or `null`.
40
40
  */
41
41
  export declare function getLinkingURL(): string | null;
42
+ /**
43
+ * Clears the cached initial URL used to launch the app, subsequent
44
+ * calls to [`getLinkingURL()`] return `null` until a new deep link is received.
45
+ *
46
+ * On web this is a no-op.
47
+ * @platform android
48
+ * @platform ios
49
+ */
50
+ export declare function clearInitialURL(): void;
42
51
  /**
43
52
  * Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)
44
53
  * for more information.
@@ -1 +1 @@
1
- {"version":3,"file":"Linking.d.ts","sourceRoot":"","sources":["../src/Linking.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIxD,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMhF;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,GAAG,mBAAmB,CAEvF;AAGD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAY/D;AAGD;;;;;GAKG;AACH,w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,EAAE,MAAM,CAAC,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAK3F;AAGD;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAQlD;AAGD;;;GAGG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE5D;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAGD;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxD;AAGD;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9D;AAGD;;;;GAIG;AACH,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,CActC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,GAAG,IAAI,CAa7C;AAED,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
package/build/Linking.js CHANGED
@@ -79,6 +79,17 @@ export async function getInitialURL() {
79
79
  export function getLinkingURL() {
80
80
  return ExpoLinking.getLinkingURL();
81
81
  }
82
+ /**
83
+ * Clears the cached initial URL used to launch the app, subsequent
84
+ * calls to [`getLinkingURL()`] return `null` until a new deep link is received.
85
+ *
86
+ * On web this is a no-op.
87
+ * @platform android
88
+ * @platform ios
89
+ */
90
+ export function clearInitialURL() {
91
+ ExpoLinking.clearInitialURL?.();
92
+ }
82
93
  // @needsAudit
83
94
  /**
84
95
  * Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)
@@ -1 +1 @@
1
- {"version":3,"file":"Linking.js","sourceRoot":"","sources":["../src/Linking.ts"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5C,MAAM,YAAY,GAAG,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACvD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAgB,WAAW,CAAC,aAAa,CAAC,CAAC;IAE1E,SAAS,QAAQ,CAAC,KAAsB;QACtC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,WAAW,CAAC,WAAW,CAAC,eAAe,EAAE,QAAe,CAAC,CAAC;QAC/E,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,GAAG,IAAI,IAAI,CAAC;AACrB,CAAC;AAED,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\nimport { useEffect, useState } from 'react';\nimport type { EmitterSubscription } from 'react-native';\nimport { Platform } from 'react-native';\n\nimport ExpoLinking from './ExpoLinking';\nimport type { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';\nimport RNLinking from './RNLinking';\nimport { parse } from './createURL';\nimport { validateURL } from './validateURL';\n\n// @needsAudit\n/**\n * Add a handler to `Linking` changes by listening to the `url` event type and providing the handler.\n * It is recommended to use the [`useLinkingURL()`](#uselinkingurl) hook instead.\n * @param type The only valid type is `'url'`.\n * @param handler An [`URLListener`](#urllistener) function that takes an `event` object of the type\n * [`EventType`](#eventtype).\n * @return An EmitterSubscription that has the remove method from EventSubscription\n * @see [React Native documentation on Linking](https://reactnative.dev/docs/linking#addeventlistener).\n */\nexport function addEventListener(type: 'url', handler: URLListener): EmitterSubscription {\n return RNLinking.addEventListener(type, handler);\n}\n\n// @needsAudit\n/**\n * Helper method which wraps React Native's `Linking.getInitialURL()` in `Linking.parse()`.\n * Parses the deep link information out of the URL used to open the experience initially.\n * If no link opened the app, all the fields will be `null`.\n * > On the web it parses the current window URL.\n * @return A promise that resolves with `ParsedURL` object.\n */\nexport async function parseInitialURLAsync(): Promise<ParsedURL> {\n const initialUrl = await RNLinking.getInitialURL();\n if (!initialUrl) {\n return {\n scheme: null,\n hostname: null,\n path: null,\n queryParams: null,\n };\n }\n\n return parse(initialUrl);\n}\n\n// @needsAudit\n/**\n * Launch an Android intent with extras.\n * > Use [`expo-intent-launcher`](./intent-launcher) instead. `sendIntent` is only included in\n * > `Linking` for API compatibility with React Native's Linking API.\n * @platform android\n */\nexport async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {\n if (Platform.OS === 'android') {\n return await RNLinking.sendIntent(action, extras);\n }\n throw new UnavailabilityError('Linking', 'sendIntent');\n}\n\n// @needsAudit\n/**\n * Open the operating system settings app and displays the app’s custom settings, if it has any.\n */\nexport async function openSettings(): Promise<void> {\n if (Platform.OS === 'web') {\n throw new UnavailabilityError('Linking', 'openSettings');\n }\n if (RNLinking.openSettings) {\n return await RNLinking.openSettings();\n }\n await openURL('app-settings:');\n}\n\n// @needsAudit\n/**\n * Get the URL that was used to launch the app if it was launched by a link.\n * @return The URL string that launched your app, or `null`.\n */\nexport async function getInitialURL(): Promise<string | null> {\n return (await RNLinking.getInitialURL()) ?? null;\n}\n\n/**\n * Get the URL that was used to launch the app if it was launched by a link.\n * @return The URL string that launched your app, or `null`.\n */\nexport function getLinkingURL(): string | null {\n return ExpoLinking.getLinkingURL();\n}\n\n// @needsAudit\n/**\n * Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)\n * for more information.\n * @param url A URL for the operating system to open. For example: `tel:5555555`, `exp://`.\n * @return A `Promise` that is fulfilled with `true` if the link is opened operating system\n * automatically or the user confirms the prompt to open the link. The `Promise` rejects if there\n * are no applications registered for the URL or the user cancels the dialog.\n */\nexport async function openURL(url: string): Promise<true> {\n validateURL(url);\n return await RNLinking.openURL(url);\n}\n\n// @needsAudit\n/**\n * Determine whether or not an installed app can handle a given URL.\n * On web this always returns `true` because there is no API for detecting what URLs can be opened.\n * @param url The URL that you want to test can be opened.\n * @return A `Promise` object that is fulfilled with `true` if the URL can be handled, otherwise it\n * `false` if not.\n * The `Promise` will reject on Android if it was impossible to check if the URL can be opened, and\n * on iOS if you didn't [add the specific scheme in the `LSApplicationQueriesSchemes` key inside **Info.plist**](/guides/linking#linking-from-your-app).\n */\nexport async function canOpenURL(url: string): Promise<boolean> {\n validateURL(url);\n return await RNLinking.canOpenURL(url);\n}\n\n// @needsAudit\n/**\n * Returns the initial URL followed by any subsequent changes to the URL.\n * @deprecated Use `useLinkingURL` hook instead.\n * @return Returns the initial URL or `null`.\n */\nexport function useURL(): string | null {\n const [url, setLink] = useState<string | null>(null);\n\n function onChange(event: { url: string }) {\n setLink(event.url);\n }\n\n useEffect(() => {\n getInitialURL().then((url) => setLink(url));\n const subscription = addEventListener('url', onChange);\n return () => subscription.remove();\n }, []);\n\n return url;\n}\n\n/**\n * Returns the linking URL followed by any subsequent changes to the URL.\n * Always returns the initial URL immediately on reload.\n * @return Returns the initial URL or `null`.\n */\nexport function useLinkingURL(): string | null {\n const [url, setLink] = useState<string | null>(ExpoLinking.getLinkingURL);\n\n function onChange(event: { url: string }) {\n setLink(event.url);\n }\n\n useEffect(() => {\n const subscription = ExpoLinking.addListener('onURLReceived', onChange as any);\n return () => subscription.remove();\n }, []);\n\n return url ?? null;\n}\n\nexport * from './Linking.types';\nexport * from './Schemes';\nexport { parse, createURL } from './createURL';\n"]}
1
+ {"version":3,"file":"Linking.js","sourceRoot":"","sources":["../src/Linking.ts"],"names":[],"mappings":"AAAA,OAAO,EA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AC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;QAC5C,MAAM,YAAY,GAAG,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACvD,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAgB,WAAW,CAAC,aAAa,CAAC,CAAC;IAE1E,SAAS,QAAQ,CAAC,KAAsB;QACtC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAED,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,YAAY,GAAG,WAAW,CAAC,WAAW,CAAC,eAAe,EAAE,QAAe,CAAC,CAAC;QAC/E,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,GAAG,IAAI,IAAI,CAAC;AACrB,CAAC;AAED,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\nimport { useEffect, useState } from 'react';\nimport type { EmitterSubscription } from 'react-native';\nimport { Platform } from 'react-native';\n\nimport ExpoLinking from './ExpoLinking';\nimport type { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';\nimport RNLinking from './RNLinking';\nimport { parse } from './createURL';\nimport { validateURL } from './validateURL';\n\n// @needsAudit\n/**\n * Add a handler to `Linking` changes by listening to the `url` event type and providing the handler.\n * It is recommended to use the [`useLinkingURL()`](#uselinkingurl) hook instead.\n * @param type The only valid type is `'url'`.\n * @param handler An [`URLListener`](#urllistener) function that takes an `event` object of the type\n * [`EventType`](#eventtype).\n * @return An EmitterSubscription that has the remove method from EventSubscription\n * @see [React Native documentation on Linking](https://reactnative.dev/docs/linking#addeventlistener).\n */\nexport function addEventListener(type: 'url', handler: URLListener): EmitterSubscription {\n return RNLinking.addEventListener(type, handler);\n}\n\n// @needsAudit\n/**\n * Helper method which wraps React Native's `Linking.getInitialURL()` in `Linking.parse()`.\n * Parses the deep link information out of the URL used to open the experience initially.\n * If no link opened the app, all the fields will be `null`.\n * > On the web it parses the current window URL.\n * @return A promise that resolves with `ParsedURL` object.\n */\nexport async function parseInitialURLAsync(): Promise<ParsedURL> {\n const initialUrl = await RNLinking.getInitialURL();\n if (!initialUrl) {\n return {\n scheme: null,\n hostname: null,\n path: null,\n queryParams: null,\n };\n }\n\n return parse(initialUrl);\n}\n\n// @needsAudit\n/**\n * Launch an Android intent with extras.\n * > Use [`expo-intent-launcher`](./intent-launcher) instead. `sendIntent` is only included in\n * > `Linking` for API compatibility with React Native's Linking API.\n * @platform android\n */\nexport async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {\n if (Platform.OS === 'android') {\n return await RNLinking.sendIntent(action, extras);\n }\n throw new UnavailabilityError('Linking', 'sendIntent');\n}\n\n// @needsAudit\n/**\n * Open the operating system settings app and displays the app’s custom settings, if it has any.\n */\nexport async function openSettings(): Promise<void> {\n if (Platform.OS === 'web') {\n throw new UnavailabilityError('Linking', 'openSettings');\n }\n if (RNLinking.openSettings) {\n return await RNLinking.openSettings();\n }\n await openURL('app-settings:');\n}\n\n// @needsAudit\n/**\n * Get the URL that was used to launch the app if it was launched by a link.\n * @return The URL string that launched your app, or `null`.\n */\nexport async function getInitialURL(): Promise<string | null> {\n return (await RNLinking.getInitialURL()) ?? null;\n}\n\n/**\n * Get the URL that was used to launch the app if it was launched by a link.\n * @return The URL string that launched your app, or `null`.\n */\nexport function getLinkingURL(): string | null {\n return ExpoLinking.getLinkingURL();\n}\n\n/**\n * Clears the cached initial URL used to launch the app, subsequent\n * calls to [`getLinkingURL()`] return `null` until a new deep link is received.\n *\n * On web this is a no-op.\n * @platform android\n * @platform ios\n */\nexport function clearInitialURL(): void {\n ExpoLinking.clearInitialURL?.();\n}\n\n// @needsAudit\n/**\n * Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)\n * for more information.\n * @param url A URL for the operating system to open. For example: `tel:5555555`, `exp://`.\n * @return A `Promise` that is fulfilled with `true` if the link is opened operating system\n * automatically or the user confirms the prompt to open the link. The `Promise` rejects if there\n * are no applications registered for the URL or the user cancels the dialog.\n */\nexport async function openURL(url: string): Promise<true> {\n validateURL(url);\n return await RNLinking.openURL(url);\n}\n\n// @needsAudit\n/**\n * Determine whether or not an installed app can handle a given URL.\n * On web this always returns `true` because there is no API for detecting what URLs can be opened.\n * @param url The URL that you want to test can be opened.\n * @return A `Promise` object that is fulfilled with `true` if the URL can be handled, otherwise it\n * `false` if not.\n * The `Promise` will reject on Android if it was impossible to check if the URL can be opened, and\n * on iOS if you didn't [add the specific scheme in the `LSApplicationQueriesSchemes` key inside **Info.plist**](/guides/linking#linking-from-your-app).\n */\nexport async function canOpenURL(url: string): Promise<boolean> {\n validateURL(url);\n return await RNLinking.canOpenURL(url);\n}\n\n// @needsAudit\n/**\n * Returns the initial URL followed by any subsequent changes to the URL.\n * @deprecated Use `useLinkingURL` hook instead.\n * @return Returns the initial URL or `null`.\n */\nexport function useURL(): string | null {\n const [url, setLink] = useState<string | null>(null);\n\n function onChange(event: { url: string }) {\n setLink(event.url);\n }\n\n useEffect(() => {\n getInitialURL().then((url) => setLink(url));\n const subscription = addEventListener('url', onChange);\n return () => subscription.remove();\n }, []);\n\n return url;\n}\n\n/**\n * Returns the linking URL followed by any subsequent changes to the URL.\n * Always returns the initial URL immediately on reload.\n * @return Returns the initial URL or `null`.\n */\nexport function useLinkingURL(): string | null {\n const [url, setLink] = useState<string | null>(ExpoLinking.getLinkingURL);\n\n function onChange(event: { url: string }) {\n setLink(event.url);\n }\n\n useEffect(() => {\n const subscription = ExpoLinking.addListener('onURLReceived', onChange as any);\n return () => subscription.remove();\n }, []);\n\n return url ?? null;\n}\n\nexport * from './Linking.types';\nexport * from './Schemes';\nexport { parse, createURL } from './createURL';\n"]}
@@ -7,6 +7,7 @@ export declare function sendIntent(action: string, extras?: SendIntentExtras[]):
7
7
  export declare function openSettings(): Promise<void>;
8
8
  export declare function getInitialURL(): Promise<string | null>;
9
9
  export declare function getLinkingURL(): string;
10
+ export declare function clearInitialURL(): void;
10
11
  export declare function openURL(url: string): Promise<true>;
11
12
  export declare function canOpenURL(): Promise<boolean>;
12
13
  export declare function useURL(): string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"Linking.server.d.ts","sourceRoot":"","sources":["../src/Linking.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEhF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;;EAEjE;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAO/D;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3F;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAElD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE5D;AAED,wBAAgB,aAAa,WAE5B;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExD;AAED,wBAAsB,UAAU,qBAE/B;AAED,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,CAEtC;AAED,wBAAgB,aAAa,SAE5B;AAED,cAAc,iBAAiB,CAAC;AAEhC,wBAAgB,sBAAsB,YAErC;AAED,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,aAAa,WAE5B;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"Linking.server.d.ts","sourceRoot":"","sources":["../src/Linking.server.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEhF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW;;EAEjE;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAO/D;AAED,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3F;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAElD;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE5D;AAED,wBAAgB,aAAa,WAE5B;AAED,wBAAgB,eAAe,IAAI,IAAI,CAAG;AAE1C,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExD;AAED,wBAAsB,UAAU,qBAE/B;AAED,wBAAgB,MAAM,IAAI,MAAM,GAAG,IAAI,CAEtC;AAED,wBAAgB,aAAa,SAE5B;AAED,cAAc,iBAAiB,CAAC;AAEhC,wBAAgB,sBAAsB,YAErC;AAED,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,eAAe,YAE9B;AAED,wBAAgB,aAAa,WAE5B;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -22,6 +22,7 @@ export async function getInitialURL() {
22
22
  export function getLinkingURL() {
23
23
  return '';
24
24
  }
25
+ export function clearInitialURL() { }
25
26
  export async function openURL(url) {
26
27
  return true;
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Linking.server.js","sourceRoot":"","sources":["../src/Linking.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,UAAU,gBAAgB,CAAC,IAAW,EAAE,OAAoB;IAChE,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,IAAI;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAc,EAAE,MAA2B;IAC1E,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,cAAc,iBAAiB,CAAC;AAEhC,MAAM,UAAU,sBAAsB;IACpC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport type { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';\n\nexport function addEventListener(type: 'url', handler: URLListener) {\n return { remove() {} };\n}\n\nexport async function parseInitialURLAsync(): Promise<ParsedURL> {\n return {\n scheme: null,\n hostname: null,\n path: null,\n queryParams: null,\n };\n}\n\nexport async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {\n throw new UnavailabilityError('Linking', 'sendIntent');\n}\n\nexport async function openSettings(): Promise<void> {\n throw new UnavailabilityError('Linking', 'openSettings');\n}\n\nexport async function getInitialURL(): Promise<string | null> {\n return '';\n}\n\nexport function getLinkingURL() {\n return '';\n}\n\nexport async function openURL(url: string): Promise<true> {\n return true;\n}\n\nexport async function canOpenURL() {\n return true;\n}\n\nexport function useURL(): string | null {\n return null;\n}\n\nexport function useLinkingURL() {\n return null;\n}\n\nexport * from './Linking.types';\n\nexport function collectManifestSchemes() {\n return [];\n}\n\nexport function hasConstantsManifest() {\n return false;\n}\n\nexport function hasCustomScheme() {\n return false;\n}\n\nexport function resolveScheme() {\n return '';\n}\n\nexport { parse, createURL } from './createURL';\n"]}
1
+ {"version":3,"file":"Linking.server.js","sourceRoot":"","sources":["../src/Linking.server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxD,MAAM,UAAU,gBAAgB,CAAC,IAAW,EAAE,OAAoB;IAChE,OAAO,EAAE,MAAM,KAAI,CAAC,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,OAAO;QACL,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,IAAI;KAClB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAc,EAAE,MAA2B;IAC1E,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,MAAM,IAAI,mBAAmB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,eAAe,KAAU,CAAC;AAE1C,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU;IAC9B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,cAAc,iBAAiB,CAAC;AAEhC,MAAM,UAAU,sBAAsB;IACpC,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC","sourcesContent":["import { UnavailabilityError } from 'expo-modules-core';\n\nimport type { ParsedURL, SendIntentExtras, URLListener } from './Linking.types';\n\nexport function addEventListener(type: 'url', handler: URLListener) {\n return { remove() {} };\n}\n\nexport async function parseInitialURLAsync(): Promise<ParsedURL> {\n return {\n scheme: null,\n hostname: null,\n path: null,\n queryParams: null,\n };\n}\n\nexport async function sendIntent(action: string, extras?: SendIntentExtras[]): Promise<void> {\n throw new UnavailabilityError('Linking', 'sendIntent');\n}\n\nexport async function openSettings(): Promise<void> {\n throw new UnavailabilityError('Linking', 'openSettings');\n}\n\nexport async function getInitialURL(): Promise<string | null> {\n return '';\n}\n\nexport function getLinkingURL() {\n return '';\n}\n\nexport function clearInitialURL(): void {}\n\nexport async function openURL(url: string): Promise<true> {\n return true;\n}\n\nexport async function canOpenURL() {\n return true;\n}\n\nexport function useURL(): string | null {\n return null;\n}\n\nexport function useLinkingURL() {\n return null;\n}\n\nexport * from './Linking.types';\n\nexport function collectManifestSchemes() {\n return [];\n}\n\nexport function hasConstantsManifest() {\n return false;\n}\n\nexport function hasCustomScheme() {\n return false;\n}\n\nexport function resolveScheme() {\n return '';\n}\n\nexport { parse, createURL } from './createURL';\n"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "host.exp.exponent",
11
11
  "artifactId": "expo.modules.linking",
12
- "version": "56.0.12",
12
+ "version": "56.0.13",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -21,6 +21,10 @@ public class ExpoLinkingModule: Module {
21
21
  Function("getLinkingURL") {
22
22
  return ExpoLinkingRegistry.shared.initialURL?.absoluteString
23
23
  }
24
+
25
+ Function("clearInitialURL") {
26
+ ExpoLinkingRegistry.shared.initialURL = nil
27
+ }
24
28
  }
25
29
 
26
30
  @objc func handleURLReceivedNotification(_ notification: Notification) {
@@ -1,8 +1,25 @@
1
+ import Foundation
2
+
1
3
  typealias OnURLReceivedCallback = (URL) -> Void
2
4
 
3
- class ExpoLinkingRegistry {
5
+ public let clearInitialURLNotification = Notification.Name("ExpoLinkingClearInitialURL")
6
+
7
+ class ExpoLinkingRegistry: NSObject {
4
8
  static let shared = ExpoLinkingRegistry()
5
9
  var initialURL: URL?
6
10
 
7
- private init() { }
11
+ private override init() {
12
+ super.init()
13
+ NotificationCenter.default.addObserver(
14
+ self,
15
+ selector: #selector(handleClearInitialURL),
16
+ name: clearInitialURLNotification,
17
+ object: nil
18
+ )
19
+ }
20
+
21
+ @objc
22
+ private func handleClearInitialURL() {
23
+ initialURL = nil
24
+ }
8
25
  }
@@ -0,0 +1 @@
1
+ a00ae7ad7f5d07a33f01b8af1caa9877b157308b68cff84358de4343c90fb61c
@@ -0,0 +1 @@
1
+ 3ea069737364b616948902aef961a3831d0e9fd65b34c28f475f883e9e7ab4248668d85c48ea7f7815dd86e1f19e6c61d64564bb2cd06f5b56cda5fbe7fa4d6c
@@ -0,0 +1 @@
1
+ 871c78452f5f85ddd6fe5af6789d985ce1e8c8f152c4161dee41779ced119f01
@@ -0,0 +1 @@
1
+ bfa4d9d13e83004a2be7ad378b8a4764b5e259dd8c24034f5d0b12c257ccd99e6ec8e2f0adac3d10627b1d250b3ed6eed7dfca4afbceab4fd6edf484df33dca4
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.linking",
6
- "version": "56.0.12",
6
+ "version": "56.0.13",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.linking-56.0.12.aar",
28
- "url": "expo.modules.linking-56.0.12.aar",
29
- "size": 12060,
30
- "sha512": "b412b9bb7e94873ed2679a4965fb54d9d31b580ed27ce9260098649b54608f6994c02d454a28935931b9f1e681968faccb79925bc620f68a8598b3643ba44222",
31
- "sha256": "cac6285cfde9293ada34173b57d26561decbf208bd3ad9779a549efad447131b",
32
- "sha1": "62617b3cfb2b4c2210a3522e4e5cc4e884b7f195",
33
- "md5": "d277fc07f77707aafc8ef03d3836f1ef"
27
+ "name": "expo.modules.linking-56.0.13.aar",
28
+ "url": "expo.modules.linking-56.0.13.aar",
29
+ "size": 13309,
30
+ "sha512": "bfa4d9d13e83004a2be7ad378b8a4764b5e259dd8c24034f5d0b12c257ccd99e6ec8e2f0adac3d10627b1d250b3ed6eed7dfca4afbceab4fd6edf484df33dca4",
31
+ "sha256": "871c78452f5f85ddd6fe5af6789d985ce1e8c8f152c4161dee41779ced119f01",
32
+ "sha1": "60bf134abeaa5861187b885fc6bdc65b4f29c667",
33
+ "md5": "89d799524769ffb518ae1158b185951e"
34
34
  }
35
35
  ]
36
36
  },
@@ -67,13 +67,13 @@
67
67
  ],
68
68
  "files": [
69
69
  {
70
- "name": "expo.modules.linking-56.0.12.aar",
71
- "url": "expo.modules.linking-56.0.12.aar",
72
- "size": 12060,
73
- "sha512": "b412b9bb7e94873ed2679a4965fb54d9d31b580ed27ce9260098649b54608f6994c02d454a28935931b9f1e681968faccb79925bc620f68a8598b3643ba44222",
74
- "sha256": "cac6285cfde9293ada34173b57d26561decbf208bd3ad9779a549efad447131b",
75
- "sha1": "62617b3cfb2b4c2210a3522e4e5cc4e884b7f195",
76
- "md5": "d277fc07f77707aafc8ef03d3836f1ef"
70
+ "name": "expo.modules.linking-56.0.13.aar",
71
+ "url": "expo.modules.linking-56.0.13.aar",
72
+ "size": 13309,
73
+ "sha512": "bfa4d9d13e83004a2be7ad378b8a4764b5e259dd8c24034f5d0b12c257ccd99e6ec8e2f0adac3d10627b1d250b3ed6eed7dfca4afbceab4fd6edf484df33dca4",
74
+ "sha256": "871c78452f5f85ddd6fe5af6789d985ce1e8c8f152c4161dee41779ced119f01",
75
+ "sha1": "60bf134abeaa5861187b885fc6bdc65b4f29c667",
76
+ "md5": "89d799524769ffb518ae1158b185951e"
77
77
  }
78
78
  ]
79
79
  },
@@ -87,13 +87,13 @@
87
87
  },
88
88
  "files": [
89
89
  {
90
- "name": "expo.modules.linking-56.0.12-sources.jar",
91
- "url": "expo.modules.linking-56.0.12-sources.jar",
92
- "size": 2384,
93
- "sha512": "d8abe8805c570aa18ee34018f0836e26d825ce9e008a7af2aa9ecc2ffd3f32958037def397960dbdcfb09bfba5938052603637dedc16a6d5d19e92efc0926f47",
94
- "sha256": "59d45e2a6cf5b9f1d58570a3a23fbfbcf5eeb66463e7510e727155d94c38cad2",
95
- "sha1": "6d333ab0bbfd515cec43299271011985dc02ff1d",
96
- "md5": "ed5b68ea8ace3e98aaaaa1bac77179fb"
90
+ "name": "expo.modules.linking-56.0.13-sources.jar",
91
+ "url": "expo.modules.linking-56.0.13-sources.jar",
92
+ "size": 2399,
93
+ "sha512": "3ea069737364b616948902aef961a3831d0e9fd65b34c28f475f883e9e7ab4248668d85c48ea7f7815dd86e1f19e6c61d64564bb2cd06f5b56cda5fbe7fa4d6c",
94
+ "sha256": "a00ae7ad7f5d07a33f01b8af1caa9877b157308b68cff84358de4343c90fb61c",
95
+ "sha1": "1b4470675f5e20a168d1bff521317c8a5b16c152",
96
+ "md5": "1db332ac890d60bcde90eb384a4c646b"
97
97
  }
98
98
  ]
99
99
  }
@@ -0,0 +1 @@
1
+ d37f938d80833f907c111ed95e178b565769acbbdb709ee40683d73a4e0a8077
@@ -0,0 +1 @@
1
+ c533dfee40477265e752f2b08d0c7b9c3be6dfd0ff7a2a85901ecf7f35cac3c26a307291901a8c827630085a2cf30eb3884586bfaf130021a0123633ac622815
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.linking</artifactId>
12
- <version>56.0.12</version>
12
+ <version>56.0.13</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.linking</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 47c1474f71003cca24d7337023603dc95fbced82a539ff9fdb9ffb476aa0cde7
@@ -0,0 +1 @@
1
+ 9737f6a81e43b1553c94160a6567b22065b7a1eaae1e809db64b51a238ac111addca6926daba1282589c7bb782dafa426e54b6f912b2e099c75e89c5de8aba42
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.linking</artifactId>
5
5
  <versioning>
6
- <latest>56.0.12</latest>
7
- <release>56.0.12</release>
6
+ <latest>56.0.13</latest>
7
+ <release>56.0.13</release>
8
8
  <versions>
9
- <version>56.0.12</version>
9
+ <version>56.0.13</version>
10
10
  </versions>
11
- <lastUpdated>20260526084440</lastUpdated>
11
+ <lastUpdated>20260529100158</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 80af532e29c5b0e07db2548079e2a402
1
+ 9fe5ee8619111d59b333bdfae38178e0
@@ -1 +1 @@
1
- 37394718a7a7d9f01babfca0747f2fd718f50885
1
+ 00a61a9855372c90d9cfaa027398583e746a2782
@@ -1 +1 @@
1
- ac23ec779ab264647d4b3876b8e8f1d68162dcf23e1a75baa8ad48ae424a3805
1
+ 1077e5c9303183180935fc63be6a83e53546e049d2fd46ab14e2a8e7705f696f
@@ -1 +1 @@
1
- d145437c520408ea9f617628c79dc852da31aeb9b994680c36a6fd998959a43f345652dc87103af7c851051d8a628c7cf182d193dbe6033761c9136a86aef271
1
+ 7b3669b9d53fe2e38c3497c3e1625b6b597d992a15ed8c2992f92034ab86481af5813177b190da6fe495b7b8ecbfd63838e505ad3d0101ef57043fc6de9c9932
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-linking",
3
- "version": "56.0.12",
3
+ "version": "56.0.13",
4
4
  "description": "Create and open deep links universally",
5
5
  "main": "build/Linking.js",
6
6
  "types": "build/Linking.d.ts",
@@ -43,7 +43,7 @@
43
43
  "jest": {
44
44
  "preset": "expo-module-scripts"
45
45
  },
46
- "gitHead": "f67a101bcbe56114e982184834b93da7bbed00af",
46
+ "gitHead": "a7adc95c1747db1e92655feba56d0e62660098db",
47
47
  "scripts": {
48
48
  "build": "expo-module build",
49
49
  "clean": "expo-module clean",
@@ -6,6 +6,7 @@ type ExpoLinkingModuleEvents = {
6
6
 
7
7
  declare class ExpoLinkingNativeModule extends NativeModule<ExpoLinkingModuleEvents> {
8
8
  getLinkingURL(): string | null;
9
+ clearInitialURL(): void;
9
10
  }
10
11
 
11
12
  const ExpoLinking = requireNativeModule<ExpoLinkingNativeModule>('ExpoLinking');
@@ -27,4 +27,6 @@ export default {
27
27
  if (typeof window === 'undefined') return '';
28
28
  return window.location.href;
29
29
  },
30
+
31
+ clearInitialURL(): void {},
30
32
  };
@@ -31,6 +31,8 @@ export function getLinkingURL() {
31
31
  return '';
32
32
  }
33
33
 
34
+ export function clearInitialURL(): void {}
35
+
34
36
  export async function openURL(url: string): Promise<true> {
35
37
  return true;
36
38
  }
package/src/Linking.ts CHANGED
@@ -90,6 +90,18 @@ export function getLinkingURL(): string | null {
90
90
  return ExpoLinking.getLinkingURL();
91
91
  }
92
92
 
93
+ /**
94
+ * Clears the cached initial URL used to launch the app, subsequent
95
+ * calls to [`getLinkingURL()`] return `null` until a new deep link is received.
96
+ *
97
+ * On web this is a no-op.
98
+ * @platform android
99
+ * @platform ios
100
+ */
101
+ export function clearInitialURL(): void {
102
+ ExpoLinking.clearInitialURL?.();
103
+ }
104
+
93
105
  // @needsAudit
94
106
  /**
95
107
  * Attempt to open the given URL with an installed app. See the [Linking guide](/guides/linking)
@@ -1 +0,0 @@
1
- 59d45e2a6cf5b9f1d58570a3a23fbfbcf5eeb66463e7510e727155d94c38cad2
@@ -1 +0,0 @@
1
- d8abe8805c570aa18ee34018f0836e26d825ce9e008a7af2aa9ecc2ffd3f32958037def397960dbdcfb09bfba5938052603637dedc16a6d5d19e92efc0926f47
@@ -1 +0,0 @@
1
- cac6285cfde9293ada34173b57d26561decbf208bd3ad9779a549efad447131b
@@ -1 +0,0 @@
1
- b412b9bb7e94873ed2679a4965fb54d9d31b580ed27ce9260098649b54608f6994c02d454a28935931b9f1e681968faccb79925bc620f68a8598b3643ba44222
@@ -1 +0,0 @@
1
- c2aa99dcbdf599a92796e7e45d4abc0e8d40bdc179971368a993f895a762a563
@@ -1 +0,0 @@
1
- 15cfb15a309530e5bb50c966680e16d3173e70b41c43b69694a5efbd7b54ef14e289e9629db51edd27c05dceb3a92d7b4ce151ed320aa60e62ff00386c74beb4
@@ -1 +0,0 @@
1
- f7b38ebd93b7ceb5f250198922b16c221617d30373e629195061bcb206f271c5
@@ -1 +0,0 @@
1
- 4f7aa77125fac055fc042742f9c209833fa8289fb84f408eba9051e69689ba0ec7206d5b21ee0af11b137544fce43a53f7b1e2a2bbed04e6ac402774f1f04f61