App Shortcuts
complete
Kristijan Ristovski
Now that Android has shortcuts, it would be great to have an API for creating iOS/Android shortcuts (example: https://github.com/lokyoung/react-native-app-shortcuts)
Evan Bacon
complete
Marking this as complete since the feature works with custom dev clients and Managed EAS Build.
We added this as an Expo config plugin.
Here is a working config plugin to an existing package which support iOS and Android react-native-quick-actions.
We cannot add this feature to the App Store client (Expo Go) because it requires build-time settings which cannot be configured OTA.
The package that was originally linked, react-native-app-shortcuts, appears to work out of the box without an Expo config plugin.
Demo
A
Antonio Stoilkov
Evan Bacon: Do you mean that doing either
expo install react-native-quick-actions
or expo install react-native-app-shortcuts
will work with fully managed workflow?Evan Bacon
Antonio Stoilkov: Please refer to the config plugin instructions.
This package can be built in a custom dev client (like Expo Go but with custom native code) using EAS Build or locally with the expo run commands.
This package is not available in the App Store client (Expo Go) because it requires build-time settings which cannot be configured OTA.
The process of creating a custom dev client takes about a 1-2 minutes per platform to setup locally (we plan to make this take a few seconds in the future).
I've personally used this package+plugin in a few libraries, works pretty well.
Benjamin Vaysse
Evan Bacon: Awesome !
The config plugin README.md only gives instructions for iOS. Am I missing something, or is Android support arriving later ?
Evan Bacon
Benjamin Vaysse: android doesn’t need a plugin, it works out of the box. Feel free to open a PR into the readme with recommended language that might make this a bit clearer for other users.
Sean O'Leary
Evan Bacon: The gradle build (run through EAS) fails with https://github.com/lokyoung/react-native-app-shortcuts...
[stderr]
FAILURE: Build failed with an exception.
[stderr]
* Where:
[stderr]
Build file '/home/expo/workingdir/build/node_modules/react-native-app-shortcuts/android/build.gradle' line: 33
[stderr]
* What went wrong:
[stderr]
A problem occurred evaluating project ':react-native-app-shortcuts'.
[stderr]
> Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Daniel Pal
Well, I guess it has not been added yet since 2017?! :O
Wodin
Daniel Pal: Based on the installation instructions it looks like there's a good chance that
react-native-app-shortcuts
would work with EAS Build without requiring a config plugin. Maybe give it a try and report back?S
Subhajit Dutta
It would be really great if app shortcut can be created using Expo
Shayan Sheshashayan
Yep....It is necessary to have Android shortcuts....