0
var url :NSURL = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("MTNSoundTrack", ofType: "aif")!)!

The name of my file and the type are double checked, but still it does not work I'm trying to play a background song in swift spriteKit

Dharmesh Kheni
  • 71,228
  • 33
  • 160
  • 165

1 Answers1

0

The problem was that the sound was not part of the target so i simply added it

i took this post as a reference: Adding files to separate targets in Xcode 4

Community
  • 1
  • 1