ios - unrecognized selector sent to instance at facebook login manager in facebook sdk 4.6 on iOS9 -
hi have upgraded app ios 9 , using facebook's latest sdk (version 4.6) facebook login.
i using custom login button hence using loginmanager class same. previous version working fine app gets crashed whenever press login button saying "unrecognized selector sent instance"
below code using in gamescene class login.
var fblogin = fbsdkloginmanager() func onclickfblogin(){ let vc = self.view?.window?.rootviewcontroller fblogin.loginwithreadpermissions(["public_profile"] [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 crashing below log on xcode.
[fbsdkloginmanager loginwithreadpermissions:fromviewcontroller:handler:]: unrecognized selector sent instance 0x7f82e51251e0
anyone facing same issue? or can me sort issue?
thanks in advance.
for ios 9 have add more keys info.plist. error can related this.
<key>nsapptransportsecurity</key> <dict> <key>nsexceptiondomains</key> <dict> <key>facebook.com</key> <dict> <key>nsincludessubdomains</key> <true/> <key>nsexceptionrequiresforwardsecrecy</key> <false/> </dict> <key>fbcdn.net</key> <dict> <key>nsincludessubdomains</key> <true/> <key>nsexceptionrequiresforwardsecrecy</key> <false/> </dict> <key>akamaihd.net</key> <dict> <key>nsincludessubdomains</key> <true/> <key>nsexceptionrequiresforwardsecrecy</key> <false/> </dict> </dict> </dict>
Comments
Post a Comment