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

Lock Screen Quick Action Fails to Present CameraCaptureIntent View After Main App Transition
I am encountering an issue where the Lock Screen Quick Action fails to visibly open my app. My app is a camera application that utilizes a CameraCaptureIntent to launch a standalone, lightweight camera view (accessible while the device is locked), distinct from the main application. Steps to Reproduce: Open the lightweight camera view using the Lock Screen Quick Action. From this view, launch the Main App. Lock the iPhone (put it to sleep). Attempt to launch the lightweight camera view via the Quick Action again. A slight animation occurs, but the camera view does not appear on screen. After multiple tests, it seems the view is actually launching but remains in an "invisible state." I suspect that the system hides the lightweight camera view when transitioning to the Main App, but fails to reset this hidden state when the Quick Action is triggered subsequently. I would appreciate any guidance on a potential workaround or confirmation if this is a known issue awaiting a system update.
0
1
112
Feb ’26
Live Activity appears briefly then disappears with "Content load failed: unable to find or unarchive file" error
Hi everyone, I’m implementing Live Activities in my iOS app and encountering an issue when starting a Live Activity via an APNS push. The Live Activity card appears on the Lock Screen / Dynamic Island for a moment, then immediately disappears. In the console, I see the following error: Content load failed: unable to find or unarchive file for key: [com.meituan.imeituan-beta::com.meituan.imeituan-beta.liveactivity:Attributes type: SAKUniversalReminderAttributes:6DBCC2DC-E613-48F5-B97F-3EF72AA0877B]:[w:fix-374.00-h:dyn-64.00-160.00-cr:23.5-s:1.0.fam:medium]. The session may still produce one shortly. Error: Using url file:///private/var/mobile/Containers/Data/PluginKitPlugin/04F7B437-3C41-4823-8559-42E18F82B283/SystemData/com.apple.chrono/activities/6DBCC2DC-E613-48F5-B97F-3EF72AA0877B-w:fix-374.00-h:dyn-64.00-160.00-cr:23.5-s:1.0.fam:medium.activity-archive ... Error Domain=NSCocoaErrorDomain Code=4 "文件“6DBCC2DC-E613-48F5-B97F-3EF72AA0877B-w/fix-374.00-h/dyn-64.00-160.00-cr/23.5-s/1.0.fam/medium.activity-archive”不存在。" UserInfo={NSFilePath=/private/var/mobile/Containers/Data/PluginKitPlugin/04F7B437-3C41-4823-8559-42E18F82B283/SystemData/com.apple.chrono/activities/6DBCC2DC-E613-48F5-B97F-3EF72AA0877B-w:fix-374.00-h:dyn-64.00-160.00-cr:23.5-s:1.0.fam:medium.activity-archive, NSUnderlyingError=0x712b56820 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}<…> The Live Activity is started by sending an APNS payload with the necessary content-state and attributes. I’ve verified that the attributes and content state types match the ones defined in the app, and the app is built with the correct entitlements.This happens on my iPhone 17 Pro device. Has anyone encountered a similar issue? Could it be related to the archive file not being written correctly by the system, or perhaps a mismatch in the activity attributes? Any guidance on debugging or resolving this would be greatly appreciated. Thank you!
0
0
71
3w
ProgressView in LiveActivities: missing functionality
Good afternoon all, I have a question about Live Activities, specifically ProgressView. Why are they so hard to customize? You can't even really, consistently make the bar a specific height in points. You can't provide any progress view style to make it richer and more dynamic. We want to build a progress bar that's built up of 3 components: a track with its value constant on 1.0 (the full progress) with a specific color, another track that's the actual progress from ProgressView(timerInterval:countsDown:), and some way to create a visual gap in between. The progress bar should also be bigger than the standard size from iOS, but that's also not possible. The corners become really ugly when you use the scaleEffect modifier. Please, if anyone has any ideas about customizing the ProgressView without me having to send push notifications to manually make sure the bar updates, comment down below.
0
0
85
3w
Prevent Live Activity from appearing on Apple Watch
Hello, I’m working on an iOS app where we have integrated ActivityKit to support Live Activities. Our app currently supports iOS 16.x and above, and we do not have an Apple Watch app or watchOS support. However, we noticed that when a Live Activity starts on the iPhone, it automatically appears on the Apple Watch as well. Since our app is not designed for Apple Watch, we would like to prevent the Live Activity UI from appearing on the watch. My questions: Is there any way to disable or prevent Live Activities from showing on Apple Watch via code? Are there any configuration options in ActivityKit or Widget configuration that can restrict Live Activities to iPhone only? Our current setup: Minimum iOS version: 16.x Using ActivityKit for Live Activities No watchOS target in the app Any guidance or recommended approach would be greatly appreciated. Thanks
0
0
75
2w
Issues with AlarmKit for IOS26+
I have been experiencing many issues trying to integrate the Apple AlarmKit in my app. I essentially keeping getting authorization errors. I was wondering if anyone else was experiencing issues like this and if anyone had guidance or a fix for what I am experiencing. I was under the impression that any devices IOS26+ could use the AlarmKit but maybe I am mistaken. Getting (com.apple.AlarmKit.Alarm error 1.) every time I try and enable alarms.
0
0
70
1w
Unable to access sourceIcon URL in AccessoryNotification.File - AccessoryError error 0
Environment iOS Version: 26.4 Beta (Build 17E5170d) Xcode Version: 26.4 Beta Framework: AccessoryNotifications, AccessoryTransportExtension Description When implementing AccessoryNotifications.NotificationsForwarding.AccessoryNotificationsHandler, I'm unable to retrieve the URL for sourceIcon from AccessoryNotification. The file.url property throws AccessoryError error 0 with the message "unable to get file URL". Code Sample func add( notification: AccessoryNotification, alertingContext: AlertingContext, alertCoordinator: any AlertCoordinating ) { Task { if let sourceIcon = notification.sourceIcon { do { let url = try await sourceIcon.url // Throws AccessoryError error 0 let data = try Data(contentsOf: url) // Process icon data... } catch { print("Failed to get sourceIcon URL: (error)") // Error: The operation couldn't be completed. // (AccessoryNotifications.AccessoryError error 0.) } } } } Observed Behavior The sourceIcon property is present and its type is correctly reported as public.image: │ sourceIcon : present │ type.identifier : public.image │ type.description : image │ url : (error: The operation couldn't be completed. (AccessoryNotifications.AccessoryError error 0.)) Error details: Error: customError(message: "unable to get file URL") Type: AccessoryError Code: 0 Expected Behavior The file.url property should return a valid URL that allows reading the source icon image data, or the documentation should clarify any limitations or prerequisites for accessing this resource. Questions Is this a known limitation in the current beta? Are there additional entitlements or permissions required to access sourceIcon.url? Is there an alternative API to retrieve the actual image data for sourceIcon? Additional Context The same error occurs when accessing url in both describeNotification (debug logging) and sendAttachment methods contextIcon is typically nil for the notifications tested (e.g., WeChat messages) The notification metadata (title, body, actions, etc.) is correctly received
0
0
34
1w
I would like to request clarification regarding the behavior of the Live Activity Start Token used in the Xcode and iOS development workflow.
Could you please provide guidance on the following points: Start Token Throttling Are there any throttling limits or rate restrictions applied to Start Tokens? Token Invalidation Scenarios Under what specific conditions can a Start Token become invalidated? Are there known scenarios that trigger invalidation? Token Regeneration Timeline Once a Start Token is invalidated, how long does it typically take before a new token can be successfully generated and validated? Frequency of Invalidation Is there any documented or expected frequency with which Start Tokens may become invalid, assuming a normal development workflow? Impact on Push Notification Token When a live activity Start Token becomes invalid, does this also cause APNs Push Notification Tokens to be invalidated or refreshed automatically?
0
0
43
1w
Getting location in an Apple Watch widget
I have a watchOS WidgetKit complication that needs the user's location to show the nearest transit station, but the widget never gets location permission and CLLocationManager times out. Setup: NSWidgetWantsLocation = YES in Widget Extension's Info.plist NSLocationWhenInUseUsageDescription and NSLocationAlwaysAndWhenInUseUsageDescription in Widget Extension's Info.plist Watch App successfully has location authorization Problem: The system never presents a location permission prompt for my widget. Apple's own World Clock widget does get one on watchOS (see screenshot) — I can't figure out what triggers it. When the widget tries to get location via CLLocationManager, the request times out and never returns a location. Questions: What triggers the system location prompt for a watchOS widget? Is NSWidgetWantsLocation sufficient or is something else required? Why would CLLocationManager time out and never return a location inside a widget extension? Is there a specific pattern required for requesting location in a WidgetKit timeline provider? Screenshots Sorry for swedish, but it says "Do you allow widgets from World Clock to use your location services?"
0
0
55
1w
Nearby Interaction background ranging with Live Activity (iOS 18.4+)
We are evaluating the new behavior mentioned in the Nearby Interaction documentation for iOS 18.4+, which states: “In iOS 18.4 and later, your app can continue ranging in the background with any supported device if the app starts a Live Activity as it goes to the background." Could you clarify what situations are considered “can continue ranging” versus cases where it will not continue? Specifically, if my app: starts a NISession in the foreground starts a Live Activity with that data then the app goes to background should the NI session still deliver ranging updates so the app can update the Live Activity? also, my app already enable Background Modes capability
0
0
101
1w
How to eliminate this spacing?
How to eliminate this spacing?
Replies
0
Boosts
0
Views
90
Activity
Feb ’26
Lock Screen Quick Action Fails to Present CameraCaptureIntent View After Main App Transition
I am encountering an issue where the Lock Screen Quick Action fails to visibly open my app. My app is a camera application that utilizes a CameraCaptureIntent to launch a standalone, lightweight camera view (accessible while the device is locked), distinct from the main application. Steps to Reproduce: Open the lightweight camera view using the Lock Screen Quick Action. From this view, launch the Main App. Lock the iPhone (put it to sleep). Attempt to launch the lightweight camera view via the Quick Action again. A slight animation occurs, but the camera view does not appear on screen. After multiple tests, it seems the view is actually launching but remains in an "invisible state." I suspect that the system hides the lightweight camera view when transitioning to the Main App, but fails to reset this hidden state when the Quick Action is triggered subsequently. I would appreciate any guidance on a potential workaround or confirmation if this is a known issue awaiting a system update.
Replies
0
Boosts
1
Views
112
Activity
Feb ’26
Live Activity appears briefly then disappears with "Content load failed: unable to find or unarchive file" error
Hi everyone, I’m implementing Live Activities in my iOS app and encountering an issue when starting a Live Activity via an APNS push. The Live Activity card appears on the Lock Screen / Dynamic Island for a moment, then immediately disappears. In the console, I see the following error: Content load failed: unable to find or unarchive file for key: [com.meituan.imeituan-beta::com.meituan.imeituan-beta.liveactivity:Attributes type: SAKUniversalReminderAttributes:6DBCC2DC-E613-48F5-B97F-3EF72AA0877B]:[w:fix-374.00-h:dyn-64.00-160.00-cr:23.5-s:1.0.fam:medium]. The session may still produce one shortly. Error: Using url file:///private/var/mobile/Containers/Data/PluginKitPlugin/04F7B437-3C41-4823-8559-42E18F82B283/SystemData/com.apple.chrono/activities/6DBCC2DC-E613-48F5-B97F-3EF72AA0877B-w:fix-374.00-h:dyn-64.00-160.00-cr:23.5-s:1.0.fam:medium.activity-archive ... Error Domain=NSCocoaErrorDomain Code=4 "文件“6DBCC2DC-E613-48F5-B97F-3EF72AA0877B-w/fix-374.00-h/dyn-64.00-160.00-cr/23.5-s/1.0.fam/medium.activity-archive”不存在。" UserInfo={NSFilePath=/private/var/mobile/Containers/Data/PluginKitPlugin/04F7B437-3C41-4823-8559-42E18F82B283/SystemData/com.apple.chrono/activities/6DBCC2DC-E613-48F5-B97F-3EF72AA0877B-w:fix-374.00-h:dyn-64.00-160.00-cr:23.5-s:1.0.fam:medium.activity-archive, NSUnderlyingError=0x712b56820 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}<…> The Live Activity is started by sending an APNS payload with the necessary content-state and attributes. I’ve verified that the attributes and content state types match the ones defined in the app, and the app is built with the correct entitlements.This happens on my iPhone 17 Pro device. Has anyone encountered a similar issue? Could it be related to the archive file not being written correctly by the system, or perhaps a mismatch in the activity attributes? Any guidance on debugging or resolving this would be greatly appreciated. Thank you!
Replies
0
Boosts
0
Views
71
Activity
3w
ProgressView in LiveActivities: missing functionality
Good afternoon all, I have a question about Live Activities, specifically ProgressView. Why are they so hard to customize? You can't even really, consistently make the bar a specific height in points. You can't provide any progress view style to make it richer and more dynamic. We want to build a progress bar that's built up of 3 components: a track with its value constant on 1.0 (the full progress) with a specific color, another track that's the actual progress from ProgressView(timerInterval:countsDown:), and some way to create a visual gap in between. The progress bar should also be bigger than the standard size from iOS, but that's also not possible. The corners become really ugly when you use the scaleEffect modifier. Please, if anyone has any ideas about customizing the ProgressView without me having to send push notifications to manually make sure the bar updates, comment down below.
Replies
0
Boosts
0
Views
85
Activity
3w
Prevent Live Activity from appearing on Apple Watch
Hello, I’m working on an iOS app where we have integrated ActivityKit to support Live Activities. Our app currently supports iOS 16.x and above, and we do not have an Apple Watch app or watchOS support. However, we noticed that when a Live Activity starts on the iPhone, it automatically appears on the Apple Watch as well. Since our app is not designed for Apple Watch, we would like to prevent the Live Activity UI from appearing on the watch. My questions: Is there any way to disable or prevent Live Activities from showing on Apple Watch via code? Are there any configuration options in ActivityKit or Widget configuration that can restrict Live Activities to iPhone only? Our current setup: Minimum iOS version: 16.x Using ActivityKit for Live Activities No watchOS target in the app Any guidance or recommended approach would be greatly appreciated. Thanks
Replies
0
Boosts
0
Views
75
Activity
2w
Issues with AlarmKit for IOS26+
I have been experiencing many issues trying to integrate the Apple AlarmKit in my app. I essentially keeping getting authorization errors. I was wondering if anyone else was experiencing issues like this and if anyone had guidance or a fix for what I am experiencing. I was under the impression that any devices IOS26+ could use the AlarmKit but maybe I am mistaken. Getting (com.apple.AlarmKit.Alarm error 1.) every time I try and enable alarms.
Replies
0
Boosts
0
Views
70
Activity
1w
Unable to access sourceIcon URL in AccessoryNotification.File - AccessoryError error 0
Environment iOS Version: 26.4 Beta (Build 17E5170d) Xcode Version: 26.4 Beta Framework: AccessoryNotifications, AccessoryTransportExtension Description When implementing AccessoryNotifications.NotificationsForwarding.AccessoryNotificationsHandler, I'm unable to retrieve the URL for sourceIcon from AccessoryNotification. The file.url property throws AccessoryError error 0 with the message "unable to get file URL". Code Sample func add( notification: AccessoryNotification, alertingContext: AlertingContext, alertCoordinator: any AlertCoordinating ) { Task { if let sourceIcon = notification.sourceIcon { do { let url = try await sourceIcon.url // Throws AccessoryError error 0 let data = try Data(contentsOf: url) // Process icon data... } catch { print("Failed to get sourceIcon URL: (error)") // Error: The operation couldn't be completed. // (AccessoryNotifications.AccessoryError error 0.) } } } } Observed Behavior The sourceIcon property is present and its type is correctly reported as public.image: │ sourceIcon : present │ type.identifier : public.image │ type.description : image │ url : (error: The operation couldn't be completed. (AccessoryNotifications.AccessoryError error 0.)) Error details: Error: customError(message: "unable to get file URL") Type: AccessoryError Code: 0 Expected Behavior The file.url property should return a valid URL that allows reading the source icon image data, or the documentation should clarify any limitations or prerequisites for accessing this resource. Questions Is this a known limitation in the current beta? Are there additional entitlements or permissions required to access sourceIcon.url? Is there an alternative API to retrieve the actual image data for sourceIcon? Additional Context The same error occurs when accessing url in both describeNotification (debug logging) and sendAttachment methods contextIcon is typically nil for the notifications tested (e.g., WeChat messages) The notification metadata (title, body, actions, etc.) is correctly received
Replies
0
Boosts
0
Views
34
Activity
1w
I would like to request clarification regarding the behavior of the Live Activity Start Token used in the Xcode and iOS development workflow.
Could you please provide guidance on the following points: Start Token Throttling Are there any throttling limits or rate restrictions applied to Start Tokens? Token Invalidation Scenarios Under what specific conditions can a Start Token become invalidated? Are there known scenarios that trigger invalidation? Token Regeneration Timeline Once a Start Token is invalidated, how long does it typically take before a new token can be successfully generated and validated? Frequency of Invalidation Is there any documented or expected frequency with which Start Tokens may become invalid, assuming a normal development workflow? Impact on Push Notification Token When a live activity Start Token becomes invalid, does this also cause APNs Push Notification Tokens to be invalidated or refreshed automatically?
Replies
0
Boosts
0
Views
43
Activity
1w
Getting location in an Apple Watch widget
I have a watchOS WidgetKit complication that needs the user's location to show the nearest transit station, but the widget never gets location permission and CLLocationManager times out. Setup: NSWidgetWantsLocation = YES in Widget Extension's Info.plist NSLocationWhenInUseUsageDescription and NSLocationAlwaysAndWhenInUseUsageDescription in Widget Extension's Info.plist Watch App successfully has location authorization Problem: The system never presents a location permission prompt for my widget. Apple's own World Clock widget does get one on watchOS (see screenshot) — I can't figure out what triggers it. When the widget tries to get location via CLLocationManager, the request times out and never returns a location. Questions: What triggers the system location prompt for a watchOS widget? Is NSWidgetWantsLocation sufficient or is something else required? Why would CLLocationManager time out and never return a location inside a widget extension? Is there a specific pattern required for requesting location in a WidgetKit timeline provider? Screenshots Sorry for swedish, but it says "Do you allow widgets from World Clock to use your location services?"
Replies
0
Boosts
0
Views
55
Activity
1w
Nearby Interaction background ranging with Live Activity (iOS 18.4+)
We are evaluating the new behavior mentioned in the Nearby Interaction documentation for iOS 18.4+, which states: “In iOS 18.4 and later, your app can continue ranging in the background with any supported device if the app starts a Live Activity as it goes to the background." Could you clarify what situations are considered “can continue ranging” versus cases where it will not continue? Specifically, if my app: starts a NISession in the foreground starts a Live Activity with that data then the app goes to background should the NI session still deliver ranging updates so the app can update the Live Activity? also, my app already enable Background Modes capability
Replies
0
Boosts
0
Views
101
Activity
1w