Question

I'm trying to find the last time a podcast was played using MPMusicPlayerController.

Using the built in iPod player on iOS, when a podcast is played and then the user changes to a different media item (could be a song, podcast, audiobook, etc.) the system remembers where the podcast was left and when it is replayed it will play it from that moment.

Is there any way to access this information? In my app, I have a user select a podcast but it always plays from the beginning and not from where it last left off.

Any ideas?

Was it helpful?

Solution

Unless you're interested in mucking around with private frameworks (which you shouldn't do if you have any plans of releasing this to the App Store), then no, there's no way of doing so. You can track when a podcast is played in your app itself manually (obviously), but you can't check when it was last played by another app, until Apple decides to add that functionality to the API. The MPMusicPlayerController class is pretty light on functionality right now, unfortunately.

OTHER TIPS

The last played location is the MPMediaItem's bookmark time. There's a working podcast example app at http://github.com/DavidPhillipOster/podbiceps

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top