I am not able to see any item in UIActivityViewController. I want to share Audio file to Available Sharing options in iPhone device.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDocumentInteractionController_class/Reference/Reference.html
Review this doc, it will help you.
NSString *docPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0];
NSString *filePath = [docPath stringByAppendingPathComponent:@"sound.aac"];//Audio file
NSURL *fileUrl = [NSURL fileURLWithPath:filePath isDirectory:NO];
NSArray *activityItems = @[fileUrl];
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With