Tutorial :How do save username and password in my twitter application in iphone


i am integrating twitter in my iphone music application.When the user enters username and password in the login dialog box of twitter and clicks on the post button the user is redirected to updatecontroller page where he can post his comments on the twitter and when he returns backand clicks on another songs his username and password is lost.So, i need help that when user click on the save username and password button his username and password should be saved. please help me regarding this problem.


When you want to save username and password call writeToFile defined in NSSString, on a need basis you can even encrypt username and password before writing to file.

Updated: you can go for "Protected Files" in iPhone. You can do this using NSData and NSFileManager.


You can use Keychain to store secure data. See Keychain Programming Guide for details on how to use it.


I'm trying to do the exact same thing, I've found an interesting tutorial on getting it done with keychain access but not sure if I want to dive into it, seems complicated :)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »