Ok so after the user fills out their details in the Sign in view controller my app crashes after tapping the sign in button; and throws me this error:
'unrecognised selector sent to instance.'
This is what it looks like in my sign in VC.
override func viewDidLoad() {
super.viewDidLoad()
/
print("Sign in loading")
didSignInObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.AWSIdentityManagerDidSignIn,
object: AWSIdentityManager.defaultIdentityManager(),
queue: OperationQueue.main,
using: {(note: Notification) -> Void in
/
})
/
customSignInProviderButton.addTarget(self, action: Selector(("handleCustomSignIn")), for: .touchUpInside)
customCreateNewAccountButton.addTarget(self, action: Selector(("handleUserPoolSignUp")), for: .touchUpInside)
customForgotUserPassword.addTarget(self, action: Selector(("handleUserPoolForgotPassword")), for: .touchUpInside)
customSignInProviderButton.addTarget(self, action: Selector(("UserLogIn")), for: .touchUpInside)
/
let toolBar = UIToolbar()
toolBar.sizeToFit()
let flexibleSpace = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil)
let doneButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.done, target: self, action: #selector(self.doneClicked))
toolBar.setItems([flexibleSpace, doneButton], animated: false)
customUserIdField.inputAccessoryView = toolBar
customPasswordField.inputAccessoryView = toolBar
}
Your code is completely broken. You have said you have redeclared your function as `@objc func handleCustomSignIn() {...}`, but there's no method named `handleCustomSignIn` in your code.
When you write `addTarget`, you need to implement all methods specified in `selector: ...`.
Update your code implementing all the action methods you need and come again with your updated code.