Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. @available(iOS 12.0, *)
  2. public enum ShortcutType: CaseIterable {
  3. case foodDashboard
  4. case activityDashboard
  5. case wellnessWins
  6. case trackYesterday
  7.  
  8. /// The display title for the shortcut
  9. public var title: String {
  10. REDACTED
  11. }
  12.  
  13. /// The display description for the shortcut
  14. public var description: String {
  15. REDACTED
  16. }
  17.  
  18. /// Indicates whether or not this shortcut should be exposed to the user
  19. public var shouldDisplay: Bool {
  20. REDACTED
  21. }
  22. }
  23.  
  24. @available(iOS 12.0, *)
  25. public protocol IntentDelegate: AnyObject {
  26. /// Indicates if the Siri Shortcut functionality is enabled for this user
  27. ///
  28. /// - returns: Bool indicating whether or not Siri is enabled
  29. func isSiriEnabled() -> Bool
  30.  
  31. /// Donates intent of specified ShortcutType and intent number
  32. ///
  33. /// - parameter type: The Shortcut type to be donated
  34. func donateIntent(type: ShortcutType)
  35.  
  36. /// Retrieves intent data for specified ShortcutType
  37. ///
  38. /// - parameter type: The ShortcutType of the needed intent info
  39. ///
  40. /// - returns: An array of INIntents applicable to the specified type
  41. func getIntentData(type: ShortcutType) -> [INIntent]?
  42. }
  43.  
  44. @available(iOS 12.0, *)
  45. public enum IntentManager {
  46. public static var intentDelegate: IntentDelegate?
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement