2.16: Multitasking apps may only use background services for their intended purposes: VoIP etc - ios

I created an iBeacon app to detect beacons using phonegap/cordova. How the app works is that once it detects a nearby beacon and the app is closed or running in the background i use local notification which includes an audio (common apple notication sound). I don't know why apple rejects it with the below comment:
2.16: Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
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.
Your app does not provide continuous streaming audio. For details on delivering an audible alert for a local notification, please refer to the About Local and Remote Notifications Programming Guide.
We hope you will consider making the necessary changes to be in compliance with the App Store Review Guidelines and will resubmit your revised binary.

Apple's comment is quite clear. Your app is incorrectly specifying that it needs the audio background mode. But it doesn't. That mode is only to be used to play audio (such as music) while the app is in the background. It is not to be used just to get audio from a local notification.
Remove the audio background mode setting from your app and Apple will be happy.

Even our App received a rejection last week for the same reason.
We didn't even need to submit a new binary. All we did was explained to the reviewer why we were using each of the background modes which we had listed in our plist. We did this by uploading a video in which we explained the purpose of each background mode. And then provided a link of this video in the resolution centre in iTunes connect. The reviewer had a look at it and later approved our app.
So you have to do a similar thing. If you need the background mode(audio in your case). Just explain it's intended purpose to the reviewer in the resolution centre. Else, just upload a new binary with the audio background mode removed from the plist.

Related

Apple doesn't accept submission of the app into the store using just_audio_background package for flutter

I followed the instructions on how to setup an app to use background audio from the just_audio_background package (https://pub.dev/packages/just_audio_background).
Unfortunately in the next app submission to the store, apple declined it with the statement:
In text:
Guideline 2.5.4 - Performance - Software Requirements
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 app was running in the background.
Next Steps
The audio key is intended for use by apps that provide audible content to the user while in the background, such as music player or streaming audio apps. 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.
The background functionality works for both staging and production apps from TestFlight, I can put the app into background or lock the screen and keep listening the audio, play/pause from the Notification Center, but still not accepted by apple.
What is missing from the README file of the package that should be added to get accepted by apple?
This is the screenshot of the player in the Notification Center:
I setup everything as explained in the package readme, they work on TestFlight as expected, but were rejected by apple as described in the question.
So, we just needed to create a video of the background audio functionality working and send it to apple as a reply in the apple review, so the reviewer reconsidered and approved the build to release. Basically we had to show that our app actually has audible content and that it works in background.

Background Audio is enabled but not needed

following the examples, I enabled the Background Audio capability in my app, even though I do not need it. I want simple playback only, with midi triggering sounds (sf2) from the app bundle only, in foreground only. I got everything working and submitted my first version to the App Store and I get complaints from the reviewer saying that if I don't use background audio (so they can't test it) then I should switch it off in the Capabilities. If I do that my foreground audio triggering stops working. Can anyone help in what is the proper way configure AKSettings and the app in this case, so I could pass the app store review?

Playing audio files in background in iOS

I'm trying to find responses to this in Apple's documents, but I don't:
1) Is it technically possible to start playing an audio file when an app goes to background?
2) If technically possible... is it "legal"? Would Apple approve an app that starts playing an audio file without an explicit interaction of the user?
Thanks in advance
An app can start playing an audio file in the background if it is already playing audio before the app goes into the background, has the appropriate audio background mode capabilities key set, and mixes the new audio file into an already playing audio unit, queue or player without stopping. There are plenty of approved apps in the App store that do this (e.g. they sequence through playlists).
An app can't start playing an audio file in the background if it is not already playing or recording audio, as the OS will take away and disable the app's audio session as it goes into the background.
Reports are that apps that play "silence" to get around this restriction are currently being rejected by Apple, although some legacy examples (alarm clocks?) may still exist in the iOS App store. But for private (non-App-store) apps, this trick currently seems to work just fine.
Also, remote notifications can start playing very short audio files contained within an app's bundle, even if the app is in the background without an active audio session.

MIDIDestinationCreate and UIBackgroundmodes

I have written an app which uses midi for playing audio. The app uses MIDIDestinationCreate and enables UIBackgroundmodes as suggested by Apple in the iOS6 release notes.
The App review team have rejected the app because they say that it does not play any sound when put into background mode. They suggested that I change the plist accordingly and uncheck audio/background mode. This of course causes the app to crash when playing the midi and is also mentioned in the question here as well as the iOS6 release notes:
CoreMIDI/PGMidi Virtual midi error in iOS6
Ideally, I don't want it to play music when in the background. When the user puts the app in the background, they've finished.
I replied to the app review team referring them to the iOS6 release notes for MIDIDestinationCreate. This made no difference - they just maintain that audio needs to play while that user has dismissed the app - perhaps like iTunes I guess.
They suggested submitting a DST for an alternative solution- which I have done but there's no reply.
Are there other solutions for playing midi or perhaps ways of appeasing the app review team?
The developer support team replied and there was no issue with the method of implementation.
It seems like the reviewer made a mistake. I lodged an appeal and the App was approved.

My App has been rejected because of UIBackgroundModes

We found that your app uses a background mode but does not include
functionality that requires that mode to run persistently. This
behavior is not in compliance with the App Store Review Guidelines.
We noticed your app declares support for audio in the
UIBackgroundModes key in your Info.plist, but no audible content is
played when the application is in the background. While your intention
may have been to provide this functionality, at the time of review, we
were not able to play background audio for your app.
As indicated in the iOS Application Programming Guide:
"This 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."
Therefore, it would be appropriate to provide audible content to the
user while the app is in the background or remove the "audio" setting
from the UIBackgroundModes key.
For discrete code-level questions, you may wish to consult with Apple
Developer Technical Support. Please be sure to:
include the complete details of your rejection issues
prepare any symbolicated crash logs, screenshots, and steps to reproduce the issues for when the DTS engineer follows up.
For information on how to symbolicate and read a crash log, please see
Tech Note TN2151 Understanding and Analyzing iPhone OS Application
Crash Reports.
If you have difficulty reproducing this issue, please try testing the
workflow as described in "Testing Workflow with Xcode's Archive feature".
So here are my problems/questions:
in the resolution center it told them that they have to start a video
first or else there obviously won't be audio playback in background
mode and also send them a screenshot that it actually works
are they actually to answer me? I've wrote the above about one hour
ago and still got no answer
will i have to resubmit the App and wait another 7 days or can they
still approve the App?
I had the exact same problem and rejection reason.
What I did was file an appeal, citing Technical Q&A 1668, "Playing media while in the background using AV Foundation" (Usually here, but not at the moment), where it explicitly says that the UIBackgroundModes audio key may be used to play video in the background, either over AirPlay, or on a local device by detaching the AVPlayerLayer from the AVPlayer.
About a week later, my appeal was approved and the app was submitted to the store. Not that I ever received an explicit answer from Apple about this. But, the approval was the important part, I guess.
// edit: I filed a radar with Apple asking for an explicit video backgrounding mode a few weeks back. Its on OpenRadar now, if you want to dupe it.
You will not have to resubmit the app, they will respond to you.
https://developer.apple.com/appstore/contact/appreviewboard/index.html
This link will get you to the form for the appeal process, though I assume you have already done this based on info in your post. If you feel like you need an expedited review there is a link for that as well. You just have to make your case, try to be very careful to address every point they make about why your app doesn't meet the guidelines.
I had the same problem and where I was using the UIBackgroundModes key to play videos in background via Airplay. while Technical Q&A 1668, it is clearly mentioned like this
Important: The UIBackgroundModes audio key will also allow apps to stream media content in the background using AirPlay (see also Special Considerations for Video Media).

Resources