WidgetKit

RSS for tag

Show relevant, glanceable content from your app on iOS and iPadOS Home Screen and Lock Screen, macOS Desktop, Apple Watch Smart Stack and Complications, and in StandBy mode on iPhone.

Posts under WidgetKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

Default widget extension not configurable on Mac
I've created a basic Multiplatform Project in Xcode, by going to File > New > Project. I've also included the default widget extension target. When I run the widget on Mac, and I control-click and choose "Edit Widget" the widget just kinda turns gray and floats over other windows, but does not let me configure anything. We leave the option to use configure with app intents turned on when adding the widget extension target. When I run the same project on an iPhone simulator, I can configure the widget without any issue. If someone else has a few minutes, can they see if this repeats for them? We are running this test because we are seeing the same experience in a real widget we are trying to develop but we can't get it to go into configuration mode on Mac.
4
1
485
3d
WidgetKit timeline crashes with EXC_RESOURCE (memory limit=30MB) when generating entries from a large photo album
Environment: Xcode 15/16, iOS 17/18, WidgetKit (IntentTimelineProvider) Issue: I have a photo widget that lets users pick an album and rotate through its photos on a timer (configurable refresh interval). When the selected album is large, the widget extension is Jetsam-killed with: Thread X: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB) After this happens, the widget stops refreshing entirely and stays on a stale/placeholder image until the app is relaunched. What I've tried: Downsampling with CGImageSourceCreateThumbnailAtIndex + kCGImageSourceThumbnailMaxPixelSize before building entries Reducing entry count and using policy .after(nextDate) instead of pre-building a full day of entries Still seeing intermittent Jetsams on albums with several hundred photos Questions: Is there a recommended max total archived timeline size WidgetKit expects developers to stay under, beyond "keep it small"? For a "large photo album" use case specifically, is the recommended pattern to pre-generate and cache small thumbnails in the App Group container ahead of time, rather than downsampling on demand inside getTimeline()? Is there guidance on how many timeline entries is "too many" before WidgetKit itself starts struggling to archive/deliver them, independent of image size? useful than a forum thread — let me know what info would help most.
0
0
57
4d
Widget is crashing with 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)
I have created widget which supports medium and large family similar to news feed app like title and image by configuring the medium widget with 2 articles and large with 4 articles where each article has title and it's image with size 46x46 and 61x61. When am adding the small and large widgets to my Home Screen getting memory limit (Thread 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)(crash and the widget is not refreshing and some times widgets is showing the skeletons instead of data. This is my timeline provider     func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) {             widgetVM.getRecommendedDataForWidget{ (result) in                 switch result {                 case .success(let items):                     let entries =  getRecommendedWidgetTimeLineEntries(recFeedModel: items)                     let timeline = Timeline(entries: entries, policy: .atEnd)                     completion(timeline)                 case .failure(_):                         let entry = RecommendedWidgetEntry(date: Date(), recommedationData: WidgetFeedModel.getPlaceholderData())                         let timeline = Timeline(entries: [entry], policy: .never)                         completion(timeline)                 }             }         }         else {             if accessTokenValue == nil { // if token is nil then considering it as member is not logged in.                 let entry = RecommendedWidgetEntry(date: Date(), recommedationData: [])                 let timeline = Timeline(entries: [entry], policy: .never)                 completion(timeline)                 return             }     } Could you please help me out on this as this is priority for me as part of app release. I couldn't find out the reason for this. Thanks
10
0
4.2k
4d
Widget Extension still uses system language even though CFBundleAllowMixedLocalizations = NO is set
I have an app with a Widget Extension. Both the main app and the widget extension link against the same Swift Package, which contains a localization bundle (String Catalog) used by SwiftUI views inside the package. To make the package's views follow the app's configured language (rather than the system language), I set CFBundleAllowMixedLocalizations to NO in the Info.plist of each target (main app and widget extension). Behavior in the main app: This works as expected. If the app only supports Korean, the package's views display Korean text even when the system language is set to English. Behavior in the widget: The same views (from the same package) display English instead of Korean, even though the widget extension has the identical CFBundleAllowMixedLocalizations = NO setting and the widget's view code lives entirely in the package — not in the widget extension target itself. Question: As far as I understand, widgets are supposed to follow the host app's language setting. Given that both targets have the same Info.plist configuration, why would the widget extension resolve localized strings differently from the main app for code in the same package? Is this expected behavior for widget extensions specifically, or a bug? Is there a recommended workaround to force a widget extension (and by extension, the Swift Package code it runs) to use the app's language instead of the system language?
1
0
626
1w
On vision 27, accessoryRectangular shows blank
Hi, On visionOS 27 simulator accessoryRectangular widget shows completely blank with no text. The same widget shows up correctly on iOS 27 simulator. What I have tried: I have checked the timeline provider and they all seem to be generating timeline entries. supportedFamilies include accessoryRectangular I have even hard coded the content in the view for the widget yet only accessoryRectangular for visionOS 27 shows up blank. Isolated problem The same widget shows up correctly on iOS 27 simulator. The problem is only with visionOS 27. Environment: macOS: 26.6.1 (25G76) Xcode: 27.0 beta 5 (27A5237l) Simulator: visionOS 27.0 Questions What am I missing? How can I resolve it? Is this a known issue? Has anyone gotten accessoryRectangular widget showing up on visionOS 27 simulator? Any help on this would be much appreciated.
0
0
302
1w
Background Health Store Access for Lock Screen Widgets
It's fairly well know and stated that the Apple Health / HealthKit data store is unavailable when iPhone is locked. Since Lock Screen Widgets were introduced there's been a feature parity mismatch with Apple's own Fitness app which is able to display updating Activity Rings on the Lock Screen. Third party apps cannot do this and have to rely unlocking their device to then trigger an update. This means they often display stale and wrong Health data. With the release of iOS 18 beta, I see no changes to this... Is there anything I've missed? Currently for requesting the Timeline Updates on my Widget I have to just keep requesting updates as often as possible and hope that each time the iPhone might be unlocked.... This is inefficient and a waste of device resources. Even a Widget timeline reload API that let the developer say "Only call update if iPhone unlocked" would be useful.
4
1
1.9k
2w
Is it recommended to use Foundation Model's SystemLanguageModel directly in a WidgetKit extension?
I'm exploring the possibility of using Apple's SystemLanguageModel from the Foundation Models framework within a WidgetKit extension to generate a summary of today's activities from my app. The API works as expected when invoked from the widget extension. However, I'm looking for guidance on whether this is a recommended approach in production. Given the execution time and memory constraints of WidgetKit extensions, is it advisable to perform on-device inference directly in the widget? Or is the recommended pattern to generate the summary in the main app (or another process), store the result in an App Group/shared container, and have the widget simply read and display the precomputed output?
0
0
300
2w
Home Screen App Size-ing And Name Removal Concept
I would like to suggest adding a third Home Screen app icon size option that separates icon size from the option to remove app names. After using the current Home Screen customization options, I noticed that removing app names creates a much cleaner and more minimal look, but it also automatically increases the size of the app icons. While some users may prefer the larger icons, I personally prefer the regular icon size because it feels more balanced and organized. I discussed this idea with my friends and family, and we all agreed that we like the clean look of having no app names while still wanting to keep the original regular app icon size and compensating for the space of the name's of these apps being gone. My suggestion is to add a third option: Regular icons with app names (current default) Regular icons without app names (new option) Large icons without app names (current option) This would allow users to create a cleaner, more customizable Home Screen without forcing the app icons to become larger when removing app names. To help visualize this idea, I have also created some design mockups of what this option could look like. I hope these concepts help demonstrate how this feature could fit naturally into the existing Home Screen customization options. Adding this option would give users more control over their Home Screen design while maintaining the simplicity and attention to detail that Apple is known for. A small change like this could make the experience feel more personalized for many users.
2
0
664
3w
iOS 26 WidgetKit APNs Pushes vs. NSE Targeted Reloads: Budget Allocation & Render Invalidation
Hello Apple DTS Team, We are optimizing a real-time iOS 26 WidgetKit architecture that utilizes both direct WidgetKit APNs pushes and Notification Service Extension (NSE) background asset downloading. We would appreciate technical clarification regarding budget allocation, execution latency, and view hierarchy invalidation on iOS 26. Architecture Overview Our system handles real-time visual updates across multiple distinct Widget kinds (KindA, KindB) using a dual-path pipeline: Direct WidgetKit APNs Push (iOS 26): Registers tokens via WidgetPushHandler (pushTokenDidChange(_:widgets:)). Remote server sends APNs requests targeting <bundleID>.push-type.widgets with apns-push-type: widgets and payload {"aps": {"content-changed": true}}. NSE Asset Pre-Fetch (Notification Service Extension): Server sends a remote notification containing mutable-content: 1 and asset metadata. The NSE intercepts the payload, streams the binary image asset into a shared App Group container (FileManager.default.containerURL(forSecurityApplicationGroupIdentifier:)), writes JSON state to shared UserDefaults, and executes targeted timeline reloads via WidgetCenter.shared.reloadTimelines(ofKind: "KindA"). Timeline Provider: TimelineProvider.getTimeline() reads data synchronously from the shared App Group UserDefaults, resolves the local file path via UIImage(contentsOfFile:), and returns a single SimpleEntry with TimelineReloadPolicy.after(25 minutes) alongside TimelineEntryRelevance(score: 100.0). Technical Questions & Observed Behaviors Per-Kind Budget Isolation vs. Bundle-Wide Budget: Does dasd / chronod maintain an independent 70-reload daily budget for each individual Widget kind (or widget instance), or is the daily background reload budget shared globally across all widget kinds within the extension bundle? Does calling WidgetCenter.shared.reloadTimelines(ofKind: "KindA") from an NSE deduct budget tokens only from KindA's budget bucket, or does it deduct from a global shared bundle pool? NSE Reload Budget Deductions vs. Direct WidgetKit Pushes: Does a direct WidgetKit APNs push (apns-push-type: widgets) draw from a completely separate APNs push budget pool than a WidgetCenter.shared.reloadTimelines(ofKind:) call issued inside an NSE? When an NSE issues reloadTimelines(ofKind:) in response to a user-visible notification (alert + mutable-content: 1), does iOS grant notification grace tokens that bypass standard _DASWidgetBudget deductions? WidgetKit Push Notification Delivery & Rendering Inconsistencies on iOS 26: When sending direct WidgetKit APNs pushes (apns-push-type: widgets), we observe 3 distinct, inconsistent behaviors in production on iOS 26: a) Successful Instant Update: APNs push arrives → WidgetKit wakes up immediately → getTimeline() executes (<0.1s) → Home Screen widget displays the new image instantly. b) Complete Execution Drop: APNs push is sent by our server (HTTP 200 response from APNs api.push.apple.com) → WidgetKit never wakes up, and getTimeline() is completely ignored/not invoked by iOS. c) Execution Success but Screen Bitmap Stale: APNs push arrives → getTimeline() wakes up, executes, and loads the image successfully from disk (UIImage(contentsOfFile:) returns a valid image) → completion(Timeline(entries: [entry])) returns → BUT the displayed image on the Home Screen does NOT change or repaint until the user opens the main app. Questions for DTS Engineers: Why does iOS 26 occasionally drop getTimeline invocation for direct apns-push-type: widgets pushes even when APNs returns HTTP 200? Is Image(uiImage:) rendering inside WidgetKit subject to view hierarchy caching if the SimpleEntry struct date is updated but SwiftUI considers the view tree structurally identical? Does binding an explicit .id(assetPath) modifier to the Image view force SpringBoard's compositor layer to invalidate and repaint immediately upon getTimeline completion? Thank you for your guidance!
0
1
590
Jul ’26
Live Activity (ActivityKit) always defaults to dark colorScheme on iOS 27
Environment: iOS Version: iOS 27.0 Framework: ActivityKit Xcode Version: Xcode 26.1 Issue Description: In iOS 27, Live Activities fail to adapt to the system colorScheme. Regardless of whether the system theme is set to Light or Dark mode, @Environment(.colorScheme) inside the Live Activity view always returns .dark. This behavior worked as expected on iOS 26, where the Live Activity correctly responded to light/dark mode changes and rendered the appropriate theme. Expected Behavior: The Live Activity view should respect the system's current colorScheme (returning .light when the system is in Light Mode) on iOS 27, consistent with the behavior on iOS 26. Actual Behavior: The Live Activity view strictly defaults to .dark mode on iOS 27, even when the device is explicitly set to Light Mode. struct LockScreenView<T: BaseLiveActivityAttributes>: View { let context: ActivityViewContext<T> @Environment(\.colorScheme) var colorScheme var isLight: Bool { colorScheme == .light } var body: some View { Color(isLight ? .white : .black) .overlay(alignment: .topTrailing) { VStack(alignment: .trailing, spacing: 2) { Text("colorScheme: \(String(describing: colorScheme))") } .font(.system(size: 9, weight: .bold, design: .monospaced)) .foregroundColor(.yellow) .padding(4) .background(Color.black.opacity(0.6)) .cornerRadius(4) .padding(.trailing, 8) .padding(.top, 4) } } } Any insights or workarounds would be greatly appreciated. Thanks!
0
0
613
Jul ’26
SwiftData query returns "private" string in WidgetExtension
Hello, I am trying to set up Widgets in my app. I want to fetch my data in the SwiftData container that is shared between my app and my WidgetExtension with App Group. let modelContext = ModelContext(modelContainer) let predicate = #Predicate<Test>{ return $0.attribute == true } return try modelContext.fetch(FetchDescriptor (predicate: predicate, sortBy: [SortDescriptor(\Test.name)])) When this code is run in my WidgetExtension, returned objects attributes values are replaced with "" string. In the logs, Swift Data writes Query returned unrequested identifiers that have been dropped: <private> Any idea what I might be doing wrong to share my SwiftData between my App and my Widget? App Groups capability has been added to both apps and extension with the same identifier. Thank you
2
0
566
Jul ’26
Apple Home missing Wind/Rock Mode controls for Matter Tower Fan
Hi Apple Home Team, We are integrating a Matter-enabled Tower Fan with Apple Home and have observed that the current Apple Home UI does not expose all the capabilities defined by the Matter Fan Control cluster. Wind Mode Our device supports the following WindMode values: Normal Natural Sleep However, Apple Home does not provide any UI to view or control the Natural and Sleep wind modes. Only the basic fan controls are available. Rock Mode (Oscillation Direction) Our device also supports the following RockMode values: Off Left-Right Up-Down In Apple Home, we only see a single Oscillation toggle (On/Off). There is no option to select the oscillation direction (e.g., Left-Right or Up-Down). Could you please clarify: Does Apple Home currently support the Matter WindMode attribute of the Fan Control cluster? Is the current On/Off Oscillation control the expected behavior for devices that support multiple RockMode directions? What is the recommended approach for Matter devices that implement multiple RockMode values (e.g., Left-Right and Up-Down)? Are there any plans to add native UI support for Wind Mode and Rock Mode direction selection in a future Apple Home release? Thank you for your support. We look forward to your guidance on the recommended implementation for Apple Home. Thanks, Chintan Patel
3
0
309
Jul ’26
Live activities not updating on lock screen
I'm working on adding Live Activities to my app but I'm running into a problem, and I'm wondering if anyone knows what's going on. The live activities are started and updated entirely via push notifications (sent through FCM). On the lock screen, updates come through fine for a while, but then the activity gets stuck while the phone is locked. The moment I unlock the device, it immediately jumps to the latest state. I've tried different update frequencies and sending with both priority 5 and priority 10, but no luck. I've also looked through the liveactivitiesd logs, but I'm not really sure what I should be looking for. And yes, NSSupportsLiveActivitiesFrequentUpdates is enabled.
1
1
569
Jul ’26
WidgetKit complications won't update
We are migrating ClockKit complications to WidgetKit in our watch app (watchOS 9+). The migration went smoothly, UI part works just fine. However, we've hit the wall with widgets not updating when requested by the watch app. I believe we are missing something very simple and fundamental, but couldn't find what exactly so far. Advice and tips would be very welcome! 🙇‍♂️ Our implementation details: Whenever data is changed in the main app, the updated data is submitted to the watch app via WatchConnectivity framework using WCSession.default.transferCurrentComplicationUserInfo(_:). According to documentation, this method should be used to transfer complication-related data, since it will wake the watch app even if it is in the background or not opened at all. Watch app receives updated data and stores it in UserDefaults shared with Watch Widget Extension hosting WidgetKit complications via App Group. Watch app then request widget timeline reload via WidgetCenter.shared.reloadAllTimelines(). According to documentation, it reloads the timelines for all configured widgets belonging to the containing app, so it seems the appropriate way to reload WidgetKit complications. Widget Timeline Provider class in Watch Widget Extension reads updated data from shared UserDefaults and uses it to provide the updated snapshot for widget views to render. We believe our implementation logic is correct, but it doesn't work, for some reason. Widgets sometimes update when the watch app is opened, but not always. The most definitive way to force widgets to update is to switch to a different watch face, which confirms that the Widget Timeline Provider has access to properly updated data. P.S. We are aware of the daily reload budget imposed on widgets, so we use widgets reload trigger sparingly. Anyway, according to documentation, reload budget is not effective when in DEBUG mode, but widgets won't reload even in DEBUG mode. Thank you!
20
10
8.8k
Jul ’26
TimeDataSource .dateRange(endingAt:) won't update
Hello, I'm trying to add a new Live Activity to my app showing a timer to a specific date and time. I thought I could use some TimeDataSource so that the timer would be updated automatically by SwiftUI without relying on Live Activity updates. That's not the case with .dateRange(endingAt:) though. Text(.dateRange(endingAt: targetDate), format: .components(style: .narrow)) Something like this correctly shows the timer exactly how I want it, but it never updates. Other TimeDataSource like .currentDate and .durationOffset(to:) do update automatically, but are not what I'm looking for. Am I missing something? Should I use another formatter to make it work?
0
0
711
Jun ’26
Live Activity Stops Updating After 30 Seconds in Background During Audio Playback
Hi I developed a music app that plays offline audio and displays lyrics using Live Activities. According to ActivityKit documentation, Live Activities can be updated from the background. However, in my case, updates stop after ~30 seconds when the app goes to the background or the device is locked. Important points: The app continues running in the background (audio playback works fine using AVAudioSession with .playback) Background code execution is working as expected Only the Live Activity stops updating I am not using push updates since this is an offline app. Is there any limitation or requirement for updating Live Activities continuously in the background during audio playback? Audio Session Configuration let session = AVAudioSession.sharedInstance() try session.setCategory( .playback, mode: .default, options: [.mixWithOthers] // ✅ DO NOT interrupt other audio ) try session.setActive(true) print("✅ [AudioSession] Activated with mixWithOthers") } catch { print("❌ [AudioSession] Error: \(error)") } Live Activity Update Methods guard let activity = getLiveActivity(for: recordID) else{ print("⚠️ No Live Activity found for recordID: \(recordID)") return } guard activity.activityState == .active else { print("⚠️ Activity is not active") return } Task { let content = ActivityContent( state: state, staleDate: Date().addingTimeInterval(60 * 60 * 12), relevanceScore: 1.0 ) await activity.update(content) print("✅ Live Activity updated with ActivityContent") } }
1
0
1.5k
Jun ’26
UI Regession for array widget configuration in iOS 27 Beta 1
Not sure if this is an intented change in terms of UI on 27 beta 1, but I think the previous implementation of configuring array of App Entity is better with a list and options and reorder and remove items. My widget configuration code: struct BusWidgetConfiguration: WidgetConfigurationIntent { static var title: LocalizedStringResource { "Bus Stop Configuration" } static var description: IntentDescription { "Configure youe top 3 most commonly used bus stop to open in app." } @Parameter(title: "Bus Stop", default: [], size: IntentCollectionSize(min: 0, max: 3)) var busStops: [BusStopEntity] @Parameter(title: "Open in Maps", default: false) var openInMaps: Bool } iOS 27 Beta 1: iOS 26.5:
1
0
862
Jun ’26
Control Widget Details?
I'm really struggling to get a handle on all the different aspects of Control Widgets. I wish the docs led with comprehensive visual examples. I'm trying to make a Control Widget that shows the user a quick status of something (on or off), and lets the user change that status, but when they turn it off, it can be turned off for a period of time. I want to present some options in a manner similar to the Focus widget. When you first display widets on macOS, you get this: On the Focus widget, see how it has a round button with a moon, the word "Focus", and a disclosure chevron? I want to reproduce that. If you click the moon button, it turns that focus mode on. If you click anywhere else, it shows this: And even those controls are quite fancy, expanding when you click on them. How do I get that second level of UI?
1
0
391
Jun ’26
Default widget extension not configurable on Mac
I've created a basic Multiplatform Project in Xcode, by going to File > New > Project. I've also included the default widget extension target. When I run the widget on Mac, and I control-click and choose "Edit Widget" the widget just kinda turns gray and floats over other windows, but does not let me configure anything. We leave the option to use configure with app intents turned on when adding the widget extension target. When I run the same project on an iPhone simulator, I can configure the widget without any issue. If someone else has a few minutes, can they see if this repeats for them? We are running this test because we are seeing the same experience in a real widget we are trying to develop but we can't get it to go into configuration mode on Mac.
Replies
4
Boosts
1
Views
485
Activity
3d
WidgetKit timeline crashes with EXC_RESOURCE (memory limit=30MB) when generating entries from a large photo album
Environment: Xcode 15/16, iOS 17/18, WidgetKit (IntentTimelineProvider) Issue: I have a photo widget that lets users pick an album and rotate through its photos on a timer (configurable refresh interval). When the selected album is large, the widget extension is Jetsam-killed with: Thread X: EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high watermark memory limit exceeded) (limit=30 MB) After this happens, the widget stops refreshing entirely and stays on a stale/placeholder image until the app is relaunched. What I've tried: Downsampling with CGImageSourceCreateThumbnailAtIndex + kCGImageSourceThumbnailMaxPixelSize before building entries Reducing entry count and using policy .after(nextDate) instead of pre-building a full day of entries Still seeing intermittent Jetsams on albums with several hundred photos Questions: Is there a recommended max total archived timeline size WidgetKit expects developers to stay under, beyond "keep it small"? For a "large photo album" use case specifically, is the recommended pattern to pre-generate and cache small thumbnails in the App Group container ahead of time, rather than downsampling on demand inside getTimeline()? Is there guidance on how many timeline entries is "too many" before WidgetKit itself starts struggling to archive/deliver them, independent of image size? useful than a forum thread — let me know what info would help most.
Replies
0
Boosts
0
Views
57
Activity
4d
Widget is crashing with 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)
I have created widget which supports medium and large family similar to news feed app like title and image by configuring the medium widget with 2 articles and large with 4 articles where each article has title and it's image with size 46x46 and 61x61. When am adding the small and large widgets to my Home Screen getting memory limit (Thread 1: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=30 MB, unused=0x0)(crash and the widget is not refreshing and some times widgets is showing the skeletons instead of data. This is my timeline provider     func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) {             widgetVM.getRecommendedDataForWidget{ (result) in                 switch result {                 case .success(let items):                     let entries =  getRecommendedWidgetTimeLineEntries(recFeedModel: items)                     let timeline = Timeline(entries: entries, policy: .atEnd)                     completion(timeline)                 case .failure(_):                         let entry = RecommendedWidgetEntry(date: Date(), recommedationData: WidgetFeedModel.getPlaceholderData())                         let timeline = Timeline(entries: [entry], policy: .never)                         completion(timeline)                 }             }         }         else {             if accessTokenValue == nil { // if token is nil then considering it as member is not logged in.                 let entry = RecommendedWidgetEntry(date: Date(), recommedationData: [])                 let timeline = Timeline(entries: [entry], policy: .never)                 completion(timeline)                 return             }     } Could you please help me out on this as this is priority for me as part of app release. I couldn't find out the reason for this. Thanks
Replies
10
Boosts
0
Views
4.2k
Activity
4d
Widget Extension still uses system language even though CFBundleAllowMixedLocalizations = NO is set
I have an app with a Widget Extension. Both the main app and the widget extension link against the same Swift Package, which contains a localization bundle (String Catalog) used by SwiftUI views inside the package. To make the package's views follow the app's configured language (rather than the system language), I set CFBundleAllowMixedLocalizations to NO in the Info.plist of each target (main app and widget extension). Behavior in the main app: This works as expected. If the app only supports Korean, the package's views display Korean text even when the system language is set to English. Behavior in the widget: The same views (from the same package) display English instead of Korean, even though the widget extension has the identical CFBundleAllowMixedLocalizations = NO setting and the widget's view code lives entirely in the package — not in the widget extension target itself. Question: As far as I understand, widgets are supposed to follow the host app's language setting. Given that both targets have the same Info.plist configuration, why would the widget extension resolve localized strings differently from the main app for code in the same package? Is this expected behavior for widget extensions specifically, or a bug? Is there a recommended workaround to force a widget extension (and by extension, the Swift Package code it runs) to use the app's language instead of the system language?
Replies
1
Boosts
0
Views
626
Activity
1w
On vision 27, accessoryRectangular shows blank
Hi, On visionOS 27 simulator accessoryRectangular widget shows completely blank with no text. The same widget shows up correctly on iOS 27 simulator. What I have tried: I have checked the timeline provider and they all seem to be generating timeline entries. supportedFamilies include accessoryRectangular I have even hard coded the content in the view for the widget yet only accessoryRectangular for visionOS 27 shows up blank. Isolated problem The same widget shows up correctly on iOS 27 simulator. The problem is only with visionOS 27. Environment: macOS: 26.6.1 (25G76) Xcode: 27.0 beta 5 (27A5237l) Simulator: visionOS 27.0 Questions What am I missing? How can I resolve it? Is this a known issue? Has anyone gotten accessoryRectangular widget showing up on visionOS 27 simulator? Any help on this would be much appreciated.
Replies
0
Boosts
0
Views
302
Activity
1w
Background Health Store Access for Lock Screen Widgets
It's fairly well know and stated that the Apple Health / HealthKit data store is unavailable when iPhone is locked. Since Lock Screen Widgets were introduced there's been a feature parity mismatch with Apple's own Fitness app which is able to display updating Activity Rings on the Lock Screen. Third party apps cannot do this and have to rely unlocking their device to then trigger an update. This means they often display stale and wrong Health data. With the release of iOS 18 beta, I see no changes to this... Is there anything I've missed? Currently for requesting the Timeline Updates on my Widget I have to just keep requesting updates as often as possible and hope that each time the iPhone might be unlocked.... This is inefficient and a waste of device resources. Even a Widget timeline reload API that let the developer say "Only call update if iPhone unlocked" would be useful.
Replies
4
Boosts
1
Views
1.9k
Activity
2w
Is it recommended to use Foundation Model's SystemLanguageModel directly in a WidgetKit extension?
I'm exploring the possibility of using Apple's SystemLanguageModel from the Foundation Models framework within a WidgetKit extension to generate a summary of today's activities from my app. The API works as expected when invoked from the widget extension. However, I'm looking for guidance on whether this is a recommended approach in production. Given the execution time and memory constraints of WidgetKit extensions, is it advisable to perform on-device inference directly in the widget? Or is the recommended pattern to generate the summary in the main app (or another process), store the result in an App Group/shared container, and have the widget simply read and display the precomputed output?
Replies
0
Boosts
0
Views
300
Activity
2w
Is there a way to know when widget is installed/uninstalled?
Hello, For tracking purpose, is there a way to know when a widget is installed/uninstalled? Also, would it be possible to check which size widget was installed?
Replies
10
Boosts
1
Views
6.8k
Activity
3w
Home Screen App Size-ing And Name Removal Concept
I would like to suggest adding a third Home Screen app icon size option that separates icon size from the option to remove app names. After using the current Home Screen customization options, I noticed that removing app names creates a much cleaner and more minimal look, but it also automatically increases the size of the app icons. While some users may prefer the larger icons, I personally prefer the regular icon size because it feels more balanced and organized. I discussed this idea with my friends and family, and we all agreed that we like the clean look of having no app names while still wanting to keep the original regular app icon size and compensating for the space of the name's of these apps being gone. My suggestion is to add a third option: Regular icons with app names (current default) Regular icons without app names (new option) Large icons without app names (current option) This would allow users to create a cleaner, more customizable Home Screen without forcing the app icons to become larger when removing app names. To help visualize this idea, I have also created some design mockups of what this option could look like. I hope these concepts help demonstrate how this feature could fit naturally into the existing Home Screen customization options. Adding this option would give users more control over their Home Screen design while maintaining the simplicity and attention to detail that Apple is known for. A small change like this could make the experience feel more personalized for many users.
Replies
2
Boosts
0
Views
664
Activity
3w
iOS 26 WidgetKit APNs Pushes vs. NSE Targeted Reloads: Budget Allocation & Render Invalidation
Hello Apple DTS Team, We are optimizing a real-time iOS 26 WidgetKit architecture that utilizes both direct WidgetKit APNs pushes and Notification Service Extension (NSE) background asset downloading. We would appreciate technical clarification regarding budget allocation, execution latency, and view hierarchy invalidation on iOS 26. Architecture Overview Our system handles real-time visual updates across multiple distinct Widget kinds (KindA, KindB) using a dual-path pipeline: Direct WidgetKit APNs Push (iOS 26): Registers tokens via WidgetPushHandler (pushTokenDidChange(_:widgets:)). Remote server sends APNs requests targeting <bundleID>.push-type.widgets with apns-push-type: widgets and payload {"aps": {"content-changed": true}}. NSE Asset Pre-Fetch (Notification Service Extension): Server sends a remote notification containing mutable-content: 1 and asset metadata. The NSE intercepts the payload, streams the binary image asset into a shared App Group container (FileManager.default.containerURL(forSecurityApplicationGroupIdentifier:)), writes JSON state to shared UserDefaults, and executes targeted timeline reloads via WidgetCenter.shared.reloadTimelines(ofKind: "KindA"). Timeline Provider: TimelineProvider.getTimeline() reads data synchronously from the shared App Group UserDefaults, resolves the local file path via UIImage(contentsOfFile:), and returns a single SimpleEntry with TimelineReloadPolicy.after(25 minutes) alongside TimelineEntryRelevance(score: 100.0). Technical Questions & Observed Behaviors Per-Kind Budget Isolation vs. Bundle-Wide Budget: Does dasd / chronod maintain an independent 70-reload daily budget for each individual Widget kind (or widget instance), or is the daily background reload budget shared globally across all widget kinds within the extension bundle? Does calling WidgetCenter.shared.reloadTimelines(ofKind: "KindA") from an NSE deduct budget tokens only from KindA's budget bucket, or does it deduct from a global shared bundle pool? NSE Reload Budget Deductions vs. Direct WidgetKit Pushes: Does a direct WidgetKit APNs push (apns-push-type: widgets) draw from a completely separate APNs push budget pool than a WidgetCenter.shared.reloadTimelines(ofKind:) call issued inside an NSE? When an NSE issues reloadTimelines(ofKind:) in response to a user-visible notification (alert + mutable-content: 1), does iOS grant notification grace tokens that bypass standard _DASWidgetBudget deductions? WidgetKit Push Notification Delivery & Rendering Inconsistencies on iOS 26: When sending direct WidgetKit APNs pushes (apns-push-type: widgets), we observe 3 distinct, inconsistent behaviors in production on iOS 26: a) Successful Instant Update: APNs push arrives → WidgetKit wakes up immediately → getTimeline() executes (<0.1s) → Home Screen widget displays the new image instantly. b) Complete Execution Drop: APNs push is sent by our server (HTTP 200 response from APNs api.push.apple.com) → WidgetKit never wakes up, and getTimeline() is completely ignored/not invoked by iOS. c) Execution Success but Screen Bitmap Stale: APNs push arrives → getTimeline() wakes up, executes, and loads the image successfully from disk (UIImage(contentsOfFile:) returns a valid image) → completion(Timeline(entries: [entry])) returns → BUT the displayed image on the Home Screen does NOT change or repaint until the user opens the main app. Questions for DTS Engineers: Why does iOS 26 occasionally drop getTimeline invocation for direct apns-push-type: widgets pushes even when APNs returns HTTP 200? Is Image(uiImage:) rendering inside WidgetKit subject to view hierarchy caching if the SimpleEntry struct date is updated but SwiftUI considers the view tree structurally identical? Does binding an explicit .id(assetPath) modifier to the Image view force SpringBoard's compositor layer to invalidate and repaint immediately upon getTimeline completion? Thank you for your guidance!
Replies
0
Boosts
1
Views
590
Activity
Jul ’26
iOS 27 beta Widget can not be found in gallery
After the installation and upgrade of the iOS App coverage, the desktop widget became unavailable. When deleting and re-adding them, they could not be found in the widget gallery . The problem was solved after the phone system was restarted
Replies
0
Boosts
1
Views
534
Activity
Jul ’26
Live Activity (ActivityKit) always defaults to dark colorScheme on iOS 27
Environment: iOS Version: iOS 27.0 Framework: ActivityKit Xcode Version: Xcode 26.1 Issue Description: In iOS 27, Live Activities fail to adapt to the system colorScheme. Regardless of whether the system theme is set to Light or Dark mode, @Environment(.colorScheme) inside the Live Activity view always returns .dark. This behavior worked as expected on iOS 26, where the Live Activity correctly responded to light/dark mode changes and rendered the appropriate theme. Expected Behavior: The Live Activity view should respect the system's current colorScheme (returning .light when the system is in Light Mode) on iOS 27, consistent with the behavior on iOS 26. Actual Behavior: The Live Activity view strictly defaults to .dark mode on iOS 27, even when the device is explicitly set to Light Mode. struct LockScreenView<T: BaseLiveActivityAttributes>: View { let context: ActivityViewContext<T> @Environment(\.colorScheme) var colorScheme var isLight: Bool { colorScheme == .light } var body: some View { Color(isLight ? .white : .black) .overlay(alignment: .topTrailing) { VStack(alignment: .trailing, spacing: 2) { Text("colorScheme: \(String(describing: colorScheme))") } .font(.system(size: 9, weight: .bold, design: .monospaced)) .foregroundColor(.yellow) .padding(4) .background(Color.black.opacity(0.6)) .cornerRadius(4) .padding(.trailing, 8) .padding(.top, 4) } } } Any insights or workarounds would be greatly appreciated. Thanks!
Replies
0
Boosts
0
Views
613
Activity
Jul ’26
SwiftData query returns "private" string in WidgetExtension
Hello, I am trying to set up Widgets in my app. I want to fetch my data in the SwiftData container that is shared between my app and my WidgetExtension with App Group. let modelContext = ModelContext(modelContainer) let predicate = #Predicate<Test>{ return $0.attribute == true } return try modelContext.fetch(FetchDescriptor (predicate: predicate, sortBy: [SortDescriptor(\Test.name)])) When this code is run in my WidgetExtension, returned objects attributes values are replaced with "" string. In the logs, Swift Data writes Query returned unrequested identifiers that have been dropped: <private> Any idea what I might be doing wrong to share my SwiftData between my App and my Widget? App Groups capability has been added to both apps and extension with the same identifier. Thank you
Replies
2
Boosts
0
Views
566
Activity
Jul ’26
Apple Home missing Wind/Rock Mode controls for Matter Tower Fan
Hi Apple Home Team, We are integrating a Matter-enabled Tower Fan with Apple Home and have observed that the current Apple Home UI does not expose all the capabilities defined by the Matter Fan Control cluster. Wind Mode Our device supports the following WindMode values: Normal Natural Sleep However, Apple Home does not provide any UI to view or control the Natural and Sleep wind modes. Only the basic fan controls are available. Rock Mode (Oscillation Direction) Our device also supports the following RockMode values: Off Left-Right Up-Down In Apple Home, we only see a single Oscillation toggle (On/Off). There is no option to select the oscillation direction (e.g., Left-Right or Up-Down). Could you please clarify: Does Apple Home currently support the Matter WindMode attribute of the Fan Control cluster? Is the current On/Off Oscillation control the expected behavior for devices that support multiple RockMode directions? What is the recommended approach for Matter devices that implement multiple RockMode values (e.g., Left-Right and Up-Down)? Are there any plans to add native UI support for Wind Mode and Rock Mode direction selection in a future Apple Home release? Thank you for your support. We look forward to your guidance on the recommended implementation for Apple Home. Thanks, Chintan Patel
Replies
3
Boosts
0
Views
309
Activity
Jul ’26
Live activities not updating on lock screen
I'm working on adding Live Activities to my app but I'm running into a problem, and I'm wondering if anyone knows what's going on. The live activities are started and updated entirely via push notifications (sent through FCM). On the lock screen, updates come through fine for a while, but then the activity gets stuck while the phone is locked. The moment I unlock the device, it immediately jumps to the latest state. I've tried different update frequencies and sending with both priority 5 and priority 10, but no luck. I've also looked through the liveactivitiesd logs, but I'm not really sure what I should be looking for. And yes, NSSupportsLiveActivitiesFrequentUpdates is enabled.
Replies
1
Boosts
1
Views
569
Activity
Jul ’26
WidgetKit complications won't update
We are migrating ClockKit complications to WidgetKit in our watch app (watchOS 9+). The migration went smoothly, UI part works just fine. However, we've hit the wall with widgets not updating when requested by the watch app. I believe we are missing something very simple and fundamental, but couldn't find what exactly so far. Advice and tips would be very welcome! 🙇‍♂️ Our implementation details: Whenever data is changed in the main app, the updated data is submitted to the watch app via WatchConnectivity framework using WCSession.default.transferCurrentComplicationUserInfo(_:). According to documentation, this method should be used to transfer complication-related data, since it will wake the watch app even if it is in the background or not opened at all. Watch app receives updated data and stores it in UserDefaults shared with Watch Widget Extension hosting WidgetKit complications via App Group. Watch app then request widget timeline reload via WidgetCenter.shared.reloadAllTimelines(). According to documentation, it reloads the timelines for all configured widgets belonging to the containing app, so it seems the appropriate way to reload WidgetKit complications. Widget Timeline Provider class in Watch Widget Extension reads updated data from shared UserDefaults and uses it to provide the updated snapshot for widget views to render. We believe our implementation logic is correct, but it doesn't work, for some reason. Widgets sometimes update when the watch app is opened, but not always. The most definitive way to force widgets to update is to switch to a different watch face, which confirms that the Widget Timeline Provider has access to properly updated data. P.S. We are aware of the daily reload budget imposed on widgets, so we use widgets reload trigger sparingly. Anyway, according to documentation, reload budget is not effective when in DEBUG mode, but widgets won't reload even in DEBUG mode. Thank you!
Replies
20
Boosts
10
Views
8.8k
Activity
Jul ’26
TimeDataSource .dateRange(endingAt:) won't update
Hello, I'm trying to add a new Live Activity to my app showing a timer to a specific date and time. I thought I could use some TimeDataSource so that the timer would be updated automatically by SwiftUI without relying on Live Activity updates. That's not the case with .dateRange(endingAt:) though. Text(.dateRange(endingAt: targetDate), format: .components(style: .narrow)) Something like this correctly shows the timer exactly how I want it, but it never updates. Other TimeDataSource like .currentDate and .durationOffset(to:) do update automatically, but are not what I'm looking for. Am I missing something? Should I use another formatter to make it work?
Replies
0
Boosts
0
Views
711
Activity
Jun ’26
Live Activity Stops Updating After 30 Seconds in Background During Audio Playback
Hi I developed a music app that plays offline audio and displays lyrics using Live Activities. According to ActivityKit documentation, Live Activities can be updated from the background. However, in my case, updates stop after ~30 seconds when the app goes to the background or the device is locked. Important points: The app continues running in the background (audio playback works fine using AVAudioSession with .playback) Background code execution is working as expected Only the Live Activity stops updating I am not using push updates since this is an offline app. Is there any limitation or requirement for updating Live Activities continuously in the background during audio playback? Audio Session Configuration let session = AVAudioSession.sharedInstance() try session.setCategory( .playback, mode: .default, options: [.mixWithOthers] // ✅ DO NOT interrupt other audio ) try session.setActive(true) print("✅ [AudioSession] Activated with mixWithOthers") } catch { print("❌ [AudioSession] Error: \(error)") } Live Activity Update Methods guard let activity = getLiveActivity(for: recordID) else{ print("⚠️ No Live Activity found for recordID: \(recordID)") return } guard activity.activityState == .active else { print("⚠️ Activity is not active") return } Task { let content = ActivityContent( state: state, staleDate: Date().addingTimeInterval(60 * 60 * 12), relevanceScore: 1.0 ) await activity.update(content) print("✅ Live Activity updated with ActivityContent") } }
Replies
1
Boosts
0
Views
1.5k
Activity
Jun ’26
UI Regession for array widget configuration in iOS 27 Beta 1
Not sure if this is an intented change in terms of UI on 27 beta 1, but I think the previous implementation of configuring array of App Entity is better with a list and options and reorder and remove items. My widget configuration code: struct BusWidgetConfiguration: WidgetConfigurationIntent { static var title: LocalizedStringResource { "Bus Stop Configuration" } static var description: IntentDescription { "Configure youe top 3 most commonly used bus stop to open in app." } @Parameter(title: "Bus Stop", default: [], size: IntentCollectionSize(min: 0, max: 3)) var busStops: [BusStopEntity] @Parameter(title: "Open in Maps", default: false) var openInMaps: Bool } iOS 27 Beta 1: iOS 26.5:
Replies
1
Boosts
0
Views
862
Activity
Jun ’26
Control Widget Details?
I'm really struggling to get a handle on all the different aspects of Control Widgets. I wish the docs led with comprehensive visual examples. I'm trying to make a Control Widget that shows the user a quick status of something (on or off), and lets the user change that status, but when they turn it off, it can be turned off for a period of time. I want to present some options in a manner similar to the Focus widget. When you first display widets on macOS, you get this: On the Focus widget, see how it has a round button with a moon, the word "Focus", and a disclosure chevron? I want to reproduce that. If you click the moon button, it turns that focus mode on. If you click anywhere else, it shows this: And even those controls are quite fancy, expanding when you click on them. How do I get that second level of UI?
Replies
1
Boosts
0
Views
391
Activity
Jun ’26