Reactive Environment Object Application State (Ep 3 SwiftUI)

  Рет қаралды 21,242

Lets Build That App

Lets Build That App

Күн бұрын

Maps UIKit SwiftUI:
www.letsbuildthatapp.com/cour...
Fullstack Social NodeJS iOS HTML:
www.letsbuildthatapp.com/cour...
AppStore JSON APIs
www.letsbuildthatapp.com/cour...
Tinder Firestore Swipe and Match
www.letsbuildthatapp.com/cour...
Podcasts Course
www.letsbuildthatapp.com/cour...
Facebook Group
/ 1240636442694543
Completed Source Code
www.letsbuildthatapp.com/
Instagram: / buildthatapp
Twitter: / buildthatapp

Пікірлер: 50
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
Solution: For everyone now using SwiftUI2.0 for Xcode 12.0, here's how to get similar environment variables to work without catastrophic threading errors. Note SwiftUI 2.0 for Xcode 12.0 SwiftUI projects do not use nor generate SceneDelegate.swift files. Voong's dated video shows one is required to change this file to avoid threading errors. To avoid a threading error, follow Voong's directions EXCEPT instead of changing the non-existent SceneDelegate.swift go to the new "main file" called YourProjectAPP.swift and add the following: import UIKit //possibly optional import SwiftUI @main struct ProtoTimer3App: App { var body: some Scene { WindowGroup { ContentView().environmentObject(GlobalEnvironment()) //CRITICAL!!! } } }
@Sollica
@Sollica Жыл бұрын
I am actually coding on iPad and was trying to find a workaround but couldn’t, you’re sooooooo helpful! Thank you!
@monicasimonyan1328
@monicasimonyan1328 Жыл бұрын
Omg this comment was life saving
@xxfkee
@xxfkee 4 жыл бұрын
I learned a lot. Many thanks for this tutorial on Environment Objects!! Now I am not any more troubled by how to structure the chaining of data transfer/reference among the views. Environment Objects made my codes much simpler and easier to review later on.
@placideirandora7405
@placideirandora7405 4 жыл бұрын
Thank you for continuing. It's so helpful for iOS development beginners like me.
@rickisyourbro
@rickisyourbro 4 жыл бұрын
nice tutorial! happy chinese new year Brian!
@rabbit_on
@rabbit_on 4 жыл бұрын
Waiting for continuing. Thx.
@Omeir34
@Omeir34 4 жыл бұрын
Always up for a Brian video!
@ecptavares
@ecptavares 4 жыл бұрын
Good as always thank you Brian.
@thebest-yp9xe
@thebest-yp9xe 4 жыл бұрын
You can get the divide (÷) symbol from the Emoji & symbols it's on the top right. left to WiFi or in the keyboard settings, Also I'm waiting for another video how to actually make the calculator work, great videos
@sosumee
@sosumee 4 жыл бұрын
also waiting for a video to make the calculator work, if you want this pleas like this comment so it goes to the top
@TrueNorthStephen
@TrueNorthStephen 4 жыл бұрын
I think it would be good practise to try to make the calculator work by yourself instead of waiting for a video to drop. You will have a better understanding of how swiftui works by coding this part yourself. I was able to do it by changing the code a little and i have no experience using swiftui. Fwiw I used alot of stackoverflow to help debug my code whenever i ran into issues.
@MariusVideoTuts
@MariusVideoTuts 3 жыл бұрын
also, you can get it with "Option + /"
@jamilamini7807
@jamilamini7807 4 жыл бұрын
you helping a lot great videos
@alekseysoldatenkov5675
@alekseysoldatenkov5675 4 жыл бұрын
Two days too late, I just dove into this! It's like a redux store, or an off-shore bank, for laundering all the variables/money you need.
@jkristia2011
@jkristia2011 4 жыл бұрын
great starter tutorial on SwiftUI
@user-cq7yb8us3o
@user-cq7yb8us3o 4 жыл бұрын
Thank you so much 😊 So cool 😎
@pankajkainthla
@pankajkainthla 3 жыл бұрын
Where is the next calculation part?
@chudq
@chudq 4 жыл бұрын
I am not sure if I understanding is correct: 1. Define an environment variable in root class; 2. Use the same environment variable name in all sub-SwiftUI views; and 3. Initiate the environment variable in root class when it is created. Then any changes in env variable will be reflected in SwfitUI views.
@readmoreapp
@readmoreapp 2 жыл бұрын
As always, thank you for easy explanation :) Love from India
@Music-gn1xe
@Music-gn1xe 4 жыл бұрын
perfect .. thank you
@nikhilnangia85
@nikhilnangia85 4 жыл бұрын
I am new with RxSwift, but would it be a nice to go with RxSwift at current time or shall we start learning reactive components in swiftui for better future perspective?
@smackaroony
@smackaroony 4 жыл бұрын
super duper vid
@abhishekbinniwale6145
@abhishekbinniwale6145 4 жыл бұрын
waiting for next video that how actually will make the calculations . And how we will handle the last typed number / last calculation and does next calculation on that .
@hoadambutxinh
@hoadambutxinh 3 жыл бұрын
you really cool, thanks so much for solve my bit problem with @enviromentObject.
@raquelaranda6687
@raquelaranda6687 4 жыл бұрын
Muchas gracias. Soy novata en programación y estoy aprendiendo mucho contigo. Sólo aprendo por gusto. Espero con ilusión el siguiente capítulo. Gracias de nuevo.
@enattudurai
@enattudurai 4 жыл бұрын
i want to render SWIFT UI controls dynamically using the JSON data. on the JSON i can define different controls and swift UI needs to render depends on my JSON. will this posisble?
@LetsBuildThatApp
@LetsBuildThatApp 4 жыл бұрын
This is always a bad idea and I recommend against it.
@technooblogy
@technooblogy 4 жыл бұрын
You can get the divide (÷) symbol easy with the quick kb shortcut: Option + /
@rayanshgupta3202
@rayanshgupta3202 3 жыл бұрын
Thanks
@tannerrozier
@tannerrozier 4 жыл бұрын
Sorry to post this here, but I just watched your Kotlin videos and I am struggling to use picasso to load images from my assets folder, seems like it should be really simple, but I've had no success after hours of trying. I can't comprehend that it'd be easier to load files from the internet than your own device! Also, thanks for all your videos, I have already completed an iOS app that I've made a few hundred dollars off so far haha
@TheseEyesSeeDarknessClearly7
@TheseEyesSeeDarknessClearly7 2 жыл бұрын
Where’s the part where we actually do calculations??
@juanur1990
@juanur1990 2 жыл бұрын
how do I get the delegate app thing?
@kevinprandini
@kevinprandini 2 жыл бұрын
Hey have loved the three tutorials untill here will you be making a follow up video??
@Raahim
@Raahim 2 жыл бұрын
eps 4?
@joeymorque1743
@joeymorque1743 4 жыл бұрын
Pls do ep 4 😊
@sonalikulkarni2938
@sonalikulkarni2938 3 жыл бұрын
When will you give how to calculate numbers man
@gabrielrml
@gabrielrml 3 жыл бұрын
where is E4 please
@legm8034
@legm8034 4 жыл бұрын
Wow he build a calculator awesome!!
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
Solution in replies. Threading error now back, and program fails as of Sept 2020, because Swift Apps don't produce a SceneDelegate.swift file anymore and this must be modified according to video. Anyone know what to do now to avoid threading error?
@LetsBuildThatApp
@LetsBuildThatApp 3 жыл бұрын
I do suggest writing your own environment object code first before trying this. Its actually dead simple once you get an example working.
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
@@LetsBuildThatApp I have, thanks. But, what modification should we make if we want to adapt your otherwise excellent video to the new version of SwiftUI? As you may know there is no SceneDelegate.swift file anymore, instead a "main" file named after the app. I think for this video and the course it advertises to stay relevant it would be helpful to me and you audience if described or linked to the new change that needs to be made to stop threading errors--the one analogous to your SceneDelegate.swift file change.
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
Solution: For everyone now using SwiftUI2.0 for Xcode 12.0, here's how to get similar environment variables to work without catastrophic threading errors. Note SwiftUI 2.0 for Xcode 12.0 SwiftUI projects do not use nor generate SceneDelegate.swift files. Voong's dated video shows one is required to change this file to avoid threading errors. To avoid a threading error, follow Voong's directions EXCEPT instead of changing the non-existent SceneDelegate.swift go to the new "main file" called YourProjectAPP.swift and add the following: import UIKit //possibly optional import SwiftUI @main struct ProtoTimer3App: App { var body: some Scene { WindowGroup { ContentView().environmentObject(GlobalEnvironment()) //CRITICAL!!! } } }
@LetsBuildThatApp
@LetsBuildThatApp 3 жыл бұрын
Yeah, would you like to make a medium post so that I can link to it?
@JJ-fr2ki
@JJ-fr2ki 3 жыл бұрын
@@LetsBuildThatApp Feel free to post it yourself or amend the video description. I'm a bit busy, don't need credit, and this is a tiny helpful hack, not worthy of a Medium post IMHO.
@RupeeInc
@RupeeInc 4 жыл бұрын
CalculatorButotnView
SwiftUI: CalculatorButtons with Enumeration and Switches (Ep 2)
19:02
Lets Build That App
Рет қаралды 23 М.
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 29 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,8 МЛН
iOS 15 Async Await JSON Fetching AsncImage Main Actors
31:28
Lets Build That App
Рет қаралды 14 М.
SwiftUI: Presenting Modals and Bindings with Callbacks
25:17
Lets Build That App
Рет қаралды 25 М.
SwiftUI Calculator - Master Stacking (Ep 1)
12:40
Lets Build That App
Рет қаралды 47 М.
The Complete Guide to NavigationView in SwiftUI
39:18
Paul Hudson
Рет қаралды 129 М.
SwiftUI Fetching JSON and Image Data with BindableObject
22:21
Lets Build That App
Рет қаралды 45 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 347 М.
SwiftUI Firebase Chat 01: Creating a Login Page
26:07
Lets Build That App
Рет қаралды 32 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 237 М.
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 29 МЛН