play output sound from microphone cable from the speaker in iOS swift

Hi

Is there any code in iOS to play the output sound of a microphone cable from the phone speaker? in real-time

I need a complete sample that works

thank you