UIActivityViewController unable to set subject when sharing to Gmail app : <p>I see via sharing content from other apps that it is possible to set a different subject and body when using share sheet to share into the Gmail Mail app.  I have implemented it and it works fine on the native mail app but not Gmail.</p>

<p>Going into Yelp and sharing a business then choosing gmail from the share sheet, I see that the subject and body are different.  The subject contains the address of the business while the body contains the address + a link to the business on Yelp.</p>

<p>I have tried to replicate this logic with success on the native Mail app but not in the Gmail app.</p>

<p>I have tried the following:</p>

<p><strong>Implementing UIActivityItemSource methods</strong> </p>

<pre><code>UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[self] applicationActivities:nil];

- (id)activityViewControllerPlaceholderItem:(UIActivityViewController *)activityViewController {
    return @"";
}

- (id)activityViewController:(UIActivityViewController *)activityViewController itemForActivityType:(NSString *)activityType {   
    return @"body";
}

- (NSString *)activityViewController:(UIActivityViewController *)activityViewController subjectForActivityType:(NSString *)activityType {
    return @"subject";
}
</code></pre>

<p><strong>Result</strong></p>

<p>Apple Mail Subject set to "subject", Body set to "body"</p>

<p>Gmail Subject set to "body", Body set to "body"</p>

<pre><code>- (NSString *)activityViewController:(UIActivityViewController *)activityViewController subjectForActivityType:(NSString *)activityType 
</code></pre>

<p>Is never called when sharing into the Gmail app.</p>

<p><strong>I then try the more hack way of doing it</strong></p>

<pre><code>UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[@"body"] applicationActivities:nil];
[activityViewController setValue:@"subject" forKey:@"subject"];
</code></pre>

<p><strong>Result</strong> </p>

<p>Apple Mail Subject set to "subject", Body set to "body"</p>

<p>Gmail Subject set to "body", Body set to "body"</p>

<p><strong>Any way to make Gmail Behave like Apple Mail?</strong></p>

<p>Again, I have seen that other applications like Yelp and Safari have gotten the proper behavior out of the Gmail app through share sheet.  Any advice would be appreciated, thanks.</p>
