I'm streaming audio from url by AVPlayer class. How can i get data usage counters (bytes) from AVPlayer or by another way. I've tried this iPhone Data Usage Tracking/Monitoring
but can't get data usage only for my application.
Update: also i tried:
self.aPlayer.currentItem.accessLog
AVPlayerItemAccessLog *accesslog = self.aPlayer.currentItem.accessLog;
NSArray *events = [accesslog events];
AVPlayerItemAccessLogEvent *event = [events objectAtIndex:0];
NSLog(@"Number of bytes received %@", [event numberOfBytesTransferred]);
but it doesn't work for me. Events array always empty.