Your current implementation stores API keys in UserDefauls what is very unsafe since users can read out this keys very simple what is a huge security whole! Use keychain instead, it's very simple to implement:
// Save the user password into keychain
let keychain = Keychain(service: "com.yourcompany.yourappbundlename")
keychain["user_password"] = "correcthorsebatterystaple"
// Load the user password
let keychain = Keychain(service: "com.yourcompany.yourappbundlename")
let user_password = keychain["user_password"]
Hey,
We'll put your feature request in a pipeline, but with a low priority, since there are lots of much simpler ways to read the key – e.x.: by using a primitive traffic sniffer.
Your current implementation stores API keys in UserDefauls what is very unsafe since users can read out this keys very simple what is a huge security whole! Use keychain instead, it's very simple to implement: