widgetkit Questions
6
Solved
3
Solved
Inside a widget, there is a button,
Button(intent: AnAppIntent()) {
// Button's label.
}
// It seems this modifier does not add any value.
.invalidatableContent()
connected to an AppIntent.
struc...
5
We have a problem with adding the widget to the screen.
Our app has 2 widgets and app is live in AppStore.
The problem that some users can see only 1 widget (randomly, and using the newest version ...
3
I would like to check if the user added my widgets to the Home Screen, is there an API for this? I could not find one. WidgetCenter.getCurrentConfigurations returns all available widgets served by ...
4
When creating an iOS live activity I get the error:
The operation couldn’t be completed. (com.apple.ActivityKit.ActivityInput error 1.)
5
I am trying to get a SwiftUI widget to update on command when the value of the @AppStorage changes. When I load the simulator the widget updates to the correct value from @AppStorage but does not u...
4
.timer Text style expands it to fill the width, instead of taking space to fit the contained string. Is there a way to change this behavior?
Text(entry.timeFinished, style: .timer).multilineTextAli...
3
Solved
I am playing around with Apple's new WeatherKit + WidgetKit. Unfortunately I can't seem to find a solution for the combination of the following three problems:
WidgetKit requires to load all data ...
Clary asked 26/8, 2022 at 14:42
3
Solved
I have a SwiftUI app with a widget. When I run the app via Xcode (either straight to my device or on the simulator), the widget works exactly as expected.
However, when I run the app through TestFl...
3
I have my images Assets.xcassets, and try to load it in my Widget View. To use images in widget too, I already set target membership for widget extension.
But the problem is it cannot load certain ...
2
I need to create an illimited number of widgets, with the same layout, but with different behavior and content.
When the user adds many widgets of the same type, the kind will be the same. I need s...
1
I am trying to find out why my Widget does not reload.
I want to print entries array from inside func getTimeline to the console.
However the print statements do not appear in the console.
How to m...
3
Solved
I am creating a Widget that has a textfield that counts down from a date like so:
Text(endDate, style: .relative)
This works fine, however as its relative, once it hits zero, it will continue to c...
0
It's weird because in documentation (SwiftUI, Live Activities, Dynamic Island) I keep seeing images like:
Or even
And in iPhone clock app (timer):
But it seems like the only way to make a functi...
Smirch asked 26/11, 2023 at 11:39
3
Solved
Here's an interesting quandary: I want to make a timer that "ticks" reliably but, also, renders symbols in predictable places so that I could, for instance, decorate the timer by adding a...
2
I have an App Group shared between my app and its widgets.
I have SwiftData's @Model, updated from the widget intent's perform() method and displayed on the app and the widget.
@MainActor
func perf...
2
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 g...
3
Solved
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 valu...
2
Solved
I'm working on a new iOS app with with widgets. Written in SwiftUI.
Most of my code is shared between the Widget target and the App target, but there are some minor style changes I want to make bet...
4
Solved
Tapping a WidgetKit widget automatically launches its parent application. How can I detect if my application was launched from its WidgetKit widget extension?
I'm unable to find any documentation o...
1
Did something change as far as how to use #Preview macros in Xcode 15 Beta 8? This code used to work fine but now no longer compiles because of == PREVIEW UPDATE ERROR: CompileDylibError: Failed to...
These asked 4/9, 2023 at 14:42
2
Solved
I tried using .ignoresSafeArea() , but did not work.
There were not a padding in iOS 16 and early versions around the content view.
struct CommonDailyEyeTipsWidget: Widget {
let kind: String = &qu...
Godsend asked 10/8, 2023 at 15:19
0
This is on iOS 17 Beta 8 and Xcode 15 Beta 8
In my app I have a framework for code that's shared between the main app and extensions. In this framework I declared AppEntities and AppEnums. I can us...
Cerumen asked 11/9, 2023 at 19:24
2
Solved
Please note, this question is regarding Xcode 15 beta 4, iOS 17 beta 3, and watchOS 10 beta 3
I have a watchOS 10 App with iOS 17 companion app with two Widget (WidgetKit) Extension Targets. Both t...
1
Solved
WidgetCenter.shared.getCurrentConfigurations() returns a list of WidgetInfo structs (one for each widget the user has set up), each of which includes an id parameter which the documentation says is...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.