Making an iOS Audio Player the Easy Way

“A black-and-white shot of headphones on a wooden surface” by Corey Blaz on Unsplash

Because puzzling together bits and pieces from around the internet is not fun!

The Quest: Create an Audio player without external libs (well almost)

I have scoured the lengths of the known google space to find all available information about making an Audio Player with Swift and with basic functionalities. Simple right? Well turns out… not so much.

The majority of StackOverflow (SO from now on) handles part of the procedure and usually is split between Obj-C, Swift-2, Swift-3, and a small percentage Swift-4. Articles also suffer from Swift versioning, or lack thereof, and are completely written in Obj-C. Plugins and libraries are also either outdated, written in Obj-C, or unmaintained.

First sub-quest: Make an AudioQueue and play one track.

So here we go, making a simple AudioQueue with…

Read more in Level Up Coding · 4 min read