ios8 - XML Parser issue in iOS 8 -



ios8 - XML Parser issue in iOS 8 -

i working on xml parser, @ same time fetching multiple urls info server. in ios 6,and ios 7 working fine, in ios 8 parser blocked. please check out screenshot.

i using dispatch_queue_t (app.forgroundqueue).

check code here

appdelegate *app = (appdelegate *) [[uiapplication sharedapplication]delegate]; app.isserialqueuerunning =yes; dispatch_async( app.forgroundqueue, ^{ [self setdelegate:adelegate]; self.responsearray =[[nsmutablearray alloc] init]; nsurlrequest *request = [nsurlrequest requestwithurl:[nsurl urlwithstring:[url stringbyaddingpercentescapesusingencoding:nsasciistringencoding]]]; nsurlsession *session = [nsurlsession sessionwithconfiguration:[nsurlsessionconfiguration defaultsessionconfiguration] delegate:self delegatequeue:nil]; nsurlsessiondatatask *task = [session datataskwithrequest:request completionhandler: ^(nsdata *data, nsurlresponse *response, nserror *error) { if (!error) { } else { if ([_delegate respondstoselector:@selector(connectionmessage:)]) { [_delegate connectionmessage:@"parsing fail please check net connection or refresh again"]; } } nsxmlparser *parser = [[nsxmlparser alloc] initwithdata:data]; [parser setdelegate:self]; [parser setshouldresolveexternalentities:no]; [parser parse]; self.allocate=@"no"; }]; [task resume]; });

i had similar problem, seek making sure parse message sent on main queue:

// start on main thread dispatch_async(dispatch_get_main_queue(), ^{ [parser parse]; });

ios ios8

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -