diff --git a/apple/OmnivoreKit/Sources/App/Views/SelfHostSettingsView.swift b/apple/OmnivoreKit/Sources/App/Views/SelfHostSettingsView.swift index 06d7eea87..372dbed51 100644 --- a/apple/OmnivoreKit/Sources/App/Views/SelfHostSettingsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/SelfHostSettingsView.swift @@ -39,16 +39,22 @@ Section("API Server Base URL") { TextField("URL", text: $apiServerAddress, prompt: Text("https://api-prod.omnivore.app")) .keyboardType(.URL) + .autocorrectionDisabled(true) + .textInputAutocapitalization(.never) } Section("Web Server URL") { TextField("URL", text: $webServerAddress, prompt: Text("https://omnivore.app")) .keyboardType(.URL) + .autocorrectionDisabled(true) + .textInputAutocapitalization(.never) } Section("Text-to-speech Server URL") { TextField("URL", text: $ttsServerAddress, prompt: Text("https://tts.omnivore.app")) .keyboardType(.URL) + .autocorrectionDisabled(true) + .textInputAutocapitalization(.never) } Section { diff --git a/apple/OmnivoreKit/Sources/Models/AppEnvironment.swift b/apple/OmnivoreKit/Sources/Models/AppEnvironment.swift index d29e3d8a8..1bf4affc3 100644 --- a/apple/OmnivoreKit/Sources/Models/AppEnvironment.swift +++ b/apple/OmnivoreKit/Sources/Models/AppEnvironment.swift @@ -40,9 +40,9 @@ private enum AppEnvironmentUserDefaultKey: String { public extension AppEnvironment { static func setCustom(serverBaseURL: String, webAppBaseURL: String, ttsBaseURL: String) { - UserDefaults.standard.set(serverBaseURL, forKey: AppEnvironmentUserDefaultKey.serverBaseURL.rawValue) - UserDefaults.standard.set(webAppBaseURL, forKey: AppEnvironmentUserDefaultKey.webAppBaseURL.rawValue) - UserDefaults.standard.set(ttsBaseURL, forKey: AppEnvironmentUserDefaultKey.ttsBaseURL.rawValue) + UserDefaults.standard.set(serverBaseURL.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines), forKey: AppEnvironmentUserDefaultKey.serverBaseURL.rawValue) + UserDefaults.standard.set(webAppBaseURL.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines), forKey: AppEnvironmentUserDefaultKey.webAppBaseURL.rawValue) + UserDefaults.standard.set(ttsBaseURL.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines), forKey: AppEnvironmentUserDefaultKey.ttsBaseURL.rawValue) } var graphqlPath: String {