Interactive Widgets in iOS 17
Vložit
- čas přidán 6. 06. 2024
- Widgets finally support interactivity (buttons & toggles) using the AppIntents framework. Let's explore how this works and what else changed in WidgetKit.
🚀 LaunchBuddy: apple.co/3iFcjjW
📚 Try CWC+: bit.ly/cwc_flo
☕️ Buy me a coffee: ko-fi.com/flowritescode
👋 Links: flowritesco.de
🛠 Forge: apple.co/3riG8MQ
Affiliate Links ❤
📕 SwiftUI & Combine Books: www.bigmountainstudio.com/a/t...
🔬 Get Reports about your apps: appfigures.com/r/5by3g
📊 Privacy focused analytics: dashboard.telemetrydeck.com/r...
💻 The most powerful mac app for developers: devutils.app/?ref=flo
☕️ Support me: ko-fi.com/flowritescode
If you have any video suggestions please feel free to let me know by a comment.
Get in contact via
Twitter: / flowritescode - Věda a technologie
I will let you know right here once SwiftData works reliably with App Groups. If you want to make sure you don't miss it, just subscribe to the channel :)
Were you ever able to get SwiftData working properly?
@@w0mblemania Yes, it works like a charm in the newer versions of Xcode & iOS 17 for me. I used it in my "Intermittent Fasting Tracker" playlist: czcams.com/play/PL-bD2p6sedqghq5xGzAuaNgcuAj6m9bXd.html
@@FloWritesCode That's awesome. Thanks. I'll check out the playlist.
And thanks again for all your work with this channel.
Can't wait for the video! Thanks for the great content
Thanks for watching!
Great Tutorial! Thanks Flo!
Glad you enjoyed it!
Thanks for another explanatory video 😊 glad I'm not the only one not figuring out how to make SwiftData work across widgets and devices. On that SwiftData topic, since you seem deeply involved with, have you already tried to migrate from Core Data to SwiftData, while retaining the data from the database? I'm thinking of migrating to SwiftData with my app, but haven't been able to keep existing data yet.
Thank you! I'll be looking into that exact topic in a bit (once I find the time). Should be possible though :)
Great thanks! Since I have a widget as well, will need to wait for the bug you faced to be resolved, if this is a bug about the App Group. By the way, it's thanks to you I was able to implement my widget, your video about App Groups and how to update the persistence controller to allow the use of the same database and cloud kit. Didn't get much success reusing that for a watch app as companion of my main app, but that's another story 😅
Great video! I wonder if we can read UserDefaults data directly inside WidgetEntryView?
Unfortunately we can't, since the WidgetEntryView is created when the timeline is generated, so it is "out of date" when shown to the user.
My friend, will it work only for ios 17 devices? Old ioses - will work the same as earlier? Only with deeplinks?
As the title states this is just for iOS 17, yes. iOS 16 and prior has no changes w.r.t. WidgetKit, so deeplinks are still the only option there :/
Might be a silly question. in 3:53 how did you collapse your struct? I didn't find that feature in my xcode. Thank you!
its editor --> code folding --> fold
or just use option+cmd+left arrow
Is the swift data thing fixed?
Works like a charm for me.
@@FloWritesCode Nice, thanks for the video.
THEY ADD THIS YET DON'T HAVE AN INTERACTIVE WIDGET SECTION... 🤨🤦♂️
Hello, thanks for the video, I have a question, I am using UIApplication.shared to open a URL but it tells me that shared is not available in the Extensions. Any solution to this, please.
Not sure what you're trying to do exactly, but this should help: czcams.com/video/byEfsFgRZaI/video.html
@@FloWritesCode If I use it in my app, but now with the Intents it is not necessary, I want to achieve something like the Widget of the contacts app that you tap the message button and sends you to the message app to write a message for that number.