Use the official KeyAuth-compatible Swift SDK and point it at your Ghotz API URL. The init call matches KeyAuth; only the base URL and branding differ on self-hosted Ghotz.
let GhotzApp = KeyAuthAPI(
name: "YOUR_APP",
ownerid: "YOUR_OWNERID",
version: "1.0",
url: "https://keyghotz.space/api/1.2/"
)
GhotzApp.init()
if !GhotzApp.response.success { return }
// License key only:
GhotzApp.license(key: licenseKey, hwid: KeyAuthAPI.get_hwid())
// Or username + password:
GhotzApp.login(username: user, password: pass, hwid: KeyAuthAPI.get_hwid())
Note: Never ship your app secret in the iOS client. Use name, ownerid, and version only (same as KeyAuth C# snippet).