My concern is that I am not able to run the app specific shortcut (which is available to develop on iOS 16/ iOS 17) on any other language except English using Siri. I’m facing the issue when I say : “Siri do A” and Siri founds the similar shortcut in the iOS (not in the my app) and runs it.
on English everything works well, but on Russian ( for example) I am facing the described above issue.
How can I fix it?
Shortcuts
RSS for tagHelp users quickly accomplish tasks related to your app with their voice or with a tap with the Shortcuts API.
Posts under Shortcuts tag
108 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Hi,
I will creat this autmation:
When this number calls then answers automatically, press 1 and hang up
Is this possible with the Shortcut application? Can anyone help me.
I want when the intercom in my building calls to answer and open automatically
Thanks
As you can see in the following screenshot the „Water“ selection is an AppEnum which gets a nicely tinted SF Symbol. On the other hand, the „My Home“ is an AppEntity which also uses an SF Symbol, but doesn’t get the blue tint. Why?
Now my question is, how can I force the tint on the AppEntity as well?
I’ve defined it the following way:
var displayRepresentation: DisplayRepresentation {
DisplayRepresentation(
title: "\(title)",
image: .init(systemName: "house", isTemplate: true)
)
}
But even adding the isTemplate doesn’t work here …
Hello, I'm working on the interesting task of blocking settings when I'm using the Parental Control App.
Could you advise how to make your Intent visible as Input in IF action?
Hi.
I switched my app from the old (<2018) Home Screen static Quick Actions implementation to the new one using the Info.plist.
Old implementation:
let shortcut1 = UIApplicationShortcutItem(
type: ShortcutType.doStuff1.rawValue,
localizedTitle: "title",
localizedSubtitle: nil,
icon: UIApplicationShortcutIcon(systemImageName: "moon"),
userInfo: nil)
application.shortcutItems = [shortcut1]
New implementation using Info.plist:
https://developer.apple.com/documentation/uikit/menus_and_shortcuts/add_home_screen_quick_actions
Now ... the new shortcut items from the Info.plist appear correctly in the new app, however shortcut1 from the old version is also still there. The new code has no traces of the old code anymore!
Why is that?
How can I get rid of it without removing the app and reinstalling it (which would work)?
Thanks,
Xcode 15 beta 6 :
Xcode is looking for "${applicationName}" in the strings file keys instead of the value only.
(it was working on Xcode 14)
error : Invalid Utterance. Every App Shortcut utterance should have one '${applicationName}' in it.
I have an app that has a different target for each platform. And each one has a different identifier.
How to make same shortcut actions (AppIntent) visible on all the platforms, so one shortcut can be used everywhere?
In iOS 17 when you search Spotlight for Notes you can see it has an App Shortcut titled New Note that simply opens the Notes app and starts composing a new note. When you open the Shortcuts app, create a new shortcut, search for and tap Notes, notice the New Note action is ONLY included at the top - it's not in the list of actions underneath. There is another intent in the list titled Create Note which will create a new note using the content you specify without opening the Notes app.
I want to achieve this same thing in my app - an App Shortcut to open the app and start creating a new item, and a shortcut action to create a new item without opening the app. How can this be done?
So far I have created two AppIntents, NewItem and CreateItem. My AppShortcutsProvider only includes NewItem. This works great when searching for my app in Spotlight. But when I open Shortcuts and go to add an action from my app to a shortcut, it includes Add Item at the top as an App Shortcut but also in the actions list underneath. Create Item is included in the list as well which is confusing. I don't want Add Item to be an available action because it's fairly useless to open the app and start creating an item, instead they should use Create Item to create an item in the background.
Do I need to instead create a single shortcut that behaves differently in Spotlight vs Shortcuts, is that possible?
I’m implementing App Shortcuts in my iOS app to allow you to add and find plants. In attempt to get a “Find Plants” shortcut, I created a query that conforms to EnumerableEntityQuery and set that as the defaultQuery in my PlantAppEntity. I have the typeDisplayRepresentation set to TypeDisplayRepresentation(name: "Plant", numericFormat: "\(placeholder: .int) plants"). I added a Localizable.stringsdict to the app target, added Plant and %lld plants as the header comments shows, then clicked Localize so now English is selected in the Localization section. But when I run the app then open Shortcuts and tap my app, there’s a Find Plant shortcut, but I expected it to be titled Find Plants. When I tap the info button it shows “plant” instead of “plants” in every parameter description. When you add that action to a shortcut the placeholder is All Plant, unlike similar shortcuts from Reminders and Contacts that say “All Reminders” and “All Contacts”. The action is working properly as it returns an array of plants, the only issue is it’s using the singular form of plant in places it should be plural. Have I done something wrong, am I missing anything, or is this a bug? (FB12908309)
I am trying to implement App Shortcuts for my app. I want to implement the same as Books. I am trying to do 2 things.
I want to set a custom image for each App Shortcut.
I want to set custom color for the Shortcuts background like orange in the Books App Shortcuts.
I am trying to implement in iOS 16.
Kindly share your ideas.
If at all possible, kindly share a snippet
struct MeditationShortcuts: AppShortcutsProvider
{
AppShortcut(
intent: OCRIntent(),
phrases: [AppShortcutPhrase<OCRIntent>.init("OCR识别\(AppShortcutPhraseToken.applicationName)")],
shortTitle: "文字识别",
systemImageName: "checklist"
)
}
static var shortcutTileColor: ShortcutTileColor {
return .orange
}
}
Why packaging shortcut instructions in the above way will not be displayed in the shortcut instruction app?
Defining a phrase in literal terms will show, for example
struct MeditationShortcuts: AppShortcutsProvider
{
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: OCRIntent(),
phrases: ["OCR识别\(.applicationName)"],
shortTitle: "文字识别",
systemImageName: "checklist"
)
}
static var shortcutTileColor: ShortcutTileColor {
return .orange
}
}
Hi, I have been exploring ideas on how to tap on a Quick Actions and not open the app, instead start a background API task. Is there a way to achieve this ?
Hi , how I can run my shortcut by tapping on button from widget?
This is Siri Intent before iOS 16.
func handle(intent: CustomIntent, completion: @escaping (CustomIntentResponse) -> Void) {
completion(CustomIntentResponse(code: .continueInApp, userActivity: nil))
}
This flow working fine.
This is AppIntent after iOS 16. There are 2 ways to continue in app
openAppWhenRun = true
ForegroundContinuableIntent Protocol only works in SwiftUI
But both are not notifying the main app its just opening app without activity. In SiriIntent we can notifiy Main App with completion(CustomIntentResponse(code: .continueInApp, userActivity: nil))
application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool
else its start with didfinishlaunching and we can get useractivity.
Is there any solution for after iOS 16 In AppIntent we can notify app and get NSUserActivity?
Dear community,
I am having troubles to configure an Apple Shortcut with my Eve Aqua automatic irrigation system.
I want the shortcut to run every day at 9 PM, but I need it to check if it rained today or if it is going to rain tomorrow and then stop if its going to rain or was raining today.
Otherwise I would need for it to trigger the Eve Aqua scene I have configured which waters the grass for 30 minutes.
Does anyone know how I can accurate achieve this in a reliable way? So far I have configured "Get Current Weather at my address", also If Precipitation chance is greater than or equal to 70m, if precipitation amount is greater than or equal to 1mm".
But these conditions seem to be ignored...
Thanks a lot for your help!
Fernando
Hi all
i want to create a shortcuts task, leting you choose from a number of menu's, where the chosen items will be added as photo keywords or captations to 1 or more subsequent taken pics.
the main problem is not being able to add the words, using this method:
(it's the Dutch version)
the other problem is that i would like to have the choise to take more pictures with a prompt.
could someone help me with this problem?
thanks a billion!
I want to run a third party shortcut after an an app intent without opening the shortcuts app. I tried using the deep linking URL method but it opens the shortcut app to run the shortcu.
Hi,
I am trying to integrate the new AppIntentsPackage protocol into my application. Especially what I want to do is to create a dedicate SPM package which holds all my app intents and then share that with my widget extension for Widget intents as well as the main iOS app for powering an AppShortcutProvider. Unfortunately I run into an issue here.
I have the following explanatory setup:
SPM package called ProjectAppIntents
iOS target
My AppIntents SPM package
//Package: ProjectAppIntents
public struct TestAppIntent: AppIntent {
public static var title: LocalizedStringResource = "TestAppIntent"
@Parameter(title: "Parameter1", optionsProvider: ParameterOptionProvider())
public var parameter: String
public init(parameter: String) {
self.parameter = parameter
}
public init() { }
public func perform() async throws -> some IntentResult & ReturnsValue {
.result(value: 5)
}
}
struct ParameterOptionProvider: DynamicOptionsProvider {
func results() async throws -> [String] {
return ["Hello", "World"]
}
}
public struct ProjectAppIntentsPackage: AppIntentsPackage { }
My iOS app
// Target: iOS
import ProjectAppIntents
struct ProjectApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
extension ProjectApp: AppIntentsPackage {
static var includedPackages: [AppIntentsPackage.Type] = [
ProjectAppIntentsPackage.self
]
}
struct ProjectShortcuts: AppShortcutsProvider {
static var appShortcuts: [AppShortcut] {
AppShortcut(
intent: TestAppIntent(),
phrases: ["Start a \(.applicationName)"],
shortTitle: "Hello World",
systemImageName: "house"
)
}
}
When I now try to compile my app, I get the following build error:
2023-06-25 09:53:47.853 appintentsnltrainingprocessor[44848:2059163] Parsing options for appintentsnltrainingprocessor
2023-06-25 09:53:47.854 appintentsnltrainingprocessor[44848:2059163] Starting AppIntents SSU YAML Generation
2023-06-25 09:53:47.868 appintentsnltrainingprocessor[44848:2059163] error: The action TestAppIntent referenced in App Shortcut does not exist
Command AppIntentsSSUTraining failed with a nonzero exit code
So for me it seems like the compiler cannot find the AppIntent defined in an SPM package.
Am I doing something wrong here or does the AppIntentsPackage protocol not work with SPM packages ?
Thanks a lot for helping !
Since the iOS 16.4 update on my iPhone 12 Pro I’ve been unable to run shortcuts using the record audio command, if the shortcut was called by Siri.
It seems that Siri might be running it twice, as when I set the command to ask for input for its parameters I get the menu twice.
When I run it from Siri, the record screen freezes and the seconds don’t count down, but when I run it from Shortcuts it works fine.
Has anyone else experienced this, or have any suggestions?
Thanks!
In Design App Shortcuts, Lynn shows a slide at 11:54 where a shortcut with a custom view has "suppressed" the dialog.
How can we achieve this? I can't find any actual examples.