I\'m working on a school project and I\'m trying to log data that is stored from a game that I made in unity.
My problem is that I want to email the data true the app.
This is a bug in IL2CPP. Unity does not have any plan to fix this issue any time soon because there is a temporary solution to fix it.
In your link.xml, add the following to it.
<linker>
<assembly fullname="System">
<type fullname="System.Net.Configuration.MailSettingsSectionGroup" preserve="all"/>
<type fullname="System.Net.Configuration.SmtpSection" preserve="all"/>
<type fullname="System.Net.Configuration.SmtpNetworkElement" preserve="all"/>
</assembly>
</linker>
It is basically telling Xcode to not strip these mail stuff out.
If you don't have link.xml, create it and put the code above in it then place the file in the Asset folder. Rebuild the project.
EDIT:
According to a comment below, it is now required to add the line below too:
<type fullname="System.Net.Configuration.SmtpSpecifiedPickupDirectoryElement" preserve="all"/>