Prevent UE4 iOS apps from stopping other app's audio playback on launch

Hi all,

I’ve been having trouble getting anywhere with this. Maybe someone can help me out?

What I Want To do:

  • Let any existing audio playback continue when my UE4 iOS app is launched on an iOS device
  • Allow podcast, music, spotify or whatever to continue playing when my app launches

What currently happens:

  • Any existing audio playback is gracefully stopped in favour of my UE4 iOS app when it launches
  • To continue playbakc of a podcast, musc, spotify etc I must switch apps, then resume playback and return to the UE4 iOS app.
  • After resuming / switching both the first app, and my app can both share the audio playback session and mute / volume etc for my app works as expected

I think this has something to do with the way the UE4 app configures itself on launch. And I believe that is controlled by the AVAudioSession category as described here ?

I don’t know where UE4 initializes the audio device, but it is possible that Config/iOS/iOSEngine.ini might support changes to this (as you can configure some audio parameters in there. Can anyone advise?

My project is Blueprint, and I’m using UE4.22 Launcher installed.

(edit 28/9/19)

Have also asked in iOS forum:
How can I set AVAudioSession for iOS apps to allow device/apps to continue audio playback?

and in audio forum:
Prevent UE4 iOS apps from stopping other app’s audio playback on launch

Not a sausage so far. :frowning:

1 Like

Does Bumping work?

If (Bumping) { ThisPost = Bump; }

:wink:

Bumping did work, but didn’t actually work. So I have rephrased the whole question / topic. Haaaaaalp!

I understand your challenge in maintaining audio playback continuity when launching your UE4 iOS app. This issue is often related to how the AVAudioSession category is configured. In Unreal Engine 4 (UE4), you can adjust this setting to allow other apps’ audio to continue playing when your app launches.

Here’s how you can address this issue in UE4:

  1. Open your UE4 project.
  2. Navigate to the “Config/iOS/iOSEngine.ini” file within your project directory.
  3. Edit this file, and look for audio-related configurations.
  4. In this file, you should find options related to AVAudioSession settings.

You can try setting the AVAudioSession category to “AVAudioSessionCategoryPlayback” to allow your app to coexist with other apps that play audio.

After making these changes, save the file and recompile your UE4 project…