(iOS) Is there a way for an app to open the iTunes music player app (preferably going straight to the Now Playing screen)?

[亡魂溺海] 提交于 2019-12-18 12:44:36

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!