apple rejection UIBackgroundModes key in Info.plist

  • 1
  • Problem
  • Updated 4 years ago
Hi

The first time i submitted my app apple approves it. But second time i get the below
issues.
My is an ibeacon app that when the app is close or is in background and you are near an ibeacon it sends a location notification with audio (using location notification plugin). It also uses the background plugin.
Has anyone encountered this before and how do you get apple to approve it?

'Your app declares support for audio in the UIBackgroundModes key in your Info.plist but did not include features that require persistent audio'
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Perhaps the reviewer didn't notice the intended feature. Have you contacted them and explained why you need background sound?
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
Hi Petra

Thanks for the quick reply. Ok i will do that.

Joseph
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
Hi petra

Apple reviewer came back with the below response

==
In order to proceed with review, please remove the "audio" setting from the UIBackgroundModes key and resubmit your app for review as we look forward to reviewing your revised app.

Best regards,

App Store Review
==

What do i do?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Sorry, don't know. Seems like they either can't find or don't understand your intended feature.

Also, their response doesn't really convince me that they actually had another close look at your app.
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
Please help

i still got rejected by apple and they still send me the below. Can someone help as to what am i suppose to do in phonegap?

"phoengap 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"
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
i wonder if i have to do like this guy.

http://community.phonegap.com/nitobi/...
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
basically apple wrote this after i did an appeal

Local notifications do not require the usage of audio in the UIBackgroundModes key. This key is used for persistent audio streaming while the app is in the background. It would be appropriate to remove the audio setting from the UIBackgroundModes key.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Joseph,
it appears you have not done your homework on this app. In reading the documentation for UIBackgroundModes. It is not completely clear why you are having this issue - except for possibly the quote at the bottom.

On Apple's comment, they appear to be telling you that - that permission (audio) is use for streaming, and that your playing of an audio sample appears to be incidental, not streaming, and therefore does not require UIBackgroundModes.

To be clear on this point, the documentation is vague and you may want to ask Apple for more clarification. Apple documentation does say,

These keys should be used sparingly and only by apps providing the indicated services. Where alternatives for running in the background exist, those alternatives should be used instead.


As such, since I am no longer actively developing for Apple, then I will see what other comments others have to say.

Jesse
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
hi i wonder because i have this in the config file that's why it causes an issue

audio
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes

<gap:config-file platform="ios" parent="UIBackgroundModes" overwrite="true">
<array>
<string>audio</string>
</array>
</gap:config-file>
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Joseph,
yes, that appears to be the issue. Can you remove that and still play your audio sample in the background?

Jesse
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
hi jesse

before i didn't have that in my config file and yes it works fine. i followed this guy's example but i did audio instead of location. Should i do what he suggested?

https://github.com/katzer/cordova-plu...

location This should overwrite

the plugin UIBackgroundModes key to location instead of audio
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Joseph,
when writing code in the message, click the link just above which says some HTML allowed. You can use <code></code> I'm not sure what your message is saying
Jesse
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
basically i tried again and removed the below from the config file.


<gap:config-file platform="ios" parent="UIBackgroundModes" overwrite="true">
<array>
<string>audio</string>
</array>
</gap:config-file>
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
Hi

I tried the above and apple still rejects my app. they wrote below i honestly don't know what to do


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.

Best regards,
Ellie
App Review Board
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Joseph,
Can you post your config.xml? or place that file some place public so we can look at it?

Thanks
Jesse
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
Below is the config file



<?xml version="1.0" encoding="UTF-8"?>

<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.beaconnected"
version = "1.1.1">

<name>Beaconnected</name>

<description>
Beaconnected application
</description>

<author href="http://phonegap.com" email="support@phonegap.com">
PhoneGap Team
</author>

<!-- Define the main entry-point to the application -->
<content src="index.html" />

<!--
If you do not want any permissions to be added to your app, add the
following tag to your config.xml; you will still have the INTERNET
permission on your app, which PhoneGap requires.
-->
<preference name="permissions" value="none"/>

<!-- Customize your app and platform with the preference element. -->
<preference name="orientation" value="default" /> <!-- all: default means both landscape and portrait are enabled -->
<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<preference name="fullscreen" value="true" /> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="true" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="prerendered-icon" value="true" /> <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
<preference name="stay-in-webview" value="false" /> <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
<preference name="ios-statusbarstyle" value="white-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="detect-data-types" value="true" /> <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
<preference name="exit-on-suspend" value="false" /> <!-- ios: if set to true, app will terminate when home button is pressed -->
<preference name="show-splash-screen-spinner" value="true" /> <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="disable-cursor" value="false" /> <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
<preference name="android-minSdkVersion" value="14" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. -->
<preference name="android-installLocation" value="auto" /> <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarBackgroundColor" value="#FFFFFF"/>
<preference name="StatusBarStyle" value="lightcontent" />
<!--
Define a specific version of PhoneGap to build into your app.
<preference name="phonegap-version" value="3.5.0" />
-->

<!-- Plugins -->

<!-- Core plugins -->
<gap:plugin name="cordova-plugin-whitelist" source="npm"/>
<gap:plugin name="cordova-plugin-dialogs" source="npm"/>
<gap:plugin name="de.appplant.cordova.plugin.local-notification-ios9-fix" source="pgb" />
<gap:plugin name="cordova-plugin-ibeacon" source="npm" />
<gap:plugin name="cordova-plugin-bluetooth-serial" source="npm" />
<gap:plugin name="cordova-plugin-statusbar" source="npm" />
<gap:plugin name="nl.x-services.plugins.socialsharing" source="pgb" />

<!-- Third party plugins -->
<!-- A list of available plugins are available at https://build.phonegap.com/plugins -->
<!-- Define app icon for each platform. -->

<icon src="icon.png" />
<icon src="res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" />
<icon src="res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" />
<icon src="res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" />
<icon src="res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" />
<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi" />
<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi" />
<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi" />
<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" />
<icon src="www/res/icon/windows-phone/icon-48.png" gap:platform="winphone" />
<icon src="www/res/icon/windows-phone/icon-173-tile.png" gap:platform="winphone" gap:role="background" />

<!-- Define app splash screen for each platform. -->
<!--
<gap:splash src="www/res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" />
<gap:splash src="www/res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi" />
<gap:splash src="www/res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi" />
<gap:splash src="www/res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi" />
<gap:splash src="www/res/screen/blackberry/screen-225.png" gap:platform="blackberry" />
-->
<gap:splash src="res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" />
<gap:splash src="res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi" />
<gap:splash src="res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi" />
<gap:splash src="res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi" />
<gap:splash src="res/screen/blackberry/screen-225.png" gap:platform="blackberry" />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" />

<!--iphone 6 -->
<gap:splash src="res/screen/ios/Default-667h@2x.png" gap:platform="ios" width="750" height="1334" />
<gap:splash src="res/screen/ios/Default-Portrait-736h@3x.png" gap:platform="ios" width="1242" height="2208" />
<gap:splash src="res/screen/ios/Default-Landscape-736h@3x.png" gap:platform="ios" width="2208" height="1242" />

<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" />
<gap:splash src="res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" />
<gap:splash src="res/screen/windows-phone/screen-portrait.jpg" gap:platform="winphone" />

<!--
Define access to external domains.

<access /> - a blank access tag denies access to all external resources.
<access origin="*" /> - a wildcard access tag allows access to all external resource.

Otherwise, you can specify specific domains:
-->
<access origin="*"/>
<!--
<access origin="http://phonegap.com" /> - allow any secure requests to http://phonegap.com/
<access origin="http://phonegap.com" subdomains="true" /> - same as above, but including subdomains, such as http://build.phonegap.com/
<access origin="http://phonegap.com" browserOnly="true" /> - only allows http://phonegap.com to be opened by the child browser.
-->
<!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin -->
<!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html -->
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
</widget>

Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
i got a reply from stackoverflow to remove audio background mode. How do i do that?


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.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
You said you removed the config-file entry from config. And indeed, you posted a config without such entry.
But I wonder if you really rebuilt successfully, so your new config was included in your latest version. Could it be that you made a mistake and failed to include that latest config? Or could it be that you had Hydration switched on, so that the config changes were ignored? Another possibility: did you perhaps send an older version to Apple, and not the latest?

BTW: your app won't display splashes correctly, and perhaps Apple will reject it because several required splashes are missing.
Since you specified both orientations, you need to include splashes for both landscape and portrait for all dimensions.
Also, you have included blackberry assets. Why?
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
hi

thanks for the advice.

The first time i uploaded the app it got approved so what i did was i uploaded that old version that got approved again. If that works then i just use that config.xml file
Photo of Joseph Luong

Joseph Luong

  • 55 Posts
  • 0 Reply Likes
thanks for your help

i resubmitted and it's approved. Strange i wonder if like you said the build didn't update the config.xml before.