Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @available(iOS 12.0, *)
- public enum ShortcutType: CaseIterable {
- case foodDashboard
- case activityDashboard
- case wellnessWins
- case trackYesterday
- /// The display title for the shortcut
- public var title: String {
- REDACTED
- }
- /// The display description for the shortcut
- public var description: String {
- REDACTED
- }
- /// Indicates whether or not this shortcut should be exposed to the user
- public var shouldDisplay: Bool {
- REDACTED
- }
- }
- @available(iOS 12.0, *)
- public protocol IntentDelegate: AnyObject {
- /// Indicates if the Siri Shortcut functionality is enabled for this user
- ///
- /// - returns: Bool indicating whether or not Siri is enabled
- func isSiriEnabled() -> Bool
- /// Donates intent of specified ShortcutType and intent number
- ///
- /// - parameter type: The Shortcut type to be donated
- func donateIntent(type: ShortcutType)
- /// Retrieves intent data for specified ShortcutType
- ///
- /// - parameter type: The ShortcutType of the needed intent info
- ///
- /// - returns: An array of INIntents applicable to the specified type
- func getIntentData(type: ShortcutType) -> [INIntent]?
- }
- @available(iOS 12.0, *)
- public enum IntentManager {
- public static var intentDelegate: IntentDelegate?
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement