Error Cannot find « » in scope XCODE

Hello I made an app and I have this error: Cannot find string in scope

I post my code under the message please help me:

Photo: ("

" "title=Capture d’écran 2022-11-21 à 19.16.00.png;width=2036;height=1380")

//

//  AuthviewModel.swift

//  iSpeak

//

//  Created by Sayan on 21.11.22.

//

import Foundation

import Firebase

class AuthViewModel: ObservableObject {

    var manager = FirebaseManager.shared

    

    @Published var isFinishedConnecting: Bool = false

    @Published var isAuth: Bool = false

    @Published var showError: Bool = false

    

    var errorString: String = ""

    var datas: [String: Any] = [:]

    

    var auth: Auth {

        return manager.auth

    }

    

    init() {

        observeAuthentication()

    }

    

    func observeAuthentication() {

        auth.addStateDidChangeListener(handleChangeListener)

    }

    

    func handleChangeListener(auth: Auth, user: User?) {

        self.isFinishedConnecting = true

        self.isAuth = user != nil

    }

    

    func signIn(email: String, password: String) {

        guard checkValue(_string: email, value: "adresse email") else { return }

        guard checkValue(_string: password, value: "Mot de passe") else { return }

        

    }

    

    func createUser() {

        

    }

    

    func checkValue(_string: String, value: String) -> Bool {

      let isNotEmpty = string != "" Error : Cannot find « string » in scope 

        self.errorString = !isNotEmpty ? "" : "Merci d'entrer (value) pour continuer"

        self.showError = !isNotEmpty

        return isNotEmpty

    }

}

Answered by Claude31 in 737036022

That is a duplicate post. Close it and see answer in the other post.

Accepted Answer

That is a duplicate post. Close it and see answer in the other post.

Error Cannot find « » in scope XCODE
 
 
Q