title: Is it safe to do certain things on local side rather than server side?
body: <p>Let's say I have an iPhone app that communicates with a database on a server through a <code>PHP</code> API, and I have problems with saving something like the user id in <code>$_SESSION</code> <a href="https://stackoverflow.com/questions/21868551/session-variables-doesnt-get-saved-when-automatically-logged-in?noredirect=1#comment33109778_21868551"><em>(you know, this can be painful sometimes)</em></a>, so alternatively, I can store it in <code>NSUserDefaults</code> or iPhone keychain, and send it to the server when needed, is it wrong/not safe to do such things on the app side rather than the server side?</p>