Product: Apryse SDK for iOS
Product Version: “PDFTron.iOS” Version=“11.2.0”
We’re using PTTabbedDocumentViewControllerDelegate and PTDocumentController to display PDFs. Tapping our share button invokes UIDocumentInteractionController with a valid file URL (activeTab.SourceURL) to present the “Open In” menu. On iOS 18.3, this opens a blank or stale Files app UI when clicked on Save to Files, which does not respond or dismiss correctly.
Sample Logic :
void ShowMoreInfo(object sender, EventArgs args)
{
var activeController = tabControl?.SelectedViewController as PTDocumentController;
if (activeController?.View == null || activeController.DocumentTabItem is not PTDocumentTabItem activeTab)
{
return;
}
var interactionController = UIDocumentInteractionController.FromUrl(activeTab.SourceURL);
interactionController.Name = activeTab.DisplayName ?? activeTab.SourceURL.LastPathComponent;
CoreGraphics.CGRect rect;
if (DeviceInfo.Idiom == DeviceIdiom.Tablet)
{
rect = new CoreGraphics.CGRect(new CoreGraphics.CGPoint(activeController.View.Bounds.Width / 2, activeController.View.Bounds.Height), CoreGraphics.CGRect.Empty.Size);
}
else
{
rect = activeController.View.Bounds;
}
interactionController.PresentOpenInMenu(rect, activeController.View, true);
}
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems you’re experiencing issues with the “Save to Files” functionality when using Apryse’s iOS SDK and the UIDocumentInteractionController. This behavior often occurs due to incorrect file URL handling or issues with the UIDocumentInteractionController setup.
Some things you can try:
Ensure the file URL is fully accessible and points to a valid location. You can verify the file URL is correct by checking if the file exists at the path before presenting the UIDocumentInteractionController.
Confirm that the file at the specified URL is not being locked or accessed by another process, which might prevent it from being shared correctly.
Check if the document interaction controller is being retained correctly. It should be a persistent instance variable, not a local one, to avoid being deallocated prematurely.
Ensure your app has the necessary permissions to access the file, especially if it’s stored in a location that requires specific entitlements.
Thank you for reaching out to the Support forum. If you can submit a minimal runnable sample, along with reproduction steps to reliably and consistently reproduce the issue, we’ll be able to investigate further. You can submit a support ticket here: Submit a ticket : Apryse
I look forward to your response.