Let’s see some useful method about NSURL

Return the name of a file (with or without extension) from NSURLRequest:

Return the file extension from NSURLRequest:

Finally, How to convert an address from NSString to NSURL and vice versa: