Shortcuts

RSS for tag

Help users quickly accomplish tasks related to your app with their voice or with a tap with the Shortcuts API.

Posts under Shortcuts tag

98 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Focus more evolved
This message only to know your feeling on my project. Not to discuss what is feasible or not. Just on the interest of the functionality. I use 5 Focus profiles, Do Not Disturb, Holiday, Work, Personal and Sleep. I find that the native solutions for changing modes are not powerful enough. I'd like an app to configure automatically when each Focus profile should be activated. Eg : -Holiday : when holiday is found in my calendar -Work : when I'm not on holiday, when we are not on the weekend, and after 7ham but before 7pm. Personal : when I'm not on holiday when we are on the weekend of after 7pm -Dot Not Disturb: When I'm not in holiday, only on the working week when I have an event in my agenda with the status accepted". These are just some examples. the idea is that everything will be configurable. (my app is almost finished.) What do you think?
0
0
64
1d
Localized App Shortcuts phrases don't work with AppIntents consumed from a Framework
Imagine we have an Xcode workspace containing two projects: MyLibrary.xcodeproj holding a framework target MyShortcutsApp.xcodeproj holding an app target which consumes MyLibrary framework Both targets define App Intents and the ones from MyLibrary are exposed via AppIntentsPackage accordingly. When trying to wrap the App Intent from framework as App Shortcut and passing localized AppShortcutPhrases I do see the following compile error: ".../Resources/de.lproj/AppShortcuts.strings:11:1: error: This AppShortcut does not map to a known action (MyLibraryIntent specified). (in target 'MyShortcutsApp' from project 'MyShortcutsApp')" If I use the same localized App Shortcut phrases for an App Intent which is locally defined in the app target, everything works fine and also if I use the framework-provided App Intent in and App Shortcut without passing any localized phrases. This is happening with Xcode 16.0 (16A242d), with 16.1 (16B40) and with 16.2 beta 2 (16C5013f). I already raised this issue via FB15701779 which contains a sample project to reproduce and to further analyze the issue. Thanks for any hint on how to solve that. Frank
0
0
79
4d
Shortcuts not appearing in Shortcuts.app
I'm curious if anyone else has figured out why an intent defined in the intents file never seems to appear in the Shortcuts app on MacOS. I'm following the steps outlined in "Meet Shortcuts for MacOS" from WWDC 2021. https://developer.apple.com/videos/play/wwdc2021/10232 I build and run my app, launch Shortcuts, and the intent I defined refuses to show up! There's one caveat - I allowed Xcode to update to 16.1, and mysteriously the intent became available in Shortcuts.app. When I went to add a second intent, I see the same as above - it simply never shows up in Shortcuts.app. I have a few intents I'd like to write/add, but this build/test cycle is really slowing me down. This app is a completely fresh Swift-AppKit app, I've never archived it, so there shouldn't be more than one copy on disk. I have also cleaned the build folder, restarted Xcode, restarted Shortcuts, restarted my machine entirely... Anyone see this before and find a workaround? Any advice on how to give Shortcuts.app a kick in the rear to try and find my second intent?
0
0
56
1w
Failed to generate TargetContentIdentifier for criteria
I have implemented ShowInAppSearchResultsIntent and AppShortcutsProvider. But on iOS 18.1+ getting and error in console :- Failed to generate TargetContentIdentifier for criteria. In iOS 18.0 it's working fine. The code I have implemented @AssistantIntent(schema: .system.search) struct SearchIntent: ShowInAppSearchResultsIntent { // static let title: LocalizedStringResource = "Search in Cineverse for" static let searchScopes: [StringSearchScope] = [.general] @Parameter(requestValueDialog: IntentDialog("What would you like to search for?")) var criteria: StringSearchCriteria @MainActor func perform() async throws -> some IntentResult { let searchString = criteria.term print("Searching for \(searchString)") return .result() } } class AppShortcuts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut( intent: SearchIntent(), phrases: [ "using \(.applicationName) search for", "search on \(.applicationName) app" ], shortTitle: "Search Movie", systemImageName: "magnifyingglass" ) } }
0
0
145
1w
[macOS sequoia] keyboard shortcut for standard deviation (sigma) symbol not working
I'm doing statistical formulas and need the keyboard shortcut of the symbol used to represent standard deviation (sigma), which should look like (σ). Everything online suggests using the keyboard shortcut for option + w, but when I use that shortcut I get, ∑ instead. I've tried searching OS settings and there doesn't seem to be a place to change or determine what is the proper keyboard shortcut. The keyboard shortcut for statistical mean (mu) is working, µ And greater than or equal to, ≥ And less than or equal to, ≤ are also working.
1
0
147
1w
Issue with Siri Not Displaying Prompt in App Intent
Hello everyone, I'm currently working on an App Intent for my iOS app, and I’ve encountered a frustrating issue related to how Siri prompts for a category selection. Here’s an overview of what I’m dealing with: extension Category: AppEntity, @unchecked Sendable { var displayRepresentation: DisplayRepresentation { DisplayRepresentation(title: "\(name)") } static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Category") typealias DefaultQueryType = ShortcutsCategoryQuery static var defaultQuery: ShortcutsCategoryQuery = ShortcutsCategoryQuery() } struct ShortcutsCategoryQuery: EntityQuery { func entities(for identifiers: [String]) async throws -> [Category] { let context = await ModelContext(sharedModelContainer) let categories = try CategoryDataProvider(context: context).getItems() return categories.filter { identifiers.contains($0.id) } } func entities(matching string: String) async throws -> [Category] { return try await suggestedEntities() } func suggestedEntities() async throws -> [Category] { let context = await ModelContext(sharedModelContainer) do { let categories = try CategoryDataProvider(context: context).getItems() if categories.isEmpty { print("No categories found.") } return categories.map { category in Category( id: category.id, name: category.name, stringSymbol: category.stringSymbol, symbol: category.symbol, stringColor: category.stringColor, color: category.color ) } } catch { print(error) return [] } } } The issue arises when I use Siri to invoke the intent. Siri correctly asks me to select a category but does not display any options unless I said something that Siri recognized, like "Casa(House) or *****(Test)" in portuguese. Only then does it show the list of available categories. I would like the categories to appear immediately when Siri asks for a selection. I've already tried refining the ShortcutsCategoryQuery and debugging various parts of my code, but nothing seems to fix this behavior.
1
0
185
2w
Missing "add transaction" shortcut
I keep seeing that there's a shortcut called "Add transaction" where whenever a card was tapped from apple wallet, you can add some automation. https://support.apple.com/en-au/guide/shortcuts/apd65c67538a/7.0/ios/17.0 However, I cannot for the life of me find this option on my iphone 13 ios 17.6.1 All I can find when I go to the shortcuts app and search for transactions or apple wallet, I get 2 options to send/receive payments which isn't what I'm looking for. Did apple remove this shortcut??
1
0
184
2w
Wallet "Open [Pass or Card]" Shortcut Input
Hello, There is a new shortcut recently in iOS shortcuts called "Open [Pass or Card]". It looks to take in a [Pass or Card] type, however I'd like to program it with a shortcut to dynamically select a card, and I noticed it works with strings, such as "BofA Customized Cash Rewards". Would there be a list of possible strings for supported cards and/or passes that I could pass in for this shortcut?
0
0
142
4w
Get Text From AppEntity not work
https://medium.com/@giulio.caggegi/use-app-intents-with-ios-16-90a341ccbc94 I create a demo according this article, and add the App Intents in Shortcuts App , then add a Scripting "Get text from ***" , but the result is Empty, how could I modify the AppEntity or add which attribute, so the Scripting "Get text from ***" can get text from the App Intents?
4
0
199
1w
Spotlight App shortcut can't refresh when refresh the AppEntity
I have encountered a problem about AppEntity and AppIntent shortcut. Here is what i have done. I created some shortcuts use AppShortcutsProvider. Each shortcut created by AppEntity. I search my app name in spotlight, so these shortcut can be shown in the spotlight. I don't click the shortcut and back to home screen. Then I delete these shortcuts by modify the Entity.defaultQuery and call AppShortcutsProvider.updateAppShortcutParameters() Going back to the spotlight, I can see my previous query and result. When I clicked the shortcut, I got an error WFBackgroundShortcutRunnerErrorDomain Should the spotlight result need to be refreshed when i come back to it?
2
0
217
4w
Run Application In The Background Automation
I’ve developed an automation and shortcut using the iPhone Shortcuts app in IOS 18, something that hasn’t been done before. With support from Apple’s customer service, I was encouraged to bring this idea to life. The automation’s purpose is to open a specified iOS app, move it to the background, and use a txt database in Folders to ensure uninterrupted data flow and continuous connectivity—especially useful for health apps where wearable devices need consistent, uninterrupted operation and monitoring (e.g., doctor tracking or wearable device connectivity). I would like to share the Automation and the Shortcut with the community.
2
0
224
Oct ’24
[iOS18]My apps do not appear in the shortcut apps.
It is no longer displayed as a target for shortcut app actions. It was displayed until iOS 17.7. Tried with iOS 18.0 and 18.0.1 but it does not appear. Shortcuts created when under iOS 18 work fine. Only INPlayMediaIntent is supported and is targeted at iOS 15 and above, so no Extension is used and is handled directly in the app. Is anyone else suffering from the same problem?
1
0
226
Oct ’24
Shortcuts app in macOS has no logic
I'm trying to study music theory and I need a simple series of tasks to be automated to avoid wasting time on repetitive actions. That's what the Shortcuts app is for, but the actions it comes with are either severely mislabeled, or just don't work. I tried to ask for this in some regular forums and nobody could give me a simple answer, so I figured this is something that developers probably know. I just need four PDFs to open in Preview, their windows moved to one of my monitors, and then be tiled in four equal sizes, with the order determined by me. Sounds easy, doesn't it? But I've been trying to accomplish this for over a year in Shortcuts and even Automator, but at best I can get halfway there. I've also noticed that the Shortcuts I had prepared are running awfully slow. I'm on a Mac Studio M1 Ultra, and these PDFs are less than 10 MB each, three of them are less than 5 MB. These used to open almost instantly, but now the first one opens, then 3-5 seconds later the next one opens and so on. As for the window tiling, at best it's tiling three of the windows correctly, but the other one that should tile on the top left, doesn't resize to the quarter of the screen. But worst of all, they are supposed to move to one of the monitors and do the tiling there, but they all open and tile on the main monitor. So this is one I started today from scratch: Logically speaking, this should work. But either I'm not following the logic with which Shortcuts was designed, or Shortcuts just doesn't work very well. I'm hoping it's just that I don't follow the logic, but the help is not very helpful. It's rather scant, and other than that, I can't find something that will give me more information about how it works. I'm on the current version of Sonoma, but this was the same in the previous macOS. I doubt it changed at all in Sequoia. Sorry if I'm asking this in a developer forum, but I figured it's the place where I can finally get some answers after over a year of trial and error and online searching and getting nowhere.
3
0
312
Oct ’24
Shortcuts Automation Trigger Transaction Timeouts
Description The Shortcut Automation Trigger Transaction frequently times out, ultimately causing the shortcut automation to fail. Please see the attached trace for details. Additionally, the Trigger is activated even when the Transaction is declined. Details In the trace I see the error: [WFWalletTransactionProvider observeForUpdatesWithInitialTransactionIfNeeded:transactionIdentifier:completion:]_block_invoke Hit timeout waiting for transaction with identifier: <private>, finishing. Open bug report: FB14035016
0
0
267
Oct ’24
Siri's voice invocation to open App and pass the intent
Hi All, requirement - "Search (placeholder) in (myApp)". When user speaks this strings, Siri should open the app and pass the placeholder. This worked for me only when i used an AppEnum (with specific defined set) with AppEntity. I want the placeholder to be dynamic and not defined via the AppEnum. Have observed this feature working fine with Youtube, Spotify & Whatsapp apps. Is there anything else that these app add specifically to make this work. ? Also in these app's Siri settings, there is a toggle named - 'Use with Ask Siri'. Could someone please help in understanding, how this option is enabled ?
5
0
381
Sep ’24
App's shortcut actions not showing on iOS 18 shortcuts app
We have developed an iOS app in objective-C and added integrations for shortcuts app - more specific the "automation" part of the app. Basically, user opens shortcuts app, select automation and when scanning NFC tag, user can select an action and our app shows 3 different actions. User select action, opens the app and action is executed. That all done in Obj-C and was working very well with no complaints till users start to update to iOS18. Now, when user starts to add automation, only thing they can do is select "open app". Our app actions are not showing any more. Is there something new in iOS 18 we have to update our app. I know Obje-C is considered "old", but the cost of upgrading an existing app and time is not available at the moment. Here's a code snippet of our shortcutIntent: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.application-groups</key> <array> <string>group.lw.grp1</string> <string>group.lw.grp2</string> </array> </dict> </plist> Shortcut Info-plist <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>IntentsRestrictedWhileLocked</key> <array/> <key>IntentsRestrictedWhileProtectedDataUnavailable</key> <array/> <key>IntentsSupported</key> <array> <string>LockIntent</string> <string>TrunkIntent</string> <string>UnlockIntent</string> </array> </dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.intents-service</string> <key>NSExtensionPrincipalClass</key> <string>IntentHandler</string> </dict> </dict> </plist> IntentHandler -(id)init{ self = [super init]; self.started = false; self.handler = [[AppIntentHandler alloc] init]; self.handler.userInfo = [[NSMutableDictionary alloc] init]; return self; } - (id)handlerForIntent:(INIntent *)intent { // This is the default implementation. If you want different objects to handle different intents, // you can override this and return the handler you want for that particular intent. if(!self.started){ self.started = YES; if([intent isKindOfClass:[LockIntent class]]){ NSLog(@"*intent lock selected*"); self.handler.userInfo = [self assignUserInfo:@"lock"]; }else if([intent isKindOfClass:[UnlockIntent class]]){ NSLog(@"*intent unlock selected*"); self.handler.userInfo = [self assignUserInfo:@"unlock"]; }else if([intent isKindOfClass:[TrunkIntent class]]){ NSLog(@"*intent trunk selected*"); self.handler.userInfo = [self assignUserInfo:@"trunk"]; } }else{ self.started = NO; } return self.handler; } A custom class to handle each intent @implementation AppIntentHandler #pragma mark - response handlers - (void)handleLock:(nonnull LockIntent *)intent completion:(nonnull void (^)(LockIntentResponse * _Nonnull))completion { LockIntentResponse *response = [[LockIntentResponse alloc] initWithCode:LockIntentResponseCodeContinueInApp userActivity:[self lockUserActivity]]; completion(response); } - (void)handleUnlock:(nonnull UnlockIntent *)intent completion:(nonnull void (^)(UnlockIntentResponse * _Nonnull))completion { UnlockIntentResponse *response = [[UnlockIntentResponse alloc] initWithCode:UnlockIntentResponseCodeContinueInApp userActivity:[self unlockUserActivity]]; completion(response); } - (void)handleTrunk:(nonnull TrunkIntent *)intent completion:(nonnull void (^)(TrunkIntentResponse * _Nonnull))completion { TrunkIntentResponse *response = [[TrunkIntentResponse alloc] initWithCode:TrunkIntentResponseCodeContinueInApp userActivity:[self trunkUserActivity]]; completion(response); } What have changed and what needs to be done to make our app's actions show in shortcuts app again. Could anyone point me to the right direction, documentations, blog post or code snippet? Thanks in advance for taking the time to help!
0
1
330
Sep ’24