Convert an NSURL to an NSString
Try this in Swift :
var urlString = myUrl.absoluteString
Objective-C:
NSString *urlString = [myURL absoluteString];
Swift update:
var myUrlStr : String = myUrl.absoluteString
If you're interested in the pure string:
[myUrl absoluteString];
If you're interested in the path represented by the URL (and to be used with NSFileManager
methods for example):
[myUrl path];
In Objective-C:
NSString *myString = myURL.absoluteString;
In Swift:
var myString = myURL.absoluteString
More info in the docs: