1

我在我的应用程序中使用 Venmo iOS sdk,我已经完成了 pod 文件安装和所有操作。我有 Venmo 应用程序 ID 和密钥,使用相同的我可以从 Venmo 提供的示例应用程序登录到 venmo,但是如果我在我的应用程序中使用相同的应用程序 ID 和密钥,那么它会在“startLoading”方法中崩溃“VENURLProtocol.m”类。获取“[NSURL queryDictionary]:无法识别的选择器发送到实例”这个错误。

以下是我的应用程序崩溃的方法。单击 Venmo 登录页面上的允许按钮后,将执行此方法。(在野生动物园中)

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

`

如果有人使用过 Venmo iOS sdk 并遇到这种错误,请帮助我。

提前致谢。

4

0 回答 0