Super excited about interactive widgets in iOS 17! Starting & stopping time entries in @timery widgets *without having to open the app* will be such a great improvement, and I can’t wait to bring this to Timery later this year!

I’ve had this working for like 20 minutes and I immediately want to install the beta on all my devices just for this.

A big thank you to everyone involved in bringing us interactive widgets this year! 🥳

More @timery experiments! I wanted some visual feedback that the widget is starting or stopping a time entry when a button is pressed since the action could take a couple seconds.

Widget interactions are through Buttons or Toggles, and Toggles update their state immediately while the action happens and then again when it’s finished.

So I changed what were Buttons to Toggles. And now while the widget performs the action, the start or stop icon swaps to a loading icon and then back. Much better!

iOS 17 beta 2 enabled another fun thing for interactive widgets: starting Live Activities! So starting a time entry from a @timery widget will also start a Live Activity!

And speaking of Live Activities, since they’re part of WidgetKit, they gain interactivity too. So the stop button can stop the time entry without having to open the app!

Had another idea for interactive @timery widgets! In the app, you can select a report item to filter the report and see time tracked for that project, tag, day, etc.

Can that work in widgets too? Yes, yes it can!

So it’s like changing the widget configuration without actually changing it to get a quick look at time tracked details. Hooray interactive widgets!

Another bit of @timery widget interactivity!

Have you ever wanted to show more timers in a widget than can actually fit? Currently you’d have to make a stack of multiple widgets each with a set of timers.

But what about having *multiple pages of timers* in a single widget? Now that’s possible!

@joehribar This looks amazing, Joe!

I have a very similar need in Mango Baby, so I'm curious how do you store the current page index? If the user adds the same widget twice, is it possible to distinguish the two widget instances so they have different currently selected pages?

@y2mango Thanks! I’m storing the current page in UserDefaults. The widgets must have unique IDs, but I wasn’t able to find something that persists across widget refreshes, so I’m making my own using the widget kind, size, and any configuration options to make a unique-enough ID.

If two widgets of the same size widget with the same configuration options are added, they will indeed show the same page. But I think for my use case it should work. Would love a better solution though!

@joehribar Thanks for sharing, keying on the widget configurations is a great idea!
@y2mango Sure thing! It’s not foolproof as I mentioned, but I figured most people aren’t going to have multiple instances of the same sized widget configured the exact same way, so it’s good enough.