iOS provides a very secure way to do this via the keychain. It's really the only way to store this type of information so I strongly recommend against rolling your own solution.
If you want to access the keychain you can use one of the many libraries available for this. Here are two: