using facebook-facebook-ios-sdk-cf1c2c3, the _sessionDelegate object is freed before my application is moved to the background.
This means that when the application comes to the forefront after the authentication / authorization callback, this method in Facebook.m images calls EXC_BAD_ACCESS:
- (void)fbDialogLogin:(NSString *)token expirationDate:(NSDate *)expirationDate
The insult line in this method:
if ([self.sessionDelegate respondsToSelector:@selector(fbDidLogin)]) { [_sessionDelegate fbDidLogin]; }
I think this is because on Facebook.h, _sessionDelegate is assigned not saved. Therefore, at some point he is released:
@property(nonatomic, assign) id<FBSessionDelegate> sessionDelegate;
Changing the save permission fixes the problem:
@property(nonatomic, retain) id<FBSessionDelegate> sessionDelegate;
Seems too obvious to me. So I have to miss something!
Any ideas?
Thanks a lot, XJ
source share