Because UILocalNotification is not being displayed while the application is in active stat,  I\'m trying to configure an UIAlertController and play         
        
You already provided the correct solution to your problem and that would be #2; to have a class-level audioPlayer property. Why is this so?
Well, that's because in the code you setup the player, start the playback, show the pop-up and after everything is done, the method exits its scope. The automated memory management (ARC) works so that any local variables get released when you exit the scope of that variable. If you consider that sound playback is asynchronous (eg. it will play without blocking the main thread), you exit the scope before the audio player is finished playing the sound. ARC notices that audioPlayer is a local variable and releases it at that point, but the sound is not done playing yet.
I hope I was clear enough, if not feel free to ask more!