Questions tagged [widgetkit]

Use for WidgetKit introduced in iOS 14 and macOS Catalyst 14

Docs: https://developer.apple.com/documentation/widgetkit

520 questions
0
votes
1 answer

How to get random Core Data element from ForEach in Widget

I'm working on a widget in iOS 14 that will show images from Core Data as submitted by my users. Currently, I can show a single image, but it's not rotating through the Project images.. it's only showing a single image in the widget. In my…
phiredrop
  • 182
  • 1
  • 11
0
votes
1 answer

Widget SiriKit intent enum value for index

I'm trying to add another SiriKit intent to my Widget to allow user to select a reddit category such as top, hot, new etc. I've set my enum in my custom intents. My question is how do I get the display name from the index? It's being assigned to a…
cole
  • 1,039
  • 1
  • 8
  • 35
0
votes
1 answer

WidgetKit Image from URL

I'm trying to load an image from URL to a Widget. I've done so before just fine in another project I've recently made. Now I'm trying to do the same exact method and seeing some strange errors Argument type 'URL' does not conform to expected type…
cole
  • 1,039
  • 1
  • 8
  • 35
0
votes
1 answer

iOS 14 widget not found after updating the app

I have a widget app on production. There are 5 static widgets. For example, in the new release, I added another new widget. After updating the app new widget not found in the widget container. Does anyone face this problem?
Shourob Datta
  • 1,886
  • 22
  • 30
0
votes
1 answer

Widgetkit kind name convention?

https://developer.apple.com/documentation/widgetkit/widgetinfo/kind Do we have to use a reverse dns notation for our widget name eg “com.server.app.widget.highscore”? Should the name be globally unique? Or only unique within the app? Or only unique…
HixField
  • 3,538
  • 1
  • 28
  • 54
0
votes
0 answers

Timeline reload policy seems to be ignored in WidgetKit

In the following example, I create 4 timeline entries in one-second intervals, specifying the timeline reload policy .atEnd. func getTimeline(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (Timeline) -> ())…
waldrumpus
  • 2,540
  • 18
  • 44
0
votes
0 answers

Can we know if a openUrl come from the widget that we created?

I created a new iOS widget based by one of my iOS application witch is using UIKit. I using swiftUI to create the widget and everything is fine. So I trying to finish it with a Url deeplink from this widget. The code is looks like this var body:…
Shaggon
  • 53
  • 6
0
votes
0 answers

SwiftUI widget not refreshing

I have a widget that is meant to update daily at midnight, my code for the timeline looks like this: func getTimeline(for configuration: ConfigurationIntent, in context: Context, completion: @escaping (Timeline) -> Void) { //…
kd02
  • 422
  • 5
  • 14
0
votes
1 answer

iOS 14 Change kind of a widget that is already in production

I have a static widget as below and deployed to production. struct ABCWidget: Widget { let kind: String = "xyzWidget" var body: some WidgetConfiguration { StaticConfiguration(kind: kind, } Now I want to change the kind to…
user1165756
  • 375
  • 3
  • 11
0
votes
2 answers

Styling with VStack and HStacks so text align - WidgetKit SwiftUI

I'm trying to get the last styling done on my Widget but I just can't seem to get the number "+1.75" and the Orange dot to align with the "Wheat" text. How do I properly align this row? I've tried using Spacer() but it just doesn't seem to…
0
votes
1 answer

Keeping Today Extension for iOS 13 and removing it for iOS 14

We've implemented the WidgetKit extension, so since on iOS 14 it seems like Today Extensions are placed all the way at the bottom of the Today View, we would like to simply remove Today Extension on iOS 14 and keep it only for iOS 13 users, but I…
0
votes
1 answer

Someone facing issues with widgets not working only on some Apple devices?

I have some apps and most of them have widgets using Coredata fetched data being displayed as expected and the apps have the same Coredata base code for fetching and displaying info into the widgets. Placeholder and snapshot working fine and widgets…
EddieF
  • 81
  • 7
0
votes
1 answer

SwiftUI and WidgetKit - Automatically updating components

I am working with WidgetKit and I found that the text component initialised with init(Date, style: Text.DateStyle) is creating automatically updating texts. This is something special because iOS widgets usually require to set a timeline about when…
DrIsaac
  • 3
  • 1
0
votes
0 answers

iOS14 Widget update every midnight

I'm making a widget app that shows today's date and calendar. I want the widget refresh every midnight, so I tried several methods. But eventually I failed to figure out how to do it. First try : give entries that update every midnight. But it…
HB.K
  • 167
  • 2
  • 12
0
votes
0 answers

How do I add tap event and update View with SwiftUI for Widget without opening parent application?

Here is how my widget looks like: and this is how it looks in code: struct WidgetTimerEntryView : View { var entry: WidgetTimerEntry var backgroundColor: Color { return Color(Options.shared.currentMode.underlayBackgroundColor) …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358