Is there an equivalent code to this (code below) for iOS6 UIActivityViewController? The question is, can I share data via url and preserve the file name? As of now the only way I can figure out how to do it is to convert the PDF to NSData and add the data as an activityItem. Works fine, but I lose the name of the attached pdf.
[composer addAttachmentData:pdfData mimeType:@"application/pdf" fileName:@"myPDF.pdf"];
yes I think it is possible, try this
NSString *str = [[NSBundle mainBundle] pathForResource:@"AppDistributionGuide" ofType:@"pdf"];
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"Test", [NSURL fileURLWithPath:str]] applicationActivities: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