In my iphone app there is some confidential data like username, password and some urls to a webservice. Which one is better NSUserdefaults or keychain. Somebody says NSUser
I would recommend you to use Keychains. Using Keychain, you can store your password in encrypted form. Take a look at Apple's GenericKeychain sample.
NSUserDefaults is a little less secure when compared with Keychain. In NSUserDefaults data can accessed easily if the specific key is known. This is not the case in Keychain.
You can also convert NSUserDefaults to Keychains. Take a look here.