Putting it together

The combination of Actions and Shortcuts is powerful: you can define generic
intents that map to specific actions at the widget level. Here’s a simple app
that illustrates the concepts described above. The app creates a text field that
also has “select all” and “copy to clipboard” buttons next to it. The buttons
invoke actions to accomplish their work. All the invoked actions and
shortcuts are logged.