Spotlight your app with App Shortcuts

RSS for tag

Discuss the WWDC23 Session Spotlight your app with App Shortcuts

View Session

Posts under wwdc2023-10102 tag

7 Posts
Sort by:
Post not yet marked as solved
1 Replies
646 Views
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
Posted Last updated
.
Post not yet marked as solved
0 Replies
335 Views
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?
Posted Last updated
.
Post not yet marked as solved
0 Replies
712 Views
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?
Posted
by Jordan.
Last updated
.
Post not yet marked as solved
3 Replies
730 Views
In Xcode 15 beta 3 and beta 4, if you add a AppShortcuts.xcstrings catalog or legacy AppShortcuts.strings files to the project, the project will always fail to build due to the following error. error: Unable to call validation: The data couldn’t be read because it isn’t in the correct format. (in target 'LearnAppShortcuts' from project 'LearnAppShortcuts') Command ValidateAppShortcutStringsMetadata emitted errors but did not return a nonzero exit code to indicate failure The error seems related to a cli called ValidateAppShortcutStringsMetadata. Reproducing Steps (1) In Xcode 15 beta 3/4, create a new iOS app project. (2) Add an arbitrary AppIntent and AppShortcutsProvider. import AppIntents struct MyAction: AppIntent { static let title: LocalizedStringResource = "My Action" func perform() async throws -> some IntentResult { return .result() } } struct MyAppShortcts: AppShortcutsProvider { static var appShortcuts: [AppShortcut] { AppShortcut(intent: MyAction(), phrases: [ "Perform action with \(.applicationName)" ], shortTitle: "Perform My Action", systemImageName: "heart") } } (3) Create a new AppShortcuts.xcstrings catalog file and add it to the iOS target (4) Build the project. The string catalog will be updated as expected. However, the build will fail.
Posted
by Gong.
Last updated
.
Post marked as solved
2 Replies
1.8k Views
I'm working on creating App Shortcuts for my app to show up in the Shortcuts app and Spotlight. One new feature this year is the option to add your apps tint color as a background, but I'm not able to get this to work. I have added the items NSAppIconActionTintColorName (String) and NSAppIconComplementingColorNames (Array?) to my info.plist file that where briefly mentioned in the WWDC23 video, but they don't seem to have any effect. Has anyone got these to work in their project?
Posted
by Weuler.
Last updated
.