【发布时间】:2013-12-29 00:22:16
【问题描述】:
我正在尝试获取有关 Spotify iOS 应用中当前播放歌曲的信息。场景如下:打开 Spotify iOS 应用,开始播放歌曲。将应用程序置于后台并打开我的 iOS 应用程序。有什么方法可以让我在我的 iOS 应用中的 Spotify 上播放这首歌?
我已尝试使用本文所述的 nowPlayingItem 属性,但没有成功:On iPhone: Find out what song is currently playing? (in the iPod music player)
我已尝试使用本文所述的 [MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo,但它不起作用:Is there a way to access the currently played track while the iPhone is connected to an accessory?
我在苹果开发者论坛上的这篇帖子中看到了同样的问题:https://devforums.apple.com/message/903640#903640。
有人遇到过这个问题吗?您找到可行的解决方案了吗?
谢谢,
【问题讨论】:
-
我不认为这是重复的,因为该问题要求通用解决方案,因此对该问题的任何答案都不能考虑任何可能特定于 Spotify 的 API。
标签: spotify mpnowplayinginfocenter