Given the name of a file in the bundle, I want load the file into my Swift app. So I need to use this method:
let soundURL = NSBundle.mainBundle().URLForReso
In Swift you can change to NSString to get extension faster:
NSString
extension String { func getPathExtension() -> String { return (self as NSString).pathExtension } }