Interactive Widgets in iOS 17

Sdílet
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

Komentáře • 24

  • @FloWritesCode
    @FloWritesCode  Před 11 měsíci +9

    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 :)

    • @w0mblemania
      @w0mblemania Před 7 měsíci +1

      Were you ever able to get SwiftData working properly?

    • @FloWritesCode
      @FloWritesCode  Před 7 měsíci +2

      @@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

    • @w0mblemania
      @w0mblemania Před 7 měsíci

      @@FloWritesCode That's awesome. Thanks. I'll check out the playlist.
      And thanks again for all your work with this channel.

  • @abs80900
    @abs80900 Před 11 měsíci +1

    Can't wait for the video! Thanks for the great content

  • @GroundshotsDe
    @GroundshotsDe Před 11 měsíci +1

    Great Tutorial! Thanks Flo!

  • @m3zish
    @m3zish Před 11 měsíci

    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.

    • @FloWritesCode
      @FloWritesCode  Před 11 měsíci

      Thank you! I'll be looking into that exact topic in a bit (once I find the time). Should be possible though :)

    • @m3zish
      @m3zish Před 11 měsíci +1

      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 😅

  • @VitSoonYoung
    @VitSoonYoung Před 10 měsíci

    Great video! I wonder if we can read UserDefaults data directly inside WidgetEntryView?

    • @FloWritesCode
      @FloWritesCode  Před 10 měsíci +1

      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.

  • @HZ4ever
    @HZ4ever Před 11 měsíci

    My friend, will it work only for ios 17 devices? Old ioses - will work the same as earlier? Only with deeplinks?

    • @FloWritesCode
      @FloWritesCode  Před 11 měsíci

      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 :/

  • @MiaomiaoShi
    @MiaomiaoShi Před 5 měsíci

    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!

    • @ottrE
      @ottrE Před 14 dny

      its editor --> code folding --> fold
      or just use option+cmd+left arrow

  • @alexserediuc8074
    @alexserediuc8074 Před 5 měsíci

    Is the swift data thing fixed?

  • @JustinBallard117
    @JustinBallard117 Před 10 měsíci

    THEY ADD THIS YET DON'T HAVE AN INTERACTIVE WIDGET SECTION... 🤨🤦‍♂️

  • @elierayalabernal
    @elierayalabernal Před 11 měsíci

    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.

    • @FloWritesCode
      @FloWritesCode  Před 11 měsíci +1

      Not sure what you're trying to do exactly, but this should help: czcams.com/video/byEfsFgRZaI/video.html

    • @elierayalabernal
      @elierayalabernal Před 11 měsíci

      @@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.