Skip to content

Instantly share code, notes, and snippets.

@icomkid
Created June 2, 2011 07:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icomkid/1004042 to your computer and use it in GitHub Desktop.
Save icomkid/1004042 to your computer and use it in GitHub Desktop.
[iOS] Convert a bundle resource path to URL
NSString *resourcePath = [[NSBundle mainBundle] pathForResource:@"intro" ofType:@"mov"];
NSURL *url = [NSURL fileURLWithPath:resourcePath];
@MuneebSaeed4
Copy link

and where is tha file "@intro"??
I am trying to give path of an image selected from Photo Library (Simulator) and it is always nil
let URL = NSBundle.mainBundle().URLForResource("(localPath)", withExtension: "JPEG")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment