iOS8 NSXMLParser crash -
i had crash in nsxmlparser
* terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'nsxmlparser not support reentrant parsing.'
here code
nsstring *wrappedsnippet = [nsstring stringwithformat:@"<html>%@</html>", self.snippet]; nsxmlparser *parser = [[nsxmlparser alloc] initwithdata:[wrappedsnippet datausingencoding:nsutf8stringencoding]]; [parser setdelegate:self]; [parser parse];
app crashes on last line.
note, works perfect on ios7!
ios8 throws exception previous versions caught , handled in background.
see manual ios 5 nsxmlparser thread safe not reentrant! make sure aren't calling parse nsxmlparser delegate. "self" in case.
Comments
Post a Comment