AuthService set up error Expected '{' in class #144589
Replies: 2 comments 2 replies
-
The error message "Expected '{' in class" in your In Swift, the correct declaration of an observable object is: class AuthViewModel: ObservableObject { In the screenshot, it looks like there might be a typo with a space in Ensure the line reads: class AuthViewModel: ObservableObject { Make this correction and see if the error persists. |
Beta Was this translation helpful? Give feedback.
-
A mensagem de erro "Esperado '{' na classe" na sua classe AuthViewModel provavelmente é causada por um erro de digitação ou sintaxe. Pelo que foi mostrado na captura de tela, o problema parece estar na declaração do ObservableObject. Em Swift, a maneira correta de declarar um objeto observável é: swift Certifique-se de que a linha esteja escrita assim: swift |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
General
Body
Hi,
So I am trying to set up my authServices to fetch and update user data from my app to the firebase database but I am getting this error even though I also have a } at the end of this code further down below. can anyone help me out and let me know know how to fix?
Beta Was this translation helpful? Give feedback.
All reactions