Hi i'm trying to connect my app to Parse and import the SDK to the view controller.
When doing so (import Parse at the top of viewController, i get an error saying "no such module Parse"
here's the code
import UIKit import Parse
class ViewController: UIViewController {
@IBOutlet weak var signupButton: UIButton!
@IBOutlet weak var loginButton: UIButton!
@IBOutlet weak var passwordTextField: UITextField!
@IBOutlet weak var emailTextField: UITextField!
override func viewDidLoad() {
let testObject = PFObject(className: "TestObject")
testObject["foo"] = "bar"
testObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
println("Object has been saved.")
}
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
///saving the email adress and paswword in background
@IBAction func login(sender: AnyObject) {
let emailObject = PFObject(className: "\(self.emailTextField.text)")
emailObject["email"] = "\(self.emailTextField.text)"
emailObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
}
let passwordObject = PFObject(className: "\(self.passwordTextField.text)")
passwordObject["password"] = "\(self.passwordTextField.text)"
passwordObject.saveInBackgroundWithBlock { (success: Bool, error: NSError?) -> Void in
println("successfully signed Up.")
}
}}