Hope you never stop this series! I'm very grateful! you are saving me a lot of time.
@TimelessKronos78 ай бұрын
This is awesome! Thank you so much Peter!
@666MrGamer Жыл бұрын
The code you provided in the video cannot work. The 'Google' button you implemented in the UI has action 'signInWithGoogle' however you made that async later in the video and the code won't compile. Wrapping the action inside a Task is also a bad idea since you have UI code (accessing the root view controller) on a background thread. One way to fix this is to wrap the AuthViewModel in a @MainActor. This solves the issue but keep in mind this will block the UI once the code is waiting for the result from Firebase (since it's await).
@danielwatson6529 Жыл бұрын
did u come up with a solution? or did u implement another way
@666MrGamer Жыл бұрын
@@danielwatson6529 Yeah my previous statement was actually wrong. It's perfectly good enough to just wrap the viewmodel class in a '@MainActor' and everything should be good to go. This property wrapper makes sure all UI updates are done on the main thread.
@alanwalker1067 Жыл бұрын
Can you demonstrate how to log into MacOS using Google credentials?