I have little experience with Android app development, and close to none with iOS. I'm writing an app that has to store a certain "key", and I would like this key to be stored in a secure way. As secure as possible, with reasonable development effort. The key has to be stored: the whole point is that the user should not need to be online to fetch it from a server.
I'm not sure which is the best solution for each of the two platforms. I've read a bit about Keystore in Android and Keychain in iOS, but I can't quite get how secure they are. Many say none of them is really secure, as an attacker could reverse engineer the app, find a file, get access to... but in the end people have been storing passwords and keys somewhere on PCs for decades, no method is 100% safe, so I fail to understand whether it's just paranoia* when it comes to mobile apps (well, more paranoia than usual) or if mobile platforms are really that much insecure.
Is it reasonably safe to assume that Keystore and Keychain would give me as much security as I would need to protect the key from a not-too-advanced (or expensive) attack?
PS Don't get me wrong, I appreciate security as much as anyone, and I always strive for it. But reading that an app would be "not secure" "because the phone might get stolen" prompts me to question whether we should write software at all :)