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

Disable NSParameterAssert #139

Open
akjesto opened this issue Nov 28, 2019 · 0 comments
Open

Disable NSParameterAssert #139

akjesto opened this issue Nov 28, 2019 · 0 comments

Comments

@akjesto
Copy link

akjesto commented Nov 28, 2019

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant