Skip to content
This repository was archived by the owner on Jan 17, 2023. It is now read-only.
This repository was archived by the owner on Jan 17, 2023. It is now read-only.

Disable NSParameterAssert #139

Description

@akjesto

I want to disable NSParameterAssert in the application

I am using AFOAuth2Manager using pod.

I want to disable the following lines in my project

NSParameterAssert(url);
NSParameterAssert(clientID);
NSParameterAssert(secret);

Please check the following code contain in AFOAuth2Manager.m file

- (id)initWithBaseURL:(NSURL *)url
 sessionConfiguration:(NSURLSessionConfiguration *)configuration
             clientID:(NSString *)clientID
               secret:(NSString *)secret {
    NSParameterAssert(url);
    NSParameterAssert(clientID);
    NSParameterAssert(secret);

    self = [super initWithBaseURL:url sessionConfiguration:configuration];
    if (!self) {
        return nil;
    }

    self.serviceProviderIdentifier = [self.baseURL host];
    self.clientID = clientID;
    self.secret = secret;
    self.useHTTPBasicAuthentication = YES;

    [self.requestSerializer setValue:@"application/json" forHTTPHeaderField:@"Accept"];

    return self;
}

Could you please help me how to resolve this issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions