NSUserDefaults API is a bad place to store the REST token and any sensitive data.
Since this is not a secure method, there is no encryption. In addition, it can be easily opened and read by reverse.
I suggest you store it in a keychain. The keychain is the best solution, as it is more secure and has encryption. See the IOS Keychain Services Help for more information on implementing keychain-enabled storage.
Also note that this is a rather time-consuming task, and you may be interested in 3-way libraries, key rings. I would recommend you the SSKeychain library or the GenericKeychain Apple sample project as a starting point.
source share