objective c - Facebook iOS crash -
i trying set facebook sdk 3.5 ios. have gotten work fine crashing. crash seems happen when user logged in through default ios facebook settings (aka not facebook application app store). app crashes when facebook "login" view tapped.
the crash is: error: [nserror fberrorshouldnotifyuser]: unrecognized selector sent instance.
i have done research , people suggesting put -objc "other linker flags". don't have have similar think. needed other options other libraries. here options:
can tell me if causing problem? if not, know causing crash? thanks!
edit
it seem error happening in method on first "if"
- (void)loginview:(fbloginview *)loginview handleerror:(nserror *)error { nsstring *alertmessage, *alerttitle; if (error.fberrorshouldnotifyuser) // crash here { // if sdk has message user, surface it. conveniently // handles cases password change or ios6 app slider state. alerttitle = @"facebook error"; alertmessage = error.fberrorusermessage; } else if (error.fberrorcategory == fberrorcategoryauthenticationreopensession) { // important handle session closures since can happen // outside of app. can inspect error more context // sample generically notifies user. alerttitle = @"session error"; alertmessage = @"your current session no longer valid. please log in again."; } else { // simplicity, sample treats other errors blindly. alerttitle = @"unknown error"; alertmessage = @"error. please try again later."; nslog(@"unexpected error:%@", error); } }
i had same problem. according this
https://developers.facebook.com/docs/ios/errors/#prerequisites
you need set -objc
flag or use fberrorutility
instead of fberror*
i added -objc flag , worked fine.
Comments
Post a Comment