Hi to all of you! My channel EvrythingSwiftUI, is dedicated to creating videos on Swift and SwiftUI that make working with the language enjoyable, straightforward, and easy. Here, I attempt to make ideas easier to grasp. My objective is to expand the untapped potential of SwiftUI and simplify complicated projects. For more information or to get in contact with me visit:
hi, I have this error: Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.
Hey there! The reason why you're getting this error is because any changes you are making to the UI need to be in executed in the main thread. To fix this either add "MainActor" to the function which automatically will run that function in the main thread or encapsulate the section where the UI changes is being made with: "DispatchQueue.main.async{}" Please let me know if you need extra help, i will be happy to provide you advice regarding this. Best of luck!
Thank you. I can do this but it will be a tutorial which I will make later on. I am currently focusing on videos which can be utilised everyday when making apps.
this is a copy paste tutorial from AppStuff channel where he is doing the same thing with the same API... Be more original please and create your own content instead of copy pasting stuff
Apologies for you thinking this. If you are to make an API call for cryptocurrency the process will be the roughly the same throughout and also coinGecko is the main api that can be used to download the symbol images.
Hi there! Thank you for the feedback. It is important to note that the reason as to why i did not make my network class of type generic is because i am only working on one data model in this example. Making the network class generic is unnecessary complexity and not needed. As for accepting any type of response, this is usually necessary if i am working with multiple data models. Finally, to handle errors with combine we use "try map" to handle the response, status code, data and more. I will have a video on this later on.