A React Native library for integrating iOS Siri Shortcuts into your app. It lets you donate shortcuts based on user activity, suggest shortcuts proactively, present the system Add to Siri sheet, and handle shortcut activations — both when the app is already running and on cold launch. iOS only; all calls are no-ops on Android.
This is a fork of Gustash/react-native-siri-shortcut.
The upstream package does not support React Native's New Architecture (TurboModules / Fabric). This fork adds dual-architecture support so the package works with both Old and New Architecture without breaking existing behaviour. It also removes RCTBridge+UIScene files that cause build errors with modern React Native versions.
Changes over upstream:
- TurboModule codegen spec (
src/NativeRNSiriShortcuts.ts) - Fabric native component spec (
src/RNSSAddToSiriButtonNativeComponent.ts) codegenConfigadded topackage.json- Podspec updated to use
install_modules_dependenciesand bumped iOS minimum to 13.0 RNSSSiriShortcuts.m→.mmwithgetTurboModule:behindRCT_NEW_ARCH_ENABLEDRNSSAddToSiriButtonViewManager.m→.mmfor legacy interop compatibilityRCTBridge+UIScenefiles removed
Install directly from this repository:
npm install https://github.com/aiir/react-native-siri-shortcutThen run pod install in your ios/ directory.
See the upstream documentation for the full API reference. The public API is unchanged from upstream.
cd example && npm install
cd example/ios && pod install
# Open example/ios in Xcode and build/run