SiriTipUIView is missing the application name for an app shortcut

I'm working on an app for an accompanying toy that allows you do drop a marble on a self made track.

As a nice bonus I wanted to make it possible to drop a marble using Siri Shortcuts, Siri or the HomePod. So the new iOS 16 App Intents work great for this.

The App Intent documentation is bare, but I got the App Intent to work and it evens shows a custom error message when something goes wrong,

However I now want to promote the feature. SiriTipUIView is meant for this, however I'm seeing an issue. The application name is missing from the tips UI, instead the phrase starts with a space.

The code for the App Shortcuts

struct MyAppShortcutsProvider: AppShortcutsProvider {

    static var appShortcuts = [
        AppShortcut(intent: DropMarbleIntent(), phrases: [
            "\(.applicationName) drop marble",
            "\(.applicationName) drop a marble",
            "Drop a \(.applicationName)",
            "Drop \(.applicationName)"
        ])
    ]

}

The code for the SiriTipUIView (just for testing)

let tipView = SiriTipUIView()
tipView.setIntent(intent: DropMarbleIntent())
tipView.sizeToFitUsingConstraints()
tipView.allowsDismissal = true
presentedSubscription = tipView.publisher(for: \.isPresented).sink { isPresented in
    if isPresented == false {
        self.tableView.tableHeaderView = nil
    }
}
tableView.tableHeaderView = tipView

This happens on any iOS 16 simulator and on an iPhone 13 Pro running the iOS 16 release version.

Am I missing something, or should I report a bug using feedback?

Post not yet marked as solved Up vote post of renssies Down vote post of renssies
1.1k views

Replies

This has been partially resolved. As it turns out CFBundleDisplayName went missing from the Info.plist. Adding CFBundleDisplayName back resolved the problem with SiriTipUIView.

However now ShortcutsUIButton suffers from the same problem. Often displaying just "shortcuts" instead of "APP NAME shortcuts"

But the problem with ShortcutsUIButton is less of an issue because it doesn't look weird when it is just "shortcuts"

Hello, Can you please explain what the following syntax is for:

presentedSubscription = tipView.publisher(for: .isPresented).sink { isPresented in if isPresented == false {     self.tableView.tableHeaderView = nil     } }

Thanks in advance.

  • SiriTipUIView has allowsDismissal which adds a small X button to the tip view for dismissal. When the user taps the dismiss button, the view is hidden and isPresented becomes false.

    To remove the empty space left by the tip view, I need to observe isPresented using KVO or Combine to remove the tip view from the tableHeaderView and with that remove the empty space.

Add a Comment

For my App, CFBundleDisplayName is in Info.plist but SiriTipView (the SwiftUI equivalent) will not show the App name, and as others have mentioned, the App name is also missing when using ShortcutsLink. Both of these are annoying bugs i hope will be addressed in 16.1.

Note: When running 16.1 Beta 4 on a real device, SiriTipView does show the App name like it's supposed to, but alas the ShortcutsLink still shows "shortcuts".

  • I run into the same issue where SiriTipView works well but ShortcutsLink doesn't contain the app name. I fixed the issue by adding an "CFBundleDisplayName" = "Rond"; in each InfoPlist.strings file.

Add a Comment