My application was rejected for 'UIBackgroundModes = {"audio",}'

While a my App was working, I wanted to play a sound of other App.

I got a response by this forum before.

– build.settings

  UIBackgroundModes = {“audio”,},

– main.lua

  if audio.supportsSessionProperty then

    audio.setSessionProperty(audio.OverrideMixWithOthers, audio.MediaPlaybackMixMode)

  end

 

There were no problems with worked.

My application worked while hearing a net radio.

The first version could be released, but it was rejected by the 3rd time of revise.

Apple : Explain why “UIBackgroundModes” is needed.

I explained once again, but he can’t understand yet.

 

Do I misunderstand setting?

Isn’t “UIBackgroundModes” usually necessary to play a sound of other applications at the same time?

If you want  your app to run while listing to other music sources you do not need the UIBackgroundMode = { “audio” }.  This is the setting if your app will play it’s audio while your app is in the background.  

I would remove that from build.settings and resubmit.  If your app plays it’s musics while it’s backgrounded, then you need it and Apple should recognize your app uses backgrounded audio.

Rob

Thank you [member=‘Rob Miracle’];

There is no necessity with which I play a sound by a background for my application.

But when setting is removed, a sound of other applications isn’t heard any more.

– build.settings

  – UIBackgroundModes = {“audio”,},

– main.lua

  if audio.supportsSessionProperty then

    audio.setSessionProperty(audio.OverrideMixWithOthers, audio.MediaPlaybackMixMode)

  end

 

I’d like to play a sound of other applications together.

What kind of setting do I have to do?

You still need the code in your main.lua.  Please be aware that these session properties are unsupported by Corona Labs.  They were added in experimentally.

Rob

Thank you [member=‘Rob Miracle’];

I suspended only “build.settings”.  I live through a cord of “main.lua”.

Only my application can play a sound.

A sound of other applications is suspended by this cord.

I tried variously, but UIBackgroundModes was needed.

“build.settings”

    – UIBackgroundModes = {“audio”,},

“main.lua”

    if audio.supportsSessionProperty then

        audio.setSessionProperty(audio.OverrideMixWithOthers, audio.MediaPlaybackMixMode)

    end

 

Isn’t there a setting method by the current state?

My update just got rejected because of this same issue. I did not change anything in this regards from previous version. 

Reasons

  • 2.16: Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.

----- 2.16 -----

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 did not include features that require persistent audio. 

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.

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 resource, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:

My app allows music to be played from other apps, it would be disaster if I suddenly removed that feature. It’s a turn based game that people open for 20 seconds several times during the day so stopping users music for that is not acceptable.

My build settings:

[lua]

settings = {

    iphone = {

        plist = {

            UIBackgroundModes = {“audio”, “remote-notification”}, 

[/lua]

In my main.lua

[lua]

– Set the audio mix mode to allow sounds from the app to mix with other sounds from the device 

if audio.supportsSessionProperty == true then 

    audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode) 

end 

[/lua]

I know this solution is not official and there was no guaranty that this would work in the future but this is quite critical and will no doubt be the cause of several rejections. 

I sent them a message explaining the use but still rejected:

Reasons

  • 2.16: Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.

Hello Jon,

Thank you for your response. However, this is not an approved use for using the background audio mode for your app. Therefore it would be appropriate for you to remove the audio setting from the background mode.

best regards
-App Review-

We really need a way to allow background audio :frowning:

Sounds like Apple changed their policy.  I’m not sure what can be done.  I’ll alert Engineering, but given that we don’t support these feature …

You could go to the feedback site:  http://feedback.coronalabs.com

and vote up any existing requests or create a new one and start voting it up.

Rob

Hello [member=‘jonjonsson’]; 

Thank you very much for your covering fire.

I’m the same opinion, too, its function wants us.

Hello [member=‘Rob Miracle’];

I understood that this function is the temporary function.

But I want you to consider that an implementation method was introduced by this site.

The introduced way was made the reject target.

The other people who saw and mounted the information should be here, too.

There is a possibility probably made the reject target in the same way by an update.

I think I jumped the gun a little bit. Sorry about that. Had some time finally to investigate more and its not so clear cut.

So skipping _ UIBackgroundModes = {“audio”} _ still enables background music from other apps for me.

@CyberCatfish

have you tried putting this 

[lua]require(‘audio’)  

if audio.supportsSessionProperty then  

    audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)

end  [/lua]

At the very top of main.lua? I did a quick test without the buildSettings UIBackgroundModes and it works.

Let me be extremely clear about this.  

[lua]

if audio.supportsSessionProperty then  

    audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode)

end

[/lua]

 

is an experimental feature that an engineer added several years ago to see what it could do.  He needed people to try it, so its existence leaked. It’s not supported.  We have no intentions on working on this in the future.  We can’t make the same features available for Android.  If you choose to use this and Apple does something to break it, it breaks.  If there are bugs, there are bugs.  I understand this is a nice-to-have feature and if you are more than welcome to vote for this feature at the feedback site here:  http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5416670-allow-external-music-audio-to-keep-playing-in-back

 

If there is enough interest in this (and it’s not a fixed number of votes as difficulty, cross platform functionality and value have to factor in), then we might do something.

 

Background tasks

 

Background tasks like “audio”, “location” and such are not supported by Corona Labs.  The way we have Lua implemented is tied to the view.  It has to be on screen for.  “audio” is known to work but it doesn’t send information back to Corona like the GPS would.  But it’s still not something we support.  Use at your own risk.  We will not be adding support for this.

 

In this case Apple seems to be requiring you to actually do audio things (like play a podcast) while your app is backgrounded to approve apps that use this mode. 

Thank you, @jonjonsson;

I seem able to settle a problem by your advice.

The insertion location of the cord you pointed out seems to have been a problem.

I mounted a relevant code the next of screen setting.

This seems to have obstructed problem solving.

By-talk…

I learned lua for the first time in corona in an early stage.

I liked these language and environment terribly.

I bought it immediately, developed an application and also participated in a Japanese group aggressively.

But I gave up using it before, And I moved to the other environment.

I’m returning and am trying the environment once again.

Conversation here just keeps me from leaving.

I’d like to say thanks to the person who participates here.

If you want  your app to run while listing to other music sources you do not need the UIBackgroundMode = { “audio” }.  This is the setting if your app will play it’s audio while your app is in the background.  

I would remove that from build.settings and resubmit.  If your app plays it’s musics while it’s backgrounded, then you need it and Apple should recognize your app uses backgrounded audio.

Rob

Thank you [member=‘Rob Miracle’];

There is no necessity with which I play a sound by a background for my application.

But when setting is removed, a sound of other applications isn’t heard any more.

– build.settings

  – UIBackgroundModes = {“audio”,},

– main.lua

  if audio.supportsSessionProperty then

    audio.setSessionProperty(audio.OverrideMixWithOthers, audio.MediaPlaybackMixMode)

  end

 

I’d like to play a sound of other applications together.

What kind of setting do I have to do?

You still need the code in your main.lua.  Please be aware that these session properties are unsupported by Corona Labs.  They were added in experimentally.

Rob

Thank you [member=‘Rob Miracle’];

I suspended only “build.settings”.  I live through a cord of “main.lua”.

Only my application can play a sound.

A sound of other applications is suspended by this cord.

I tried variously, but UIBackgroundModes was needed.

“build.settings”

    – UIBackgroundModes = {“audio”,},

“main.lua”

    if audio.supportsSessionProperty then

        audio.setSessionProperty(audio.OverrideMixWithOthers, audio.MediaPlaybackMixMode)

    end

 

Isn’t there a setting method by the current state?

My update just got rejected because of this same issue. I did not change anything in this regards from previous version. 

Reasons

  • 2.16: Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.

----- 2.16 -----

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 did not include features that require persistent audio. 

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.

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 resource, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:

My app allows music to be played from other apps, it would be disaster if I suddenly removed that feature. It’s a turn based game that people open for 20 seconds several times during the day so stopping users music for that is not acceptable.

My build settings:

[lua]

settings = {

    iphone = {

        plist = {

            UIBackgroundModes = {“audio”, “remote-notification”}, 

[/lua]

In my main.lua

[lua]

– Set the audio mix mode to allow sounds from the app to mix with other sounds from the device 

if audio.supportsSessionProperty == true then 

    audio.setSessionProperty(audio.MixMode, audio.AmbientMixMode) 

end 

[/lua]

I know this solution is not official and there was no guaranty that this would work in the future but this is quite critical and will no doubt be the cause of several rejections. 

I sent them a message explaining the use but still rejected:

Reasons

  • 2.16: Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.

Hello Jon,

Thank you for your response. However, this is not an approved use for using the background audio mode for your app. Therefore it would be appropriate for you to remove the audio setting from the background mode.

best regards
-App Review-

We really need a way to allow background audio :frowning:

Sounds like Apple changed their policy.  I’m not sure what can be done.  I’ll alert Engineering, but given that we don’t support these feature …

You could go to the feedback site:  http://feedback.coronalabs.com

and vote up any existing requests or create a new one and start voting it up.

Rob

Hello [member=‘jonjonsson’]; 

Thank you very much for your covering fire.

I’m the same opinion, too, its function wants us.

Hello [member=‘Rob Miracle’];

I understood that this function is the temporary function.

But I want you to consider that an implementation method was introduced by this site.

The introduced way was made the reject target.

The other people who saw and mounted the information should be here, too.

There is a possibility probably made the reject target in the same way by an update.