I am not able to retrieve NSData from the url that I get from ALAsset
Below is the code I tried:- I always get NSData as nil.
NSData *webData = [NSData dataWithContentsOfURL:[asset defaultRepresentation].url];
I also tried something like this
NSData *webData1 = [NSData dataWithContentsOfURL:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]]];
The url that I get from the ALAsset:-
assets-library://asset/asset.MOV?id=1000000116&ext=MOV
I have tried this below link which works but I need to unnecessary write to a temp location which is very time consuming.
Getting video from ALAsset
Any hint in right direction would be highly appreciated.
Waiting for your replies
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…