It's iOS.
I would like to know how to get songs that I played in the past through the Apple music app on Swift.
There were many source codes for how to get the songs that were being played, so I understood it somehow, but I didn't know how to get the songs that were played all at once.
swift ios
You can retrieve the date and time that you last played in the MPMediaItem lastPlayedDate property.
I think you can get a history of the songs you played by getting all the songs in MPMediaQuery.songs() and sorting them in the order of lastPlayedDated.
© 2024 OneMinuteCode. All rights reserved.