7.0.0 • Published 5 months ago

@config-plugins/react-native-siri-shortcut v7.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@config-plugins/react-native-siri-shortcut

Expo Config Plugin to auto-configure react-native-siri-shortcut when the native code is generated (npx expo prebuild).

Versioning

Ensure you use versions that work together!

exporeact-native-siri-shortcut@config-plugins/react-native-siri-shortcut
51.0.03.2.47.0.0
50.0.03.2.46.0.0
49.0.03.2.35.0.0
48.0.03.2.24.0.0

Expo installation

This package cannot be used in the "Expo Go" app because it requires custom native code.

First install the package with yarn, npm, or npx expo install.

npx expo install react-native-siri-shortcut @config-plugins/react-native-siri-shortcut

After installing this npm package, add the config plugin to the plugins array of your app.json or app.config.js:

{
  "plugins": ["@config-plugins/react-native-siri-shortcut"]
}

Next, rebuild your app as described in the "Adding custom native code" guide.

API

When working with Siri Shorcuts, you need to define their identifiers on the Xcode project. To achieve the same result using this plugin, just pass an array of strings with the identifiers of your shortcuts, and they will be added automatically during the build cycle:

Example

{
  "plugins": [
    [
      "@config-plugins/react-native-siri-shortcut",
      ["com.example.InitiateWorkout", "com.example.FinishWorkout"]
    ]
  ]
}