-2

Iv'e tried using the SwiftySound lib but from some reason it didn't work, Iv'e also tried to play a sound using the AVFoundation but it doesn't seems to work neither (it's wether I get a nil on the url or it's simply doesn't work). the device is not muted and the speakers works fine, does anyone know what it might be?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
nadavs
  • 11
  • 5

1 Answers1

0

Make sure you are adding your sound files to your project and also to your application target. It may be the case that, AVfoundation or SwiftySound not able to find your sound file. Also check out example project of SwiftySound.

pod try SwiftySound

Also check out other similar questions:- iOS Sound not playing in Swift

Aks
  • 1,567
  • 13
  • 23
  • i did check the example of the SwiftySound and it worked fine, Iv'e also checked for application target and it seems fine, what do you mean by "pod try SwiftySound" – nadavs Oct 07 '17 at 16:44
  • To try any pod you can use `pod try PODNAME`. And I was asking, if you have your sound files included in your target. Check Target -> Build Phases -> Copy Bundle resources, and make sure your sound files are listed there. – Aks Oct 07 '17 at 16:46
  • you got it thanks! it wasn't on my bundle resources.. Iv'e been trying to fix it for the last 3 hours thank you! – nadavs Oct 07 '17 at 16:55