如何在我的 iphone 推特应用程序中保存用户名和密码 [英] How do save username and password in my twitter application in iphone

查看:130
本文介绍了如何在我的 iphone 推特应用程序中保存用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 twitter 集成到我的 iphone 音乐应用程序中.当用户在 twitter 的登录对话框中输入用户名和密码并单击发布按钮时,用户将被重定向到更新控制器页面,在那里他可以在 twitter 上发布他的评论和当他返回并点击另一首歌曲时,他的用户名和密码丢失了.所以,我需要帮助,当用户点击保存用户名和密码按钮时,他的用户名和密码应该被保存.请帮我解决这个问题.

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.

推荐答案

当你想保存用户名和密码时调用 NSSString 中定义的 writeToFile,根据需要你甚至可以在写入文件之前对用户名和密码进行加密.

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.

更新:您可以在 iPhone 中找到受保护的文件".你可以使用 NSData 和 NSFileManager 来做到这一点.

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

这篇关于如何在我的 iphone 推特应用程序中保存用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆