expo-targets 0.2.8 → 0.2.9
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 +20 -50
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,18 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
**Source of truth for** the published package overview (monorepo canonical story lives in the root README).
|
|
4
4
|
|
|
5
|
-
<!-- doc-meta: owner=eng | last-reviewed=2026-08-
|
|
5
|
+
<!-- doc-meta: owner=eng | last-reviewed=2026-08-05 -->
|
|
6
6
|
|
|
7
|
-
Expo config plugin and runtime for Apple app extensions Expo does not ship — share, action, App Clips, messages, stickers, wallet, and more. React Native UIs are supported for share/action/clip/messages.
|
|
7
|
+
Expo config plugin and runtime for Apple app extensions Expo does not ship — share, action, App Clips, messages, stickers, wallet, and more. React Native UIs are supported for share/action/clip/messages/notification-content/safari (popup).
|
|
8
8
|
|
|
9
|
-
> **Part of the expo-targets monorepo**. Full docs: [
|
|
9
|
+
> **Part of the expo-targets monorepo**. Full docs: [https://github.com/csark0812/expo-targets](https://github.com/csark0812/expo-targets).
|
|
10
10
|
>
|
|
11
|
-
> **
|
|
11
|
+
> **Tested on Expo SDK 57** (development builds; not Expo Go).
|
|
12
|
+
>
|
|
13
|
+
> **Widgets:** Native WidgetKit + Live Activities are first-class. See [widgets](https://github.com/csark0812/expo-targets/blob/main/docs/widgets.md). Android widgets are bridge-grade.
|
|
14
|
+
>
|
|
15
|
+
> **Bare RN:** `expo-targets sync` is unimplemented — use `npx expo prebuild`. Tracking: [#67](https://github.com/csark0812/expo-targets/issues/67).
|
|
12
16
|
|
|
13
17
|
## Quick Start
|
|
14
18
|
|
|
15
19
|
```bash
|
|
16
|
-
|
|
20
|
+
npm install expo-targets
|
|
21
|
+
# or: bun add expo-targets / yarn add expo-targets
|
|
17
22
|
```
|
|
18
23
|
|
|
19
24
|
```bash
|
|
@@ -36,58 +41,23 @@ import ShareExtension from "./ShareExtension";
|
|
|
36
41
|
export const myShare = createTarget<"share">("MyShare", ShareExtension);
|
|
37
42
|
```
|
|
38
43
|
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
### 1. TypeScript API (`src/`)
|
|
44
|
+
## Storage
|
|
42
45
|
|
|
43
46
|
```typescript
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
openHostApp,
|
|
49
|
-
getSharedData,
|
|
50
|
-
} from "expo-targets";
|
|
47
|
+
const target = createTarget("MyWidget");
|
|
48
|
+
target.setData({ key: "value" });
|
|
49
|
+
target.storage.set("key", "value");
|
|
50
|
+
target.refresh();
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
- `createTarget(name, component?)` — target instance; pass a component for RN extensions
|
|
54
|
-
- `close` / `openHostApp` / `getSharedData` — share/action (and related) lifecycle
|
|
55
|
-
- Storage helpers via the target instance (`setData`, `getData`, `refresh`)
|
|
56
|
-
|
|
57
|
-
### 2. Config Plugin (`plugin/`)
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"expo": {
|
|
62
|
-
"plugins": ["expo-targets"]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
### 3. Metro helper (`metro/`)
|
|
68
|
-
|
|
69
|
-
```js
|
|
70
|
-
const { withTargetsMetro } = require("expo-targets/metro");
|
|
71
|
-
module.exports = withTargetsMetro(getDefaultConfig(__dirname));
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 4. Native modules (`ios/`, `android/`)
|
|
75
|
-
|
|
76
|
-
App Group storage, WidgetCenter reload, extension host bridges.
|
|
77
|
-
|
|
78
53
|
## Documentation
|
|
79
54
|
|
|
80
|
-
- [Getting started](
|
|
81
|
-
- [
|
|
82
|
-
- [
|
|
83
|
-
- [
|
|
84
|
-
- [
|
|
85
|
-
- [API](../../docs/api.md)
|
|
55
|
+
- [Getting started](https://github.com/csark0812/expo-targets/blob/main/docs/getting-started.md)
|
|
56
|
+
- [Configuration](https://github.com/csark0812/expo-targets/blob/main/docs/configuration.md)
|
|
57
|
+
- [API](https://github.com/csark0812/expo-targets/blob/main/docs/api.md)
|
|
58
|
+
- [Widgets](https://github.com/csark0812/expo-targets/blob/main/docs/widgets.md)
|
|
59
|
+
- [Contributing](https://github.com/csark0812/expo-targets/blob/main/CONTRIBUTING.md)
|
|
86
60
|
|
|
87
61
|
## License
|
|
88
62
|
|
|
89
63
|
MIT
|
|
90
|
-
|
|
91
|
-
## Credits
|
|
92
|
-
|
|
93
|
-
Inspired by [@bacons/apple-targets](https://github.com/EvanBacon/expo-apple-targets) and [expo-share-extension](https://github.com/MaxAst/expo-share-extension). Native WidgetKit + Live Activities are first-class here ([docs/widgets.md](../../docs/widgets.md)); official [`expo-widgets`](https://docs.expo.dev/versions/latest/sdk/widgets/) is an alternate React/Expo-UI path — do not dual-generate.
|