Build your second iOS app with SwiftUI

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ธ.ค. 2021
  • Donate to my fundraising effort here: justgiving.com/twostraws
    Assets: hws.dev/coolbeans-assets.zip
    Final project: hws.dev/coolbeans-final.zip
    In this livestream I'll show you how to build a complete SwiftUI app from scratch, building on the concepts introduced in my first livestream. Along the way I'll be answering questions that you might have, and also providing quizzes to help test your learning.
    To follow along, you'll need to install Xcode from the Mac App Store. I'll be using Xcode 13.2, but any version of Xcode after 13.0 should be fine.
    I strongly encourage you to watch my previous livestream, "Build your first iOS app with SwiftUI", because you'll need all those concepts here too: • Build your first iOS a...
    As well as helping folks learn more SwiftUI, this livestream is also taking place in aid of Julian House - a UK charity that provides support for vulnerable and at-risk individuals. These include men, women and young people experiencing homelessness, women and children escaping domestic abuse, adults with learning difficulties and people who need support after leaving prison.
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Very very happy belated birthday and thank you for being a great role model for the iOS community. You and many others have really helped me more than I could ever imagine. I appreciate it tons.
    I found when trying to use previews set it up first. I have much better luck with passing any example information in first to the preview and then writing out all the code and occasionally hitting command, option, p and r to resume it. Starting it up right away usually makes it cooperate better. It is a shame that they can be quite flaky though. Also, the “see this, not for you” had me dying of laughter. It is the perfect pitch to a freemium app model. Entice new users.

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

    FIRST! HAPPY BIRTHDAY PAUL. You are a hero of mine and please keep up with this fantastic work!

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

    Thank you very much Paul. It is a pleasure to watch your videos.

  • @mrd.j.2303
    @mrd.j.2303 2 ปีที่แล้ว

    You are a real hero. Doing a charity stream on your birthday. What a guy. Thanks for being so generous. I'm just starting this video but I'm sure you are just as thorough as you were last year. I'm putting your bday on my calendar. Lol

    • @mrd.j.2303
      @mrd.j.2303 2 ปีที่แล้ว

      you know when you press play it makes the quiz full screen and we cannot even see the chat window so their answers don't matter. :) You didn't do it with these quizzes I guess but you did last year lol

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

    Really enjoyed and learnt a lot. Thank you Sir!

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

    Great content as always, thanks Paul! 😃

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

    Loving this series thanks so much Paul and happy birthday! Maybe for "Build your third iOS app", if you can teach how to take photos and videos and make use of other sensors on the iPhone?

  • @413blaze
    @413blaze ปีที่แล้ว

    Love your stuff Paul! Thank you!!!!

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

    Hi Paul, I watched this video and the previous one of last year in a row, it's just amazing. Great pedagogy, makes SwiftUI a charm to learn. I've been programming in Swift for 4 years now, using UIKit and I'm really considering moving to SwiftUI completely now that SwiftUI has become so rich (which wasn't the case a couple of years back). Thanks again. When can I be notified when you do a live? is it through the BELL in your youtube channel? Thanks a bunch... BTW, love your dogs too ;)

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

    We're waiting for this year app! Don't forget us :)

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

    Thank you Paul....

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

    Is there a way for you in TH-cam Studio to temporarily disable the chat during quizzes?

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

    Happy Birthday Sir

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

    Hey Paul, I have better luck with the preview if I do a build before I try to unpause the preview. Happy birthday, happy solstice, happy new year
    P.S. Thank you, thank you, thank you! 🙏

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

    Paul, thank so much for these tutorials, they are incredibly useful ... even if it's your fault now I always say D-D-D-D too 😂

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

    done with the 1st one, ok im on for the 2nd one..

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

    hello !i have a problem with image on programm, i see "hello world!" after implementation of all cod until 30 min of video:(

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

    Great video, one thing though: when trying the .searchable() part on the iPad and an iPad Simulator I can't get the search field to pop up the keyboard, works fine on an iPhone and an iPhone simulator. Does anyone else have the same issues?

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

    How did you know you needed to use the .tag()? Why do we need it?

  • @user-ub1wn7yt1d
    @user-ub1wn7yt1d 2 ปีที่แล้ว +2

    can you share code please?

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

    Can anyone tell me how to change it so instead of the all the drinks being on the same screen, you make it so that each category eg, coffee, tea is a button that takes you to a list of all the drinks in that category? cheers

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

    thanks, nice tutorial. It would be nice if it shows date of the order in history. I will try to add that.

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

    Hi Paul! Just finished my first app with you, now onto this one! Loving learning from you! But many troubles with this one... Mainly, and namely: This worked last night. Tried again this morning -- magically cannot load menu.json. This is incredibly frustrating!
    EDIT:
    Well, I've something. It's not quite clear yet, but...
    When following a tutorial in a language you know nothing about, do not allow your OCD to change variable names because that's how you would do it. *Why? Something you don't see or understand might be dependent on those exact spellings!* In this case, I renamed variables that we were dumping from JSON into (those in Menu class for example) to snake_case, not realizing they were being used literally to find a matching string in the JSON. I had a mysterious error that wasn't immediately clear due to our `catch` -> `fatalError` statement in Menu.swift. I'm an idiot. My OCD really needs to chill.
    What I'm currently not clear on is where we tied those variable NAMES to the JSON entries with same name. I would expect to define those variables as strings, then search for a matching string in the json, as you iterate over the whole thing (python is the only language I know, and I started in Jan 22).
    Is the fact that our variable names were taken literally inherent to the decoding of JSON in swift? Is it expecting a swift-defined struct to put the items from JSON in, and the way it knows which JSON item is which is by the names of corresponding vars of the exact same name defined in the struct?

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

    Hey Paul, while I was making this project the menu.json suddenly started giving the fatal error. I deleted the file and copied it again to the app folder but still it is giving me the error and the build is failing.

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

    I missed this live, but it's great stuff Paul, thanks. I'm wondering about the difference between calling Type() and calling Type.init - presumably both create a new object of type Type?

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

      Correction, Type() and Type.init() are the same. But that wasn't the question.
      I'm answering my own question here, but I thought it's worth doing in case anyone else had the same query:
      Type() and Type.init() create a new struct/object
      But Type.init (without the parentheses) is a reference to the constructor. So, at 1:45:26 it is used in line 40, and it's used in place of a callback/closure. 'content' takes a closure or function that returns a view - and this requirement is satisfied by MenuView.init

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

      yes for the most part they are the same, especially went it comes to *init* ializing classes

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

      @@hoagy_ytfc Is there a specific reason to use Type.init instead of Type() in this case? I've not seen it done that way before.

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

    I'll have to convert it to tea... the drink/elixir of the gods..

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

    I got that error from 17:00 but only after maybe 1hr video tutorial and how to fix that error? fatalError("menu.json is missing or corrupt.")

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

      I’m getting the fatal error message when I try to init the class menu
      The file is definitely there.
      I’m doing this in Playgrounds 4.1 on my iPad
      Has there been a change in the JSONdecoder since Paul recorded this or is it a shortcoming of Playgrounds.
      Are you saying that there’s a tip an hour into the video it tells how to fix this error?
      Any ideas would be appreciated
      thanks

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

      Annoyingly, mine was working last night. I closed my laptop, passed out, woke up, it was ALREADY RUNNING in the sim, closed the sim, cmd+R -- fatal error! can't find the menu json. WUT!

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

    Maybe you should get a 2nd screen for the chat.

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

    Hi, can't download assets... link doesn't work

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

      Yes it does. It downloads a ZIP file with the images and JSON

  • @mrd.j.2303
    @mrd.j.2303 2 ปีที่แล้ว

    I've been having some trouble with this one. I have copied the code correct and got an error for .indices I had to fix with "id: \.self". But now I'm having issues with the app actually running and I'm only 50 minutes in. I have an error at @main on the main app file that READ "Thread 1: EXC_BAD_ACCESS (code=2, address=0x7ff7bb19cff8)" I see a lot of stuff here that means absolutely nothing to me as far as this error goes.
    Do you think this was made with an older swift code or Xcode that is not quite compatible with what I'm writing now? (cause I've triple-checked my code to make sure I have the same as you do. but I may check again.) I'm in Xcode 13.4.6 and Swift 5 and SwiftUI.
    I can run the app but it is missing several pictures on the menu screen that are in the assets page. It also gives me an error "No image named 'flat white' found in asset catalog for..." But I have checked the file names and even rewrote the names and added them to the project again.
    I don't know if it is my computer's lack of power either. I am using a 2014 Mac mini with a 2.6 GHz Dual-Core Intel Core i5, 8GB RAM and a 500GB SSD (with 250GB free). No other open applications except for safari and Xcode. I'm not sure what I'm doing wrong and I'm not sure if I should even continue with this project at this point? Or do I need a better computer? Any response is greatly appreciated. I am determined to learn more one way or another.