Section 1/181 menit

1. Apa Itu App Intents?

1. Apa Itu App Intents?

App Intents adalah framework Apple (iOS 16+, macOS 13+) yang memungkinkan app mengekspos actions dan data ke sistem — Siri, Shortcuts, Spotlight, Widget, Action Button, dan Apple Intelligence. Framework ini menggantikan pendekatan lama (INIntent, NSUserActivity, dan SiriKit) dengan API yang sepenuhnya ditulis dalam Swift dan diproses pada waktu kompilasi.

Filosofi utama App Intents: "Define once, expose everywhere." Kamu mendefinisikan intent sekali, dan sistem secara otomatis membuatnya tersedia di seluruh entry point Apple Intelligence ecosystem.

Evolusi: Dari SiriKit ke App Intents

Era Teknologi Cara Definisi Bahasa
iOS 10–15 SiriKit / INIntent .intentdefinition file + code gen ObjC/Swift
iOS 12–15 NSUserActivity + Intents File + delegate pattern Swift
iOS 16+ App Intents Pure Swift struct/class Swift
iOS 18+ App Intents + Apple Intelligence Swift + AI-powered understanding Swift

Entry Points yang Didukung

swift
App Intent
    ├── Shortcuts app          → user buat automation
    ├── Siri (iOS 16+)         → voice command langsung
    ├── Spotlight (iOS 16+)    → shortcut muncul di search
    ├── Action Button (iOS 17+)→ trigger langsung dari tombol
    ├── Widget (iOS 17+)       → button di interactive widget
    ├── Control Center (iOS 18+)→ Control Widget
    └── Apple Intelligence (iOS 18+) → AI-powered Siri actions