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

Venmo iOS sdk crashing application, when Venmo returning back to app after login to Venmo from safari #87

Open
userdivya opened this issue Jul 27, 2015 · 0 comments

Comments

@userdivya
Copy link

I am using Venmo iOS sdk in my application, i have done pod file installation and all. I have Venmo app id and secret key, using same i am able to login to venmo from the sample app provided by Venmo, but if i use same app id and secret key in my application then it is getting crashed in "startLoading" method in "VENURLProtocol.m" class. Getting '[NSURL queryDictionary]: unrecognized selector sent to instance' this error.

Below is the method in which my app is crashing.This method gets executed after clicking on Allow button on Venmo login page. (in safari)

-(void)startLoading {

NSString *host = [self.request.URL host];

NSLog(@"self.request.URL = %@",self.request.URL);

NSDictionary *queryDictionary = [self.request.URL queryDictionary];  ///////Application is crashing here

if ([host isEqualToString:@"oauth"]) {

    NSString *oAuthErrorCode = [queryDictionary valueForKey:@"error"];

    if (oAuthErrorCode) {
        NSString *oAuthErrorMessage = queryDictionary[@"message"] ?: @"";
        NSError *oAuthError = [NSError errorWithDomain:VenmoSDKDomain
                                                  code:VENSDKErrorTransactionFailed
                                           description:oAuthErrorMessage
                                    recoverySuggestion:@"Please try again."];
        if ([Venmo sharedInstance].OAuthCompletionHandler) {
            [Venmo sharedInstance].OAuthCompletionHandler(NO, oAuthError);
        }

Help me if anyone has used the Venmo iOS sdk and faced this kind of error.

Thanks in advance.

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