@symbiote-native/store-review 3.0.1 → 3.0.3
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 +35 -23
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# @symbiote-native/store-review
|
|
2
2
|
|
|
3
3
|
A wrapper package for [SymbioteNative](../../README.md) that makes
|
|
4
|
-
[`expo-store-review`](https://github.com/expo/expo/tree/main/packages/expo-store-review)
|
|
5
|
-
|
|
4
|
+
[`expo-store-review`](https://github.com/expo/expo/tree/main/packages/expo-store-review):
|
|
5
|
+
prompting the platform's native in-app review flow - usable from **every** adapter, React,
|
|
6
6
|
Vue, Svelte, Solid, and Angular, not just React. Like [`@symbiote-native/device`](../device) and
|
|
7
7
|
[`@symbiote-native/local-auth`](../local-auth), every export here is a one-shot async call with
|
|
8
|
-
no per-instance state, so there is no hook/composable/service to wrap
|
|
8
|
+
no per-instance state, so there is no hook/composable/service to wrap - the React, Vue, Svelte,
|
|
9
9
|
and Solid entry points are plain re-exports of the same `core`.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
@@ -23,32 +23,32 @@ npx @symbiote-native/cli add --store-review
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Either way: installs `@symbiote-native/store-review` and wires the native autolinking
|
|
26
|
-
automatically
|
|
26
|
+
automatically - see [`@symbiote-native/cli`](../cli).
|
|
27
27
|
|
|
28
28
|
<details>
|
|
29
|
-
<summary>Manual install (no CLI
|
|
29
|
+
<summary>Manual install (no CLI - installing and wiring native autolinking by hand)</summary>
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
32
|
npm install @symbiote-native/store-review
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
`expo-store-review` and `expo-modules-core` come along as regular dependencies, pinned to exact
|
|
36
|
-
versions
|
|
36
|
+
versions - never install either yourself, and never add the `expo` meta-package to your project
|
|
37
37
|
(it bundles its own Metro/Babel pipeline, which conflicts with this project's own).
|
|
38
38
|
|
|
39
39
|
### Required one-time step: native autolinking wiring
|
|
40
40
|
|
|
41
41
|
Unlike a plain RN native module, `expo-store-review`'s native code is discovered by
|
|
42
|
-
`expo-modules-autolinking`, not RN's own `react-native.config.cjs` mechanism
|
|
42
|
+
`expo-modules-autolinking`, not RN's own `react-native.config.cjs` mechanism - this needs wiring
|
|
43
43
|
into the native host app **once**, covering this package and every other `expo-modules-core`
|
|
44
44
|
package with zero further changes:
|
|
45
45
|
|
|
46
46
|
| Platform | Touches |
|
|
47
47
|
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
48
|
-
| iOS | `ios/Podfile`
|
|
49
|
-
| iOS | `AppDelegate.swift`
|
|
50
|
-
| Android | `settings.gradle` / `app/build.gradle`
|
|
51
|
-
| Android | `MainApplication.kt`
|
|
48
|
+
| iOS | `ios/Podfile` - add `use_expo_modules!` |
|
|
49
|
+
| iOS | `AppDelegate.swift` - Expo's runtime-bootstrap hook |
|
|
50
|
+
| Android | `settings.gradle` / `app/build.gradle` - resolve and include the Expo Gradle projects |
|
|
51
|
+
| 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) |
|
|
52
52
|
|
|
53
53
|
Full mechanics live in the `symbiote-expo-native-module` project skill. Reference
|
|
54
54
|
implementation: `examples/expo-react/ios/Podfile` and
|
|
@@ -64,11 +64,11 @@ implementation: `examples/expo-react/ios/Podfile` and
|
|
|
64
64
|
src/core/ isAvailableAsync / requestReview / hasAction, plus the IStoreReviewUrlOptions
|
|
65
65
|
type. native-module.ts resolves the native module via expo-modules-core's
|
|
66
66
|
requireNativeModule.
|
|
67
|
-
src/angular/ @symbiote-native/store-review/angular
|
|
67
|
+
src/angular/ @symbiote-native/store-review/angular - export * from '../core'
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
`./react`, `./vue`, `./svelte`, and `./solid` are `exports`-map aliases straight onto
|
|
71
|
-
`src/core/`
|
|
71
|
+
`src/core/` - no physical per-framework file, since there's nothing to subscribe to or clean up.
|
|
72
72
|
`./angular` stays a physical file/subpath since Angular ships through a separate `ngc`/AOT build
|
|
73
73
|
(`build-ngc/`).
|
|
74
74
|
|
|
@@ -168,7 +168,7 @@ export class RateAppButton {
|
|
|
168
168
|
}
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
These snippets mirror the real canary demo screens
|
|
171
|
+
These snippets mirror the real canary demo screens - `examples/expo-react/screens/StoreReviewScreen.tsx`,
|
|
172
172
|
`examples/expo-vue-sfc/screens/StoreReviewScreen.vue`, `examples/expo-vue-tsx/screens/StoreReviewScreen.tsx`,
|
|
173
173
|
`examples/expo-svelte/screens/StoreReviewScreen.svelte`, `examples/expo-solid/screens/StoreReviewScreen.tsx`,
|
|
174
174
|
`examples/expo-angular/src/screens/StoreReviewScreen.ts`.
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
isAvailableAsync,
|
|
193
193
|
hasAction,
|
|
194
194
|
} from '@symbiote-native/store-review';
|
|
195
|
-
// or the framework-scoped entry points
|
|
195
|
+
// or the framework-scoped entry points - identical surface, re-exported verbatim:
|
|
196
196
|
import { requestReview } from '@symbiote-native/store-review/react';
|
|
197
197
|
import { requestReview } from '@symbiote-native/store-review/vue';
|
|
198
198
|
import { requestReview } from '@symbiote-native/store-review/svelte';
|
|
@@ -202,36 +202,48 @@ import { requestReview } from '@symbiote-native/store-review/angular';
|
|
|
202
202
|
|
|
203
203
|
## Notes
|
|
204
204
|
|
|
205
|
-
- **Deliberate deviation from upstream
|
|
205
|
+
- **Deliberate deviation from upstream - no `expo-constants` dependency.** Upstream's
|
|
206
206
|
`storeUrl()` reads `Constants.expoConfig.ios.appStoreUrl`/`.android.playStoreUrl` off
|
|
207
207
|
`expo-constants`, which requires an Expo-CLI-generated manifest (`app.config`/EAS/updates)
|
|
208
208
|
this bare, Metro-only project never produces (see the `symbiote-expo-package-catalog` skill,
|
|
209
|
-
row 9
|
|
209
|
+
row 9 - `expo-constants` was skipped for exactly this reason). So this port trims that surface:
|
|
210
210
|
every function that would have read the manifest instead takes an optional
|
|
211
211
|
`IStoreReviewUrlOptions` argument (`iosAppStoreUrl` / `androidPlayStoreUrl`), and the caller
|
|
212
212
|
supplies the store URL explicitly instead of it being resolved from `app.json`/`app.config.js`.
|
|
213
|
-
There is no standalone `storeUrl()` export
|
|
213
|
+
There is no standalone `storeUrl()` export - its logic lives inline as a private helper,
|
|
214
214
|
since it now takes the same options argument every public function does.
|
|
215
215
|
- **`requestReview()` prefers the native in-app review flow** (iOS `SKStoreReviewController`,
|
|
216
216
|
Android's Play Core in-app review API) and only falls back to opening the supplied store URL
|
|
217
|
-
via `Linking` when the native flow is unavailable
|
|
218
|
-
- **A missing URL on the fallback path logs a warning, never throws**
|
|
217
|
+
via `Linking` when the native flow is unavailable - matching upstream's own fallback order.
|
|
218
|
+
- **A missing URL on the fallback path logs a warning, never throws** - matching upstream's own
|
|
219
219
|
`console.warn`-and-continue behavior, just with different wording (pointing at the
|
|
220
220
|
`IStoreReviewUrlOptions` argument instead of `app.json`).
|
|
221
221
|
|
|
222
|
+
## Common questions
|
|
223
|
+
|
|
224
|
+
- **No prompt on TestFlight.** Apple suppresses it there; test a release build elsewhere.
|
|
225
|
+
- **`isAvailableAsync` is `false`.** Simulators and old OS versions; it is only a capability check.
|
|
226
|
+
- **How often?** iOS caps it at about three a year; never wire it to a button.
|
|
227
|
+
- **Resolves but nothing shows.** The user may have In-App Ratings and Reviews off.
|
|
228
|
+
- **`E_NO_SCENE`.** iOS needs a foreground-active window scene.
|
|
229
|
+
|
|
230
|
+
Sources: [expo/expo#38163](https://github.com/expo/expo/issues/38163),
|
|
231
|
+
[expo/expo#35497](https://github.com/expo/expo/issues/35497),
|
|
232
|
+
[expo/expo#28080](https://github.com/expo/expo/issues/28080).
|
|
233
|
+
|
|
222
234
|
## Test it
|
|
223
235
|
|
|
224
|
-
No Fabric/Descriptor angle at all
|
|
236
|
+
No Fabric/Descriptor angle at all - every export here is a pure async-function surface, never a
|
|
225
237
|
view or per-instance state. Tests inject a fake native-module object in place of the real
|
|
226
238
|
`requireNativeModule` resolution, plus a stubbed `expo-modules-core` `Platform` and a stubbed
|
|
227
|
-
`react-native` `Linking` (`src/core/store-review.test.ts`, `vitest`)
|
|
239
|
+
`react-native` `Linking` (`src/core/store-review.test.ts`, `vitest`) - no `installFabric()`, no
|
|
228
240
|
ViewConfig. Native rendering itself is verified on-device (see the parent
|
|
229
241
|
[README](../../README.md) for the project's testing model).
|
|
230
242
|
|
|
231
243
|
Native autolinking wiring for `expo-modules-core` packages is already done in all six Expo
|
|
232
244
|
canary apps (`examples/expo-react`, `examples/expo-vue-sfc`, `examples/expo-vue-tsx`,
|
|
233
245
|
`examples/expo-svelte`, `examples/expo-solid`, `examples/expo-angular`) via
|
|
234
|
-
`@symbiote-native/local-auth`/`@symbiote-native/sensors`
|
|
246
|
+
`@symbiote-native/local-auth`/`@symbiote-native/sensors` - this package reuses that same wiring
|
|
235
247
|
with zero further app-side changes, since `expo-modules-autolinking` discovers any
|
|
236
248
|
`expo-modules-core` package already present in `node_modules`. Each canary carries its own
|
|
237
249
|
`StoreReviewScreen` demo.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/store-review",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "expo-store-review wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, Svelte, Solid, and Angular adapters. Prompts the platform's native in-app review flow, with a caller-supplied store-URL fallback in place of upstream's expo-constants-based lookup (this project doesn't depend on expo-constants).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"expo-store-review": "57.0.1",
|
|
72
|
-
"expo-modules-core": "57.0.
|
|
72
|
+
"expo-modules-core": "57.0.20"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
75
|
"@angular/core": ">=20",
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
"solid-js": ">=1.9.0",
|
|
80
80
|
"svelte": ">=5.56.0",
|
|
81
81
|
"vue": ">=3.5.0",
|
|
82
|
-
"@symbiote-native/angular": "^3.
|
|
83
|
-
"@symbiote-native/engine": "^1.
|
|
84
|
-
"@symbiote-native/react": "^3.0
|
|
85
|
-
"@symbiote-native/solid": "^3.0
|
|
86
|
-
"@symbiote-native/
|
|
87
|
-
"@symbiote-native/
|
|
82
|
+
"@symbiote-native/angular": "^3.2.0",
|
|
83
|
+
"@symbiote-native/engine": "^1.5.0",
|
|
84
|
+
"@symbiote-native/react": "^3.2.0",
|
|
85
|
+
"@symbiote-native/solid": "^3.1.0",
|
|
86
|
+
"@symbiote-native/svelte": "^3.1.0",
|
|
87
|
+
"@symbiote-native/vue": "^3.2.0"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
90
90
|
"@symbiote-native/angular": {
|
|
@@ -132,13 +132,13 @@
|
|
|
132
132
|
"solid-js": "^1.9.14",
|
|
133
133
|
"svelte": "^5.56.0",
|
|
134
134
|
"typescript": "~6.0.0",
|
|
135
|
-
"@symbiote-native/angular": "3.
|
|
136
|
-
"@symbiote-native/engine": "1.
|
|
137
|
-
"@symbiote-native/react": "3.0
|
|
138
|
-
"@symbiote-native/solid": "3.0
|
|
139
|
-
"@symbiote-native/svelte": "3.0
|
|
140
|
-
"@symbiote-native/test-utils": "0.4.
|
|
141
|
-
"@symbiote-native/vue": "3.0
|
|
135
|
+
"@symbiote-native/angular": "3.2.0",
|
|
136
|
+
"@symbiote-native/engine": "1.5.0",
|
|
137
|
+
"@symbiote-native/react": "3.2.0",
|
|
138
|
+
"@symbiote-native/solid": "3.1.0",
|
|
139
|
+
"@symbiote-native/svelte": "3.1.0",
|
|
140
|
+
"@symbiote-native/test-utils": "0.4.6",
|
|
141
|
+
"@symbiote-native/vue": "3.2.0"
|
|
142
142
|
},
|
|
143
143
|
"scripts": {
|
|
144
144
|
"typecheck": "tsc --build",
|