AppShortcuts.swift 845 B

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