@symbiote-native/application 0.2.0 → 1.0.0

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/README.md CHANGED
@@ -4,12 +4,11 @@ A wrapper package for [SymbioteNative](../../README.md) that makes
4
4
  [`expo-application`](https://github.com/expo/expo/tree/main/packages/expo-application)
5
5
  — native app version/build/name/ID, the Android ID, install-referrer and install/update-time
6
6
  lookups, and the iOS vendor ID / release type / push-notification-service environment — usable
7
- from **every** adapter, React, Vue, and Angular, not just React. Like
7
+ from **every** adapter, React, Vue, Svelte, Solid, and Angular. Like
8
8
  [`@symbiote-native/local-auth`](../local-auth) (and unlike `@symbiote-native/sensors`'s
9
9
  `EventEmitter` + live-subscription surface), everything here is either a plain constant resolved
10
10
  once at import time or a one-shot async call with no per-instance state, so there is no hook/
11
- composable/service to wrap — the React, Vue, and Angular entry points are plain re-exports of
12
- the same `core`.
11
+ composable/service to wrap — every adapter's entry point is a plain re-export of the same `core`.
13
12
 
14
13
  ## Install
15
14
 
@@ -28,12 +27,12 @@ Unlike a plain RN native module, `expo-application`'s native code is discovered
28
27
  into the native host app **once**, covering this package and every other `expo-modules-core`
29
28
  package with zero further changes:
30
29
 
31
- | Platform | Touches |
32
- |---|---|
33
- | iOS | `ios/Podfile` — add `use_expo_modules!` |
34
- | iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
35
- | Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
36
- | Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
30
+ | Platform | Touches |
31
+ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
32
+ | iOS | `ios/Podfile` — add `use_expo_modules!` |
33
+ | iOS | `AppDelegate.swift` — Expo's runtime-bootstrap hook |
34
+ | Android | `settings.gradle` / `app/build.gradle` — resolve and include the Expo Gradle projects |
35
+ | Android | `MainApplication.kt` — Expo's bootstrap hook, plus a hand-written native-module name map (there's no `expo` meta-package here to auto-generate one) |
37
36
 
38
37
  Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
39
38
  implementation: `examples/expo-react/ios/Podfile` and
@@ -51,13 +50,12 @@ src/core/ nativeApplicationVersion / nativeBuildVersion / applicationName /
51
50
  getInstallationTimeAsync, getLastUpdateTimeAsync, plus ApplicationReleaseType and
52
51
  PushNotificationServiceEnvironment. native-module.ts resolves the native module via
53
52
  expo-modules-core's requireNativeModule.
54
- src/react/ @symbiote-native/application/react — export * from '../core'
55
- src/vue/ @symbiote-native/application/vue — export * from '../core'
56
53
  src/angular/ @symbiote-native/application/angular — export * from '../core'
57
54
  ```
58
55
 
59
- No per-adapter lifecycle wrapper exists because there's nothing to subscribe to or clean up —
60
- each adapter entry is a single-file re-export.
56
+ `./react`, `./vue`, `./svelte`, and `./solid` are `exports`-map aliases straight onto `src/core/`
57
+ — no physical per-framework file, since there's nothing to subscribe to or clean up. `./angular`
58
+ stays a physical file/subpath since Angular ships through a separate `ngc`/AOT build (`build-ngc/`).
61
59
 
62
60
  ## Use it
63
61
 
@@ -82,8 +80,12 @@ function ApplicationScreen() {
82
80
 
83
81
  return (
84
82
  <View>
85
- <Text>{applicationName} ({applicationId})</Text>
86
- <Text>v{nativeApplicationVersion} (build {nativeBuildVersion})</Text>
83
+ <Text>
84
+ {applicationName} ({applicationId})
85
+ </Text>
86
+ <Text>
87
+ v{nativeApplicationVersion} (build {nativeBuildVersion})
88
+ </Text>
87
89
  {Platform.OS === 'android' && installedAt && (
88
90
  <Text>Installed {installedAt.toLocaleDateString()}</Text>
89
91
  )}
@@ -115,7 +117,9 @@ onMounted(() => {
115
117
  <template>
116
118
  <View>
117
119
  <Text>{{ applicationName }} ({{ applicationId }})</Text>
118
- <Text>v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text>
120
+ <Text
121
+ >v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text
122
+ >
119
123
  <Text v-if="Platform.OS === 'android' && installedAt">
120
124
  Installed {{ installedAt?.toLocaleDateString() }}
121
125
  </Text>
@@ -141,7 +145,9 @@ import {
141
145
  template: `
142
146
  <View>
143
147
  <Text>{{ applicationName }} ({{ applicationId }})</Text>
144
- <Text>v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text>
148
+ <Text
149
+ >v{{ nativeApplicationVersion }} (build {{ nativeBuildVersion }})</Text
150
+ >
145
151
  @if (Platform.OS === 'android' && installedAt(); as date) {
146
152
  <Text>Installed {{ date.toLocaleDateString() }}</Text>
147
153
  }
@@ -158,10 +164,75 @@ export class ApplicationScreen {
158
164
  }
159
165
  ```
160
166
 
167
+ ```svelte
168
+ <!-- Svelte -->
169
+ <script lang="ts">
170
+ import { Platform, Text, View } from '@symbiote-native/svelte';
171
+ import {
172
+ applicationId,
173
+ applicationName,
174
+ getInstallationTimeAsync,
175
+ nativeApplicationVersion,
176
+ nativeBuildVersion,
177
+ } from '@symbiote-native/application/svelte';
178
+
179
+ let installedAt = $state<Date | null>(null);
180
+
181
+ getInstallationTimeAsync().then(value => {
182
+ installedAt = value;
183
+ });
184
+ </script>
185
+
186
+ <View>
187
+ <Text>{applicationName} ({applicationId})</Text>
188
+ <Text>v{nativeApplicationVersion} (build {nativeBuildVersion})</Text>
189
+ {#if Platform.OS === 'android' && installedAt !== null}
190
+ <Text>Installed {installedAt.toLocaleDateString()}</Text>
191
+ {/if}
192
+ </View>
193
+ ```
194
+
195
+ ```tsx
196
+ // Solid
197
+ import { createSignal } from 'solid-js';
198
+ import { Platform, Text, View } from '@symbiote-native/solid';
199
+ import {
200
+ applicationId,
201
+ applicationName,
202
+ getInstallationTimeAsync,
203
+ nativeApplicationVersion,
204
+ nativeBuildVersion,
205
+ } from '@symbiote-native/application/solid';
206
+
207
+ function ApplicationScreen() {
208
+ const [installedAt, setInstalledAt] = createSignal<Date | null>(null);
209
+
210
+ getInstallationTimeAsync().then(setInstalledAt);
211
+
212
+ return (
213
+ <View>
214
+ <Text>
215
+ {applicationName} ({applicationId})
216
+ </Text>
217
+ <Text>
218
+ v{nativeApplicationVersion} (build {nativeBuildVersion})
219
+ </Text>
220
+ {Platform.OS === 'android' && installedAt() !== null && (
221
+ <Text>Installed {installedAt()!.toLocaleDateString()}</Text>
222
+ )}
223
+ </View>
224
+ );
225
+ }
226
+ ```
227
+
161
228
  There's no per-instance service to `inject()` in the Angular case — every function is a plain
162
- free function off the core package, called straight from the constructor. All three examples
163
- mirror the real canary demo screens — `examples/expo-react/screens/ApplicationScreen.tsx`,
164
- `examples/expo-vue-sfc/screens/ApplicationScreen.vue`, `examples/expo-vue-tsx/screens/ApplicationScreen.tsx`,
229
+ free function off the core package, called straight from the constructor (or, on Solid, straight
230
+ from the component body). All five examples mirror the real canary demo screens —
231
+ `examples/expo-react/screens/ApplicationScreen.tsx`,
232
+ `examples/expo-vue-sfc/screens/ApplicationScreen.vue`,
233
+ `examples/expo-vue-tsx/screens/ApplicationScreen.tsx`,
234
+ `examples/expo-svelte/screens/ApplicationScreen.svelte`,
235
+ `examples/expo-solid/screens/ApplicationScreen.tsx`,
165
236
  `examples/expo-angular/src/screens/ApplicationScreen.ts`.
166
237
 
167
238
  ## API
@@ -191,7 +262,10 @@ Plus `ApplicationReleaseType` and `PushNotificationServiceEnvironment` — porte
191
262
  carries no `I` prefix; `ts-js-best-practices`).
192
263
 
193
264
  ```ts
194
- import { getInstallationTimeAsync, nativeApplicationVersion } from '@symbiote-native/application';
265
+ import {
266
+ getInstallationTimeAsync,
267
+ nativeApplicationVersion,
268
+ } from '@symbiote-native/application';
195
269
  // or the framework-scoped entry points — identical surface, re-exported verbatim:
196
270
  import { getInstallationTimeAsync } from '@symbiote-native/application/react';
197
271
  import { getInstallationTimeAsync } from '@symbiote-native/application/vue';
@@ -1,2 +1,2 @@
1
1
  export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application';
2
- export { ApplicationReleaseType, type PushNotificationServiceEnvironment } from './types';
2
+ export { ApplicationReleaseType, type PushNotificationServiceEnvironment, } from './types';
@@ -1,2 +1,2 @@
1
1
  export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application.js';
2
- export { ApplicationReleaseType } from './types.js';
2
+ export { ApplicationReleaseType, } from './types.js';
@@ -1 +1 @@
1
- {"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/core/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAE9C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GACnC,eAAe,CAAC,wBAAwB,IAAI,IAAI,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAkB,eAAe,CAAC,kBAAkB,IAAI,IAAI,CAAC;AAE5F;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkB,eAAe,CAAC,eAAe,IAAI,IAAI,CAAC;AAEtF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkB,eAAe,CAAC,aAAa,IAAI,IAAI,CAAC;AAElF;;;;;;GAMG;AACH,MAAM,UAAU,YAAY;IAC1B,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC;QAC/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AAwB,EAAE,CAAC;QAC9C,MAAM,IAAI,mBAAmB,CAC3B,kBAAkB,EAClB,0BAA0B,CAC3B,CAAC;IACJ,CAAC;IACD,MAAM,gBAAgB,GAAG,MAAM,eAAe,CAAC,wBAAwB,EAAE,CAAC;IAC1E,OAAO,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,IAAI,CAAC,eAAe,CAAC,sBAAsB,EAAE,CAAC;QAC5C,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,EAAE,wBAAwB,CAAC,CAAC;IAC9E,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,eAAe,CAAC,sBAAsB,EAAE,CAAC;IACtE,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC;AAClC,CAAC"}
@@ -1,2 +1,2 @@
1
1
  export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application';
2
- export { ApplicationReleaseType, type PushNotificationServiceEnvironment } from './types';
2
+ export { ApplicationReleaseType, type PushNotificationServiceEnvironment, } from './types';
@@ -1,3 +1,3 @@
1
1
  export { nativeApplicationVersion, nativeBuildVersion, applicationName, applicationId, getAndroidId, getInstallReferrerAsync, getIosIdForVendorAsync, getIosApplicationReleaseTypeAsync, getIosPushNotificationServiceEnvironmentAsync, getInstallationTimeAsync, getLastUpdateTimeAsync, } from './application';
2
- export { ApplicationReleaseType } from './types';
2
+ export { ApplicationReleaseType, } from './types';
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EACjC,6CAA6C,EAC7C,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAA2C,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,sBAAsB,EACtB,iCAAiC,EACjC,6CAA6C,EAC7C,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,sBAAsB,GAEvB,MAAM,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGxD,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AAoBvD,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAChD,4BAA4B,CAC7B,CAAC"}
1
+ {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAMxD,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;AAoBvD,MAAM,CAAC,MAAM,eAAe,GAAG,mBAAmB,CAChD,4BAA4B,CAC7B,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@symbiote-native/application",
3
- "version": "0.2.0",
4
- "description": "expo-application wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Native app version/build/name/ID constants, the Android ID, install-referrer and install/update-time lookups, and the iOS vendor ID, release type, and push-notification-service environment.",
3
+ "version": "1.0.0",
4
+ "description": "expo-application wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Native app version/build/name/ID constants, the Android ID, install-referrer and install/update-time lookups, and the iOS vendor ID, release type, and push-notification-service environment.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -13,6 +13,18 @@
13
13
  "url": "https://github.com/OneEyed1366/symbiote-native/issues"
14
14
  },
15
15
  "author": "Andrey Prokopenko <psevdoproger@gmail.com>",
16
+ "keywords": [
17
+ "react-native",
18
+ "symbiote-native",
19
+ "expo-application",
20
+ "react",
21
+ "vue",
22
+ "svelte",
23
+ "solid",
24
+ "angular",
25
+ "app-version",
26
+ "android-id"
27
+ ],
16
28
  "type": "module",
17
29
  "main": "./build/core/index.js",
18
30
  "module": "./build/core/index.js",
@@ -23,16 +35,20 @@
23
35
  "default": "./build/core/index.js"
24
36
  },
25
37
  "./vue": {
26
- "types": "./build/vue/index.d.ts",
27
- "default": "./build/vue/index.js"
38
+ "types": "./build/core/index.d.ts",
39
+ "default": "./build/core/index.js"
28
40
  },
29
41
  "./react": {
30
- "types": "./build/react/index.d.ts",
31
- "default": "./build/react/index.js"
42
+ "types": "./build/core/index.d.ts",
43
+ "default": "./build/core/index.js"
32
44
  },
33
45
  "./svelte": {
34
- "types": "./build/svelte/index.d.ts",
35
- "default": "./build/svelte/index.js"
46
+ "types": "./build/core/index.d.ts",
47
+ "default": "./build/core/index.js"
48
+ },
49
+ "./solid": {
50
+ "types": "./build/core/index.d.ts",
51
+ "default": "./build/core/index.js"
36
52
  },
37
53
  "./angular": {
38
54
  "types": "./build-ngc/angular/index.d.ts",
@@ -57,17 +73,19 @@
57
73
  "expo-modules-core": "57.0.5"
58
74
  },
59
75
  "peerDependencies": {
60
- "@symbiote-native/angular": ">=0.6.2",
61
- "@symbiote-native/engine": ">=0.1.7",
62
- "@symbiote-native/react": ">=0.2.8",
63
- "@symbiote-native/svelte": ">=0.1.0",
64
- "@symbiote-native/vue": ">=0.3.8",
65
76
  "@angular/core": ">=20",
66
77
  "@vue/runtime-core": "^3.5.13",
67
78
  "react": ">=19.0.0",
68
79
  "react-native": ">=0.86",
80
+ "solid-js": ">=1.9.0",
69
81
  "svelte": ">=5.56.0",
70
- "vue": ">=3.5.0"
82
+ "vue": ">=3.5.0",
83
+ "@symbiote-native/angular": "^1.0.0",
84
+ "@symbiote-native/engine": "^0.4.0",
85
+ "@symbiote-native/react": "^1.0.0",
86
+ "@symbiote-native/solid": "^1.0.0",
87
+ "@symbiote-native/svelte": "^1.0.0",
88
+ "@symbiote-native/vue": "^1.0.0"
71
89
  },
72
90
  "peerDependenciesMeta": {
73
91
  "@symbiote-native/angular": {
@@ -76,6 +94,9 @@
76
94
  "@symbiote-native/react": {
77
95
  "optional": true
78
96
  },
97
+ "@symbiote-native/solid": {
98
+ "optional": true
99
+ },
79
100
  "@symbiote-native/svelte": {
80
101
  "optional": true
81
102
  },
@@ -91,6 +112,9 @@
91
112
  "react": {
92
113
  "optional": true
93
114
  },
115
+ "solid-js": {
116
+ "optional": true
117
+ },
94
118
  "svelte": {
95
119
  "optional": true
96
120
  },
@@ -106,14 +130,16 @@
106
130
  "@types/react": "^19.2.0",
107
131
  "@vue/runtime-core": "^3.5.13",
108
132
  "react": "19.2.3",
133
+ "solid-js": "^1.9.14",
109
134
  "svelte": "^5.56.0",
110
135
  "typescript": "~6.0.0",
111
- "@symbiote-native/angular": "0.7.0",
112
- "@symbiote-native/engine": "0.2.0",
113
- "@symbiote-native/react": "0.3.0",
114
- "@symbiote-native/svelte": "0.2.0",
115
- "@symbiote-native/test-utils": "0.1.6",
116
- "@symbiote-native/vue": "0.4.0"
136
+ "@symbiote-native/angular": "1.0.0",
137
+ "@symbiote-native/engine": "0.4.0",
138
+ "@symbiote-native/react": "1.0.0",
139
+ "@symbiote-native/solid": "1.0.0",
140
+ "@symbiote-native/svelte": "1.0.0",
141
+ "@symbiote-native/test-utils": "0.3.0",
142
+ "@symbiote-native/vue": "1.0.0"
117
143
  },
118
144
  "scripts": {
119
145
  "typecheck": "tsc --build",
@@ -1,7 +1,10 @@
1
1
  import { Platform, UnavailabilityError } from 'expo-modules-core';
2
2
 
3
3
  import { expoApplication } from './native-module';
4
- import type { ApplicationReleaseType, PushNotificationServiceEnvironment } from './types';
4
+ import type {
5
+ ApplicationReleaseType,
6
+ PushNotificationServiceEnvironment,
7
+ } from './types';
5
8
 
6
9
  const NATIVE_MODULE_NAME = 'expo-application';
7
10
 
@@ -20,21 +23,24 @@ export const nativeApplicationVersion: string | null =
20
23
  * the `Info.plist` value for `CFBundleVersion` (`ios.buildNumber` in the app config).
21
24
  * @example `"114"`
22
25
  */
23
- export const nativeBuildVersion: string | null = expoApplication.nativeBuildVersion ?? null;
26
+ export const nativeBuildVersion: string | null =
27
+ expoApplication.nativeBuildVersion ?? null;
24
28
 
25
29
  /**
26
30
  * The human-readable name of the application, displayed with the app's icon on the device's
27
31
  * home screen.
28
32
  * @example `"Expo"`, `"Yelp"`, `"Instagram"`
29
33
  */
30
- export const applicationName: string | null = expoApplication.applicationName ?? null;
34
+ export const applicationName: string | null =
35
+ expoApplication.applicationName ?? null;
31
36
 
32
37
  /**
33
38
  * The ID of the application. On Android, this is the application ID. On iOS, this is the
34
39
  * bundle ID.
35
40
  * @example `"com.cocoacasts.scribbles"`, `"com.apple.Pages"`
36
41
  */
37
- export const applicationId: string | null = expoApplication.applicationId ?? null;
42
+ export const applicationId: string | null =
43
+ expoApplication.applicationId ?? null;
38
44
 
39
45
  /**
40
46
  * Gets the value of `Settings.Secure.ANDROID_ID` — a hexadecimal string unique to each
@@ -61,7 +67,10 @@ export function getAndroidId(): string {
61
67
  */
62
68
  export async function getInstallReferrerAsync(): Promise<string> {
63
69
  if (!expoApplication.getInstallReferrerAsync) {
64
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getInstallReferrerAsync');
70
+ throw new UnavailabilityError(
71
+ NATIVE_MODULE_NAME,
72
+ 'getInstallReferrerAsync',
73
+ );
65
74
  }
66
75
  return expoApplication.getInstallReferrerAsync();
67
76
  }
@@ -87,7 +96,10 @@ export async function getIosIdForVendorAsync(): Promise<string | null> {
87
96
  */
88
97
  export async function getIosApplicationReleaseTypeAsync(): Promise<ApplicationReleaseType> {
89
98
  if (!expoApplication.getApplicationReleaseTypeAsync) {
90
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getApplicationReleaseTypeAsync');
99
+ throw new UnavailabilityError(
100
+ NATIVE_MODULE_NAME,
101
+ 'getApplicationReleaseTypeAsync',
102
+ );
91
103
  }
92
104
  return expoApplication.getApplicationReleaseTypeAsync();
93
105
  }
@@ -100,7 +112,10 @@ export async function getIosApplicationReleaseTypeAsync(): Promise<ApplicationRe
100
112
  */
101
113
  export async function getIosPushNotificationServiceEnvironmentAsync(): Promise<PushNotificationServiceEnvironment> {
102
114
  if (!expoApplication.getPushNotificationServiceEnvironmentAsync) {
103
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getPushNotificationServiceEnvironmentAsync');
115
+ throw new UnavailabilityError(
116
+ NATIVE_MODULE_NAME,
117
+ 'getPushNotificationServiceEnvironmentAsync',
118
+ );
104
119
  }
105
120
  return expoApplication.getPushNotificationServiceEnvironmentAsync();
106
121
  }
@@ -114,7 +129,10 @@ export async function getIosPushNotificationServiceEnvironmentAsync(): Promise<P
114
129
  */
115
130
  export async function getInstallationTimeAsync(): Promise<Date> {
116
131
  if (!expoApplication.getInstallationTimeAsync) {
117
- throw new UnavailabilityError(NATIVE_MODULE_NAME, 'getInstallationTimeAsync');
132
+ throw new UnavailabilityError(
133
+ NATIVE_MODULE_NAME,
134
+ 'getInstallationTimeAsync',
135
+ );
118
136
  }
119
137
  const installationTime = await expoApplication.getInstallationTimeAsync();
120
138
  return new Date(installationTime);
package/src/core/index.ts CHANGED
@@ -11,4 +11,7 @@ export {
11
11
  getInstallationTimeAsync,
12
12
  getLastUpdateTimeAsync,
13
13
  } from './application';
14
- export { ApplicationReleaseType, type PushNotificationServiceEnvironment } from './types';
14
+ export {
15
+ ApplicationReleaseType,
16
+ type PushNotificationServiceEnvironment,
17
+ } from './types';
@@ -1,5 +1,8 @@
1
1
  import { requireNativeModule } from 'expo-modules-core';
2
- import type { ApplicationReleaseType, PushNotificationServiceEnvironment } from './types';
2
+ import type {
3
+ ApplicationReleaseType,
4
+ PushNotificationServiceEnvironment,
5
+ } from './types';
3
6
 
4
7
  const EXPO_APPLICATION_MODULE_NAME = 'ExpoApplication';
5
8
 
package/src/core/types.ts CHANGED
@@ -19,4 +19,5 @@ export enum ApplicationReleaseType {
19
19
  * Maps to the `aps-environment` key in the native target's registered entitlements.
20
20
  * @platform ios
21
21
  */
22
- export type PushNotificationServiceEnvironment = 'development' | 'production' | null;
22
+ export type PushNotificationServiceEnvironment =
23
+ 'development' | 'production' | null;
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,5 +0,0 @@
1
- // @symbiote-native/application/react: the React entry over the framework-agnostic core.
2
- // Upstream ships plain constants and one-shot async functions, no per-instance state and no
3
- // event stream — there is nothing for a hook to wrap, so this is a plain re-export, mirroring
4
- // packages/local-auth/src/react/index.ts.
5
- export * from '../core/index.js';
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/application/svelte: the Svelte entry over the framework-agnostic core.
2
- // Upstream ships plain constants and one-shot async functions, no per-instance state and no
3
- // event stream — there is nothing for a rune to wrap, so this is a plain re-export. Svelte's
4
- // lifecycle bucket is `runes/` (adapters/svelte/src/runes — never React's `hooks` or Vue's
5
- // `composables`), and this package has none to fill.
6
- export * from '../core/index.js';
@@ -1 +0,0 @@
1
- export * from '../core';
@@ -1,4 +0,0 @@
1
- // @symbiote-native/application/vue: the Vue entry over the framework-agnostic core. Same
2
- // reasoning as the React entry — no per-instance state or event stream to wire onto Vue's
3
- // reactivity, so this is a plain re-export.
4
- export * from '../core/index.js';
@@ -1,5 +0,0 @@
1
- // @symbiote-native/application/react: the React entry over the framework-agnostic core.
2
- // Upstream ships plain constants and one-shot async functions, no per-instance state and no
3
- // event stream — there is nothing for a hook to wrap, so this is a plain re-export, mirroring
4
- // packages/local-auth/src/react/index.ts.
5
- export * from '../core';
@@ -1,6 +0,0 @@
1
- // @symbiote-native/application/svelte: the Svelte entry over the framework-agnostic core.
2
- // Upstream ships plain constants and one-shot async functions, no per-instance state and no
3
- // event stream — there is nothing for a rune to wrap, so this is a plain re-export. Svelte's
4
- // lifecycle bucket is `runes/` (adapters/svelte/src/runes — never React's `hooks` or Vue's
5
- // `composables`), and this package has none to fill.
6
- export * from '../core';
package/src/vue/index.ts DELETED
@@ -1,4 +0,0 @@
1
- // @symbiote-native/application/vue: the Vue entry over the framework-agnostic core. Same
2
- // reasoning as the React entry — no per-instance state or event stream to wire onto Vue's
3
- // reactivity, so this is a plain re-export.
4
- export * from '../core';