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
0
votes
1 answer

Can we use an AppIntent to trigger background fetching?

Our goal is to build an iPad app which fetches data every 5 minutes, without the app ever being opened. (The app is a backup for emergency use.) Background tasks won't work if the app is very rarely opened. One idea is to expose an AppIntent and…
chmac
  • 11,757
  • 3
  • 32
  • 36
0
votes
0 answers

Convert to AppIntent from Siri Intent not recognizing new handler class

I'm trying to convert a Siri Intent (written in Obj-C, don't think it's relevant, but better to say it) to App Intent. I used the button Convert to App Intent, I refactored the code writing it in Swift. When I test the Intent runnning it with the…
Andrea Mario Lufino
  • 7,921
  • 12
  • 47
  • 78
0
votes
1 answer

AppIntent: How to present a Localized Title in the Shortcuts App?

Using MacOS, I'm finding that titles in the Shortcuts App aren't being presented dynamically. The code below always shows the default value for this Action in the Shortcuts App eg. "Not Found Again". @available(macOS 13.0, *) struct…
unB
  • 119
  • 1
  • 2
0
votes
1 answer

Some of my iOS AppShortcut phrases work, but some launch Safari?

One of my intents responds to an optional parameter. The parameter is defined as an enum with 4 values (case today, week, month, year). I have 2 AppShortcut phrases defined, one that does not specify the parameter and another which does. …
Koa
  • 173
  • 8
0
votes
1 answer

iOS 16 - How to include more than 1 AppIntent / AppShortcut

I've implemented 2 different AppIntents, each includes their own AppShortcutsProvider with phrases unique to each AppIntent. Individually, they work great. But, when I try to include both in my app, only the last one defined works. In my…
Koa
  • 173
  • 8
0
votes
0 answers

How to add a default value to an AppShortcut in @AppShortcutsBuilder in the new AppShortcutsProvider?

I tried a lot and was happy to see that this code first looks like the ideal setup: @AppShortcutsBuilder static var appShortcuts: [AppShortcut] { AppShortcut(intent: ExecuteAction(action: .init(title: "Start", default: .startTimer)),…
Tob
  • 627
  • 6
  • 9
0
votes
0 answers

How can I divide App Intents Snippet and Intent Dialog(like on the picture below)

I'm trying to divide dialog that Siri speaks and Snippet My code: @available(iOS 16.0, macOS 13.0, watchOS 9.0, *) struct AddRopeShortcut : AppIntent { func perform() async throws -> some ProvidesDialog & ShowsSnippetView{ return…
0
votes
0 answers

What's the right way to use CoreData in an AppIntent?

I have an AppIntent (introduced in iOS 16.0) that utilizes my Core Data store. If I enable CoreData's concurrency debugging (add this argument to scheme -com.apple.CoreData.ConcurrencyDebug 1), I get errors while my app is running. I've begun using…
stanlemon
  • 399
  • 3
  • 10
0
votes
0 answers

LocalizedStringResource with Formatter in AppIntent

I am trying to use DateComponentsFormatter() with my AppIntent, but I can not find a way to localize the formatter string with the same language that LocalizedStringResource use... Example (My App: Arabic, Device: English, Siri: English) let…
iTarek
  • 736
  • 1
  • 8
  • 17
0
votes
0 answers

Start microphone using App Intents "required condition is false: IsFormatSampleRateAndChannelCountValid(format)"

I want to include Speech Recognition in my app, for this I used the Speech Framework from Apple in combination with App Intents Framework. The app intent "Listen" starts the speech recognition. Now I have the problem that I keep getting the…
tamaramaria
  • 173
  • 1
  • 4
  • 17
-2
votes
0 answers

How do I configure wigdget to switch to a different widget(file) in SwiftUI

I'm trying to make an app (iOS 17) which I want to switch to a completely different widget using AppIntents. I'm not able to achieve changing the whole widget that includes the view as well as timeline provider. In short, I want to switch to a…
Max
  • 1
1 2 3
4