由于UIBackgroundModes键中的音频,我的应用被拒绝了

时间:2017-07-14 19:27:10

标签: ios iphone swift itunesconnect appstore-approval

我的申请因此问题而被驳回:

  

您的应用声明在UIBackgroundModes键中声明支持音频   您的Info.plist,但我们无法播放任何声音内容   该应用程序在后台运行。

这种拒绝的有趣部分是我在第1版中批准的应用程序!现在在版本1.1中他们拒绝了这个问题!我有一个内置的音乐播放器,当你播放一首歌时,这首歌将继续在后台播放,我甚至发送一个视频片段来声明我的解释,但评论者仍然拒绝我的应用!!!!

解决方案是什么?如果我从Plist中删除the App plays audio or streams audio/video using AirPlay音乐将无法在后台播放!

这是允许在后台播放音乐的代码部分:

//Play music when it's on BG
do {
    try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
    print("AVAudioSession Category Playback OK")
    do {
        try AVAudioSession.sharedInstance().setActive(true)
        print("AVAudioSession is Active")
    } catch let error as NSError {
        print(error.localizedDescription)
    }
} catch let error as NSError {
    print(error.localizedDescription)
}

UIApplication.shared.beginReceivingRemoteControlEvents()

0 个答案:

没有答案
相关问题