Hi I have just upgraded my app to iOS 9 and using Facebook's latest SDK (version 4.6) for facebook login.
I am using custom login button hence using the LoginManager class for the same. With the previous version it was working fine but now my app gets crashed whenever I press the login button saying "unrecognized selector sent to instance"
Below is the code I am using in my GameScene class to login.
var fbLogin = FBSDKLoginManager()
func onClickFBLogin(){
let vc = self.view?.window?.rootViewController
fbLogin.logInWithReadPermissions(["public_profile"] as [AnyObject], fromViewController: vc, handler: {(result:FBSDKLoginManagerLoginResult!, error:NSError!) -> Void in
if(error != nil){
print("Facebook login error \(error)")
} else if(result.isCancelled){
print("Facebook login cancelled")
} else{
print("facebook login successful")
if(self.isSaveMeButtonPressed){
print("facebook login successful")
}
}
})
}
The app is crashing with below log on Xcode.
[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:]: unrecognized selector sent to instance 0x7f82e51251e0
Anyone facing the same issue? Or someone who can help me sort this issue?
Thanks in advance.