How do you save a login beacon locally on a Unity app running on an iPhone or Android?
Is saving a login beacon locally the best way to enable a “remember me” option?
How do you save a login beacon locally on a Unity app running on an iPhone or Android?
Is saving a login beacon locally the best way to enable a “remember me” option?
ina,
I am not 100% sure what you mean by “login beacon”… I assume you mean a some form of login token? If this is the case then you could save this token locally using the PlayerPrefs class.
You should be careful when saving any authentication information. Make sure you are not saving anything that could be detrimental if it falls into the wrong hands.
Was wondering about security concerns with storing login credentials to PlayerPrefs… I suppose the data should be encrypted when stored locally – or is there something else to use to store login info other than PlayerPrefs?
ina,
I think that in the iOS SDK you can store application specific items in the KeyChain, this would probably be the most secure place for them. As far as I know there is no built in function for Unity to access the KeyChain, you would need to write a plugin to do this.
I’m looking for a solution in the keychain direction. From my research, is a feasible way.
Anyone has ever written such iOS plugin to get me started?
There is a simila solution to other mobile platforms such as Android and WP8 to save data securely and persistent from app uninstall?
Thanks!
You can do it with MonoTouch… I’m not sure if the Mono that Unity uses is really MonoTouch so you’d have to play around with it and you’d have to wrap it in precompiler directives because the code likely won’t work in the editor:
http://fizzylogic.nl/2013/10/08/monotouch-by-example-working-with-the-keychain/