Is there a way to access the currently played track while the iPhone is connected to an accessory?

后端 未结 4 1574
予麋鹿
予麋鹿 2020-12-29 06:36

I am trying to receive information about the currently played track in a iOS app. This works pretty fine while the iPhone is not connected to an accessory. If I con

4条回答
  •  Happy的楠姐
    2020-12-29 07:04

    I am pretty sure the answer is no, you can't with any public api's at least but you should file a bug with apple for two reasons:

    The reason MPNowPlayingInfoCenter does not give you the info is because it has to be specifically implemented by the app playing the music, if apple's app playing then it should have been implemented so file a bug.

    Now if you say [[MPMusicPlayerController iPodMusicPlayer] playbackState] reflects playback changes then that would mean iPodMusicPlayer is still the app in charge of playback so giving you nil for MPMediaItemPropertyTitle should also be reported to apple as a bug.

    Additionally non public information on the topic is likely covered by the MFi NDA and nobody is going to risk his ass.

提交回复
热议问题