widgetkit Questions

6

Solved

I already have an iOS 17 App Intent that works with a URL: @available(iOS 16, *) struct MyAppIntent: AppIntent { static let title : LocalizedStringResource = "My App Inent" static let o...
Lith asked 6/7 at 22:22

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...
Malicious asked 27/6, 2023 at 15:20

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 ...
Ibnsaud asked 10/10, 2020 at 7:45

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 ...
Carliecarlile asked 27/8, 2020 at 5:8

4

When creating an iOS live activity I get the error: The operation couldn’t be completed. (com.apple.ActivityKit.ActivityInput error 1.)
Busey asked 25/8, 2022 at 17:4

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...
Fork asked 21/1, 2021 at 18:10

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...
Agree asked 15/2, 2021 at 15:15

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...
Fearnought asked 11/5, 2021 at 7:37

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 ...
Retiarius asked 11/7, 2021 at 14:53

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...
Layoff asked 11/6, 2022 at 13:49

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...
Pinter asked 21/5, 2022 at 18:15

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...
Honeysucker asked 29/10, 2020 at 16:53

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...
Corollary asked 7/8, 2021 at 12:40

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...
Reduction asked 18/7, 2023 at 11:20

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...
Pachston asked 6/9, 2023 at 9:31

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...
Idden asked 9/8, 2023 at 4:21

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...
Panter asked 26/9, 2020 at 4:6

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...
Yung asked 2/9, 2020 at 0:35

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...
Ramekin asked 15/7, 2023 at 13:44

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...
Estren asked 31/5, 2022 at 5:47

© 2022 - 2024 — McMap. All rights reserved.