title: AWS Cognito Sign In in iOS (swift)
body: <p>I am using AWS Cognito. The scenario is very simple. The user is prompt to enter a username, password, email address and phone number. The requirement is that when the user presses Sign Up button, a confirmation email is sent to the provided email address. After confirmation, he gets successfully signed up. </p>
  
  <p><strong>Things did till now:</strong></p>
  
  <p>Created Xcode project and installed the necessary pods. </p>
  
  <p>Set up user pool by following AWS official docs.</p>
  
  <p>Set up configuration by using the following code:</p>
  
  <pre><code>let credentialsProvider = AWSCognitoCredentialsProvider(regionType: .######, identityPoolId: "######")
          let configuration = AWSServiceConfiguration(region: ######, credentialsProvider: credentialsProvider)
  
      AWSServiceManager.default().defaultServiceConfiguration = configuration
  </code></pre>
  
  <p>Used the following code for making users sign up.</p>
  
  <pre><code>@IBAction func SignUpClicked(_ sender: UIButton) {
  
          let userName = textFieldUsername.text
          let emailAddress = textFieldEmailAddress.text
          let phoneNo = textFieldPhoneNo.text
          let password = textFieldPassword.text
          let userPool = AWSCognitoIdentityUserPool(forKey: "myApp")
  
          let name = AWSCognitoIdentityUserAttributeType()
          name?.name = "name"
          name?.value = userName
  
          let phone = AWSCognitoIdentityUserAttributeType()
          phone?.name = "phone_number"
          phone?.value = phoneNo
  
          let email = AWSCognitoIdentityUserAttributeType()
          email?.name = "email"
          email?.value = emailAddress
  
          userPool.signUp(userName!, password: password!, userAttributes: [name!, phone!, email!], validationData: nil)
      }
  </code></pre>
  
  <p>What am I supposed to do next? Did I miss anything?
  I searched a lot but the content found was in objective c or related to signing up using identity providers. So it didn't help!</p>