title: How to save Name and Password details in Keychain in swift
body: <p>I am using UserDefaults to store and retrieve name and password details but now i want to store name and password details in keychain for security purpose. I have gone through so many tutorials but i do not understand. is it necessary to add any git framework or we can save and retrieve name and  password details manually. if it necessary to add git framework then please suggest me the best keychain framework in swift to store name and password.</p>
  
  <p>below is my code in UserDefaults:</p>
  
  <p>in registration viewcontroller</p>
  
  <pre><code>UserDefaults.standard.set(regNameTextField.text, forKey: "name")
  UserDefaults.standard.set(regPasswordTextField.text, forKey: "password")
  </code></pre>
  
  <p>in login viewcontroller</p>
  
  <pre><code>let storedregName = UserDefaults.standard.value(forKey: "name") as! String
  let storedregPassword = UserDefaults.standard.value(forKey: "password") as! String
  </code></pre>
  
  <p>anyone can guide me here.</p>