I'm trying to configure the "Now Playing" information for my app on iOS. Using MPNowPlayingInfoCenter/MPRemoteCommandCenter is pretty straightforward for this. The issue I'm having is that the audio I'm playing is generated "on the fly" and I do not know the exact duration in seconds.
I am able to synthesize an NSProgress to display the progress of the playback but the units are not in seconds. So if I use the NSProgress units with MPNowPlayingInfoCenter the "Now Playing" shows the units in seconds but it appears to be jumpy (because again my progress units are not in seconds but an approximation of the percent completed).
[playInfo setObject:@(self.progress.totalUnitCount) forKey:MPMediaItemPropertyPlaybackDuration];
[playInfo setObject:@(self.progress.completedUnitCount) forKey:MPNowPlayingInfoPropertyElapsedPlaybackTime];
I see there is a MPNowPlayingInfoPropertyPlaybackProgress which looks like it would be perfect. I tried setting that instead of MPMediaItemPropertyPlaybackDuration/MPNowPlayingInfoPropertyElapsedPlaybackTime but it appears to have no effect in the "Now Playing" UI. I also tried setting MPNowPlayingInfoPropertyIsLiveStream to YES but that just makes the "Now Playing" UI display "Live" instead of the progress value. Is there a way I can show a progress bar without the units being displayed in seconds?
Thanks in advance.