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

115 Posts

Post

Replies

Boosts

Views

Activity

Automatic Signing failed and Provisioning profile is missing the activitykit
I am a professor at the Mercer University School of Medicine (Macon, GA) and I teach a stress reduction course for first year medical students. I am developing an app to allow the students to trace their mediations as well as time them. Using ChatGPT with Xcode, I was able to get all the features in the app working except that the stopwatch timer would not continue when the iPhone goes to sleep. When ChatGPT made some changes, the build failed because automated signing failed and the com.apple developer.activity kit entitlement is missing I don’t see Live Activities in the capability section of signing & Capabilities and I don’t know how to fix the provisioning profile. How can I get help for this? Thank you!
2
0
124
4h
Old values not cleared when Live Activity updates in CarPlay
I'm updating some of the views for a Live Activity, now that CarPlay can display Live Activities in iOS 26. My Activity is updated only with local updates from the iPhone (no push notifications), displaying a user's blood glucose. The activity updates fine in both CarPlay and in the Apple Watch Smart Stack, but in CarPlay, the previous values are not cleared when the new values are displayed, resulting in superimposed text and making it essentially unreadable. This only happens when the iPhone screen is off. As soon as the phone screen is woken up, even if the phone is not unlocked, the old values disappear and the display looks fine. I can't find anything in the API about clearing a display, so I'm wondering if this is a bug (especially since it clears when waking the phone screen). I'm running iOS 26.0.1 on my test phone. Thanks for any thoughts!
5
0
97
2d
How to temporarily hide another app's Dynamic Island?
Hello, I have a question regarding the control over the Dynamic Island UI when my app is in the foreground. Scenario: A user is playing a song on Apple Music, so its Live Activity is active and visible in the Dynamic Island. Then, the user opens my app. Desired Behavior: While my app is in the foreground, I would like to temporarily hide or dismiss the dynamic island from Apple Music to provide a more immersive experience. When the user navigates away from my app, it's perfectly fine for the Dynamic Island to show dynamic island again. Is there an API that allows an app to temporarily suppress a Live Activity that was initiated by another application? My understanding of the iOS sandbox model suggests this might not be possible for security and privacy reasons, but I wanted to confirm if there's an intended way to handle this, especially for full-screen apps like games or video players. Thank you!
0
0
23
1w
The APP was not awakened after start a liveactivity
The APP was not awakened by system after start a liveactivity and the liveactivity has showed on lock screen.so the updatetoken wont send to our inner server and the liveactivity can not update,often like this,but sometimes it can work. it makes me confuse,and i don't know how should i can do,because the liveactivity like a black box,i can not analyse the data link.for example ,inner server send a start liveactivity,but it can not accept a updatetoken unless the user lanuch APP. i hope the liveactivity can start and update on background. And i have developed it as described in the document. Hope to get your help,thank you very much.
1
0
93
1w
ActivityKit - Live Activity countdown needs Wallet - Upgraded Boarding Pass Live Activity-style behavior
Hi, We need Wallet Boarding Pass Live Activity style countdown inside Live Activity. Requirements Show only hours+minutes (no seconds ever). Format examples (Turkish locale concept): T > 60 min: "1sa 14d" (HHh MMm) T < 60 min: "58d" At exactly zero show a single final zero value (e.g. "0d"). Do NOT show seconds or any upward (elapsed) counting after zero. When remaining time < 0 immediately replace display with status text (e.g. "ON TIME"). Never display negative or increasing elapsed time. Discovered Current Timer Methods (Observed) Method 1 (Text(date, style: .relative)): After reaching target it continues counting UP (should stop). Seconds appear automatically once remaining < 1 hour. Method 2 (Text(date, style: .timer)): After reaching target it continues counting UP (should stop). Seconds are always visible from start. Method 3 (Text(timerInterval: Date.now ... targetDate, countsDown: true)): Stops at target (no upward counting) but seconds are always visible; cannot limit to single zero then freeze before status swap. Requested Enhancement Provide a behavior where the countdown displays hours+minutes, renders a single zero-minute value at the boundary (no seconds), then transitions to supplied status text. Request Public API or configuration to: Select displayed units (hours, minutes only). Stop automatic updating after rendering the zero frame (prevent upward counting). Prevent post-target elapsed counting (no positive re-growth). Allow immediate swap-to-text after zero (remaining < 0) while permitting a single zero display at the boundary. Why Align UX with Wallet; need predictable single zero then status, no seconds, no elapsed confusion. Thank you.
0
0
38
2w
Can you use `JSONDecoder` for decoding your attributes and contentState
Watching WWDC video: https://developer.apple.com/videos/play/wwdc2023/10185/?time=481 It says: So when encoding your content state, do not set any custom encoding strategies. Otherwise, your JSON will be mismatched, and the system will fail to update your Live Activity So I'm just wondering if using JSONDecoder is allowed for decoding apps payloads for the UI of a Live Activity? Or is there a performance hit for this?
0
0
45
2w
Live Activity updates not received on iPhone 16 Pro Max when started via ActivityKit push
Description When starting Live Activities via ActivityKit push notifications, the “start” notification is received correctly on iPhone 16 Pro Max, but subsequent update or end push notifications are not. The same implementation on iPhone 16 Pro behaves as expected (both start and update/end notifications are delivered and processed). Environment Property Value Device (failing) iPhone 16 Pro Max Device (working) iPhone 16 Pro iOS Version 18.5 Xcode / SDK 16.2/ActivityKit / Push Notifications Network Wi-Fi / Cellular (both tested) Data Collection Method Devices connected via USB. Logs captured using Console.app. Log filtering applied for the liveactivitiesd daemon to isolate Live Activity behavior. Initial Triage/Observations Payload format confirmed compatible; no incompatible fields. APNs token remains the same across messages (no refresh). Identical ActivityKit subscriptions/participants on both devices. Server-side delivery is confirmed: iPhone 16 Pro receives all messages (start, update, end). Only iPhone 16 Pro Max fails to receive update or end push notifications. Log Analysis iPhone 16 Pro (Working) Push-to-Start successfully received: 13:45:20 - APSXPCDeliverMessageEvent: Created APSIncomingMessage 13:45:20 - Received message: eventType: start(SessionPushNotifications.IncomingMessage.EventType.StartParameters(attributesType: "AchToLSUpgradeAttributes", attributesData: 125 bytes, inputs: [])) 13:45:20 - Created activity: 1C081AC5-01AE-4EC0-8B67-5F2A9FAE2D60 13:45:45 - APSXPCDeliverMessageEvent: Created APSIncomingMessage 13:45:45 - Received message: eventType: end(dismissDate: Optional(2025-07-21 21:00:44 +0000)) 13:45:20 - Activity updated: 1C081AC5-01AE-4EC0-8B67-5F2A9FAE2D60 13:45:20 - Local activity did update: 1C081AC5-01AE-4EC0-8B67-5F2A9FAE2D60 iPhone 16 Pro Max (Failing) 13:56:39 - APSXPCDeliverMessageEvent: Created APSIncomingMessage 13:56:39 - Received message: eventType: start(SessionPushNotifications.IncomingMessage.EventType.StartParameters(attributesType: "AchToLSUpgradeAttributes", attributesData: 125 bytes, inputs: [])) 13:56:39 - Created activity: E6BBF691-0C7A-4791-98D2-6F1440D9932E **No subsequent APNs push-to-update or push-to-end messages received.** 13:56:39 - No destinations for event E6BBF691... of type start 13:56:40 - No destinations for event E6BBF691... of type update Questions for Apple Engineering Are there known issues with ActivityKit push notifications specifically on iPhone 16 Pro Max devices? What additional diagnostic logs (system, APNs, liveactivitiesd) would be most helpful to collect? Could device-specific power management, notification settings, or OS-level changes on Pro Max models affect Live Activity updates? Are there differences in how Live Activity push subscriptions or routing are handled on iPhone 16 Pro Max vs Pro that could lead to this issue?
0
0
82
Sep ’25
Get update token from the OS when the Live Activity is started from the backend, without the user explicitly providing "Allow" or "Always Allow" consent from the lock screen
We are currently using Live Activities in our app and supporting both of the following use cases: Starting a Live Activity directly from the app using ActivityKit APIs. Starting a Live Activity from the backend using the start token. In the first case (initiated from the app), the OS generates an update token, and we are able to continuously update the Live Activity via our backend—even if the user has not explicitly provided "Allow" or "Always Allow" consent from the lock screen. This works as expected. In the second case (initiated from the backend), if the user does provide consent ("Allow" or "Always Allow") from the lock screen, we receive the update token and can continue updating the Live Activity. However, if the user does not provide consent, the OS does not provide the update token, and we are unable to send further updates. Question: Is it possible to receive the update token from the OS when the Live Activity is started from the backend, without the user explicitly providing "Allow" or "Always Allow" consent from the lock screen? We would appreciate any clarification or official documentation related to this behavior. Thank you!
0
4
124
Sep ’25
how to suppress sound of a live activity when app is foregrounded?
Regular apns will give you a willPresent callback and there you can decide to suppress showing the notification or suppress its sound etc. I know the iOS app will give you callbacks for when there's a contentUpdate, yet that doesn't give the option to change the sound. Is there a way to suppress sound of a received Live Activity when app is in foreground?
0
1
65
Sep ’25
Push tokens from push-to-start Live Activities require user permissions?
Just wanted to clarify some expected behaviors here. It seems that there are two distinct behaviors for Live Activity flows for freshly installed apps. When you start a Live Activity for the first time and the user hasn't yet clicked on Allow/Don't Allow in the activity interface, there are two different sequences: Starting a Live Activity locally Request a Live Activity locally via Swift Live Activity starts .pushTokenUpdates is immediately triggered, even if the Allow/Don't Allow buttons appear under the Activity UI Starting a Live Activity via push-to-start Send a push-to-start notification to launch a Live Activity Live Activity starts .pushTokenUpdates is not triggered, and .pushToken returns nil. If a user clicks on Allow in the Activity UI, only then is .pushTokenUpdates triggered.
0
3
106
Sep ’25
Live Activity life cycle
A Live Activity relies on its app being in the background , but contrary to a widget it does not have a timeline. Our app "in the making" is sandboxed and does not need to receive ActivityKit push notifications How is the app "maintained in life" and not entirely killed for the duration of the activity - Apple documentation says up to 8 hours ? Is it necessary for us to do something to maintain it, like to trick the system , play a white noise audio background ...?
0
0
45
Sep ’25
push notification-driven Live activity decoding fail
My start live activity CURL is not starting my live activity and I keep getting a decoding failure even though my curl matches my content state so my live activity is not starting. heres my CURL --header "apns-topic: MuscleMemory.KimchiLabs.com.push-type.liveactivity" \ --header "apns-push-type: liveactivity" \ --header "apns-priority: 10" \ --header "authorization: bearer eyJhbGciOiJFUzI1NiIsImtpZCI6IjI4MjVTNjNEV0IifQ.eyJpc3MiOiJMOTZYUlBCSzQ2IiwiaWF0IjoxNzU3NDYwMzQ2fQ.5TGvDRk5ZYLsvncjKwXIZYN78X88v5lCwX4fRvfl1QXjwv8tOtO2uoId27LQahXA3zqjruu_2YoOfqEtrppKXQ" \ --data '{ "aps": { "timestamp": '"$(date +%s)"', "event": "start", "content-state": { "plain_text": "hello world", "userContentPage": ["hello world"] }, "alert": { "sound": "chime.aiff" } }, "attributes-type": "KimchiKit.DynamicRepAttributes", "attributes": {} }' \ --http2 https://api.sandbox.push.apple.com/3/device/802fe7b4066e26b51ede7188a7077a9603507a0fa6ee8ffda946a864e75aa139602861538d6fb12100afbe9a3338d6c7c799d947dfacb2ee835f0339ecdc3165c9ed7e54839f5a3b89b76a011f5826cc and here is my content state public struct ContentState: Codable, Hashable { public var plainText: String public var userContentPage: [String] public enum CodingKeys: String, CodingKey { case plainText = "plain_text" case userContentPage } public init(plainText: String, userContentPage: [String]) { self.plainText = plainText self.userContentPage = userContentPage } } public init() {} }
1
0
223
Sep ’25
Inconsistencies with activityBackgroundTint when a device switches between light and dark modes
While the activityBackgroundTint modifier is intended to set the background color of a Live Activity, it often fails to dynamically update, leaving the activity with an incorrect background. Replacing it with ZStack { Color(.background) .... } solves the problem, but this is a workaround. The activityBackgroundTint modifier is still needed, at a minimum, so that the "Allow Live Activity for the app" extension does not have the default color.
Topic: Design SubTopic: General Tags:
2
0
481
Sep ’25
Live Activity: no value in pushTokenUpdates and pushToStartTokenUpdates not called after app restart
When running application after installation I get a value in pushTokenUpdates and also the call to pushToStartTokenUpdates returns with the token value. But, if I kill the app and restart it again, there is no value in pushTokenUpdates and the call to pushToStartTokenUpdates does not return. Am I suppose to use the push to start token from the previous application run? is there a different solution?
1
0
154
Sep ’25
Unable to open new live activities after opening 5 live activities and clearing them
After opening 5 live activities using live activity push-to-start push notifications, I clear them from lock screen. From this point forward I am unable to open new live activities. Device log shows: Could not create a new activity from push notification: ActivityKit.ActivityAuthorizationError.targetMaximumExceeded How can I handle such use case? shouldn't the count of opened live activities be reduced once the user clears the live activities? is this a bug?
1
0
132
Sep ’25
Live Activity budget exceeded
When sending multiple push to start notifications to start a live activities in a short time frame, after around 10 pushes live activities are no longer being started. Device logs show the following entry: Push-to-start budget exceeded for com.att.tlv.myatt::pushToStart; not starting activity What can be done to be able to open more live activities via push-to-start in a short time frame (increase the push-to-start budget)? Can this be related to the development environment and it will not happen on production? NSSupportsLiveActivitiesFrequentUpdates is already set to YES
2
0
150
Sep ’25
What is the purpose of the `alert` field for live activities payloads?
Does the alert only serve the following purposes: required for start events require for any event that needs to alert the user (with sound or having the live activity show in expanded presentation) while its content DO NOT matter. Only the presence of the field and its attributes matter. The only time its content matter are when the receiving device is an Apple Watch. Is that correct?
1
0
109
Sep ’25
Push notifcation-driven live activity not starting
Hi, I'm having this issue that I have have not been able to figure out as I've gone through a checklist and it seems I have everything in place, but im sending my pushToStartTokenUpdates token to a server and im able to test starting a live activity via CURL where it shows my push token going through and even my test payload but after a while I get this issue in my logs where it fails to find a live activity Push notifications are set up, im sending my token to APN and im even able to start live activities locally.
2
0
144
Sep ’25