Mann Mann - 2 months ago 19
Swift Question

Get Bundle reference from Path in Swift

I want to get NSBundle reference from Path in swift.

Like in Objective-c >

NSBundle* languageBundle = [NSBundle bundleWithPath:path];


How we can achieve same in swift .

Answer

This way you can do that in swift:

let languageBundle = NSBundle(path: path)