Widgets & Live Activities

RSS for tag

Discuss how to manage and implement Widgets & Live Activities.

WidgetKit Documentation

Posts under Widgets & Live Activities subtopic

Post

Replies

Boosts

Views

Activity

iOS 26 - Widget not updated with respect to main app's system preferred language
Hi, My iOS app's home screen widget content was implemented to base on the preferred language of my main app (e.g. my app has the following preferred language options with this order English, Japanese, Traditional Chinese, Korean, Simplify Chinese). Say the main app is currently using English as their preferred language, I can change the preferred language in the iOS Settings -> Apps -> My App -> Preferred Language. My widget's content will respect to the preferred language option that I selected with only exception if I switch back to English language and my Widget's content won't get updated. The Main app content is always update with respect to the selected preferred language. My app and widget is working without any issue in iOS 18. Other things that I had discovered during my testing under iOS 26, the "first" language appeared in my preferred language always being the issue (e.g. if the first language is Japanese , once I change to other languages and than switch back to Japanese, my widget content won't respect to this but the main app content are ok). Any one has a similar issues regarding the preferred language?
1
0
86
Aug ’25
Live Activity doesn't update as frequently as it should
I'm developing an app which will show the driver ETA and rendering the progress bar of the current ETA. Intuitively the backend server sends the push notification every 3 seconds through firebase cloud message service to APNS so that the device can refresh the dynamic island smoothly. But the live activity doesn't refresh as frequently as the backend service does. It should refresh every 3 seconds but it turns out like refresh 30 ~ 60 seconds, sometimes it didn't refresh at all. any body facing the same?
1
0
62
Aug ’25
AppIntents not working in Release
We have some AppIntents we are POCing and when we make a Release build, they no longer appear in the system. These AppIntents live in a Framework compiled and linked with the core app. We believe that this is related to Mergable Libraries. We have confirmed that the meta data for the framework still contains a list of all of the actions and their mangled symbols. The mangled symbols however now live in the app binary (confirmed by building Release with DEBUG_INFORMATION_FORMAT = dwarf) If we move the AppIntent code into the app target, things once again work as expected. Is there a flag we need to set, or is moving the code into the app target the only workaround? Thank you!
3
0
254
Aug ’25
Should `input-push-token` be added to all live-activity based payloads?
I'm struggling to understand what the impact of this flag is. Docs only say: For devices running iOS 18 and iPadOS 18 or later, you can add input-push-token: 1 to your payload to start a Live Activity and receive a new push token. After you receive a new push token, you can use it to send updates to a Live Activity. But things were working fine for iOS 17. Right? Does it somehow make the OS emit update tokens faster/more successfully? Should I include in all start, update, end events?
1
0
120
Aug ’25
Can I Present AlarmKit's UI in Expanded Dynamic Island when its fired?
Can I Present AlarmKit's Alarm UI in Expanded Dynamic Island that I implement with SwiftUI when its fired? not System AlarmUI, but my the view that I implemented. I've implemented Dynamic Island properly, and tried various scenarios but I can't find out the way to present AlarmKit UI in Expanded Dynamic Island when it is fired. I don't know why, but, sometimes, it is presented in Expanded Dynamic Island UI which is I Implemented. But when I try lots of times, It is presented in System AlarmKit UI not my SwiftUI View. Can you please tell me how can I present my SwiftUI Expanded Dynamic Island when it is fired? Sincerely
0
0
33
Aug ’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
137
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
95
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
135
3w
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
126
3w
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
220
3w
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
38
3w
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
53
2w
Widget with Core Data guidance
I have an app that has a Core Data store for dates with descriptions that I'd like to present in a widget with countdown calculations. In the app I have a button that just equates an active calculation to the currently selected item in the database (using an EnvironmentObject). I gather I can't use this mechanism inside a widget, right? The user could put tons of items into the database - so I'm sure I don't want to have an editable widget allowing them to pick. I suppose I could create an intent and allow an independent entering from the app - but that seems rather user hostile since they've already entered it for the app - and I'm still trying to support iOS15 which doesn't support that. I did create an App Group and have the Core Data store available from within the widget, but I don't see how to allow the user to choose which date is active. I also want multiple widgets to be able to point to different dates. Any help would be appreciated. Thanks!
2
0
211
2h
WidgetKit: UIImage(named:) Fails to Load Asset After App Upgrade
Attachments: Problem Description: I encountered an issue related to WidgetKit. Inside a widget, I used the following API: UIImage(named: "some_pic_in_asset")! However, in my crash monitoring system, I observed a large number of crashes caused by force-unwrapping a UIImage that could not be loaded. After analyzing the crash reports and the associated app version information, I found that this issue consistently occurs during the app upgrade process. For example: A user installs the app at version A and adds the widget to their Home Screen. Later, the app is upgraded to version A+1. Then, in the monitoring backend, I observe many crashes. The crash itself happens under version A, but the report is uploaded under version A+1. Since crash collection happens in the widget and the report is uploaded by the app, the version mismatch is understandable. I also confirmed that the number of crashes strongly correlates with the number of app version upgrades. Based on this analysis, I believe that in the upgrade scenario described above, UIImage(named: "some_pic_in_asset") sometimes fails to load the image even though it exists in the asset catalog. Please note that the force-unwrapping operation is not the focus of my concern here. Question: Is this a known system issue? If so, is there a plan for fixing it in future iOS updates?
0
0
47
1w
The Flashlight Burnout
Often times myself and others have left flashlight on by accident. Burning it out for sometime of being in pocket or left on table the light stays on the whole time because of just not realizing it was on. The front of phone shows flashlight icon is white when light is on, but this is not good enough! The icon needs to be a bright red or some other color so user can see that the light is actually still on. This would help alot , ty
1
0
31
1w
privacySensitive on lockScreen does not seem to work...
Documentation seems to say that privacySensitive is supposed to redact on the lockScreen. I've disabled "Allow Access when locked" for "Lock Screen Widgets" just in case. It does not work for me. If I add "redacted(reason:) into the view hierarchy it redacts all the content all the time including on the home screen. I've read articles. I gone through a lot of documentation. None of them seem to give the magic formula for redacting sensitive content on the lock screen. I'm using iOS 18.7 on a real iPhone 14 Pro Max.
1
0
83
1w