THIS FEATURE IS STILL A BETA FEATURE!
AI Prompt
Add Siri shortcut functionality to my app using the Despia SDK from: https://www.npmjs.com/package/despia-nativeFirst, install the package: Please follow the installation instructions for the “despia-native” npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
npm install despia-nativeThen import it: import despia from 'despia-native'Create a Siri shortcut system that uses Despia URLs like: despia("addtosiri://?command={NATURAL-LANGUAGE-COMMAND}&jsFunction=siriFunction()") where command contains the natural language phrase users will speak to Siri and jsFunction specifies the globally-defined JavaScript function to execute when the command is triggered.This feature requires native capabilities which will be fully provided by the “despia-native” npm package, no additional native libraries are needed!
Installation
Install the Despia package from NPM:Usage
1. Import the SDK
2. Execute Add to Siri
Call thedespia() function with an Add to Siri Command:
Shortcut Parameters
Siri shortcut URLs must include proper parameters:- command: The natural language phrase users will speak to Siri to trigger the shortcut
- jsFunction: The globally-defined JavaScript function name to execute when Siri triggers the command (the function must be globally accessible in your app)
Platform Support
Supports iOS devices with Siri:- iPhone, iPad, iPod touch
- Apple Watch (when paired with iPhone)
- HomePod (when linked to user account)
- CarPlay (for supported voice commands)
Resources
- NPM Package
- View full NPM documentation for additional configuration options