#widgetkit — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #widgetkit, aggregated by home.social.
-
Your widget can show a live countdown without spending a timeline reload.
Its SwiftUI view is rendered once per timeline entry and then frozen: no timers, no animation loop. So you generate an entry per minute to keep a countdown current, and run out of budget by lunchtime.
Two things are updated by the system on device between reloads, with no new entry: Text(date, style: .timer) and ProgressView(timerInterval:).
For a running school period that is one entry per period.
-
I'm trying to run the basic widgets extension template from Xcode on a physical device (iOS 18.7.9) but it fails. I tried rebooting my device twice. I tried using Xcode 26.6 too, same issue. I don't know what to do to get it work...
-
I'm trying to run the basic widgets extension template from Xcode on a physical device (iOS 18.7.9) but it fails. I tried rebooting my device twice. I tried using Xcode 26.6 too, same issue. I don't know what to do to get it work...
-
Книга про разработку под iOS на русском: разбираем единственный актуальный учебник по SwiftUI
Если набрать в поиске «книга по SwiftUI на русском», результаты будут неожиданно скромными. Такие издания есть, но они либо выпущены уже довольно давно (как, например, наша книга Александра Казанцева , либо представлены на английском, либо доступны в формате он-лайн курсов разной степени полноты. Печатная книга по актуальной разработке под iOS - явление нынче редкое. Месяц назад мы выпустили перевод книги «iOS 18 App Development Essentials» Нила Смита — автора, которого англоязычное сообщество знает по многолетней серии учебников по разработке приложений под платформы Apple и Android. Книга вышла под названием « Что внутри?
https://habr.com/ru/companies/bhv_publishing/articles/1022756/
#iOS #SwiftUI #Swift #Xcode #мобильная_разработка #App_Store #WidgetKit #мобильная_разработка_и_дизайн
-
Introducing Jewel Case: Spotify Album Art for Your Mac Desktop
Remember when music was physical? You’d flip through a stack of CDs, admiring the album art before deciding what to spin. The jewel case was part of the experience—the artwork set the mood before the first note played.
Streaming killed that ritual. Spotify buried album art behind tiny thumbnails, and unless you’re staring at your phone, you never see it. I wanted that back.
The Problem
I spend most of my day looking at my Mac, not my phone. When music is playing, I want to see what’s playing—really see it. The big, beautiful album artwork. Not hunt for a browser tab or pull out my phone.
macOS widgets seemed like the obvious solution. A glanceable “Now Playing” widget right on my desktop. But Spotify doesn’t offer one. Third-party apps either wanted too many permissions or looked like afterthoughts.
So I built my own.
Jewel Case
Jewel Case is a simple Mac app that does one thing well: shows you what’s playing on Spotify.
The menu bar shows the current track. Click it, and you get the full album art with playback controls. But the real magic is the widget—drop it on your desktop, and your currently playing album art is always visible. It’s like having a tiny record player on your desk.
Features:
- Desktop widget — Small or medium size, shows album artwork and track info
- Menu bar player — Quick access to playback controls without switching apps
- Interactive controls — Play, pause, skip—right from the widget (Premium required)
- Automatic updates — Artwork refreshes as tracks change
The Technical Bits
Built with SwiftUI and WidgetKit. The trickiest part was getting the widget to update reliably—widgets don’t have continuous network access, so the main app caches the current track data to a shared App Group container. The widget reads from there instead of hitting Spotify’s API directly.
OAuth was the usual dance. If you’ve ever implemented Spotify auth, you know.
Get It
Jewel Case is available on the Mac App Store — free to download.
#Apple #development #MacOS #NerdyStuff #Swift #SwuiftUI #WidgetKit -
Introducing Jewel Case: Spotify Album Art for Your Mac Desktop
Remember when music was physical? You’d flip through a stack of CDs, admiring the album art before deciding what to spin. The jewel case was part of the experience—the artwork set the mood before the first note played.
Streaming killed that ritual. Spotify buried album art behind tiny thumbnails, and unless you’re staring at your phone, you never see it. I wanted that back.
The Problem
I spend most of my day looking at my Mac, not my phone. When music is playing, I want to see what’s playing—really see it. The big, beautiful album artwork. Not hunt for a browser tab or pull out my phone.
macOS widgets seemed like the obvious solution. A glanceable “Now Playing” widget right on my desktop. But Spotify doesn’t offer one. Third-party apps either wanted too many permissions or looked like afterthoughts.
So I built my own.
Jewel Case
Jewel Case is a simple Mac app that does one thing well: shows you what’s playing on Spotify.
The menu bar shows the current track. Click it, and you get the full album art with playback controls. But the real magic is the widget—drop it on your desktop, and your currently playing album art is always visible. It’s like having a tiny record player on your desk.
Features:
- Desktop widget — Small or medium size, shows album artwork and track info
- Menu bar player — Quick access to playback controls without switching apps
- Interactive controls — Play, pause, skip—right from the widget (Premium required)
- Automatic updates — Artwork refreshes as tracks change
The Technical Bits
Built with SwiftUI and WidgetKit. The trickiest part was getting the widget to update reliably—widgets don’t have continuous network access, so the main app caches the current track data to a shared App Group container. The widget reads from there instead of hitting Spotify’s API directly.
OAuth was the usual dance. If you’ve ever implemented Spotify auth, you know.
Get It
Jewel Case is available on the Mac App Store — free to download.
#Apple #development #MacOS #NerdyStuff #Swift #SwuiftUI #WidgetKit -
I’ve been exploring WidgetKit in iOS 26 by building a Step Counter widget and documenting what I learned.
This isn’t an App Store release. It’s an intentional build used to understand system surfaces, constraints, and tradeoffs.
-
I’ve been exploring WidgetKit in iOS 26 by building a Step Counter widget and documenting what I learned.
This isn’t an App Store release. It’s an intentional build used to understand system surfaces, constraints, and tradeoffs.
-
A few details on supporting rendering mode in visionOS widgets
https://stepinto.vision/example-code/widgets-adapting-content-to-rendering-modes/
-
A few details on supporting rendering mode in visionOS widgets
https://stepinto.vision/example-code/widgets-adapting-content-to-rendering-modes/
-
Our apps can trigger widgets to update by asking WidgetCenter to reload timelines.
#visionOS #SwiftUI #WidgetKit #AppleVisionPro
https://stepinto.vision/example-code/widgets-reloading-a-widget-from-an-app-scene/
-
Level of detail for widgets in #WidgetKit + #SwiftUI environment value. Can be default or simplified.
Documentation: https://developer.apple.com/documentation/widgetkit/levelofdetail
-
Level of detail for widgets in #WidgetKit + #SwiftUI environment value. Can be default or simplified.
Documentation: https://developer.apple.com/documentation/widgetkit/levelofdetail
-
These iPad Lockscreen #WidgetKit widgets for PDX Transit have been fun to build too! :) There are two: one with shortcuts to the app and another showing your top 4 bookmarks.
Wallpaper from @BasicAppleGuy which is also the default wallpaper included in the original iPad with Retina display.
-
These iPad Lockscreen #WidgetKit widgets for PDX Transit have been fun to build too! :) There are two: one with shortcuts to the app and another showing your top 4 bookmarks.
Wallpaper from @BasicAppleGuy which is also the default wallpaper included in the original iPad with Retina display.
-
I might have overdone it with #WidgetKit but as a friend once told me… “just give me everything and let me fuck it up.” (Something along those lines) 😅 Lock Screen widgets, regular widgets, Control Center buttons… they all there for you to fuck it up I guess. Oh and tons of stuff in the Shortcuts app!
-
I might have overdone it with #WidgetKit but as a friend once told me… “just give me everything and let me fuck it up.” (Something along those lines) 😅 Lock Screen widgets, regular widgets, Control Center buttons… they all there for you to fuck it up I guess. Oh and tons of stuff in the Shortcuts app!
-
Apple has Sample Code for their new Control Center widgets online. It's incomplete but it also doesn't work. Or at least I cannot for the life of me figure out how to make it work. In fact, I don't think anyone can.
This is so that a Control Center button can open to your app to a specific view which are defined in the `AppEnum` you see here but unless you have more than one enum value, it won't even call your `OpenIntent`.
Makes dev so frustrating.
-
Apple has Sample Code for their new Control Center widgets online. It's incomplete but it also doesn't work. Or at least I cannot for the life of me figure out how to make it work. In fact, I don't think anyone can.
This is so that a Control Center button can open to your app to a specific view which are defined in the `AppEnum` you see here but unless you have more than one enum value, it won't even call your `OpenIntent`.
Makes dev so frustrating.
-
I ended up adding the large size widget for the single transit stop widget which links you to its service alerts in the app. I’m happy with these. 😊
#widgetkit #swiftui #pdxtransit #publictransit #portland #trimet
-
I ended up adding the large size widget for the single transit stop widget which links you to its service alerts in the app. I’m happy with these. 😊
#widgetkit #swiftui #pdxtransit #publictransit #portland #trimet
-
I learned a lot about using #WidgetKit these past 8 days. I created two types of Widgets for #PDXTransit based on the bookmarks you save in the app 😊 Still tweaking the UI though but you get the idea.
-
I learned a lot about using #WidgetKit these past 8 days. I created two types of Widgets for #PDXTransit based on the bookmarks you save in the app 😊 Still tweaking the UI though but you get the idea.
-
Still tinkering with the styling of my #WidgetKit widget for #PDXTransit.
-
Still tinkering with the styling of my #WidgetKit widget for #PDXTransit.
-
Not quite done yet but this Widget with your bookmarked transit stops for #Trimet is feeling more and more real! It works too! 🤓
#WidgetKit #SwiftUI #PDXTransit #PDX #Portland #PublicTransit
-
Not quite done yet but this Widget with your bookmarked transit stops for #Trimet is feeling more and more real! It works too! 🤓
#WidgetKit #SwiftUI #PDXTransit #PDX #Portland #PublicTransit
-
Now that I have #AppShortcuts complete for #PDXTransit, I’m getting into Widgets with #WidgetKit. 🤓
-
Now that I have #AppShortcuts complete for #PDXTransit, I’m getting into Widgets with #WidgetKit. 🤓
-
Anyone able to get black text on widgets in iOS 18’s tinted icon mode? I've noticed that Pixel Pals is able to workaround this, wondering if any other apps have figured out how? #iOSDev #WidgetKit
-
Does anyone know how to debug this kind of stacktrace? Widget is crashing during launch. Have no idea where to look :(
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Termination Reason: SIGNAL 5 Trace/BPT trap: 5_dispatch_assert_queue_fail ()
dispatch_assert_queue ()
swift_task_isCurrentExecutorImpl ()
closure #1 in WidgetsExtension.body.getter ()
___lldb_unnamed_symbol8600 ()
___lldb_unnamed_symbol8640 ()
___lldb_unnamed_symbol14485 ()
___lldb_unnamed_symbol10307 ()
… -
📝 Using #WidgetKit + #SwiftData
When working with a PersistentModel to a widget in #SwiftUI, you may run into "failed to fin a currently active container" crashes. I ran into this and wrote up a solution.
Thanks to @Mecid and @twostraws whose tutorials helped me on the way.
-
📝 Using #WidgetKit + #SwiftData
When working with a PersistentModel to a widget in #SwiftUI, you may run into "failed to fin a currently active container" crashes. I ran into this and wrote up a solution.
Thanks to @Mecid and @twostraws whose tutorials helped me on the way.
-
Is it just me or everything is super confusing when building for #WidgetKit ?
It's a PITA to debug entries states, it's too much boilerplate code to get a widget working... idk, I'm not loving the journey tbqh.
-
Is it just me or everything is super confusing when building for #WidgetKit ?
It's a PITA to debug entries states, it's too much boilerplate code to get a widget working... idk, I'm not loving the journey tbqh.
-
Even months later, I still struggle how to use the #WidgetKit Simulator. Errors over errors. Is anyone out there with a few tips? I try debugging an error that I submitted close to half a year ago to Feedback Assistant without any reply.
-
Does anyone have an idea why defaultResult of an EntityQuery only works if a value of suggestedEntities is returned?
-
Is there a way to animate an SF Symbol in a widget/live activity when the View appears using the new Symbols framework?
I tried to use .symbolEffect(.variableColor, options: .repeating, isActive: true) on an Image without success.
-
Is there a way to animate an SF Symbol in a widget/live activity when the View appears using the new Symbols framework?
I tried to use .symbolEffect(.variableColor, options: .repeating, isActive: true) on an Image without success.
-
Xcode Canvas for Widgets/Live Activity is not my friend today and keeps crashing 😩. My only fix is to relaunch Xcode. It then works for 30 seconds until I update my Views, which breaks my Previews again...
-
Xcode Canvas for Widgets/Live Activity is not my friend today and keeps crashing 😩. My only fix is to relaunch Xcode. It then works for 30 seconds until I update my Views, which breaks my Previews again...
-
In a Widget/LiveActivity (all sizes), is there a way to make a Text(date, style: .timer) not expand to take all available width?
-
In a Widget/LiveActivity (all sizes), is there a way to make a Text(date, style: .timer) not expand to take all available width?
-
When using an AttributedString in a #SwiftUI widget, it seems the weight parameter is ignored when directly specified in the Font system(_:design:weight:) static method.
One fix is to use the weight function on the resulting Font.
Feeback: #FB13281183
-
When using an AttributedString in a #SwiftUI widget, it seems the weight parameter is ignored when directly specified in the Font system(_:design:weight:) static method.
One fix is to use the weight function on the resulting Font.
Feeback: #FB13281183
-
My canvas while working on a Live Activity for my logbook app. I usually try to avoid designing in Figma because I find myself spending too much time on little details, but sometimes it helps me create variants faster.
-
My canvas while working on a Live Activity for my logbook app. I usually try to avoid designing in Figma because I find myself spending too much time on little details, but sometimes it helps me create variants faster.
-
In a #LiveActivity widget, it seems a subview is always re rendered even if the content doesn't change.
Normal?
This breaks my timer animation because I update the content regularly in the background. In an app, if the date variable doesn't change, the View is not re rendered.
#WidgetKit #ActivityKit #iOSdev #buildinpublic #indiedev #swiftui
cc @_Davidsmith you have this kind of Text timer + background location services in your app iirc. Have you faced this?
-
In a #LiveActivity widget, it seems a subview is always re rendered even if the content doesn't change.
Normal?
This breaks my timer animation because I update the content regularly in the background. In an app, if the date variable doesn't change, the View is not re rendered.
#WidgetKit #ActivityKit #iOSdev #buildinpublic #indiedev #swiftui
cc @_Davidsmith you have this kind of Text timer + background location services in your app iirc. Have you faced this?
-
I want to update a Live Activity in my iOS 17+ app.
The Apple documentation tells to use the update(:) method.
Xcode can't build my app. Instead, it tells me to use the update(using:). Then informs me this method is now deprecated (iOS 16.2) and update(:) should be used 🫤...
#ActivityKit #WidgetKit #buildinpublic #indiedev #SwiftUI #Xcode
-
I want to update a Live Activity in my iOS 17+ app.
The Apple documentation tells to use the update(:) method.
Xcode can't build my app. Instead, it tells me to use the update(using:). Then informs me this method is now deprecated (iOS 16.2) and update(:) should be used 🫤...
#ActivityKit #WidgetKit #buildinpublic #indiedev #SwiftUI #Xcode
-
Does anyone know how to have the background color for a Live Activity full screen?
According to the "Design dynamic Live Activities" video from #WWDC23, it should be the case when we use a background to the View but it does not work for me.
-
Does anyone know how to have the background color for a Live Activity full screen?
According to the "Design dynamic Live Activities" video from #WWDC23, it should be the case when we use a background to the View but it does not work for me.
-
Hmm, where do you even start with debugging the Monochrome style of iPhone widgets running on macOS Sonoma. Is that behaviour documented anywhere?
-
Hmm, where do you even start with debugging the Monochrome style of iPhone widgets running on macOS Sonoma. Is that behaviour documented anywhere?
-
@kaybutter just wanted to share that I took another direction at the end. But your suggestion is similar and helped me a lot! 🙏🏻
I've defined a Configuration and added it as a static var on my PersistenceController. I enable/disable parts of the features based on the configuration. The configuration is setup when I init the app or the extension. I only have one shared singleton now.
-
@kaybutter just wanted to share that I took another direction at the end. But your suggestion is similar and helped me a lot! 🙏🏻
I've defined a Configuration and added it as a static var on my PersistenceController. I enable/disable parts of the features based on the configuration. The configuration is setup when I init the app or the extension. I only have one shared singleton now.
-
I think the issue I have is related to the fact that I use the same model twice, even though I init a new one for every container?
I made a simple app that either use two models, or a shared one. When two models are used, the app crashes. It's working fine when re using the shared model.
#CoreData #WidgetKit #AppIntents #buildInPublic #iosdev #indiedev
-
I think the issue I have is related to the fact that I use the same model twice, even though I init a new one for every container?
I made a simple app that either use two models, or a shared one. When two models are used, the app crashes. It's working fine when re using the shared model.
#CoreData #WidgetKit #AppIntents #buildInPublic #iosdev #indiedev
-
WidgetConfigurationIntent question: how do you setup your EntityQuery when it needs to access your Core Data database?
I'm getting a crash when I try to use different Core Data stacks for the app and EntityQuery.
I describe my issue in this attached note. I'm new to extensions btw so I don't have the full picture of how processes run.