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

Supported deterministic WidgetKit provider read testing while locked and before first unlock
We are qualifying a production WidgetKit extension on an iPhone 17 running iOS 26.6.1. both use App Group group.com....app.widgets. The extension reads small snapshots from the App Group. Precise personal Home data uses NSFileProtectionComplete; a separate book-only Lock projection uses NSFileProtectionCompleteUntilFirstUserAuthentication. Public Daily and non-personal control state are stored separately. Does Apple provide a supported deterministic mechanism to cause or observe the actual system-hosted WidgetKit provider performing a fresh App Group read during each phase below? Locked after first unlock. Rebooted, before the first passcode unlock. Relocked after first unlock. We need to attribute the read to the exact extension executable/process, establish the lock phase without unlocking or opening the protected data through the observation mechanism, and distinguish “the provider did not run” from “it ran but observation was unavailable.” Cached widget pixels, file attributes and later recovery cannot establish whether a fresh provider read was allowed or denied. WidgetCenter reload requests and timeline dates are opportunistic and have not produced deterministic invocations in these phases. Direct provider invocation, XCTest helper processes, debugger-controlled lifecycle substitution and manually reading files from the host do not establish the required system WidgetKit lifecycle. We cannot weaken file protection or add artificial production AppIntent/background capabilities solely to force this test. Please clarify which applies: A. A supported deterministic XCTest, CoreDevice, Xcode or WidgetKit test mechanism exists. If so, what setup, trigger and logging method should we use? B. WidgetKit scheduling in these states is intentionally opportunistic and no deterministic public test mechanism is provided. If so, what supported evidence does Apple recommend for verifying this protected-file contract? This request concerns test methodology; we are not claiming locked/BFU protection has passed.
Topic: Design SubTopic: General Tags:
0
0
222
17h
Is a genuinely transparent widget container possible in .fullColor rendering mode, or is transparency limited to Clear/Tinted (.accented)?
Following up on a related discussion here: https://developer.apple.com/forums/thread/797298 "Using the new Liquid Glass effect in iOS 26 for widget backgrounds" I’ve also been looking at the widgetRenderingMode documentation and the “Optimizing your widget for accented rendering mode and Liquid Glass” documentation you mentioned. I understand that the widget should adapt its content based on the rendering mode, and that Liquid Glass is provided by the system when the widget is rendered in the appropriate context. What I’m still trying to understand is the behavior of the widget’s background/container itself. I tested a minimal widget on an iPhone running iOS 27, including: .containerBackground(for: .widget) { Color.clear } I also tried EmptyView(), .clear, containerBackgroundRemovable(true), and several material/glass combinations. What I found is: In Clear/Tinted Home Screen appearance, the widget becomes .accented and the system provides the expected transparent/Liquid Glass presentation. In the normal Home Screen appearance, the widget remains .fullColor (confirmed by logging @Environment(.widgetRenderingMode) directly in the widget view), but the actual Home Screen wallpaper does not show through the widget container. So I’m wondering whether this is simply expected behavior for .fullColor. Is it possible for a Home Screen widget to remain in .fullColor while its system widget container is genuinely transparent, allowing the actual Home Screen wallpaper to remain visible behind the widget? Or is transparency of the system widget container intentionally limited to the system’s Clear/Tinted (.accented) presentation? I’m asking because I’ve seen some third-party widgets that appear to provide a transparent or Liquid Glass-style widget even when the Home Screen is using its normal appearance, so I’m trying to understand whether there is a public WidgetKit/SwiftUI API or configuration that I’m missing. Thanks for any clarification.
0
0
223
1d
Complication flickers in Infograph sub-dials on a single-color Infograph face with Always On (watchOS 27)
On watchOS 27 my app's round complication on the Infograph face disappears for about a second every time I raise or lower my wrist, then comes back. It only happens in the small round dials of that face, only when the face is set to a single color instead of Multicolor, and only when Always On Display is turned on. Everything else on the same watch is fine. my complication placed in a corner of the same face, the same face set to Multicolor, and an Apple complication sitting right next to mine. Other faces set to a single color are fine too, including in their round slots - I tested Modular and Meridian among others. With Always On Display off there is no problem either. What I already checked is: It still happens when my complication is the only one on the face. It still happens when the complication shows just a single line of plain text. The data is not being reloaded. I displayed the timestamp of the entry inside the complication and it does not change across the gap, so the same content is simply being redrawn. Removing the complication and adding it back does not help. Rebuilding with the newest Xcode changes nothing, and an older build behaves exactly the same. The same app, unchanged, worked correctly on watchOS 26. This started right after updating the watch to watchOS 27. Has anyone else run into this on watchOS 27? And has anyone found anything on the app side that makes a difference? I have not found a single thing.
0
0
89
3d
iOS Dynamically loaded custom fonts in WidgetKit not working on real device (simulator is fine). Sandbox chronod deny file-read-data for font file.
Project structure is: App target + widget extension + widget intent extension All share a common appgroup group.com.x.y and all file handling is done using FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.x.y") so that only the shared container is used. Using the Main app target, a font "Chewy-Regular.ttf" is downloaded and saved to the shared AppGroup container. Font can now be loaded via CTFontManagerRegisterFontsForURL and displayed in a Main App Text view Text("Testing...").font(Font.custom("Chewy-Regular", size: 20)) Now add a Widgetkit widget instance that uses this font. In 'getTimeLine() and getSnapShot() of IntentTimelineProvider we load the font again via CTFontManagerRegisterFontsForURL (this needs to happen again probably because widget runs in a separate process from the main app?). On simulator, the widget will show the correct font. BUT On iPhone7 real device, the widget will show the 'redacted placeholder view'. It seems that something is crashing. I see in the device console : error 14:39:07.567120-0800 chronod No configuration found for configured widget identifier: D9BF75EE-4A04-441A-8C85-1507F7ECE379 fault 14:39:07.625600-0800 widgetxExtension -[EXSwiftUI_Subsystem beginUsing:withBundle:] unexpectedly called multiple times. error 14:39:07.672733-0800 chronod Encountered an error reading the view archive for <private>; error: <private> error 14:39:07.672799-0800 chronod [co.appevolve.onewidget.widgetx:widgetx:small:1536744920620481560@148.0/148.0/20.2] reload: could not decode view error 14:39:07.674984-0800 kernel Sandbox: chronod(2128) deny(1) file-read-metadata /private/var/mobile/Containers/Shared/AppGroup/9B524570-1765-4C24-9E0C-15BC3982F0DC/downloadedFonts/Chewy/Chewy-Regular.ttf error 14:39:07.675762-0800 kernel Sandbox: chronod(2128) deny(1) file-read-data /private/var/mobile/Containers/Shared/AppGroup/9B524570-1765-4C24-9E0C-15BC3982F0DC/downloadedFonts/Chewy/Chewy-Regular.ttf error 14:39:07.708914-0800 chronod [u 8D2C83B3-A6CB-432E-A9D4-9BC8F7056B10:m (null)] [<private>(<private>)] Connection to plugin invalidated while in use. fault 14:39:07.710284-0800 widgetxExtension -[EXSwiftUI_Subsystem beginUsing:withBundle:] unexpectedly called multiple times. error 14:39:07.803468-0800 chronod Encountered an error reading the view archive for <private>; error: <private> It seems that it's a permission issue, and the textview can't access the font file it needs when the widget is rendering. Notes: 1) Font is definitely registered because I can see them in for fontFamily in UIFont.familyNames {             for fontName in UIFont.fontNames(forFamilyName: fontFamily) {                 print(fontName) 								... in both the Main App target and the Widget Extension target 2) If I make make the font part of the app bundle and add to 'Fonts provided by application' , the are loaded absolutely fine in the Main App and the Widget on simulator and iPhone 7 real device. 3) I do see this error sometimes in the Widget extension target log, don't know if it's related. widgetxExtension[1385:254599] [User Defaults] Couldn't read values in CFPrefsPlistSource<0x28375b880> (Domain: group.co.appevolve.onewidget, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd 4) I suspected something to do with app groups, so I tried to copy the font into the Widget Extension container and load from there, but had the same result. Please help! Thank you.
8
1
3.5k
5d
watchOS 27 beta: EVERY app update kills WidgetKit complications until the watch is rebooted
Filed as FB24619522 — sysdiagnoses from both devices and the live logs are attached to the report. We ship WidgetKit complications, and on the watchOS 27 betas (24R5360a, paired with iOS 27 24A5430a) they die every time the app gets updated while they're on the active face. Within seconds they turn into empty placeholders and never come back on their own — opening the app, switching faces or reloading timelines from the app does nothing. The watch logs show the extension being killed during the install (normal), and after that watchOS simply can't launch the new copy any more: runningboardd: <OSLaunchdJob | handle=…>: start succeeded, info=spawn failed, error=111: Invalid or missing Program/ProgramArguments chronod(ChronoKit): Reload failed; 0 retries remaining: … "Unknown extension process" Only two things fix it, and both restart chronod: rebooting the watch, or switching the watch language and back (iPhone › Watch app › General › Language & Region, then give it a couple of minutes). Our second extension in the same bundle, which wasn't running during the install, came back fine — so this looks like an OS bug rather than something we can work around in code. iOS 27 widgets seem to have the same problem (this thread, and iPhone in Canada wrote it up on beta 4), and someone posted the identical log lines back in March. FB24619522 — the full story, both sysdiagnoses and the live logs are in the Feedback.
0
3
365
1w
Using isActivityFullscreen to build applications in xcode 16 will crash in ios 17
My widget uses the @Environment(.isActivityFullscreen) variable. When running on ios 17, it will crash and report an error: dyld[55031]: Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE20isActivityFullscreenSbvg Expected in: /Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/WidgetKit.framework/WidgetKit
2
0
628
2w
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
573
3w
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
213
3w
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.4k
3w
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
923
Aug ’26
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
455
Aug ’26
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
2.1k
Aug ’26
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
460
Aug ’26
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
808
Jul ’26
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
785
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
843
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
727
Jul ’26
Supported deterministic WidgetKit provider read testing while locked and before first unlock
We are qualifying a production WidgetKit extension on an iPhone 17 running iOS 26.6.1. both use App Group group.com....app.widgets. The extension reads small snapshots from the App Group. Precise personal Home data uses NSFileProtectionComplete; a separate book-only Lock projection uses NSFileProtectionCompleteUntilFirstUserAuthentication. Public Daily and non-personal control state are stored separately. Does Apple provide a supported deterministic mechanism to cause or observe the actual system-hosted WidgetKit provider performing a fresh App Group read during each phase below? Locked after first unlock. Rebooted, before the first passcode unlock. Relocked after first unlock. We need to attribute the read to the exact extension executable/process, establish the lock phase without unlocking or opening the protected data through the observation mechanism, and distinguish “the provider did not run” from “it ran but observation was unavailable.” Cached widget pixels, file attributes and later recovery cannot establish whether a fresh provider read was allowed or denied. WidgetCenter reload requests and timeline dates are opportunistic and have not produced deterministic invocations in these phases. Direct provider invocation, XCTest helper processes, debugger-controlled lifecycle substitution and manually reading files from the host do not establish the required system WidgetKit lifecycle. We cannot weaken file protection or add artificial production AppIntent/background capabilities solely to force this test. Please clarify which applies: A. A supported deterministic XCTest, CoreDevice, Xcode or WidgetKit test mechanism exists. If so, what setup, trigger and logging method should we use? B. WidgetKit scheduling in these states is intentionally opportunistic and no deterministic public test mechanism is provided. If so, what supported evidence does Apple recommend for verifying this protected-file contract? This request concerns test methodology; we are not claiming locked/BFU protection has passed.
Topic: Design SubTopic: General Tags:
Replies
0
Boosts
0
Views
222
Activity
17h
Is a genuinely transparent widget container possible in .fullColor rendering mode, or is transparency limited to Clear/Tinted (.accented)?
Following up on a related discussion here: https://developer.apple.com/forums/thread/797298 "Using the new Liquid Glass effect in iOS 26 for widget backgrounds" I’ve also been looking at the widgetRenderingMode documentation and the “Optimizing your widget for accented rendering mode and Liquid Glass” documentation you mentioned. I understand that the widget should adapt its content based on the rendering mode, and that Liquid Glass is provided by the system when the widget is rendered in the appropriate context. What I’m still trying to understand is the behavior of the widget’s background/container itself. I tested a minimal widget on an iPhone running iOS 27, including: .containerBackground(for: .widget) { Color.clear } I also tried EmptyView(), .clear, containerBackgroundRemovable(true), and several material/glass combinations. What I found is: In Clear/Tinted Home Screen appearance, the widget becomes .accented and the system provides the expected transparent/Liquid Glass presentation. In the normal Home Screen appearance, the widget remains .fullColor (confirmed by logging @Environment(.widgetRenderingMode) directly in the widget view), but the actual Home Screen wallpaper does not show through the widget container. So I’m wondering whether this is simply expected behavior for .fullColor. Is it possible for a Home Screen widget to remain in .fullColor while its system widget container is genuinely transparent, allowing the actual Home Screen wallpaper to remain visible behind the widget? Or is transparency of the system widget container intentionally limited to the system’s Clear/Tinted (.accented) presentation? I’m asking because I’ve seen some third-party widgets that appear to provide a transparent or Liquid Glass-style widget even when the Home Screen is using its normal appearance, so I’m trying to understand whether there is a public WidgetKit/SwiftUI API or configuration that I’m missing. Thanks for any clarification.
Replies
0
Boosts
0
Views
223
Activity
1d
Changes to Activity/WidgetKit LiveActivities in iOS 27
Hi, for anyone who is working with LiveActivities and is running a beta of iOS 27, has apple made the ability for LiveActivities to be vertically larger and display more content as they appear in some of the demo images, or are these LiveActivities like the ones in the pictures above just system specific that is only available to apple.
Replies
0
Boosts
0
Views
187
Activity
2d
Complication flickers in Infograph sub-dials on a single-color Infograph face with Always On (watchOS 27)
On watchOS 27 my app's round complication on the Infograph face disappears for about a second every time I raise or lower my wrist, then comes back. It only happens in the small round dials of that face, only when the face is set to a single color instead of Multicolor, and only when Always On Display is turned on. Everything else on the same watch is fine. my complication placed in a corner of the same face, the same face set to Multicolor, and an Apple complication sitting right next to mine. Other faces set to a single color are fine too, including in their round slots - I tested Modular and Meridian among others. With Always On Display off there is no problem either. What I already checked is: It still happens when my complication is the only one on the face. It still happens when the complication shows just a single line of plain text. The data is not being reloaded. I displayed the timestamp of the entry inside the complication and it does not change across the gap, so the same content is simply being redrawn. Removing the complication and adding it back does not help. Rebuilding with the newest Xcode changes nothing, and an older build behaves exactly the same. The same app, unchanged, worked correctly on watchOS 26. This started right after updating the watch to watchOS 27. Has anyone else run into this on watchOS 27? And has anyone found anything on the app side that makes a difference? I have not found a single thing.
Replies
0
Boosts
0
Views
89
Activity
3d
iOS Dynamically loaded custom fonts in WidgetKit not working on real device (simulator is fine). Sandbox chronod deny file-read-data for font file.
Project structure is: App target + widget extension + widget intent extension All share a common appgroup group.com.x.y and all file handling is done using FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: "group.com.x.y") so that only the shared container is used. Using the Main app target, a font "Chewy-Regular.ttf" is downloaded and saved to the shared AppGroup container. Font can now be loaded via CTFontManagerRegisterFontsForURL and displayed in a Main App Text view Text("Testing...").font(Font.custom("Chewy-Regular", size: 20)) Now add a Widgetkit widget instance that uses this font. In 'getTimeLine() and getSnapShot() of IntentTimelineProvider we load the font again via CTFontManagerRegisterFontsForURL (this needs to happen again probably because widget runs in a separate process from the main app?). On simulator, the widget will show the correct font. BUT On iPhone7 real device, the widget will show the 'redacted placeholder view'. It seems that something is crashing. I see in the device console : error 14:39:07.567120-0800 chronod No configuration found for configured widget identifier: D9BF75EE-4A04-441A-8C85-1507F7ECE379 fault 14:39:07.625600-0800 widgetxExtension -[EXSwiftUI_Subsystem beginUsing:withBundle:] unexpectedly called multiple times. error 14:39:07.672733-0800 chronod Encountered an error reading the view archive for &amp;lt;private&amp;gt;; error: &amp;lt;private&amp;gt; error 14:39:07.672799-0800 chronod [co.appevolve.onewidget.widgetx:widgetx:small:1536744920620481560@148.0/148.0/20.2] reload: could not decode view error 14:39:07.674984-0800 kernel Sandbox: chronod(2128) deny(1) file-read-metadata /private/var/mobile/Containers/Shared/AppGroup/9B524570-1765-4C24-9E0C-15BC3982F0DC/downloadedFonts/Chewy/Chewy-Regular.ttf error 14:39:07.675762-0800 kernel Sandbox: chronod(2128) deny(1) file-read-data /private/var/mobile/Containers/Shared/AppGroup/9B524570-1765-4C24-9E0C-15BC3982F0DC/downloadedFonts/Chewy/Chewy-Regular.ttf error 14:39:07.708914-0800 chronod [u 8D2C83B3-A6CB-432E-A9D4-9BC8F7056B10:m (null)] [&amp;lt;private&amp;gt;(&amp;lt;private&amp;gt;)] Connection to plugin invalidated while in use. fault 14:39:07.710284-0800 widgetxExtension -[EXSwiftUI_Subsystem beginUsing:withBundle:] unexpectedly called multiple times. error 14:39:07.803468-0800 chronod Encountered an error reading the view archive for &amp;lt;private&amp;gt;; error: &amp;lt;private&amp;gt; It seems that it's a permission issue, and the textview can't access the font file it needs when the widget is rendering. Notes: 1) Font is definitely registered because I can see them in for fontFamily in UIFont.familyNames {             for fontName in UIFont.fontNames(forFamilyName: fontFamily) {                 print(fontName) &amp;amp;#9;&amp;amp;#9;&amp;amp;#9;&amp;amp;#9;&amp;amp;#9;&amp;amp;#9;&amp;amp;#9;&amp;amp;#9;... in both the Main App target and the Widget Extension target 2) If I make make the font part of the app bundle and add to 'Fonts provided by application' , the are loaded absolutely fine in the Main App and the Widget on simulator and iPhone 7 real device. 3) I do see this error sometimes in the Widget extension target log, don't know if it's related. widgetxExtension[1385:254599] [User Defaults] Couldn't read values in CFPrefsPlistSource&amp;lt;0x28375b880&amp;gt; (Domain: group.co.appevolve.onewidget, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null), Contents Need Refresh: Yes): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd 4) I suspected something to do with app groups, so I tried to copy the font into the Widget Extension container and load from there, but had the same result. Please help! Thank you.
Replies
8
Boosts
1
Views
3.5k
Activity
5d
watchOS 27 beta: EVERY app update kills WidgetKit complications until the watch is rebooted
Filed as FB24619522 — sysdiagnoses from both devices and the live logs are attached to the report. We ship WidgetKit complications, and on the watchOS 27 betas (24R5360a, paired with iOS 27 24A5430a) they die every time the app gets updated while they're on the active face. Within seconds they turn into empty placeholders and never come back on their own — opening the app, switching faces or reloading timelines from the app does nothing. The watch logs show the extension being killed during the install (normal), and after that watchOS simply can't launch the new copy any more: runningboardd: <OSLaunchdJob | handle=…>: start succeeded, info=spawn failed, error=111: Invalid or missing Program/ProgramArguments chronod(ChronoKit): Reload failed; 0 retries remaining: … "Unknown extension process" Only two things fix it, and both restart chronod: rebooting the watch, or switching the watch language and back (iPhone › Watch app › General › Language & Region, then give it a couple of minutes). Our second extension in the same bundle, which wasn't running during the install, came back fine — so this looks like an OS bug rather than something we can work around in code. iOS 27 widgets seem to have the same problem (this thread, and iPhone in Canada wrote it up on beta 4), and someone posted the identical log lines back in March. FB24619522 — the full story, both sysdiagnoses and the live logs are in the Feedback.
Replies
0
Boosts
3
Views
365
Activity
1w
Using isActivityFullscreen to build applications in xcode 16 will crash in ios 17
My widget uses the @Environment(.isActivityFullscreen) variable. When running on ios 17, it will crash and report an error: dyld[55031]: Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE20isActivityFullscreenSbvg Expected in: /Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/WidgetKit.framework/WidgetKit
Replies
2
Boosts
0
Views
628
Activity
2w
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
573
Activity
3w
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
213
Activity
3w
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.4k
Activity
3w
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
923
Activity
Aug ’26
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
455
Activity
Aug ’26
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
2.1k
Activity
Aug ’26
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
460
Activity
Aug ’26
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
7.0k
Activity
Aug ’26
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
808
Activity
Jul ’26
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
785
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
2
Views
716
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
843
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
727
Activity
Jul ’26