I was using this code.
var audioUnit:AudioUnit = AudioUnit()
AudioUnit is a typealais of
AudioComponentInstance which itself is a typealais of
COpaquePointer. Initializing pointers will be removed with Swift 3.0, just set the variable to
AudioUnit() should do the same thing. If your program is crashing with
nil, you probably have a bug somewhere else.