Sharing attachments using the Gmail extension
I am trying to use an image in my application using Gmail sharing extension
. Everything works fine, except for the recipient of the email receiving the wrong file.
A sample project can be downloaded from here .
Using iOS 8.3
, Xcode 4.6.3
,Gmail 4.0
The general code looks like this:
UIImage *image = [UIImage imageNamed:@"image"];
NSData *imageData = UIImagePNGRepresentation(image);
UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:@[imageData]
applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];
Here is the list of activities as follows:
Pressing the Gmail button shows:
And the letter comes in like this:
But it's ok if I try to use iOS Mail.app:
+3
source to share
No one has answered this question yet
Check out similar questions: