You can just save the raw data from the url without formatting as any particular image.
The file has to have a name because the name is part of the path to the file. If you don't care about the actual name of the file, the easiest way to generate a name is to use NSDate
to generate a timestamp string and use that as the name of the file. If you use the millisecond precision of the timeinterval functions, you have no risk of getting two files with the same timestamp.
Edit01:
From comment:
do u know any method that gets the
filename from a given URL
Check NSURL's methods for accessing parts of urls. Remember that urls do not necessarily have a file name. For example, a url that calls a php script does not have a file name associated with it.
In my experience, you should plan on having to generate part of the file name yourself. Unless you have complete control of the creation of the url, you can never ensure that any file name extracted from the url will be unique. If you give two files the same name in the same directory, writing the second file will overwrite the first.