It looks like subject is used for email and the title in other cases. Some detailed documentation would be great so users understand what is used, where, and when.
The behavior seems a little inconsistent from my testing when using both title and subject. The Android Mail app will append title to the body thus accounting for a repeated subject but on iOS this works as expected. Also, one field is ignored in some cases and both in others.
I realize that this is quite dependent upon the app being used to share but just wondering if we can provide more information for a better understanding?
[iOS] Behavior is different depending on destination app selected.
From trial and error:
const shareOptions = {
subject: 'subject',
title: 'title',
message: 'message',
social: Share.Social.EMAIL,
failOnCancel: false,
urls,
};
Any update on this ? I am also facing this issue with Gmail and Outlook client on iOS with react-native-share 1.1.3 while sharing a PDF file with RN-FETCH-BLOB.
I tried to share a PDF with Outlook (iOS), subject & title are completely ignored, message is pasted into the subject and body, on the contrary file attachment works. I tried to use activityItemSources to maybe access subject and recipient-mail-address but couldn't figure it out.
Also: even when the default mail-app in settings is set to outlook, i can't use Share.single with social set to Share.Social.EMAIL to open Outlook.
Current Setup: "react-native": "~0.63.3",
"react-native-share": "4.1.0",
I hope either this issue gets addressed and fixed or there can be some workaround provided eg. to use the activityItemSources.
Most helpful comment
[iOS] Behavior is different depending on destination app selected.
From trial and error:
const shareOptions = { subject: 'subject', title: 'title', message: 'message', social: Share.Social.EMAIL, failOnCancel: false, urls, };