ASIHTTPRequest在ios8上崩溃了应用程序 [英] ASIHTTPRequest crashes the app on ios8

查看:137
本文介绍了ASIHTTPRequest在ios8上崩溃了应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里我使用JSON来解析数据 ASIHTTPRequest
相同的代码适用于我的较低版本的iOS。 (iOs7及以下)
但我无法在我的iOS-8设备上运行此功能。

Here I am using JSON to parse the data with ASIHTTPRequest The same code is working fine for my lower version of iOS. (iOs7 & below) But I am not able to run this on my iOS-8 device.

日志状况良好,但应用程序崩溃,
可能是来自服务器的迟到回复。
迟到的回复不应该崩溃。

The log is getting well, but the app crashes, may be getting late reply from server. It should not crash for late reply.

iOS-8是否需要为 ASIHTTPRequest ?

Does any new modification required for iOS-8 for ASIHTTPRequest?

较低版本运行良好的相同代码。

Same code for lower version working well.

如果我尝试用调试器检查每个方法,我发现我的代码在这里崩溃:

If I tried to check with debugger ON with each method, I found my code is crashing right here:

-(void)startSynchronous
{
#if DEBUG_REQUEST_STATUS || DEBUG_THROTTLING
    ASI_DEBUG_LOG(@"[STATUS] Starting synchronous request %@",self);
#endif
    [self setSynchronous:YES];
    [self setRunLoopMode:ASIHTTPRequestRunLoopMode];
    [self setInProgress:YES];

    if (![self isCancelled] && ![self complete]) {
        [self main];
        while (!complete) {
            [[NSRunLoop currentRunLoop] runMode:[self runLoopMode] beforeDate:[NSDate distantFuture]];
        }
    }

    [self setInProgress:NO];
}

在循环应用程序崩溃的同时。
我做错了什么??

In while loop app crashes. Am I doing something wrong...?

先谢谢。

推荐答案

我知道,答案已经放在问题的评论中,但以下是我的解释!

I know, the answer has been put there in the Questions' comment, but following is my explanation!

我想知道为什么这些人仍然将AsiHTTP用于他们的项目。
在iOS 5和iOS 6之前或之前,它的开发者已被弃用并放弃了!我也使用过AsiHTTP库,但这只是在我学习开发iOS应用程序的时候,而且仅用于学习目的!

I was wondering why these people still use AsiHTTP for their projects. It's been deprecated and also abandoned by its developer before or around iOS 5 and iOS 6!!! I've also used AsiHTTP library too, but that's only when I was learning to develop iOS apps and that's only for studying purpose only!

更好地开始使用像 AFNetworking ,一个非常易于使用的网络库,同时支持iOS和Mac OS X!

Better start using something like AFNetworking, a very easy to use networking library, which supports both iOS and Mac OS X both!

请参阅以下链接,


  1. http://afnetworking.com/

  2. https://github.com/AFNetworking/AFNetworking

  3. http://www.raywenderlich.com/ 59255 / afnetworking-2-0-tutorial

  1. http://afnetworking.com/
  2. https://github.com/AFNetworking/AFNetworking
  3. http://www.raywenderlich.com/59255/afnetworking-2-0-tutorial

这篇关于ASIHTTPRequest在ios8上崩溃了应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆