Skip to content

Instantly share code, notes, and snippets.

@yyjim
Created November 2, 2011 05:28
Show Gist options
  • Save yyjim/1332964 to your computer and use it in GitHub Desktop.
Save yyjim/1332964 to your computer and use it in GitHub Desktop.
MixiSDK problem
// Mixi.m
- (void)clear {
NSUserDefaults *defaults = [self userDefaults];
[defaults removeObjectForKey:@"clientId"];
[defaults removeObjectForKey:@"expiresIn"];
[defaults removeObjectForKey:@"state"];
[defaults removeObjectForKey:@"accessTokenExpiryDate"];
// yyjim: is this need to do synchronize after removeObjectForKey?
// [defaults synchronize]
[self storeAccessToken:nil refreshToken:nil];
}
// "clear" is only call in logout in this Mixi.m
- (void)logout {
[self clear];
self.accessToken = nil;
self.refreshToken = nil;
self.expiresIn = nil;
self.state = nil;
self.accessTokenExpiryDate = nil;
self.mixiViewController = nil;
}
// MixiWebViewController.m
- (void)dealloc
{
[super dealloc]; // crash here, this method should call in the end
self.url = nil;
self.delegate = nil;
// [super dealloc];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment