AVAudioPlayer is Not playing iOS swift 3


Not able to play the sound when try to play the sound using below code

            player.play()



You must have to set the delegate to the player.

            player.delegate = self
           player.play()

Because if you set the delegate then only you can get the delegate methods for that to play the audio.Otherwise it will not be able to get the playing options from the device.

    Comments

    Popular posts from this blog

    Invalid bundle error while upload the app to the app Store

    Convert NsNumber, NSDate to String in iOS Swift

    Global LocationManager Singleton class iOS Swift