How to use @AppStorage in SwiftUI | Bootcamp #52

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 62

  • @backlitdigitizer8628
    @backlitdigitizer8628 2 ปีที่แล้ว +31

    Literally the only SwiftUI videos I can sit through end to end. Clear, concise, but not presumptuous. Great stuff.

  • @WendyWhite-s5q
    @WendyWhite-s5q ปีที่แล้ว +3

    Don't stop doing this, you're the best. I hope you earn yourself tons of cash with those videos.

  • @olepetersen4460
    @olepetersen4460 3 ปีที่แล้ว +5

    Great. I think it is nice that you show that AppStorage is much leaner and cleaner than the older UserDefaults way. Thanks again!

  • @jonewc
    @jonewc 11 หลายเดือนก่อน +1

    Thank you for creating such a comprehensive (and free) set of courses. I've tried several courses throughout the past years (some of them paid) and yours are by far the easiest to follow. I now use your playlists as a reference as I build my apps. Thank you, Nick!

  • @JoelFuchs
    @JoelFuchs ปีที่แล้ว +2

    Fantastic! Over the past year I worked though several paid courses and was never introduced to this and many other useful techniques introduced in this series! This series is so good I am now using it along with Nick's Swift Basics to help teach my daughter the fundamentals of coding.

    • @SwiftfulThinking
      @SwiftfulThinking  ปีที่แล้ว +2

      It is incredibly rewarding to see comments like this! I really hope your daughter is able to follow along and grasp these concepts too. You'll have to let me know how she does! Thanks for the comment Joel 👍

  • @nurlanakylbekov7266
    @nurlanakylbekov7266 3 ปีที่แล้ว +9

    Start watching from 13:22)

  • @faengelm
    @faengelm ปีที่แล้ว +2

    @16:00 Thanks for pointing out that the "@AppStorage.." line needs to be in every view that wants to use the stored value.

  • @trevorduersch2278
    @trevorduersch2278 2 ปีที่แล้ว +2

    Yes, I love the examples and real-world application you demonstrate in these videos. Great stuff indeed! :)

  • @varunbagga9996
    @varunbagga9996 ปีที่แล้ว +1

    Your content is blessing to community❤

  • @toomee4674
    @toomee4674 2 ปีที่แล้ว

    This is the best opening, I've ever heard 🤘I never skip it.

  • @danuff
    @danuff 3 ปีที่แล้ว +4

    Thank you for making this clear and easy to understand.

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +1

      You're welcome Danny. Thanks for watching!

  • @rachitsharma8829
    @rachitsharma8829 ปีที่แล้ว +1

    Great Video and clear explanation ... loved it .. ❤ .. keep it up.

  • @christianburrus
    @christianburrus 3 ปีที่แล้ว +3

    Great video. I'm struggling to figure out how to use app storage for an array of strings ..... any thoughts? Thanks!

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +1

      You need a quick extension for that: stackoverflow.com/questions/63166706/how-to-store-nested-arrays-in-appstorage-for-swiftui

  • @jordanchan8881
    @jordanchan8881 2 ปีที่แล้ว

    SwiftUI is much more powerful, thanks for the video

  • @yuchen3587
    @yuchen3587 2 ปีที่แล้ว +1

    Great tutorial! I want to wrap my object data into JSON files and stores them in local storage, do you have a tutorial for that?

  • @keycheung6898
    @keycheung6898 11 หลายเดือนก่อน

    真的是太棒了!!This is awesome course!!!!ever!!thanks Nick!!!thanks

  • @1slyboy
    @1slyboy ปีที่แล้ว

    How do you force quit of the app in the simulator? Shift-Cmd-H followed by 2nd H just minimizes the app, but when you double click to restart the app the data is still there ("Nick") before any of the code has been added yet to persist it (e.g. 8:35)?
    OK - I figured it out. After dragging it up. Long click and hold the corner of the app. Then you can swish it up to quit.

  • @rajdhakate617
    @rajdhakate617 2 ปีที่แล้ว

    Can I use AppStorage from inside my ViewModel? If not, what is the best way to achieve the same result?

  • @xvanichx
    @xvanichx 6 หลายเดือนก่อน

    Good day, Nick! Thanks a lot for such a beautiful video. Do you have, by any chance, a video about offline storage but for big data? Right now I'm building the App for the gym, and I want to store inside my app GIFs that will show the user their exercises, and I want to let my users access them in offline mode. , thank you in advance!

    • @SwiftfulThinking
      @SwiftfulThinking  6 หลายเดือนก่อน

      Yes, for images/videos I would save them in the FileManager and for other data I would save them in Core Data. Both are covered in the Continued Learning playlist, or you can search for them here: www.swiftful-thinking.com/search

    • @xvanichx
      @xvanichx 6 หลายเดือนก่อน

      @@SwiftfulThinking Thanks a lot , and good luck ! You are the best !

  • @Horizon-tr6iy
    @Horizon-tr6iy 2 ปีที่แล้ว +1

    3:45

  • @melmandaragrows
    @melmandaragrows ปีที่แล้ว +1

    I did your dog gram course and use my and wished you had an updated course with FirebaseAuth and using Firestore database 😢 This is gold though🎉

    • @SwiftfulThinking
      @SwiftfulThinking  ปีที่แล้ว +1

      I have a Firebase playlist coming in a few weeks 🤙

    • @melmandaragrows
      @melmandaragrows ปีที่แล้ว

      On Udemy** Great! Excited🔥

    • @satyadodda2386
      @satyadodda2386 ปีที่แล้ว +1

      @@SwiftfulThinking Waiting

    • @melmandaragrows
      @melmandaragrows ปีที่แล้ว

      @@SwiftfulThinking waiting patiently 😩😇

  • @will.gallegos
    @will.gallegos ปีที่แล้ว

    Is it possible to get the same @AppStorage from a different script?

  • @knowledgeispower4953
    @knowledgeispower4953 10 หลายเดือนก่อน

    Awasome Bro...😎

    • @SwiftfulThinking
      @SwiftfulThinking  10 หลายเดือนก่อน

      Brooooo you’re moving fast bro

  • @ejjjjjjjjjh
    @ejjjjjjjjjh 2 ปีที่แล้ว

    How can I save a COMPUTED variable to app storage?

  • @kal5211
    @kal5211 ปีที่แล้ว +1

    My man.

  • @fredflintstone2460
    @fredflintstone2460 11 หลายเดือนก่อน

    This seems to be similar to using a pointer

  • @saraghanavati7899
    @saraghanavati7899 3 ปีที่แล้ว +2

    I watched your instagram video on the Udemy website. Its a great and wonderful video. May you please published the second video to complete instagram format such as follower and other features? Thank you for your teaching and your videos.

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +1

      Thanks Sara! I will be creating a new Firebase series + course on this channel in the coming weeks and will be sure to include that. Thanks for watching :)

    • @coffeeCatPeanutDust
      @coffeeCatPeanutDust 3 ปีที่แล้ว +1

      @@SwiftfulThinking Just bought the Udemy course! You should totally mention this in your videos. I didn't know you had one.

  • @Adventurevictoria
    @Adventurevictoria 2 ปีที่แล้ว

    Just quick question @AppStorage working out side of View for example ... Does this work in @main Class ?

    • @SwiftfulThinking
      @SwiftfulThinking  2 ปีที่แล้ว +2

      I believe the correct usage of @AppStorage is only used inside a View. You can just access UserDefaults directly if you need to do it in the @main struct.

  • @hashcat5721
    @hashcat5721 ปีที่แล้ว

    It should be noted that you should not store authorization and confidential information in this storage, because it is possible to get access to them.

  • @mig12394
    @mig12394 3 ปีที่แล้ว +2

    Cool

  • @JemmaGuaney
    @JemmaGuaney 6 หลายเดือนก่อน

    13:08 : tutorial begins

    • @zenBoy323
      @zenBoy323 5 วันที่ผ่านมา

      incorrect, it begins at 00:00 because this is a beginner course and I'm pretty sure most of us didn't know about UserDefaults in UIKit and it's a pretty important thing to know where @AppStorage originated from.

    • @JemmaGuaney
      @JemmaGuaney 5 วันที่ผ่านมา

      @@zenBoy323 A beginner course in SwiftUI is not the same thing as a beginner course in Swift.
      Many come from Swift.

  • @bharathiganesh2053
    @bharathiganesh2053 ปีที่แล้ว

    Thank you🙌

  • @pakaponwiwat2405
    @pakaponwiwat2405 ปีที่แล้ว

    Hi, Excuse me.
    Does anyone know why when I try to use @AppStorage, there is always an error message saying 'Struct 'AppStorage' cannot be used as an attribute'.

    • @brandonhopkins3438
      @brandonhopkins3438 ปีที่แล้ว

      I had the same thing and realised that I named my struct AppStorage(). If you change your struct name to something else and the corresponding preview name, you'll be good to go.

  • @andrews13
    @andrews13 2 ปีที่แล้ว

    Perfect!

  • @natgenesis5038
    @natgenesis5038 2 ปีที่แล้ว

    12:00 reference
    16:15

  • @dimflash1987
    @dimflash1987 2 ปีที่แล้ว

    Cool!!!!!!!!!!!!!!!

  • @valerieokelly6224
    @valerieokelly6224 2 ปีที่แล้ว

    👍👍

  • @valentinberg7
    @valentinberg7 หลายเดือนก่อน

    9:00

  • @nurlanakylbekov7266
    @nurlanakylbekov7266 3 ปีที่แล้ว +3

    I think if ppl interested in using and learning @AppStorage, they probably already know what is exclamation mark and they already know how to safely unwrap optional😏 Anyway thanks for the video

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +1

      Hey Nurlan! You're probably right haha. Thanks for watching!

  • @loliconmaster7152
    @loliconmaster7152 ปีที่แล้ว

    Am I the only one who gets sleepy when watching coding courses?
    It's not about the instructor, this one is great, but in general, I get sleepy when watching a programming course even if I'm coding along with the course😴

    • @zenBoy323
      @zenBoy323 5 วันที่ผ่านมา

      I get pumped and excited because I'm pretty passionate about learning this stuff! Maybe this just isn't your thing or if it is either watch courses earlier in the day or drink some strong coffee lol

    • @hasanato-01
      @hasanato-01 5 วันที่ผ่านมา

      @@zenBoy323 I wonder if it's really my thing cuz I've been programming for almost 4 years now yet I still get sleepy when watching a course