Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道如何使用 AVAudioPlayer 从 iPhone 的 iPod 音乐库中播放选定的 .m4a 文件?是否可以将文件导出或复制到 iPhone 的本地 Documents 目录?任何人都可以分享任何示例代码来成功处理这个问题吗?
谢谢
无法使用 avaudioplayer 播放音乐库中的音乐。也没有办法将文件从音乐库复制到应用程序的本地路径。如果您使用 avplayer,您可以访问音乐库。