App “Alarmy” is able to play iTunes song from background state… How?

喜你入骨 提交于 2019-11-30 05:27:12

They're using the audio background mode, it's listed in their info.plist. They use the "NoSound.mp3" file in their bundle to play silence, while in the background. They also have a "Sleep music" mode to get them through the AppStore.

For other ways that you can use, check out this article.

if ([[MPMusicPlayerController iPodMusicPlayer] playbackState] == MPMusicPlaybackStatePlaying)
{
       NSLog(@"yes itune Player Sound is on");
}
else
{
      NSLog(@"NO itune Player Sound is not on");
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!