I am quite new to iOS programming, SwiftUI and our beloved AudioKit, so I ran into a problem that seems impossible to solve - but maybe is an easy newbie thing for you more advanced developers.
I need my app to play sound, regardless of whether the iOS device is in silent mode with the dedicated hardware switch. I found in several older postings that the following line is helping to achieve the behaviour I am looking for:
AKSettings.playbackWhileMuted = true
But calling this lets my XCode complain "Cannot find 'AKSettings' in scope". I managed to start the AudioKit engine, and even my DynamicOscillator makes some noise, so AudioKit is there and running but how do I access these settings?
There seems to be no documentation regarding these settings, and I did not find anything in the AudioKit docs, so I feel a little helpless...
It's not in the AudioKit docs because it is a part of AVFoundation. Like @jnpdx said you set the AVAudioSession directly. There is an example in the AudioKit Cookbook here. The part you want to use is AVAudioSession.sharedInstance().setCategory(.playback