ActivityKit

RSS for tag

Help people keep track of tasks and events that they care about with Live Activities on the Lock Screen, the Dynamic Island, and in StandBy.

Posts under ActivityKit tag

95 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Help Needed: Implementing a Countdown Timer Live Activity with Push Notifications
Notifying the Live Activity When Countdown is Complete: Once the countdown timer reaches zero, how do I notify the live activity? What is the best approach to ensure the live activity updates accurately and promptly? Handling App Suspension in the Background: When my app is in the background, it gets suspended. Should I set up a job queue on the backend to send an update push notification when the timer ends? Is there a more efficient way to handle this? Ensuring Timer Accuracy: Since this feature deals with time, I am concerned about the accuracy of the timer. How can I ensure the countdown timer remains accurate even when the app is not in the foreground? Any answers, insights, or guidance on these issues would be greatly appreciated. Thank you in advance for your help!
1
0
269
4w
Live Activity is black when iPhone is in focus mode
I have a live activity and I can't get the colors to work correctly when the iPhone has the focus mode set to do not disturb. My activity uses the system background and foreground. The live activity goes completely black. I have tried setting activityBackgroundTint and activitySystemActionForegroundColor to nil but that still gives a black activity that looks like this.
0
0
156
3w
Live Activity Widget -
Hi, I'm developing a Live Activity Widget that shows a count down timer. In the current solution I have a stop watch that is responsible for handling the start, stop, resume, reset function. When the stop watch starts I have timer that calls on an updateTime function every 0.2 seconds. This works well. The problems comes when I try to use my stop watch in the Live Activity Widget. I have a timer that updates the live activity attributes with content every 0.5 second. // Start the activity let activity = try? Activity.request(... DispatchQueue.main.async { self.logger.log("Start internal timer") self.timer = Timer.scheduledTimer(withTimeInterval:0.5, repeats: true) { _ in self.logger.log("Update activity widget.") self.updateActivity() } } Is this a correct approach? If not what should I use to implement a stop watch with a count down timer and a corresponding progress bar/view?
1
0
164
1w
Live Activities
I work on an App that uses Live Activities and shows a countdown. We want to use it without the seconds. We are currently using Text(getDate(), style: .relative). Is there a new method in Swift to show the countdown on a Live Activity without seconds being displayed.
1
0
119
2w
Live Activity compact timers
The Human Interface Guidelines for Live Activities provide several examples of compact presentations that have a timer counting down formatted like "3min" or "3m", similar to the timers in the Clock app. Such examples can be found in this Stack Overflow question: https://stackoverflow.com/questions/77551496/is-it-possible-to-make-an-only-minutes-1m-countdown-in-a-live-activity A Timer initialized with init(timerInterval:pauseTime:countsDown:showsHours:) has provided a live countdown timer in widgets and live activities, but the formatting is limited. And since live activities come with limitations that prevent us from using Timers, there's no real way to implement this kind of thing ourselves. What is Apple's official guidance for implementing this kind of timer for the compact presentation?
2
0
167
2w
Interactive Live Activity in watchOS 11 - not getting AppIntent buttons to work
I have started to work on adding Live Activities to my app in watchOS 11. The app already has interactive Live Activities on the phone that works as expected. I have added a view for the activityFamily: small and it shows up as expected. My problem is that buttons doesn't work. I use the Intent based button, and on the iPhone Lock Screen they work. On the watch, nothing happens. Has anyone got this working? Not sure if I'm missing something or if it's a bug.
1
0
160
1w
Integrate with the system provided Workout Live Activity in the Apple Watch Smart Stack
When I start a workout in my app, the system shows a Live Activity in the Smart Stack like in the picture. My app opens if I tap on it, but the pause and resume buttons doesn't do anything. I have implemented the PauseWorkoutIntent and ResumeWorkoutIntent which works with the Action Button. I guessed that these would be used from this Live Activity as well, but it seems like not. Has anyone successfully integrated with this? I haven't seen it documented anywhere, although I think it was already included in watchOS 10. This is also shown when using the built in workout app and for that the buttons work as expected.
0
0
111
1w
Screen time crashing
So I updated my phone to ios18 beta and ever since then my phone will always crash when I enter screen time but any other application nothing will happen, my phone has gotten so much slower and heats up faster. Lags so much! I dont know what else to do. I have 107gb and my max is 128gb so I don’t see that as the issue. Especially since I can’t enter into my screen time. I waited it out for almost two or one week. it hasn’t changed. restarted my phone and everything. please help asap!!!
3
3
201
1w
Possible to start a live activity on watchOS 11?
I'm excited to bring my Live Activity to Apple Watch via the .supplementalActivityFamilies([.small]) modifier. However, I'm also wondering whether it is possible for my watchOS app, separately, to initiate a Live Activity and receive updates for it via push notification. From my testing it seems like no, but the function call itself can be made, since ActivityKit is available on watchOS. Are there any other recommendations for how to go about initiating a Live Activity from a watchOS app? Would I have to communicate with a companion iOS app to start the Live Activity on the phone instead?
2
0
109
3d
Typography on Apple Watch Live Activity
I'm not quite sure whether this post belongs in a Design forum or here, but with iOS 18 Developer Beta 1 and watchOS 11 Developer Beta 1, when a Live Activity is displayed on an Apple Watch, the system font used is SF Pro rather than SF Compact. I would expect that the design guidance would be to stick with SF Compact while on watchOS, and I would expect that the system font, when displayed on the Apple Watch using .supplementalActivityFamilies([.small]), would appear as SF Compact. To ensure that SF Compact appears on my Live Activity when viewed on Apple Watch, I can set a custom font for use with the small supplemental family, but this seems really clunky; is there any other guidance here?
0
0
133
1w
The button click for real-time activity did not work.
We added a button in the real-time activity that responds within the app upon clicking. Now we're encountering an issue where, if you immediately click this button after swiping down to enter the notification center, it only opens the app without any scheme response. You have to wait for about 1 second after swiping down before the button can respond normally. Could you please tell us why this is happening?
0
0
61
6d