I want to save video to my app document from asset url. My asset url is as follows:-
"assets-library://asset/asset.MOV?id=1000000394&ext=MOV"
I tried this:-
NSString *str=@"assets-library://asset/asset.MOV?id=1000000394&ext=MOV";
NSData *videoData = [NSData dataWithContentsOfURL:[NSURL URLWithString:str]];
[videoData writeToFile:mypath atomically:YES];
but on the second line [NSData dataWithContentsOfURL:[NSURL URLWithString:str]] i got program crash with this reason:- Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURL length]: unrecognized selector sent to instance
I want to know how to access asset video url.
Thanx for any help.