Search code examples
iosswiftswift2nsbundle

Find path for local video in Xcode Project


I need to play locally stored Videos in my iOS app.

The videos are located in the directory: App/Resources/Videos/

When I try to get the path with:

NSBundle.mainBundle().pathForResource("myFile", ofType: "mp4", inDirectory: "App/Resources/Videos/")

I get nil. Any advice?


Solution

  • Problem solved: the error was I didn't add the Target-Membership for the Videos.