Using this very basic implementation I was unable to reliably obtain progressBlock callbacks.
STTwitterAPI *twitter = [STTwitterAPI twitterAPIWithOAuthConsumerKey:@"..."
consumerSecret:@"..."
oauthToken:@"..."
oauthTokenSecret:@"..."];
_request = [twitter getStatusesSampleStallWarnings:[NSNumber numberWithInt:0] progressBlock:^(NSDictionary *json, STTwitterStreamJSONType type) {
// ... code here was not run even though the network had traffic ... //
} errorBlock:^(NSError *error){
NSLog(@"Error: %@", error);
}];
I traced back the problem to the implementation of getStatusesSampleStallWarnings:..., line # 1463. streamParser was becoming nil seemingly at random. I fixed the bug by referencing self.streamParser for both the test and successive parseWithStreamData:... call.
I am not sure if that is an elegant way to fix it, but it is a workaround for now.
Using this very basic implementation I was unable to reliably obtain
progressBlock
callbacks.I traced back the problem to the implementation of
getStatusesSampleStallWarnings:...
, line # 1463.streamParser
was becomingnil
seemingly at random. I fixed the bug by referencingself.streamParser
for both the test and successiveparseWithStreamData:...
call.I am not sure if that is an elegant way to fix it, but it is a workaround for now.