测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可证 | MIT |
发布最新发布 | 2017年3月 |
SwiftSwift版本 | 3.0 |
SPM支持SPM | ✗ |
由Miklos Kristyan维护。
适用于控制macOS上Spotify的Spotify包装类。
此包装类最初是为SpotMenu创建的。
要使用CocoaPods将Spotify集成到您的Xcode项目中,请在您的Podfile中指定它
platform :osx, '10.10'
use_frameworks!
target '<Your Target Name>' do
pod 'Spotify', '~> 0.1'
end
然后,运行以下命令
$ pod install
import Spotify
// Get current artist
if let artist = Spotify.currentTrack.artist {
print(artist)
}
// Get current track title
if let title = Spotify.currentTrack.title {
print(title)
}
// Play next song
Spotify.playNext()
有关实际示例,请参阅SpotMenu