Posts

Post not yet marked as solved
2 Replies
128 Views
Hello Everyone, I am having a problem here with my app. I developed a timer that play a sound .mp3 and the sound play every time that the timer start and finish. Everything works very well in the simulator but not on the devices after I distribute the build and install using the testflight. I saw the build content and the file is inside. However, I have no idea what I am doing wrong (if it is some option that i forgot to check or some problem in my code). Please, somebody can help me? Here is the func with the path. (I inserted the sound on the root) in the same place that we can find the Contentview. func playFinishSound() { guard let url = Bundle.main.url(forResource: "finish_sound", withExtension: "mp3") else { return } do { player = try AVAudioPlayer(contentsOf: url) player?.play() } catch { print("Error playing finish sound") } } } Thank you very much for your help. I appreciate. Antonio
Posted
by Antoniojr.
Last updated
.