@DTS Engineer
It looks like the system, when invoking an OpenIntent, knows the input target of the intent, and knows the "ID" of the "target". In my case it's the special FileEntityIdentifier
Using the code on the documentation will not work because func entities(for identifiers: [FilesEntity.ID]) async throws -> [FilesEntity] { [] }
is not converting the system provided FileEntityIdentifier
to a "FilesEntity", so there's no target to invoke the OpenIntent with.
Here's the fix for that:
func entities(for identifiers: [FilesEntity.ID]) async throws -> [FilesEntity] {
identifiers.map {
FilesEntity(
id: $0,
creationDate: nil,
fileModificationDate: nil
)
}
}
I've resolved this and ALSO provided the OpenIntent using the "AppShortcutsProvider". Otherwise it does not appear in shortcuts.
The good news: When invoked from the provided shortcuts area it works!
I am not able to add it to a custom-shortcut as an action, though, I can only invoke it directly from the provided shortcuts card.
-
Now that I know the OpenIntent works, how can I invoke it with Siri? It seems any phase with "open" in it still just opens my app.
-
Does the OS provide a "file" to Siri anywhere? How can I know this? I've tried a quick looked file in the Files app and phrases like "Open this in <App name>".