title: Parse login issue invalid login parameters
body: <p>when i try to login to Parse on ios simulator using my app id and client id it shows "invalid login parameters (Code: 101, Version: 1.8.2)" but when i tried Udemy's ios tutor's app id and client id it was  worked. My code is alright and i think the problem is in Parse. Is there anybody has had an issue like this?</p>
  
  <p>import UIKit
  import Parse
  import Bolts</p>
  
  <p>class ViewController: UIViewController {</p>
  
  <pre><code>var signUp = true // for creating current mode of the page
  
  @IBOutlet weak var username: UITextField!
  
  
  @IBOutlet weak var password: UITextField!
  </code></pre>
  
  <p>// login iv outlet</p>
  
  <pre><code>@IBOutlet weak var signUpB: UIButton!
  @IBOutlet weak var loginB: UIButton!
  @IBOutlet weak var registerText: UILabel!
  var activityIndicator:UIActivityIndicatorView = UIActivityIndicatorView() // for spinner
  
  //for displaying alert 
  func displayAlert(title:String,message:String){
  
      var alert = UIAlertController(title:title, message: message, preferredStyle: UIAlertControllerStyle.Alert)
      alert.addAction((UIAlertAction(title: "ok", style: .Default , handler: { (action) -&gt; Void in
  
          self.dismissViewControllerAnimated(true, completion: nil)
  
      })))
  
      self.presentViewController(alert, animated: true, completion: nil)
  
  
  }
  
  @IBAction func signUp(sender: AnyObject) {
  
      if username.text == "" || password.text == "" {
  
      displayAlert("Error in form", message: "Please enter username and password")
  
  
  
      }
  
      else  {
  
          activityIndicator = UIActivityIndicatorView(frame: CGRectMake(0, 0, 50, 50))
          activityIndicator.center = self.view.center
  
          activityIndicator.hidesWhenStopped = true
          activityIndicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray
          view.addSubview(activityIndicator)
          activityIndicator.startAnimating()
          UIApplication.sharedApplication().beginIgnoringInteractionEvents()
  
          var errorMessage = "Please try again later"
          if signUp == true
          {
  
          var user = PFUser()
          user.username = username.text
          user.password = username.text
  
  
          user.signUpInBackgroundWithBlock(
  
              {(success, error) -&gt; Void in
  
              self.activityIndicator.stopAnimating()
  
              UIApplication.sharedApplication().endIgnoringInteractionEvents()
  
              if error == nil
              {
              // sign up successful
              }
              else  {
                  if let errorString = error!.userInfo?["error"] as? String
                  {
  
                      errorMessage = errorString
                  }
                  self.displayAlert("Failed ", message: errorMessage)
  
                     }
  
                })
            }      else  {
  
  
                         PFUser.logInWithUsernameInBackground(username.text, password: password.text, block:
                          { (user, error) -&gt; Void in
  
                              self.activityIndicator.stopAnimating()
  
                              UIApplication.sharedApplication().endIgnoringInteractionEvents()
  
                              if user != nil
                                    {
                                       //  logged in
                                     }
  
                              else   {
  
  
                                  if let errorString = error!.userInfo?["error"] as? String
                                  {
  
                                      errorMessage = errorString
                                  }
                                  self.displayAlert("Failed Login", message: errorMessage)
  
  
                                      }
  
                           })
                          }
  
  
  
              }
  
  
  
         }
  
  @IBAction func login(sender: AnyObject) {
      if signUp == true {
  
          signUpB.setTitle("Login", forState: UIControlState.Normal)
  
          registerText.text = "Not Registered?"
          loginB.setTitle("Sign Up", forState: UIControlState.Normal)
  
          signUp = false
      }
  
      else{
  
          signUpB.setTitle("Sign Up", forState: UIControlState.Normal)
  
          registerText.text = "Already Registered?"
          loginB.setTitle("Login", forState: UIControlState.Normal)
  
          signUp = true
  
      }
  
  }
  
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  </code></pre>
  
  <p>}</p>