All Questions
21
questions
0
votes
2
answers
274
views
SwiftUI Widget Previews have a padding in iOS 17 / Xcode 15
After iOS 17 / Xcode 15 the previews for my widgets are inset and squeezed into the view.
I added a .contentMarginsDisabled() modifier to the intent, which fixes this in the actual widgets on a ...
0
votes
0
answers
44
views
"Prompt Label" Custom Intent localization not working in iOS 17
I've an app with a custom intent to select a value from a list when configuring a widget. The prompt label (the title of the view controller presented where you can pick a value from a list) is ...
0
votes
0
answers
123
views
WidgetKit iOS 17 - getCurrentConfigurations returned configuration is nil
Widget configuration is nil in returned data from getCurrentConfigurations function.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication....
1
vote
0
answers
11
views
Wrong icon for Widget Extension scheme after rename
I had renamed my Widget Extension struct from "PropediumWidgetExtension" to "Widget" and updated corresponding values in the extension's Building Settings. The icon for the Widget ...
5
votes
1
answer
347
views
SwiftUI, SwiftData, WidgetKit - Missing 'previewContext' modifier
Cannot Preview this file
Missing 'previewContext' modifier.
No bug anywhere else. Xcode 15, iOS 17
import SwiftUI
import WidgetKit
import SwiftData
struct DiemWidgetEntryView : View {
var entry: ...
1
vote
0
answers
293
views
SwiftUI - Share SwiftData View with Widget
I have a SwiftData model called Diem. I want my App and my WidgetExtension to share DiemSharedView (already having both App and Widget as targets). However, DiemSharedView just doesn't show up on my ...
1
vote
1
answer
229
views
Widget not updated when selecting AppEnum with AppIntents
I'm trying to select options for a widget using a drop-down, and provide the user with a limited list of options that will never change. I'm using an AppEnum as recommended. However, when selecting an ...
0
votes
0
answers
74
views
CoreData: Request was cancelled because the store was removed from the coordinator
I am working with CoreData and WidgetKit. I would like to implement a NSPersistentCloudKitContainer into an interactive widget. However, when the user makes a change over the widget, the container ...
4
votes
3
answers
2k
views
Adopt containerBackground API - iOS 17 widget
I built an analog clock widget which was working fine for iOS 16 and Xcode 14, however upon updating to Xcode 15 and iOS 17 I can't seem to get it to work anymore. My widgets show up with this warning,...
1
vote
0
answers
95
views
CLLocationManager: getting kCLErrorDenied in widget
I am having some problem with accessing the CLLLocationManager location from my widget. It works fine with Xcode 15 running on a iOS17 simulator. But running it on device gives me an error in the ...
1
vote
1
answer
271
views
Swift - How to get WidgetLocation from WidgetCenter
I know I can get WidgetInfo from WidgetCenter using getCurrentConfigurations(_:). But, how can I access new WidgetLocation from that info?
I can't find anything in the documentation. If there is ...
4
votes
2
answers
1k
views
iOS 17 interactive widgets - remove button background and padding
I'm trying to create new iOS 17 interactive widget. To be able to add "action" I want to use new init(_:intent:) initializer of Button which allow me to perform given intent when button gets ...
0
votes
1
answer
465
views
Use disfavoredLocations(_:for:) for Widget below iOS 17
I have multiple Widgets for my iOS/iPadOS/watchOS app. I have one widget with supported family .systemLarge.
struct MyWidget: Widget {
var body: some WidgetConfiguration {
...
4
votes
2
answers
861
views
How to setup an iOS 17 interactive Widget using AppIntents from an SPM package?
I've setup an interactive Widget in iOS 17 which uses an AppIntent from an SPM package but nothing works when you tap on the button in the widget.
Supposedly you should be able to use ...
5
votes
3
answers
670
views
is there a way to provide iOS version check inside widget extension
I tried to add iOS 17 version check inside WidgetBundle but the widget extension keep on crashing .
Getting Thread 1: Swift runtime failure: Unexpectedly found nil while unwrapping an Optional value. ...