0

I've seen apps that have interactive widget buttons where a short tap does nothing, but holding the button for at least 1 second executes the action. This can be configured per button in the widget configuration UI with a toggle like "Requires long press".

How is this implemented? The standard Button(intent:) in WidgetKit seems to execute immediately on tap.

What I need:

  • Button tap < 1 second: Nothing happens
  • Button press ≥ 1 second: Action executes
  • Configurable per button via WidgetConfigurationIntent parameter

Is there an official API for this, or does it require a workaround?

Target: iOS 17+, currently using iOS 26, WidgetKit with AppIntent

1
  • Can you share the widget app to us, maybe a gif screenshot ? Commented 13 hours ago

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.