Created
November 2, 2011 05:28
-
-
Save yyjim/1332964 to your computer and use it in GitHub Desktop.
MixiSDK problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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