Ios App Development appending pdf

Hi all,
I’m working on an application that needs to integrate with our Mattermost server. I’ve included the default share menu from Apple, and when I keep out appending a PDF to the message, I have the option to post it MatterMost. However, I need to pass the PDF generated from the application to the MatterMost server.

I’m calling:

Once this line is put in to my array, the MatterMost option disappears.

Can someone point me in the right direction?