Memory leak in login with amazon sample ios app

2019-06-14 04:29发布

问题:

I am following the steps to integrate with login with Amazon for iOS app in objective-C. Getting started document

Right now my app has only one view controller and a button that runs this code when clicked:

- (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");
        }
    }];

}

While seeing the memory graph and running the memory leak instrument in xcode. I am seeing memory leaks. Is this acceptable number of leaks? or something wrong with my the code? or a known issue with LoginWithAmazon framework?