Build your second iOS app with SwiftUI

  Переглядів 44,410

Paul Hudson

Paul Hudson

2 роки тому

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
@ProVokeGames
@ProVokeGames 2 роки тому
FIRST! HAPPY BIRTHDAY PAUL. You are a hero of mine and please keep up with this fantastic work!
@ChristopherJRoura
@ChristopherJRoura 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.
@sorrowseal
@sorrowseal 2 роки тому
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?
@Zep2000
@Zep2000 Рік тому
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 ;)
@luisgomezreus732
@luisgomezreus732 2 роки тому
Thank you very much Paul. It is a pleasure to watch your videos.
@citizenken8540
@citizenken8540 2 роки тому
Really enjoyed and learnt a lot. Thank you Sir!
@tojal
@tojal 2 роки тому
Great content as always, thanks Paul! 😃
@413blaze
@413blaze Рік тому
Love your stuff Paul! Thank you!!!!
@mrd.j.2303
@mrd.j.2303 Рік тому
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 Рік тому
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
@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! 🙏
@CodeWithoutFocus
@CodeWithoutFocus Рік тому
We're waiting for this year app! Don't forget us :)
@Rethinam81
@Rethinam81 2 роки тому
Happy Birthday Sir
@davehall6001
@davehall6001 24 дні тому
thanks, nice tutorial. It would be nice if it shows date of the order in history. I will try to add that.
@TheTruthSentMe
@TheTruthSentMe 2 роки тому
Is there a way for you in UKposts Studio to temporarily disable the chat during quizzes?
@andrejkling3886
@andrejkling3886 Рік тому
Thank you Paul....
@yunizamyunusyunus2832
@yunizamyunusyunus2832 Рік тому
done with the 1st one, ok im on for the 2nd one..
@PierluigiLuceri
@PierluigiLuceri Рік тому
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 😂
@joshuaboltz
@joshuaboltz 2 роки тому
How did you know you needed to use the .tag()? Why do we need it?
@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?
@hoagy_ytfc
@hoagy_ytfc 2 роки тому
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 роки тому
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 Рік тому
@@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.
@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?
@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
@whitelite7878
@whitelite7878 2 роки тому
hello !i have a problem with image on programm, i see "hello world!" after implementation of all cod until 30 min of video:(
@gavenavichius
@gavenavichius Рік тому
31:03
@user-ub1wn7yt1d
@user-ub1wn7yt1d 2 роки тому
can you share code please?
@Goodandgeeky
@Goodandgeeky 2 роки тому
I'll have to convert it to tea... the drink/elixir of the gods..
@ckarthik2025
@ckarthik2025 9 місяців тому
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.
@ljunq
@ljunq 2 роки тому
Maybe you should get a 2nd screen for the chat.
@gavenavichius
@gavenavichius Рік тому
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 Рік тому
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!
@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 Рік тому
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.
SwiftUI + Metal - Create special effects by building your own shaders
1:16:26
Why I spent $3600 on the iPad Pro M4.
16:12
Mrwhosetheboss
Переглядів 1,6 млн
船长被天使剪成光头了?#天使 #小丑 #超人不会飞
00:28
超人不会飞
Переглядів 27 млн
Артем Пивоваров х Klavdia Petrivna - Барабан
03:16
Artem Pivovarov
Переглядів 6 млн
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
The Last SwiftData Tutorial You Will Ever Need
1:09:25
Rebeloper - Rebel Developer
Переглядів 4,3 тис.
Xcode Tutorial - Step by Step for Beginners
56:52
CodeWithChris
Переглядів 305 тис.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Переглядів 3,4 млн
How much Money does my Free Mobile Game Make?
8:26
Sam Hogan
Переглядів 11 млн
I Built an App From Scratch in 24 Hours!
8:37
Logan Koshenka
Переглядів 2,1 тис.
MatchedGeometryEffect in SwiftUI
26:31
Stewart Lynch
Переглядів 4,7 тис.
SwiftData CloudKit Sync - The Complete Guide
1:02:38
azamsharp
Переглядів 6 тис.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Переглядів 3,3 млн
Игровой ноутбук за 100тр в МВИДЕО
0:58
KOLBIN REVIEW
Переглядів 254 тис.
The PA042 SAMSUNG S24 Ultra phone cage turns your phone into a pro camera!
0:24
I wish I knew this When Istarted Programming #school #software  #codingtips
0:34
Claude Ams - Programming Guru 💻
Переглядів 13 млн
iPhone - телефон для нищебродов?!
0:53
ÉЖИ АКСЁНОВ
Переглядів 3,7 млн