16.8 C
Canberra
Thursday, April 30, 2026

ios – AppShortcut is proven in Shortcuts app however not in Highlight


I wish to create my very own AppShortcut so I can seek for my app and its contents on Highlight. At present I’ve these codes:

import AppIntents

@obtainable(iOS 16.0, *)
struct TransferIntent: AppIntent {
    static var title = LocalizedStringResource("Switch cash.")
    static var openAppWhenRun = true
    static var isDiscoverable = true
    
    func carry out() async throws -> some IntentResult & ProvidesDialog {
        NavigationManager.shared.navigate(to: .transferMoney)
        return .consequence(dialog: IntentDialog("Open app to switch cash."))
    }
}
import AppIntents

@obtainable(iOS 16.0, *)
struct OmniAppShortcutsProvider: AppShortcutsProvider {
    @AppShortcutsBuilder
    static var appShortcuts: [AppShortcut] {
        AppShortcut(
            intent: TransferIntent(),
            phrases: [
                "Transfer money with (.applicationName)",
                "Kirim uang dengan (.applicationName)"
            ],
            shortTitle: "Switch cash",
            systemImageName: "banknote.fill"
        )
    }
}
class AppDelegate: UIResponder, UIApplicationDelegate {
    func software(_ software: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
        
        setupAppsFlyer()
        
        if #obtainable(iOS 16.0, *) {
            OmniAppShortcutsProvider.updateAppShortcutParameters()
        }
...
}

The shortcut reveals up on Shortcuts app. However after I tried looking with Highlight, it does not present up. How do I present it on Highlight?

Thanks.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles