iphonensdataalassetassetslibrary

iphone: NSDATA dataWithContentsOfURL returning null


I have a problem of getting NSData via [NSData dataWithContentsOfURL: url] and giving me an null object where the url is the NSURL got it from defaultRepresentation of the asset.. The url in the NSURL is :

assets-library://asset/asset.JPG?id=1000000366&ext=JPG

I went to other forum, they talked about something like file url... Do I have to convert the url to file path ?

But i can have the thumbnail of the ALAsset on a view.

Does anyone know why i get null NSData object?


Solution

  • from what I know these URLs are just for identification or so - you cannot actually access them.

    maybe this helps ? ALAsset , send a photo to a web service including its exif data