我正在遵循以下目标:在Objective-C中使用Amazon for iOS app登录进行集成。 Getting started document
现在我的应用程序只有一个视图控制器和一个单击时运行此代码的按钮:
- (IBAction)amznButtonClicked:(id)sender {
NSLog(@"amazon button clicked");
AMZNAuthorizeRequest *request = [[AMZNAuthorizeRequest alloc] init];
request.scopes = [NSArray arrayWithObject:
[AMZNProfileScope profile]];
[[AMZNAuthorizationManager sharedManager] authorize:request
withHandler:^(AMZNAuthorizeResult *result, BOOL
userDidCancel, NSError *error) {
if (error) {
// Handle errors from the SDK or authorization server.
NSLog(@"there was an error %s",[error.description UTF8String]);
} else if (userDidCancel) {
// Handle errors caused when user cancels login.
NSLog(@"User cancelled");
} else {
// Authentication was successful.
// Obtain the access token and user profile data.
NSString *accessToken = result.token;
AMZNUser *user = result.user;
NSString *userID = user.userID;
NSLog(@"Success");
}
}];
}
在xcode中查看内存图并运行内存泄漏仪器。 我看到内存泄漏。 这是否是可接受的泄漏数量?或者我的代码出了什么问题?或者LoginWithAmazon框架的已知问题?