Error while sending email on iOS app with unity

后端 未结 1 740
借酒劲吻你
借酒劲吻你 2021-01-27 11:14

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.

相关标签:
1条回答
  • 2021-01-27 11:45

    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"/>
    
    0 讨论(0)
提交回复
热议问题