1234567891011121314151617181920212223 |
- //
- // LoginViewModel.swift
- // Chat
- //
- // Created by Sergey Tarasov on 25.07.2022.
- //
- import Foundation
- import XMPPFramework
- import XMPPFrameworkSwift
- final class LoginViewModel: ObservableObject {
- @Published var login: String = "test11@msg.sharix-app.org"
- @Published var password: String = "test11_-"
- func login(_ completion: @escaping (Bool) -> Void) {
- XMPPController.shared.login(with: login, and: password)
- XMPPController.shared.connect()
- completion(true)
- }
- }
|