#ios #objective_c #apple
Ребята, у меня в принципе простое приложение. Которое должно проигрывать музыку посредством AVPlayer'a. Вроде все хорошо, сделал чтобы она играла и тогда когда приложение идет в background. Но я все сделал так как Apple говорит Здесь И так: First, declare your application provides specific background services and must be allowed to continue running while in the background. To do this, add the UIBackgroundModes key in your app's Info.plist file. Its value is an array that contains one or more strings that identify which background tasks your application supports. Specify the string value audio to indicate the application plays audible content to the user while in the background: Плюс так: Listing 1 Setting the audio category to allow playback when the screen locks or when the Ring/Silent switch is set to silent. #import#import AVAudioSession *audioSession = [AVAudioSession sharedInstance]; NSError *setCategoryError = nil; BOOL success = [audioSession setCategory:AVAudioSessionCategoryPlayback error:&setCategoryError]; if (!success) { /* handle the error condition */ } NSError *activationError = nil; success = [audioSession setActive:YES error:&activationError]; if (!success) { /* handle the error condition */ } Но сегодня пришел реджект со словами: June 17, 2015 at 6:12 AM От: Apple 2.16 - Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc. 2.16 Details Your app declares support for audio in the UIBackgroundModes key in your Info.plist, but we were unable to play any audible content when the application was running in the background. Next Steps The audio key is intended for use by applications that provide audible content to the user while in the background, such as music player or streaming audio applications. Please revise your app to provide audible content to the user while the app is in the background or remove the "audio" setting from the UIBackgroundModes key. Resources If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions. If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide: - complete details of your rejection issue(s) - screenshots - steps to reproduce the issue(s) - symbolicated crash logs - if your issue results in a crash log Подскажите что не так делаю, запутался если честно(( Заранее спасибо!
Ответы
Ответ 1
В принципе все так как советовал товарищ Sega-Zero. в коде исправил мелкие недочеты написал развернутое сообщение интервьюеру, от том как правильно запустить и зачем, а главное когда нужно воспроизведения музыки в фоне После чего получил одобрение в apple store.
Комментариев нет:
Отправить комментарий