I am trying to create an empty PDF file in Xamarin.IOS using Filestream. When I try to create the Filestream using the following code:
FileStream fs = new FileStream("InvestmentAgreemen.pdf", FileMode.Create, FileAccess.ReadWrite);
I get the following error: "Access to the path "/private/var/containers/Bundle/Application/05AA1616-B66B-483D-8BA1-80A2B1AEC973/NewEPA.app/InvestmentAgreemen.pdf" is denied."
It worked fine when running on the iPad simulator, but as soon as I moved it to a real device I got this permissions error. Additionally, I have to use a filestream to create the empty PDF because I am also using Syncfusion's PDF tools for xamarin.IOS which require the use of Filestream for saving. I also tried creating a FileIOPermission object granting AllAccess to AllFiles but I got a system not allowed error. How can I resolve this permissions error?