expo-targets
v1.8.7
Published
Expo config plugin for Apple targets and Android app extensions
Downloads
6,154
Maintainers
Keywords
Readme
expo-targets
Source of truth for the published package overview (monorepo canonical story lives in the root README).
Expo config plugin and runtime for Apple app extensions Expo does not ship. The library covers share, action, App Clips, messages, stickers, wallet, and more. React Native UIs work for share, action, clip, messages, notification-content, and safari (popup).
Part of the expo-targets monorepo. Full docs: https://github.com/csark0812/expo-targets.
Tested on Expo SDK 57 (development builds; Expo Go is not supported).
Widgets: Native WidgetKit and Live Activities are first-class on iOS. Android widgets are first-class (Glance and RemoteViews). See widgets. Do not use the
expo-widgetsconfig plugin and expo-targetswidgettargets in the same app.Bare RN: Run
npx expo-targets syncagainst an existingios/tree, thenpod install. For new projects, use managed Expo andnpx expo prebuild.
Quick Start
npm install expo-targets
npx expo-targets add
# Share Extension → my-share → Use React Native: Yesexpo-targets add wires the host by default. Install dependencies if wiring added expo-targets to package.json.
// metro.config.js
const { getDefaultConfig } = require("expo/metro-config");
const { withTargets } = require("expo-targets/metro");
module.exports = withTargets(getDefaultConfig(__dirname));// targets/my-share/index.tsx
import { createTarget } from "expo-targets";
import ShareExtension from "./ShareExtension";
export const myShare = createTarget("MyShare", ShareExtension);Storage
const target = createTarget("MyWidget");
target.setData({ key: "value" });
target.storage.set("key", "value");
target.refresh();Documentation
- Getting started
- Configuration
- API (includes
ExtensionUpdates) - React Native extensions — App Group OTA / eas update
- Widgets
- Contributing
License
MIT
