Question

PLEASE! This has been driving me crazy for hours. I know its possible to share video to Facebook,twitter ... through UIActivityViewController. PLEASE somebody tell me how to do it!!

Was it helpful?

Solution

Simply use the ALAsset object and pass it in:

ALAsset * asset = [[ALAsset alloc] init];
[asset setVideoAtPath:urlToVideoFile completionBlock:NULL];
NSArray * activityItems = @[asset];
UIActivityViewController * activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:NULL];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top