AppShortcuts.swift 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import AppIntents
  2. import Foundation
  3. @available(iOS 16.0, *) struct AppShortcuts: AppShortcutsProvider {
  4. @AppShortcutsBuilder static var appShortcuts: [AppShortcut] {
  5. AppShortcut(
  6. intent: BolusIntent(),
  7. phrases: [
  8. "\(.applicationName) bolus",
  9. "Enacts a \(.applicationName) Bolus"
  10. ]
  11. )
  12. AppShortcut(
  13. intent: ApplyTempPresetIntent(),
  14. phrases: [
  15. "Activate \(.applicationName) temporary target ?",
  16. "\(.applicationName) apply a temporary target"
  17. ]
  18. )
  19. AppShortcut(
  20. intent: ListStateIntent(),
  21. phrases: [
  22. "List \(.applicationName) state",
  23. "\(.applicationName) state"
  24. ]
  25. )
  26. AppShortcut(
  27. intent: AddCarbPresentIntent(),
  28. phrases: [
  29. "Add carbs in \(.applicationName)",
  30. "\(.applicationName) allows to add carbs"
  31. ]
  32. )
  33. }
  34. }