Questions tagged [appintents]

AppIntents is a Swift-native framework that was introduced in iOS/iPadOS 16, macOS 13, watchOS 9 and tvOS 16. As Apple describes in the documentation:

The App Intents framework offers a programmatic way to make your app’s content and functionality available to system services like Siri, [Spotlight] and the Shortcuts app. The programmatic approach lets you expose any of your app’s capabilities, and not just ones that fall into specific categories. You also use this programmatic approach to supply metadata, UI information, activation phrases, and other information the system needs to initiate your app’s actions.

The AppIntents framework is the modern way to build Shortcuts for Siri, Spotlight and the Shortcuts app. It complements the SiriKit Intents framework (introduced in iOS/iPadOS 10, macOS 12, watchOS 3.2 and tvOS 14).


Related Tags

56 questions
7
votes
1 answer

Extract App Intents Metadata - very slow build step

The app intents extraction from the new AppIntents framework takes a lot of time, even when changes in code don't touch the intents directly. In the build log reasons for this step to happen differ, but mostly it's that "file X changed" and I wonder…
dziobaczy
  • 891
  • 9
  • 17
7
votes
1 answer

How can a parameterised App Intent display additional parameters “below the fold”?

I'm adding App Intents to my iOS16 app using the App Intents framework. One of the intents I want to add opens a list view of all events in my app's database. The view in the app has a number of filters available, and I'm trying to replicate some of…
ScottM
  • 7,108
  • 1
  • 25
  • 42
7
votes
3 answers

Implemented iOS AppIntents don't show in Shortcuts

I'm trying to test out the new AppIntents API that is currently on iOS16 Beta. Looking at the documentation, the implementation seems pretty straight forward, but after implementing it, I'm not seeing my AppIntent in the Shortcuts app. The device is…
Norik
  • 161
  • 1
  • 9
6
votes
2 answers

How to localize title and description? (LocalizedStringResource)

I am working on my SwiftUI project and added some AppIntents for the Shortcuts app. Currently I am not able to localize the title and description. The title and the description are of type LocalizedStringResource (available from iOS16+). I tried to…
Timo
  • 138
  • 10
5
votes
1 answer

How to open App via AppIntents conditionally?

I am currently creating an App which is supposed to launch via an AppIntent. For example whenever I open Instagram it should trigger the AppIntent, which then decides if my App is supposed to open or not. The first part already works fine via Apple…
Meyssam
  • 192
  • 1
  • 8
4
votes
5 answers

How to add AppIntent to app target and use it in an interactive widget

How do you create an AppIntent that will run in your app's process and use it in your widget's Button? I created a new file, added it to my app's target, created my AppIntent struct, then added a button to my widget: Button(intent: TestIntent()) {…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
3
votes
0 answers

SiriTipView doesn't localise commands

I have my commands saved in Ropes/AppShortcuts.strings and they appear well in shortcuts app but in SiriTipView It stays like this(photo bellow): My code: SiriTipView(intent: AddRopeShortcut()) .frame(width:…
2
votes
3 answers

Provide example parameter in a Siri Tip View

I am implementing iOS16 App Shortcuts. I am using SiriTipView to show users the possibilities. My AddItem intent has a parameter for which Box entity to add the Item to. The shortcut will prompt for this. @available(iOS 16.0, *) struct MyShortcuts:…
Chris
  • 4,009
  • 3
  • 21
  • 52
2
votes
2 answers

AppIntents and AppShortcuts not showing up on WatchOS

I've been trying to setup AppIntents and respective AppShortcuts on my WatchOS target, but they don't show up in the Watch's Shortcuts app. Using the same setup, it works just fine on the iOS companion. Documentation says AppIntents works with…
szagun
  • 123
  • 8
2
votes
3 answers

iOS App Intents: Dynamically open the app and bring it to the foreground

I'm using the App Intents API to provide an automation through the iOS Shortcuts app. When my intent runs, I'd like to be able to decide if I want to open the app (bring it to the foreground) or not. I know openAppWhenRun can be used to open the…
1
vote
1 answer

Core Data fetch in AppIntent is crashing when app is running in background

I’m building an AppIntent Shortcut and want to perform fetch requests of my apps Core Data to feed the Shortcut with the data. My Code Core Data Handling: class HomesHandler: NSObject, ObservableObject { static let shared = HomesHandler() …
alexkaessner
  • 1,966
  • 1
  • 14
  • 39
1
vote
0 answers

Swift AppIntent Parameters. How to trap errors?

I have a very simple AppIntent but Siri is easily confused when capturing parameters and responds with "Something went wrong" then silently terminates the process - how do I see the error and ask the user to try again? The error happens before the…
Kittovski
  • 177
  • 3
  • 16
1
vote
1 answer

How to setup an iOS 17 intractable Widget using AppIntents from an SPM package?

I've setup an intractable Widget in iOS 17 which uses an AppIntent from an SPM package but nothing works when you tap on the button in the widget. Supposedly you should be able to use AppIntentsPackage, which should make it possible to use…
Mattias Farnemyhr
  • 4,148
  • 3
  • 28
  • 49
1
vote
0 answers

iOS 16 Swift App Intents - Phrases Not Working as Expected

I have defined custom App Intents using the new App Intent framework provided in iOS 16. However, not all of these phrases seem to work for Siri. Sometimes it will open another app or will perform a completely different action. Is there a different…
1
vote
1 answer

AppIntent and AppShortcutsProvider does not work with Siri

I have a very simple AppIntent and AppShortcutsProvider. It's working great in the Shortcuts app, but it just will not work when asking Siri. // MARK: - OpenLibrary struct OpenLibrary: AppIntent { static let title: LocalizedStringResource =…
Jacob Cavin
  • 2,169
  • 3
  • 19
  • 47
1
2 3 4