I'm trying to understand how to handle errors in obj-c on the MediaPlayer and we had someone do some work to do this for us on the AVPlayer but the way that is handled on AVPlayer is different, from what I can see in the documentation, than how errors are handled on the MPMusicPlayerController.
There is something called an MPErrorDomain which is a type of ErrorDomain.
https://developer.apple.com/documentation/mediaplayer/mperrordomain?language=objc
Do I create an observer to listen for when this type of error object occurs?
I am really just looking to understand how to process when one of these errors occur
https://developer.apple.com/documentation/mediaplayer/mperrorcode?language=objc
Ultimately I want to process these error codes https://developer.apple.com/documentation/mediaplayer/mperrorcode?language=objc
Do I create an observer to listen for when this type of error object occurs?
No. You just do stuff and either you get an error or you don't.
Some methods have error parameters in their completion handlers:
https://developer.apple.com/documentation/mediaplayer/mpmusicplayercontroller/2582424-preparetoplay
Apart from that, you'll know you've got an error because the Console will say so (during debugging with Xcode).