22 lines
619 B
Swift
22 lines
619 B
Swift
internal import ExpoAppIntents
|
|
internal import ExpoModulesCore
|
|
|
|
/// Registered Expo inline module that wires app-target App Intents code to expo-app-intents.
|
|
/// Do not change the name of this class.
|
|
final class AppIntentsSetup: Module {
|
|
public func definition() -> ExpoModulesCore.ModuleDefinition {
|
|
Name("AppIntentsSetup")
|
|
|
|
OnCreate {
|
|
if #available(iOS 18.0, *) {
|
|
Task {
|
|
await AppIntentDispatcher.shared.setShortcutsRefreshHandler {
|
|
AppShortcuts.updateAppShortcutParameters()
|
|
}
|
|
AppShortcuts.updateAppShortcutParameters()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|