Possible Duplicate:
Save Youtube video to iPhone in the app
Is there any sdk or way to download youtube video with youtube url in iphone programmatically.
Please help me out for the same.
Thanks in advance.
Regards,
Possible Duplicate:
Save Youtube video to iPhone in the app
Is there any sdk or way to download youtube video with youtube url in iphone programmatically.
Please help me out for the same.
Thanks in advance.
Regards,
If you are planning to release that app to AppStore I wouldn't advise you to leave that option. Youtube rules are not permitting that and Apple is following them very much these days although there are apps on AppStore that have that functionality enabled. One of my friends tried to add offline play to his Youtube player app and got rejected because of it.
1) Get the NSURL Object First using url string.
2) Allocate and start an NSURLConnection to fetch the file from the URL. Do not use sendSynchronousRequest:returningResponse:error
3) In the connection:didReceiveResponse: delegate method, create NSData object
4) In the connection:didReceiveData: delegate method, get the data and append it to NSData object
5) play the video using MPMoviePlayerController after getting data.