Does you physical device have Shortcuts app installed?
I noticed that if you remove the Shortcuts app that it seems like the App Intent doesn't get registered.
Post
Replies
Boosts
Views
Activity
I believe you need to include your application name in the phrase. That was what seemed to fix it for me.
Try this:
AppShortcut(intent: ShowTodayTasks(),
phrases:["Show today tasks in \(.applicationName)", "Show my tasks today in \(.applicationName)"])
Have you had any luck here? I'm running into similarly issues.
AppShortcut(intent: AskClipDish(), phrases: [
"Ask \(.applicationName) a question",
"Ask \(.applicationName) for help",
"Ask \(.applicationName)",
"Tell \(.applicationName) \(\.$questionForClipDish)"
])
When I trigger with Ask ClipDish, I'm prompted to choose between Messages and ClipDish
With I trigger with Tell ClipDish question, Safari opens.
Except that's not 100% accurate. That is the behavior in iOS. However, you can exclude 3rd party extension activities when you build for macOS (built for iPad) or Catalyst.
I've tried this on iOS 14.1 and still see the problem.
As another data point. URLs open Safari in two ways from within my app. Tapping a link from a webview opens Safari and my extension and other extensions that handle URLs work fine.
Tapping a UI element that calls UIApplication.open(URL('the url to open")) still causes the problem
This is definitely an issue and only seems to happen with Action Extensions on Safari. If you try this on Chrome the issue doesn't happen.
Here's the feedback I submitted to Apple.
URLs opened with UIApplication.shared.open that launch Safari as the default browser will not enumerate any of the action extensions that respond to URLs the first time you tap Share. If you tap Share a second time it will display the Action Extensions.
Install an app or apps that have an Action Extension that responds to a URL (i.e., Dropbox, GoodNotes, ClipDish)
Install and run the test app included here which calls open function.
In the app, tap "Tap Me"
This will open Safari. Then:
Tap the Share button
browse through the list and look for Dropbox, GoodNotes or ClipDish. You won't see them.
Close the share sheet
Open it again.
They will appear.
This just started happening in iOS 14.
If I change my default browser to Chrome this doesn't happen so I'm pretty sure it's related to Safari.