Here is a little solution that uses the open source programs Soundflower, VLC and SoX.
First of all, you need to install the necessary programs using Homebrew:
brew install sox
brew install --cask soundflower vlc
Choose the Soundflower (2ch) device in the system settings for the sound output such that it can be forwarded to a VLC server which we will set up next. (Note, that this mutes the internal speakers/headphone jack.) By checking "Show volume in menu bar", you can also change the output device by alt-clicking the menu bar item more conveniently.

Now, run the VLC server:
sox -t coreaudio "Soundflower (2c" -t mp3 -C 96 -q - | \
vlc - --sout "#standard{access=http,mux=ogg,dst=localhost:8080}" --intf dummy
You can adapt the quality and bit rate with the -C
switch (see the SoX documentation). Remove -q
to get visual feedback about whether sound is playing.
Finally, on your iOS device, install the iOS VLC client. In the side menu, choose Network Stream and enter http://[YOUR-LOCAL-IP]:8080
to start the stream.
Caveats: This setup is not suitable for real-time applications like gaming or chat because there is a ~2 seconds lag. However, it can be used for watching videos in VLC by shifting the sound track to account for the lag (Window > Track Synchronization).