本文介绍了STTwitter CFNetwork内部错误NSURLRequest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在查看此链接后 API模式错误我使用纠正了一些代码STTwitter.这消除了一个错误,但让我注意到了一个新的CFNetwork错误.每当我尝试使用getHomeTimelineSinceID或getUserTimelinewithScreenName获取状态时,都会在调试器中弹出错误"CFNetwork内部错误(0xc01a:/SourceCache/CFNetwork/CFNetwork-695.1.5/Foundation/NSURLRequest.mm:798)".调试后,我发现错误在[r异步](STTwitterAppOnly.m的第272行)之后弹出.我进入了verifyCredentialsWithSuccessBlock.

After looking at this link API mode error I corrected some code using STTwitter. This eradicated one error but made me notice a new CFNetwork error. Whenever I try to fetch statuses using either getHomeTimelineSinceID or getUserTimelinewithScreenName, the error "CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-695.1.5/Foundation/NSURLRequest.mm:798)" pops up in the debugger. After debugging I found the error pops right after [r Asynchronous] (line 272 of STTwitterAppOnly.m). I got to this spot by stepping into verifyCredentialsWithSuccessBlock.

我当前正在使用的代码:

The code I am currently using:

   [twitter verifyCredentialsWithSuccessBlock:^(NSString *bearerToken) {

    [twitter getHomeTimelineSinceID:nil
                               count:20
                        successBlock:^(NSArray *statuses) {

                            NSLog(@"-- statuses: %@", statuses);


                            self.twitterFeed = statuses;

                            [self.tableView reloadData];

                        } errorBlock:^(NSError *error) {
                        }];

我也尝试过:

        [twitter getUserTimelineWithScreenName:@"Dandelion_2014"
                              successBlock:^(NSArray *statuses) {

                                  self.twitterFeed = [NSMutableArray arrayWithArray:statuses];

                                  [self.tableView reloadData];

                              } errorBlock:^(NSError *error) {

                                  NSLog(@"%@", error.debugDescription);

                              }];

我不确定是什么原因导致此错误,有人有见识吗?

I'm not sure what is causing this error, does anybody have insight?

推荐答案

我认为我发现了问题.

-[NSURLRequest HTTPMethod]设置为nil时,iOS 8会发出运行时警告.

iOS 8 raises a runtime warning when setting -[NSURLRequest HTTPMethod] to nil.

我更新了 STHTTPRequest STTwitter .

让我知道它是否对您有用.

Let me know if it works for you.

这篇关于STTwitter CFNetwork内部错误NSURLRequest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 20:21