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.
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:
Open your UE4 project.
Navigate to the “Config/iOS/iOSEngine.ini” file within your project directory.
Edit this file, and look for audio-related configurations.
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…