问题
I would like to be able to launch the iTunes app from my app when I tap a button (note that I mean the actual music player, NOT the iTunes Store or App Store). Preferably I'd like it to go straight to the Now Playing screen. Is there any way to accomplish this?
回答1:
Yes, it is possible to open the iTunes music player to the "now playing" screen using the music://
URL scheme. Found this out rather incidentally while reading this post on how to quickly launch apps using Siri.
Also, here are a few sites that you might find handy if you ever need to answer the question "Can I open Application X with a url?"
- handleOpenURL - a searchable database of iOS apps that accept URLs (and the URL schemes they take). You can submit your apps here.
- Adrian Kosmaczewski's Wiki lists quite a few iOS app url schemes as well.
- app lookup blog has more.
来源:https://stackoverflow.com/questions/8147073/ios-is-there-a-way-for-an-app-to-open-the-itunes-music-player-app-preferably