开发者

iPhone game where user can choose background music

I've noticed some games in the app store that allow th开发者_如何学运维e user to choose background music from their music library (iTunes). As a developer how can I add this functionality to my game?

(Just a link to a tutorial would be great... I've tried searching about 10 times and no luck)


I believe that you are looking for the iPod Library Access Programming Guide, which describes the new features in iPhone OS 3.0 for playing music, video, and even audio books from the user's iPod library on their device. Take note of their one caution in that guide:

iPod library access works only on devices and not in the Simulator. This is because the Simulator has no access to a device’s iPod library. To develop applications using the classes in this technology, you need a provisioned iPhone OS device.

Apple's AddMusic sample application shows how this works.


What's the point?

A game should have his own music or have none.

Allowing him to play music from his library is completely pointless: just allow him to turn the music down and if he wants he can start the media player.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜