I use audio recording through the UIActivityViewController. When an audio file is shared by email or iMessage, it shows the base name of the audio file without a visible way to change it.
NSArray *activityItems = [NSArray arrayWithObjects:self.audioPlayer.url, nil]; UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; [self presentViewController:avc animated:YES completion:nil];
If I do not use the UIActivityViewController and just use the MFMessageComposeViewController directly, than I can use
[composer addAttachmentURL:self.audioPlayer.url withAlternateFilename:@"Piano Song.m4a"];
Is it possible to have an alternate file name using the UIActivityViewController?
source share