Gaby Fitcal Gaby Fitcal - 3 months ago 32
iOS Question

Remove the possibility to send small file size?


I trying to share a gif with

. I used code below:

NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil];
NSURL *fileURL = [documentsDirectoryURL URLByAppendingPathComponent:@"animated.gif"];

NSString *text = @"This GIF was created successfully on Gifbooth";
NSData *gifFile=[NSData dataWithContentsOfFile:fileURL.path options:NSDataReadingMappedAlways error:nil];
UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:@[text,gifFile] applicationActivities:nil];

[self presentViewController:controller animated:YES completion:nil];

When i choose to share with email i got this.

enter image description here

I want remove the possibility to send the small file. I just want to send the file with real size.


You are using default MAIL to send the image. You can not control the size of the images. Naturally you can present a very small image to mail, so that it will not come with a popup which image size to use.

Or send the image via another medium.