All,
Is there a way to have a minimum time to keep a stream open before it closes? For some reason, my stream is closing prematurely which is causing errors elsewhere. I need to keep it open to make sure ALL of the data is gathered, and then it can run the other code.
Thanks,
James
In the case that someone falls upon this question later, I ended up creating nested if statements to pull it off.
Basically, there is one statement that checks if the end tag is not found (for my code, the END of the ENTIRE data that I should be receiving is
</SessionData>– So, I didif([outputString rangeOfString:@"</SessionData>"].location == NSNotFound). I created a string calledtotalOutputthat would have theoutputStringadded onto the end oftotalOutputuntil the</SessionData>is found.If anyone ever needs help, just go ahead and comment on here and I can give more information.