How to get list of all Image files in Watchkit Extension

216 views Asked by At

I added images file to Watchkit Extension like this:

enter image description here

I want to get all images file Path of those Images. How can I do that? I tried

let applicationDic = NSFileManager.defaultManager().URLsForDirectory( NSSearchPathDirectory.ApplicationDirectory, inDomains: NSSearchPathDomainMask.UserDomainMask)[0] as! NSURL
println("document:\(applicationDic)")
1

There are 1 answers

0
CoolPenguin On

This answer is if you don't need to do it programmatically: right click (command click) the photo, press "Open with external editor," and then on the right side of the screen you will see "Full Path" about an inch or two down the screen. That is the path to that photo!