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.
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.
Following is the implementation to reverse the array of int’s:
To implement similar for array of string’s, the function definition would be as follows:
Similar array method can be implemented to reverse the array irrespective of the fact that elements are of type Int, String or any class…