// // ServerData.swift // CarController // // Created by Michael Pivato on 13/4/20. // Copyright © 2020 Michael Pivato. All rights reserved. // import Foundation struct UserKeys{ static let host = "host" static let port = "port" } final class ServerData: ObservableObject{ @Published var host: String = UserDefaults.standard.string(forKey: UserKeys.host) ?? "10.0.0.53" @Published var grpcPort: Int = UserDefaults.standard.integer(forKey: UserKeys.port) func load(){ // Load the server values from settings, if they had been previously saved. } func save(){ // Save the current state to be remembered for next time. } }