Handling Siri shortcuts — iOS 14.2

Shortcuts allow users to access features of the app from Spotlight search, Lock Screen, and the Siri watch face. Routine can be automated using the shortcuts app. Shortcut lets you expose the main functionalities of your app to Siri by providing shortcuts to your app’s actions.

In this article, we will create custom intent and add Intents and IntentsUI extensions for iOS. We will customize the UI for the Siri response.

Steps for creating a shortcut

  1. Donate shortcut: This helps Siri to understand when…


Introduction

Generics are one of the great features in Swift which allows implementing reusable and abstract code supporting multiple types. This avoids code duplication which makes the code more maintainable. The collections like arrays, dictionaries, and other functionalities in the Swift standard libraries are implemented using generics.

Generics syntax and examples

Following is the implementation to reverse the array of int’s:

Reverse Int array

To implement similar for array of string’s, the function definition would be as follows:

Reverse String array

Similar array method can be implemented to reverse the array irrespective of the fact that elements are of type Int, String or any class…

Prajakta Aher

iOS Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store