App Intents

RSS for tag

Explore the App Intents framework, including how to expose your app's actions and content to Siri, Shortcuts, Spotlight, and other system experiences.

Documentation

Posts under App Intents subtopic

Post

Replies

Boosts

Views

Activity

Siri Questions
We have existing Siri functionalities in our app, for customer retrieve their bank or credit cards information. How can we leverage new Siri AI features to our existing function? what is correct approach we can go?
1
0
31
6d
2nd deprecation of shortcuts action
My app has had shortcuts support since the Siri Intent days, so I have app intents with CustomIntentMigratedAppIntent to make sure old shortcuts continue working. Now I need to make further changes to one such shortcuts actions so I need to make a 2nd app intent to take the place of my older app intent that itself took the place of a siri intent. I need the old app intent to still exist for the sake of old shortcuts but I find that having isDiscoverable = false doesn't hide the 1st app intent so long as it has CustomIntentMigratedAppIntent. Is there any solution or do I have to either break old shortcuts or accept duplicate shortcuts actions to move my app intents forward?
1
0
48
6d
How to best parse [street] numbers with Siri Shortcut phrases
Hi all, This is a contrived example for an App Intent where I need my phrases to recognize three "regions" and a specific set of numbers associated with those regions. I am having trouble defining the AppEntity and associated AppShortcut phrases that works well with Siri, which is having trouble extracting numbers for some reason... Now the example: Imagine my app provides information surrounding Starbucks establishments on three major thoroughfares in NYC, such as: Broadway & 26, 40, 43, 54, 63, 75, 86, 95 Madison & 44, 50, 84, 96 Lexington & 43, 48, 55, 63, 67, 77, 85, 96 I need AppEntities, AppShortcuts, and friends that best work with Siri when launched with phrases such as: "Show 'example' for Madison and 50th in \(.applicationName)", "Show 'example' on 43rd and Broadway in \(.applicationName)", Long story short, Siri is picking up my phrases well, but then asking me to answer whether the value is 44, 50, 84, or 96, instead of just hearing that I said: "Madison and 50th" I've defined streets like this: public let nycStreetDisplayRepresentations: [DisplayRepresentation] = [ DisplayRepresentation(title: "26", synonyms: ["twenty six", "twenty sixth"]), DisplayRepresentation(title: "40", synonyms: ["forty", "fortieth"]), DisplayRepresentation(title: "43", synonyms: ["forty three", "forty third"]), DisplayRepresentation(title: "48", synonyms: ["forty eight", "forty eighth"]), DisplayRepresentation(title: "50", synonyms: ["fifty", "fiftieth"]), DisplayRepresentation(title: "54", synonyms: ["fifty four", "fifty fourth"]), DisplayRepresentation(title: "55", synonyms: ["fifty five", "fifty fifth", "five five"]), DisplayRepresentation(title: "63", synonyms: ["sixty three", "sixty third"]), DisplayRepresentation(title: "67", synonyms: ["sixty seven", "sixty seventh"]), DisplayRepresentation(title: "75", synonyms: ["seventy five", "seventy fifth"]), DisplayRepresentation(title: "77", synonyms: ["seventy seven", "seventy seventh", "seven seven"]), DisplayRepresentation(title: "84", synonyms: ["eighty four", "eighty fourth"]), DisplayRepresentation(title: "85", synonyms: ["eighty five", "eighty fifth"]), DisplayRepresentation(title: "86", synonyms: ["eighty six", "eighty sixth"]), DisplayRepresentation(title: "95", synonyms: ["ninety five", "ninety fifth"]), DisplayRepresentation(title: "96", synonyms: ["ninety six", "ninety sixth"]) ] And an entity like this: public struct MadisonThings: AppEntity, Identifiable { public let id: Int public var displayRepresentation: DisplayRepresentation { nycStreetDisplayRepresentations[id-1] } public static var typeDisplayRepresentation = TypeDisplayRepresentation( name: "Madison" , synonyms: ["Madison Ave"] ) public static var defaultQuery = MadisonTHingsQuery() } An EntityQuery: public struct MadisonThingsQuery: EntityQuery, EntityStringQuery { ...attempts to find synonyms in the phrase } Intent: public struct ShowMadisonThingsIntent: AppIntent { { @Parameter( title: "Street Number", description: "The street number (e.g., 5, 12, 44)" ) var streetNumber: MadisonThings // I have also tried just plain 'int' to no avail } And finally the shortcuts: static var appShortcuts: [AppShortcut] { return [ AppShortcut( intent: ShowMadisonThingsIntent(), phrases: [ "Show example for Madison and \(\.$streetNumber) in \(.applicationName)", "Show example on \(\.$streetNumber) in \(.applicationName)", ... This should be very simple, I think, and I've tried multiple ways of extracting numbers from my speech, but for some reason this is not working well at all. Thanks for your help!
0
0
14
6d
Opening an App as the Result of an App Intent
Is it possible to hand over from Siri to the App providing the App Intent (i.e. open the app from a Siri as result of an action)? For example, this could be handy when I actually want to show some UI in Response to a customer's prompt, like opening a Photo Album.
Replies
1
Boosts
1
Views
72
Activity
6d
App Name tied to Siri action
Is the user required to remember the name of my app in order to interact with it via Siri AI?
Replies
1
Boosts
2
Views
55
Activity
6d
Siri Questions
We have existing Siri functionalities in our app, for customer retrieve their bank or credit cards information. How can we leverage new Siri AI features to our existing function? what is correct approach we can go?
Replies
1
Boosts
0
Views
31
Activity
6d
Determining trigger source (Siri vs. Spotlight vs. Shortcuts) in AppIntent
Is there a supported way to differentiate the trigger source (i.e. Siri, Spotlight, or Shortcut) within the perform() method of an AppIntent?
Replies
1
Boosts
0
Views
41
Activity
6d
2nd deprecation of shortcuts action
My app has had shortcuts support since the Siri Intent days, so I have app intents with CustomIntentMigratedAppIntent to make sure old shortcuts continue working. Now I need to make further changes to one such shortcuts actions so I need to make a 2nd app intent to take the place of my older app intent that itself took the place of a siri intent. I need the old app intent to still exist for the sake of old shortcuts but I find that having isDiscoverable = false doesn't hide the 1st app intent so long as it has CustomIntentMigratedAppIntent. Is there any solution or do I have to either break old shortcuts or accept duplicate shortcuts actions to move my app intents forward?
Replies
1
Boosts
0
Views
48
Activity
6d
Lifecycle Change, Compute & Network assignment when executing an App Intent?
Will the processing of an Intent result in an App Lifecycle change? How is compute time & network access managed when processing the intent? E.g., would I be able to make backend requests if needed?
Replies
1
Boosts
0
Views
38
Activity
6d
Integration of App Intents not covered by an existing Schema
Can I make functionality of my app available to Siri AI if they are NOT from one of the predefined App Schema domains? (This was already asked here: https://developer.apple.com/forums/thread/829586 ) Can I define my own App Schemas & App Schema Domains?
Replies
1
Boosts
1
Views
53
Activity
6d
How to best parse [street] numbers with Siri Shortcut phrases
Hi all, This is a contrived example for an App Intent where I need my phrases to recognize three "regions" and a specific set of numbers associated with those regions. I am having trouble defining the AppEntity and associated AppShortcut phrases that works well with Siri, which is having trouble extracting numbers for some reason... Now the example: Imagine my app provides information surrounding Starbucks establishments on three major thoroughfares in NYC, such as: Broadway & 26, 40, 43, 54, 63, 75, 86, 95 Madison & 44, 50, 84, 96 Lexington & 43, 48, 55, 63, 67, 77, 85, 96 I need AppEntities, AppShortcuts, and friends that best work with Siri when launched with phrases such as: "Show 'example' for Madison and 50th in \(.applicationName)", "Show 'example' on 43rd and Broadway in \(.applicationName)", Long story short, Siri is picking up my phrases well, but then asking me to answer whether the value is 44, 50, 84, or 96, instead of just hearing that I said: "Madison and 50th" I've defined streets like this: public let nycStreetDisplayRepresentations: [DisplayRepresentation] = [ DisplayRepresentation(title: "26", synonyms: ["twenty six", "twenty sixth"]), DisplayRepresentation(title: "40", synonyms: ["forty", "fortieth"]), DisplayRepresentation(title: "43", synonyms: ["forty three", "forty third"]), DisplayRepresentation(title: "48", synonyms: ["forty eight", "forty eighth"]), DisplayRepresentation(title: "50", synonyms: ["fifty", "fiftieth"]), DisplayRepresentation(title: "54", synonyms: ["fifty four", "fifty fourth"]), DisplayRepresentation(title: "55", synonyms: ["fifty five", "fifty fifth", "five five"]), DisplayRepresentation(title: "63", synonyms: ["sixty three", "sixty third"]), DisplayRepresentation(title: "67", synonyms: ["sixty seven", "sixty seventh"]), DisplayRepresentation(title: "75", synonyms: ["seventy five", "seventy fifth"]), DisplayRepresentation(title: "77", synonyms: ["seventy seven", "seventy seventh", "seven seven"]), DisplayRepresentation(title: "84", synonyms: ["eighty four", "eighty fourth"]), DisplayRepresentation(title: "85", synonyms: ["eighty five", "eighty fifth"]), DisplayRepresentation(title: "86", synonyms: ["eighty six", "eighty sixth"]), DisplayRepresentation(title: "95", synonyms: ["ninety five", "ninety fifth"]), DisplayRepresentation(title: "96", synonyms: ["ninety six", "ninety sixth"]) ] And an entity like this: public struct MadisonThings: AppEntity, Identifiable { public let id: Int public var displayRepresentation: DisplayRepresentation { nycStreetDisplayRepresentations[id-1] } public static var typeDisplayRepresentation = TypeDisplayRepresentation( name: "Madison" , synonyms: ["Madison Ave"] ) public static var defaultQuery = MadisonTHingsQuery() } An EntityQuery: public struct MadisonThingsQuery: EntityQuery, EntityStringQuery { ...attempts to find synonyms in the phrase } Intent: public struct ShowMadisonThingsIntent: AppIntent { { @Parameter( title: "Street Number", description: "The street number (e.g., 5, 12, 44)" ) var streetNumber: MadisonThings // I have also tried just plain 'int' to no avail } And finally the shortcuts: static var appShortcuts: [AppShortcut] { return [ AppShortcut( intent: ShowMadisonThingsIntent(), phrases: [ "Show example for Madison and \(\.$streetNumber) in \(.applicationName)", "Show example on \(\.$streetNumber) in \(.applicationName)", ... This should be very simple, I think, and I've tried multiple ways of extracting numbers from my speech, but for some reason this is not working well at all. Thanks for your help!
Replies
0
Boosts
0
Views
14
Activity
6d